1 #ifndef PNDMDTIGEOMETRY_H 2 #define PNDMDTIGEOMETRY_H 1 5 #include "TGeoVolume.h" 11 #include "TGeoMatrix.h" 27 void AddSensor(TString _v) { fSensorSet.insert(_v); }
35 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
36 if (it == fGeoMap.end())
38 pos = it->second.Position;
44 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
45 if (it == fGeoMap.end())
47 len = it->second.Length;
53 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
54 if (it == fGeoMap.end())
56 len = it->second.Length;
61 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
62 if (it == fGeoMap.end())
64 pos = it->second.Position;
69 std::map<Int_t, LayerBoundary>::const_iterator it = fLayerInfoMap.find(iLayer);
70 if (it == fLayerInfoMap.end())
72 LBPos = TVector3(it->second.minX, it->second.minY, it->second.minZ);
73 RTPos = TVector3(it->second.maxX, it->second.maxY, it->second.maxZ);
78 std::map<Int_t, InfoType>::const_iterator it = fGeoMap.find(iDetId);
79 if (it == fGeoMap.end())
81 TVector3 center = it->second.Position;
82 TGeoMatrix *fMtrx = it->second.Matrix;
88 fMtrx->MasterToLocal(&master[0], &local[0]);
92 Bool_t
MapWireToStrip(Int_t iDetId,
const TVector3 &fEntryPos, Int_t &fStripDetID)
94 static const Double_t cSTRIPWIDTH = 1.;
95 static const Double_t cGAPOFSTRIPS = 0.0;
100 LayerInfoMapIter it = fLayerInfoMap.find(layerID);
101 if (it == fLayerInfoMap.end())
105 fStripNo = (fEntryPos.Z() - it->second.minZ) / (cSTRIPWIDTH + cGAPOFSTRIPS);
109 fStripNo = (fEntryPos.Y() - it->second.minY) / (cSTRIPWIDTH + cGAPOFSTRIPS);
111 fStripNo = (fEntryPos.X() - it->second.minX) / (cSTRIPWIDTH + cGAPOFSTRIPS);
113 fStripNo = (fEntryPos.X() - it->second.minX) / (cSTRIPWIDTH + cGAPOFSTRIPS);
120 std::set<TString> fSensorSet;
121 Bool_t FindSensorinPath(TString path)
124 std::set<TString>::iterator it = fSensorSet.begin();
125 std::set<TString>::iterator end = fSensorSet.end();
127 if (path.Contains(*it)) {
138 Bool_t fGoodGeometry;
149 std::map<Int_t, InfoType> fGeoMap;
150 std::map<Int_t, TGeoMatrix *> fMatrixMap;
163 std::map<Int_t, LayerBoundary> fLayerInfoMap;
164 typedef std::map<Int_t, LayerBoundary>::iterator LayerInfoMapIter;
165 typedef std::pair<Int_t, LayerBoundary> LayerInfoMapValue;
167 Int_t fBarrelVersion;
168 Int_t fEndcapVersion;
169 Int_t fForwardVersion;
170 Int_t fMuonFilterVersion;
175 void LoadGeometry(TGeoNode *node);
176 Bool_t GetStripInfo();
177 Bool_t GetGeometryInfoV2(
const TString &fFullPath,
const TString &Name);
178 void InsertLayerInfo(Int_t layerID,
const TVector3 &pos,
const TVector3 &lwh);
180 Bool_t AddTubeInfo(Int_t detID,
const TVector3 ¢er, Double_t wirelen, TGeoMatrix *matrix);
181 Bool_t AddStripInfo(Int_t detID, TVector3 stripPos, Double_t stripLen, TGeoMatrix *matrix = 0);
182 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