1 #ifndef PNDMDTIGEOMETRY_H
2 #define PNDMDTIGEOMETRY_H 1
6 #include "TGeoVolume.h"
12 #include "TGeoMatrix.h"
38 std::map<Int_t, InfoType>::const_iterator it =
fGeoMap.find(iDetId);
41 pos = it->second.Position;
47 std::map<Int_t, InfoType>::const_iterator it =
fGeoMap.find(iDetId);
50 len = it->second.Length;
56 std::map<Int_t, InfoType>::const_iterator it =
fGeoMap.find(iDetId);
59 len = it->second.Length;
64 std::map<Int_t, InfoType>::const_iterator it =
fGeoMap.find(iDetId);
67 pos = it->second.Position;
71 std::map<Int_t, LayerBoundary>::const_iterator it =
fLayerInfoMap.find(iLayer);
74 LBPos = TVector3(it->second.minX, it->second.minY, it->second.minZ);
75 RTPos = TVector3(it->second.maxX, it->second.maxY, it->second.maxZ);
80 std::map<Int_t, InfoType>::const_iterator it =
fGeoMap.find(iDetId);
83 TVector3 center = it->second.Position;
84 TGeoMatrix* fMtrx = it->second.Matrix;
85 if(!fMtrx)
return kFALSE;
89 fMtrx->MasterToLocal(&master[0], &local[0]);
94 static const Double_t cSTRIPWIDTH = 1.;
95 static const Double_t cGAPOFSTRIPS = 0.0;
104 fStripNo = (fEntryPos.Z() - it->second.minZ)/(cSTRIPWIDTH + cGAPOFSTRIPS);
108 fStripNo = (fEntryPos.Y() - it->second.minY)/(cSTRIPWIDTH + cGAPOFSTRIPS);
110 fStripNo = (fEntryPos.X() - it->second.minX)/(cSTRIPWIDTH + cGAPOFSTRIPS);
112 fStripNo = (fEntryPos.X() - it->second.minX)/(cSTRIPWIDTH + cGAPOFSTRIPS);
121 std::set<TString>::iterator it =
fSensorSet.begin();
122 std::set<TString>::iterator end =
fSensorSet.end();
124 if(path.Contains(*it)) { ret = kTRUE;
break; }
Bool_t GetStripLength(Int_t iDetId, Double_t &len) const
static Short_t Module(Int_t detID)
std::set< TString > fSensorSet
Bool_t MasterToLocal(Int_t iDetId, TVector3 &master, TVector3 &local)
static Short_t Layer(Int_t detID)
Bool_t GetLayerBoundary(Int_t iLayer, TVector3 &LBPos, TVector3 &RTPos) const
std::map< Int_t, InfoType > fGeoMap
Bool_t AddStripInfo(Int_t detID, TVector3 stripPos, Double_t stripLen, TGeoMatrix *matrix=0)
Bool_t GetTubeLength(Int_t iDetId, Double_t &len) const
std::ostream & operator<<(std::ostream &o, const PndEventInfo &a)
static Int_t LayerID(Int_t iMod, Int_t iOct, Int_t iLayer)
static PndMdtIGeometry * fInstance
Bool_t AddTubeInfo(Int_t detID, const TVector3 ¢er, Double_t wirelen, TGeoMatrix *matrix)
static Int_t Identifier(Int_t iMod, Int_t iOct, Int_t iLayer, Int_t iBox, Int_t iWire)
Bool_t MapWireToStrip(Int_t iDetId, const TVector3 &fEntryPos, Int_t &fStripDetID)
static Short_t Sector(Int_t detID)
basic_ostream< char, char_traits< char > > ostream
void LoadGeometry(TGeoNode *node)
Bool_t FindSensorinPath(TString path)
void AddSensor(TString _v)
void InsertLayerInfo(Int_t layerID, const TVector3 &pos, const TVector3 &lwh)
void SetVerbose(Int_t _v)
std::pair< Int_t, LayerBoundary > LayerInfoMapValue
ClassDef(PndMdtIGeometry, 1)
static PndMdtIGeometry * Instance()
Bool_t GetStripCenter(Int_t iDetId, TVector3 &pos) const
std::map< Int_t, LayerBoundary >::iterator LayerInfoMapIter
std::map< Int_t, TGeoMatrix * > fMatrixMap
Bool_t AddMatrix(Int_t layerID, TGeoMatrix *matrix)
Bool_t GetTubeCenter(Int_t iDetId, TVector3 &pos) const
std::map< Int_t, LayerBoundary > fLayerInfoMap
Bool_t GetGeometryInfoV2(const TString &fFullPath, const TString &Name)