//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class PndMvdRecoHit // see PndMvdRecoHit.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 ---------------------- #include "TMatrixT.h" #include "TMath.h" // Collaborating Class Headers -------- #include "CbmMCPoint.h" #include "LSLTrackRep.h" #include "DetPlane.h" // This Class' Header ------------------ #include "PndMvdRecoHit.h" #include "PndMvdMCPoint.h" #include "PndMvdHit.h" #include "PndMvdHit.h" // Class Member definitions ----------- ClassImp(PndMvdRecoHit) PndMvdRecoHit::~PndMvdRecoHit() { delete (fGeoH); } PndMvdRecoHit::PndMvdRecoHit() : RecoHitIfc(fNparHitRep) { fGeoH = new PndMvdGeoHandling(gGeoManager); } PndMvdRecoHit::PndMvdRecoHit(PndMvdMCPoint* point) : RecoHitIfc(fNparHitRep) { // std::cout<<" -I- PndMvdRecoHit::PndMvdRecoHit(PndMvdMCPoint*) called. Only Z-planes available!"<GetX(); _hitCoord[1][0] = point->GetY(); _hitCoord[2][0] = point->GetZ(); TVector3 o, u, v; fGeoH = new PndMvdGeoHandling(gGeoManager); fGeoH->GetOUVId(point->GetDetName(),o,u,v); setDetPlane(DetPlane(o,u,v)); Double_t sigx=0.1/TMath::Sqrt(12); Double_t sigy=0.1/TMath::Sqrt(12); Double_t cost=1., sint=0.; _hitCov[0][0] = cost*sigx*sigx; _hitCov[0][1] = sint*sigx*sigy; _hitCov[1][0] = sint*sigy*sigx; _hitCov[1][1] = cost*sigy*sigy; } PndMvdRecoHit::PndMvdRecoHit(PndMvdHit* hit) : RecoHitIfc(fNparHitRep) { std::cout<<" -I- PndMvdRecoHit::PndMvdRecoHit(PndMvdHit*) called."<GetX(); _hitCoord[1][0] = hit->GetY(); _hitCoord[2][0] = hit->GetZ(); // get covarianve values from the CbmHit part of PndMvdCluster _hitCov[0][0] = hit->GetDx(); _hitCov[1][1] = hit->GetDy(); _hitCov[2][2] = hit->GetDz(); fGeoH = new PndMvdGeoHandling(gGeoManager); TVector3 o,u,v; fGeoH->GetOUVId(hit->GetDetName(), o, u, v); std::cout << "o: " << o.X() << " " << o.Y() << " " << o.Z() << std::endl; std::cout << "u: " << u.X() << " " << u.Y() << " " << u.Z() << std::endl; std::cout << "v: " << v.X() << " " << v.Y() << " " << v.Z() << std::endl; setDetPlane(DetPlane(o,u,v)); } PndMvdRecoHit::PndMvdRecoHit(const TVector3& hit, const TMatrixT& cov, const DetPlane* detplane) : RecoHitIfc(fNparHitRep) { std::cout<<" -I- PndMvdRecoHit::PndMvdRecoHit() called."<& cov, const TVector3& o,const TVector3& u,const TVector3& v) : RecoHitIfc(fNparHitRep) { std::cout<<" -I- PndMvdRecoHit::PndMvdRecoHit() called."<& state) { if (dynamic_cast(stateVector) != NULL) { //I know, since this is the same everytime, it could be done in the //the constructor, but I do it here anyway, to make clear that in the //case of several track-reps per hit, it would have to be done here _HMatrix.ResizeTo(fNparHitRep,5); _HMatrix[0][0] = 1.; _HMatrix[0][1] = 0.; _HMatrix[0][2] = 0.; _HMatrix[0][3] = 0.; _HMatrix[0][4] = 0.; _HMatrix[1][0] = 0.; _HMatrix[1][1] = 1.; _HMatrix[1][2] = 0.; _HMatrix[1][3] = 0.; _HMatrix[1][4] = 0.; _HMatrix[2][0] = 0.; _HMatrix[2][1] = 0.; _HMatrix[2][2] = 1.; _HMatrix[2][3] = 0.; _HMatrix[2][4] = 0.; } else { std::cerr << "PndMvdRecoHit can only handle state" << " vectors of type LSLTrackRep -> abort" << std::endl; throw; } } Double_t PndMvdRecoHit::residualScalar(const AbsTrackRep* stateVector, const TMatrixT& state) { throw; }