13 #ifndef PNDMDTIGEOMETRY_H 14 #define PNDMDTIGEOMETRY_H 1 17 #include "TGeoVolume.h" 23 #include "TGeoMatrix.h" 39 void AddSensor(TString _v) { fSensorSet.insert(_v); }
47 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
48 if (it == fGeoMap.end())
50 pos = it->second.Position;
56 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
57 if (it == fGeoMap.end())
59 len = it->second.Length;
65 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
66 if (it == fGeoMap.end())
68 len = it->second.Length;
73 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
74 if (it == fGeoMap.end())
76 pos = it->second.Position;
81 std::map<Int_t, LayerBoundary>::const_iterator it = fLayerInfoMap.find(iLayer);
82 if (it == fLayerInfoMap.end())
84 LBPos = TVector3(it->second.minX, it->second.minY, it->second.minZ);
85 RTPos = TVector3(it->second.maxX, it->second.maxY, it->second.maxZ);
90 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
91 if (it == fGeoMap.end())
93 TVector3 center = it->second.Position;
94 TGeoMatrix *fMtrx = it->second.Matrix;
100 fMtrx->MasterToLocal(&master[0], &local[0]);
104 Bool_t
MapWireToStrip(Int_t iDetId,
const TVector3 &fEntryPos, Int_t &fStripDetID)
106 static const Double_t cSTRIPWIDTH = 1.;
107 static const Double_t cGAPOFSTRIPS = 0.0;
112 LayerInfoMapIter it = fLayerInfoMap.find(layerID);
113 if (it == fLayerInfoMap.end())
117 fStripNo = (fEntryPos.Z() - it->second.minZ) / (cSTRIPWIDTH + cGAPOFSTRIPS);
121 fStripNo = (fEntryPos.Y() - it->second.minY) / (cSTRIPWIDTH + cGAPOFSTRIPS);
123 fStripNo = (fEntryPos.X() - it->second.minX) / (cSTRIPWIDTH + cGAPOFSTRIPS);
125 fStripNo = (fEntryPos.X() - it->second.minX) / (cSTRIPWIDTH + cGAPOFSTRIPS);
132 std::set<TString> fSensorSet;
133 Bool_t FindSensorinPath(TString path)
136 std::set<TString>::iterator it = fSensorSet.begin();
137 std::set<TString>::iterator end = fSensorSet.end();
139 if (path.Contains(*it)) {
150 Bool_t fGoodGeometry;
161 std::map<Int_t, InfoType> fGeoMap;
162 std::map<Int_t, TGeoMatrix *> fMatrixMap;
175 std::map<Int_t, LayerBoundary> fLayerInfoMap;
176 typedef std::map<Int_t, LayerBoundary>::iterator LayerInfoMapIter;
177 typedef std::pair<Int_t, LayerBoundary> LayerInfoMapValue;
179 Int_t fBarrelVersion;
180 Int_t fEndcapVersion;
181 Int_t fForwardVersion;
182 Int_t fMuonFilterVersion;
187 void LoadGeometry(TGeoNode *node);
188 Bool_t GetStripInfo();
189 Bool_t GetGeometryInfoV2(
const TString &fFullPath,
const TString &Name);
190 void InsertLayerInfo(Int_t layerID,
const TVector3 &pos,
const TVector3 &lwh);
192 Bool_t AddTubeInfo(Int_t detID,
const TVector3 ¢er, Double_t wirelen, TGeoMatrix *matrix);
193 Bool_t AddStripInfo(Int_t detID, TVector3 stripPos, Double_t stripLen, TGeoMatrix *matrix = 0);
194 Bool_t AddMatrix(Int_t layerID, TGeoMatrix *matrix);
ostream & operator<<(ostream &os, const TVector3 &v3)
static Short_t Module(Int_t detID)
Bool_t MasterToLocal(Int_t iDetId, TVector3 &master, TVector3 &local)
static Short_t Layer(Int_t detID)
Bool_t GetTubeLength(Int_t iDetId, Double_t &len) const
Bool_t GetLayerBoundary(Int_t iLayer, TVector3 &LBPos, TVector3 &RTPos) const
static Int_t LayerID(Int_t iMod, Int_t iOct, Int_t iLayer)
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)
Bool_t GetStripCenter(Int_t iDetId, TVector3 &pos) const
static Short_t Sector(Int_t detID)
Bool_t GetTubeCenter(Int_t iDetId, TVector3 &pos) const
void AddSensor(TString _v)
void SetVerbose(Int_t _v)
Bool_t GetStripLength(Int_t iDetId, Double_t &len) const
static PndMdtIGeometry * Instance()
basic_ostream< char, char_traits< char > > ostream