#ifndef PNDTPCALIGNMENTMANAGER_H #define PNDTPCALIGNMENTMANAGER_H //ROOT headers #include "TGeoMatrix.h" #include "TVector3.h" #include "TMatrixD.h" //STL headers #include #include #include #include /* Euler convention This represent the composition of : first a rotation about Z axis with angle phi, then a rotation with theta about the rotated X axis, and finally a rotation with psi about the new Z axis. */ class TLorentzVector; class PndTpcAlignmentManager{ public: static PndTpcAlignmentManager* getInstance(std::string filename){ if(inst==NULL){ inst=new PndTpcAlignmentManager(filename); }else if(filename==inst->transformationFileName) { inst->read(filename); } return inst; } //special case, need to return identity-transform static PndTpcAlignmentManager* getInstance(){ if(inst==NULL){ std::cerr<<"No PndTpcAlignmentManager instance existing, " <<"PndTpcAlignmentManager::getInstance(string filename)" <<" needs to be called first"< fTransformations; std::map fRes; std::map fPitch; std::vector detIDs; std::string transformationFileName; static PndTpcAlignmentManager *inst; PndTpcAlignmentManager(std::string filename){ // std::cout<<"creator called"<abort" << std::endl; throw; } std::vector tVector3ToStlVector(TVector3 v){ std::vector r; r.push_back(v[0]); r.push_back(v[1]); r.push_back(v[2]); return r; } ClassDef(PndTpcAlignmentManager,5); }; #endif