//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Implementation of class TBGEMCluster // see TBGEMCluster.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 "TBGEMCluster.h" // C/C++ Headers ---------------------- #include #include using namespace std; // Collaborating Class Headers -------- #include "TVectorD.h" TBGEMCluster::TBGEMCluster() : 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) {;} TBGEMCluster::TBGEMCluster(const TBGEMCluster& 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); } //std::cout << "TBGEMClusterInit Cl::" << " on " << fuu.x() << " " << fuu.y() << " " << fuu.z() << " " << fvv.x() << " " << fvv.y() << " " << fvv.z() << std::endl;} TBGEMCluster::TBGEMCluster(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 << "TBGEMCluster: TBGEMClusters.getAlMan() return NULL" << std::endl; return;} TVector3 uu(1,0,0); TVector3 vv(0,1,0); TVector3 oo(0,0,0); //std::cout << "HERE" << std::endl; falman->getPlaneDef(fdetName,oo,uu,vv); //std::cout << "HERE" << std::endl; oo.Print(); fuu = TVector3(uu); fvv = TVector3(vv); foo = TVector3(oo); //std::cout << "TBGEMClusterInit No::" << " on "<< &fuu << "->" << fuu.x() << " " << fuu.y() << " " << fuu.z() << " <<>> " << fvv.x() << " " << fvv.y() << " " << fvv.z() << std::endl; } TBGEMCluster::~TBGEMCluster(){} void TBGEMCluster::GetPlane(TVector3 & uu, TVector3 & vv, TVector3 & oo) const { uu=fuu; oo=foo; vv=fvv; //std::cout << "TBGEMCluster GetPlane" << " on " << &fuu << "->"<< uu.x() << " " << uu.y() << " " << fuu.z() << " <<>> " << vv.x() << " " << vv.y() << " " << vv.z() << std::endl; } std::ostream& operator<< (std::ostream& s, const TBGEMCluster& me){ s << "TBGEMCluster\n" << me.fdetName << ")\n" << " (detid "<