//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class TpcXYRecoHit // see TpcXYRecoHit.hh for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Sebastian Neubert TUM (original author) // // //----------------------------------------------------------- // Panda Headers ---------------------- // This Class' Header ------------------ #include "TpcXYRecoHit.h" // C/C++ Headers ---------------------- // Collaborating Class Headers -------- #include "TpcCluster.h" #include "LSLTrackRep.h" // Class Member definitions ----------- ClassImp(TpcXYRecoHit) TpcXYRecoHit::~TpcXYRecoHit() {} TpcXYRecoHit::TpcXYRecoHit() : AbsRecoHit(NparHitRep) {} TpcXYRecoHit::TpcXYRecoHit(double x, double y, double z, double sigx, double sigy) : AbsRecoHit(NparHitRep) { hitCoord[0][0] = x; hitCoord[1][0] = y; sVal=z; hitCov[0][0] = sigx*sigx; hitCov[1][1] = sigy*sigy; } TpcXYRecoHit::TpcXYRecoHit(const TVector3& pos, double sigx, double sigy) : AbsRecoHit(NparHitRep) { hitCoord[0][0] = pos.X(); hitCoord[1][0] = pos.Y(); sVal=pos.Z(); hitCov[0][0] = sigx*sigx; hitCov[1][1] = sigy*sigy; } TpcXYRecoHit::TpcXYRecoHit(TpcCluster* cl) : AbsRecoHit(NparHitRep) { hitCoord[0][0] = cl->pos().X(); hitCoord[1][0] = cl->pos().Y(); sVal=cl->pos().Z(); double sigx=cl->sig().X(); double sigy=cl->sig().Y(); hitCov[0][0] = sigx*sigx; hitCov[1][1] = sigy*sigy; } AbsRecoHit* TpcXYRecoHit::clone(){ return new TpcXYRecoHit(*this); } void TpcXYRecoHit::setHMatrix(double s, const AbsTrackRep* stateVector, const TMatrixT& 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(NparHitRep,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.; } else { std::cerr << "TpcRecoHit can only handle state" << " vectors of type LSLTrackRep -> abort" << std::endl; throw; } } double TpcXYRecoHit::residualScalar(double s, const AbsTrackRep* stateVector, const TMatrixT& state) {}