File indexing completed on 2024-04-06 12:14:24
0001 #ifndef CSCGeometry_CSCGeometry_h
0002 #define CSCGeometry_CSCGeometry_h
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <DataFormats/DetId/interface/DetId.h>
0012 #include <DataFormats/MuonDetId/interface/CSCDetId.h>
0013 #include <Geometry/CommonDetUnit/interface/TrackingGeometry.h>
0014 #include <Geometry/CSCGeometry/interface/CSCLayer.h>
0015 #include <vector>
0016 #include <map>
0017
0018 class GeomDetType;
0019
0020 class CSCChamber;
0021 class CSCChamberSpecs;
0022 class CSCWireGroupPackage;
0023
0024 class CSCGeometry : public TrackingGeometry {
0025 typedef std::map<DetId, GeomDet*> CSCDetMap;
0026
0027 typedef std::map<int, const CSCChamberSpecs*, std::less<int> > CSCSpecsContainer;
0028
0029 public:
0030 typedef std::vector<const CSCChamber*> ChamberContainer;
0031 typedef std::vector<const CSCLayer*> LayerContainer;
0032
0033 friend class CSCGeometryBuilder;
0034 friend class GeometryAligner;
0035
0036
0037 CSCGeometry();
0038
0039
0040 CSCGeometry(
0041 bool debugV, bool gangedstripsME1a_, bool onlywiresME1a_, bool realWireGeometry_, bool useCentreTIOffsets_);
0042
0043
0044 ~CSCGeometry() override;
0045
0046 void clear();
0047
0048
0049
0050
0051 const DetTypeContainer& detTypes() const override;
0052
0053
0054 const DetContainer& detUnits() const override;
0055
0056
0057 const DetContainer& dets() const override;
0058
0059
0060 const DetIdContainer& detUnitIds() const override;
0061
0062
0063 const DetIdContainer& detIds() const override;
0064
0065
0066 const GeomDet* idToDetUnit(DetId) const override;
0067
0068
0069 const GeomDet* idToDet(DetId) const override;
0070
0071
0072
0073
0074 const CSCChamber* chamber(CSCDetId id) const;
0075
0076
0077 const CSCLayer* layer(CSCDetId id) const;
0078
0079
0080 const ChamberContainer& chambers() const;
0081
0082
0083 const LayerContainer& layers() const;
0084
0085
0086
0087
0088
0089 const CSCChamberSpecs* findSpecs(int iChamberType);
0090
0091
0092
0093
0094
0095
0096 const CSCChamberSpecs* buildSpecs(int iChamberType,
0097 const std::vector<float>& fpar,
0098 const std::vector<float>& fupar,
0099 const CSCWireGroupPackage& wg);
0100
0101 void setGangedStripsInME1a(bool gs) { gangedstripsME1a_ = gs; }
0102 void setOnlyWiresInME1a(bool ow) { onlywiresME1a_ = ow; }
0103 void setUseRealWireGeometry(bool rwg) { realWireGeometry_ = rwg; }
0104 void setUseCentreTIOffsets(bool cti) { useCentreTIOffsets_ = cti; }
0105 void setDebugV(bool dbgv) { debugV_ = dbgv; }
0106
0107
0108
0109
0110 bool gangedStrips() const { return gangedstripsME1a_; }
0111
0112
0113
0114
0115 bool wiresOnly() const { return onlywiresME1a_; }
0116
0117
0118
0119
0120
0121
0122
0123
0124 bool realWireGeometry() const { return realWireGeometry_; }
0125
0126
0127
0128
0129
0130 bool centreTIOffsets() const { return useCentreTIOffsets_; }
0131
0132
0133 void queryModelling() const;
0134
0135 private:
0136
0137 void deallocate();
0138
0139
0140 void addChamber(CSCChamber* ch);
0141
0142
0143 void addLayer(CSCLayer* l);
0144
0145
0146 void addDetType(GeomDetType* type);
0147
0148
0149 void addDetId(DetId id);
0150
0151
0152 void addDet(GeomDet* det);
0153
0154
0155 ChamberContainer theChambers;
0156
0157
0158 CSCDetMap theMap;
0159
0160
0161
0162 DetTypeContainer theDetTypes;
0163 DetContainer theDets;
0164 DetContainer theDetUnits;
0165 DetIdContainer theDetIds;
0166 DetIdContainer theDetUnitIds;
0167
0168
0169 LayerContainer theLayers;
0170
0171
0172
0173 bool debugV_;
0174
0175 bool gangedstripsME1a_;
0176 bool onlywiresME1a_;
0177 bool realWireGeometry_;
0178 bool useCentreTIOffsets_;
0179
0180
0181 CSCSpecsContainer specsContainer;
0182 };
0183
0184 #endif