//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class TBSICluster // see TBSICluster.h for details // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Maxence Vandenbroucke TUM (original author) // // //----------------------------------------------------------- // Panda Headers ---------------------- // This Class' Header ------------------ #include "TBSICluster.h" // C/C++ Headers ---------------------- #include #include using namespace std; // Collaborating Class Headers -------- #include "TVectorD.h" TBSICluster::TBSICluster() : FairHit(), fposuvw(0,0,0),fposuvwerr(0,0,0),fposxyz(0,0,0),fposxyzerr(0,0,0), famp(0), fsize(0), fpitch(0), fdetid(-1), fdetName(""), falman(NULL) {;} TBSICluster::TBSICluster(const TBSICluster& clust) : FairHit(clust.detid(), const_cast(clust.fposxyz), const_cast(clust.fposxyzerr),0), famp(clust.famp), fsize(clust.fsize), fpitch(clust.fpitch), fdetid(clust.fdetid), fdetName(clust.fdetName), fposuvwerr(clust.fposuvwerr), fposuvw(clust.fposuvw), fposxyz(clust.fposxyz), fposxyzerr(clust.fposxyzerr), falman(clust.falman) { TVector3 uu(1,0,0); TVector3 vv(0,1,0); TVector3 oo(0,0,0); clust.GetPlane(uu,vv,oo); fuu = TVector3(uu); fvv = TVector3(vv); foo = TVector3(oo); } TBSICluster::TBSICluster(const TVector3& posuvw, const TVector3& posuvwErr, const TVector3& posxyz, const TVector3& posxyzErr, double Amp, int Det, unsigned int Size, TString Detname, double Pitch, TpcAlignmentManager * alman) : //FairHit(Det, fposxyz, fposxyzerr, 0), famp(Amp), fsize(Size), fdetid(Det), fdetName(Detname), fposuvwerr(posuvwErr), fposuvw(posuvw),fposxyz(posxyz), fposxyzerr(posxyzErr), fpitch(Pitch),falman(alman) { if(!falman){ std::cerr << "TBSICluster: TBSIClusters.getAlMan() return NULL" << std::endl; return;} TVector3 uu(1,0,0); TVector3 vv(0,1,0); TVector3 oo(0,0,0); falman->getPlaneDef(fdetName,oo,uu,vv); fuu = TVector3(uu); fvv = TVector3(vv); foo = TVector3(oo); } TBSICluster::~TBSICluster(){} void TBSICluster::GetPlane(TVector3 & uu, TVector3 & vv, TVector3 & oo) const {uu=fuu;vv=fvv;oo=foo; } std::ostream& operator<< (std::ostream& s, const TBSICluster& me){ s << "TBSICluster\n" << me.fdetName << ")\n" << " (detid "<