Go to the documentation of this file.00001 #ifndef CSCGeometry_CSCGeometry_h
00002 #define CSCGeometry_CSCGeometry_h
00003
00011 #include <DataFormats/DetId/interface/DetId.h>
00012 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
00013 #include <Geometry/CommonDetUnit/interface/TrackingGeometry.h>
00014 #include <Geometry/CSCGeometry/interface/CSCLayer.h>
00015 #include <vector>
00016 #include <map>
00017
00018 class GeomDetType;
00019 class GeomDetUnit;
00020 class CSCChamber;
00021 class CSCChamberSpecs;
00022 class CSCWireGroupPackage;
00023
00024 class CSCGeometry : public TrackingGeometry {
00025
00026 typedef std::map<DetId, GeomDet*> CSCDetMap;
00027
00028 typedef std::map<int, const CSCChamberSpecs*, std::less<int> > CSCSpecsContainer;
00029 typedef std::vector<CSCChamber*> ChamberContainer;
00030 typedef std::vector<CSCLayer*> LayerContainer;
00031
00032 public:
00033
00034 friend class CSCGeometryBuilder;
00035 friend class GeometryAligner;
00036
00038 CSCGeometry();
00039
00041 CSCGeometry( bool debugV, bool gangedstripsME1a_, bool onlywiresME1a_, bool realWireGeometry_, bool useCentreTIOffsets_ );
00042
00044 virtual ~CSCGeometry();
00045
00046
00047
00048
00049 virtual const DetTypeContainer& detTypes() const;
00050
00051
00052 virtual const DetUnitContainer& detUnits() const;
00053
00054
00055 virtual const DetContainer& dets() const;
00056
00057
00058 virtual const DetIdContainer& detUnitIds() const;
00059
00060
00061 virtual const DetIdContainer& detIds() const;
00062
00063
00064 virtual const GeomDetUnit* idToDetUnit(DetId) const;
00065
00066
00067 virtual const GeomDet* idToDet(DetId) const;
00068
00069
00070
00072 const CSCChamber* chamber(CSCDetId id) const;
00073
00075 const CSCLayer* layer(CSCDetId id) const;
00076
00078 const ChamberContainer& chambers() const;
00079
00081 const LayerContainer& layers() const;
00082
00083
00084
00089 const CSCChamberSpecs* findSpecs( int iChamberType );
00090
00096 const CSCChamberSpecs* buildSpecs( int iChamberType,
00097 const std::vector<float>& fpar,
00098 const std::vector<float>& fupar,
00099 const CSCWireGroupPackage& wg );
00100
00101 void setGangedStripsInME1a(bool gs) { gangedstripsME1a_ = gs; }
00102 void setOnlyWiresInME1a(bool ow) { onlywiresME1a_ = ow; }
00103 void setUseRealWireGeometry(bool rwg) { realWireGeometry_ = rwg; }
00104 void setUseCentreTIOffsets(bool cti) { useCentreTIOffsets_ = cti; }
00105 void setDebugV(bool dbgv) { debugV_ = dbgv; }
00106
00110 bool gangedStrips() const { return gangedstripsME1a_; }
00111
00115 bool wiresOnly() const { return onlywiresME1a_; }
00116
00124 bool realWireGeometry() const { return realWireGeometry_; }
00125
00130 bool centreTIOffsets() const { return useCentreTIOffsets_; }
00131
00133 void queryModelling() const;
00134
00135 private:
00136
00138 void addChamber(CSCChamber* ch);
00139
00141 void addLayer(CSCLayer* l);
00142
00144 void addDetType(GeomDetType* type);
00145
00147 void addDetId(DetId id);
00148
00150 void addDet(GeomDet* det);
00151
00152
00153 ChamberContainer theChambers;
00154
00155
00156 CSCDetMap theMap;
00157
00158
00159
00160 DetTypeContainer theDetTypes;
00161 DetContainer theDets;
00162 DetUnitContainer theDetUnits;
00163 DetIdContainer theDetIds;
00164 DetIdContainer theDetUnitIds;
00165
00166
00167 LayerContainer theLayers;
00168
00169
00170
00171 bool debugV_;
00172
00173 bool gangedstripsME1a_;
00174 bool onlywiresME1a_;
00175 bool realWireGeometry_;
00176 bool useCentreTIOffsets_;
00177
00178
00179 CSCSpecsContainer specsContainer;
00180
00181 };
00182
00183 #endif
00184