//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class PndSdsRecoHit // see PndSdsRecoHit.h for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // Ralf Kliemt TUD (application to PndMvd) // //----------------------------------------------------------- // C/C++ Headers ---------------------- // root Headers ---------------------- //----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class PndSdsRecoHit // see PndSdsRecoHit.h for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // Ralf Kliemt TUD (application to PndMvd) // modified by Elisabetta Prencipe, 19/05/2014 //----------------------------------------------------------- // C/C++ Headers ---------------------- // root Headers ---------------------- #include "TMatrixT.h" #include "TMath.h" // Collaborating Class Headers -------- #include "FairMCPoint.h" #include "RKTrackRep.h" #include "DetPlane.h" // This Class' Header ------------------ #include "PndHypRecoHit.h" #include "PndHypPoint.h" #include "PndHypHit.h" #include "PndHypHit.h" #include "PndHypGeoHandling.h" #include "FairRootManager.h" // Class Member definitions ----------- ClassImp(PndHypRecoHit); PndHypRecoHit::~PndHypRecoHit() { if(fGeoH!=0) delete (fGeoH); } PndHypRecoHit::PndHypRecoHit() : genfit::PlanarMeasurement(fNparHitRep) { fGeoH = new PndHypGeoHandling(gGeoManager); } PndHypRecoHit::PndHypRecoHit(PndHypPoint* point) : genfit::PlanarMeasurement(fNparHitRep) { std::cout<<" -I- PndHypRecoHit::PndHypRecoHit(PndHypMCPoint*) called."<GetX(); fHitCoord[1][0] = point->GetY(); fHitCov[0][0] = 0.01;//cost*sigx*sigx; fHitCov[1][1] = 0.01;//cost*sigy*sigy; TVector3 o(0.,0.,point->GetZ()), u(1.,0.,0.), v(0.,1.,0.); fPolicy.setDetPlane(genfit::DetPlane(o,u,v)); } PndHypRecoHit::PndHypRecoHit(PndHypHit* hit) : genfit::PlanarMeasurement(fNparHitRep) { //std::cout<<" -I- PndHypRecoHit::PndHypRecoHit(PndHypHit*) called."<GetDetName(); FairRootManager* ioman = FairRootManager::Instance(); TString fGeoFile = ioman->GetInFile()->GetName(); fGeoH = new PndHypGeoHandling(fGeoFile.Data()); TVector3 oo, uu, vv; fGeoH->GetOUVId(id, oo,uu,vv); TVector3 position = hit->GetPosition(); TVector3 localpos = fGeoH->MasterToLocalId(position, id); fHitCoord[0][0] = localpos.X(); fHitCoord[1][0] = localpos.Y(); fHitCov[0][0] = 0.0050 * 0.0050; fHitCov[1][1] = 0.0050 * 0.0050; fPolicy.setDetPlane(genfit::DetPlane(oo,uu,vv)); }