CMS 3D CMS Logo

CSCChamberSpecs.h
Go to the documentation of this file.
1 #ifndef Geometry_CSCGeometry_CSCChamberSpecs_H
2 #define Geometry_CSCGeometry_CSCChamberSpecs_H
3 
28 
29 #include <cmath>
30 #include <string>
31 #include <vector>
32 
33 class CSCGeometry;
34 class CSCLayerGeometry;
36 class Topology; //@@ Can go once GeomDetType has it removed.
38 
39 class CSCChamberSpecs : public GeomDetType {
40 public:
41  typedef std::vector<float> CSCSpecsParcel;
42 
45 
48  int iChamberType,
49  const TrapezoidalPlaneBounds& mediaShape,
50  const CSCSpecsParcel& fupar,
51  const CSCWireGroupPackage& wg);
52 
54  ~CSCChamberSpecs() override;
55 
57  bool operator!=(const CSCChamberSpecs& specs) const;
58  bool operator==(const CSCChamberSpecs& specs) const;
59 
60  //@@ Topology() will be removed from GeomDetType interface (good, so we're no longer forced to pick something)
61  //@@ But still there as of Aug-2007. So much for design.
62 
64  const Topology& topology() const override;
65 
67  const CSCLayerGeometry* oddLayerGeometry(int iendcap) const {
68  return (iendcap == 1 ? poszOddLayerGeometry : negzOddLayerGeometry);
69  }
70  const CSCLayerGeometry* evenLayerGeometry(int iendcap) const {
71  return (iendcap == 1 ? poszEvenLayerGeometry : negzEvenLayerGeometry);
72  }
73 
84  int chamberType() const;
85 
91 
92  // CHAMBER 'PARAMETER' FUNCTIONS
93  //@@ FIXME these must all be sorted out in a world of real conditions & calibration
94 
95  float stripResolution() const { return specsValue(0); }
96  float wireResolution() const { return specsValue(1); }
97  float efficiency() const { return specsValue(2); }
98  float timeWindow() const { return specsValue(3); }
99 
103  float neutronRate() const { return specsValue(4); }
104 
108  int nStrips() const { return nstrips; }
109 
113  int nNodes() const { return int(specsValue(6)); }
114  int nWiresPerGroup() const { return int(specsValue(7)); }
115  int nFloatingStrips() const { return int(specsValue(8)); }
116 
120  float stripPhiPitch() const { return 1.E-03 * stripDeltaPhi; }
121 
126  float ctiOffset() const { return centreToIntersectionOffset; }
127 
131  float wireSpacing() const;
132 
136  float anodeCathodeSpacing() const { return specsValue(9); }
137 
138  float gasGain() const;
139 
140  float voltage() const { return specsValue(11); }
141 
142  float calibrationError() const { return specsValue(13); }
143 
144  float electronAttraction() const { return specsValue(14); }
145 
149  float fractionQS() const { return specsValue(15); }
150 
154  float chargePerCount() const;
155 
159  float wireRadius() const { return specsValue(17); }
160 
164  float shaperPeakingTime() const { return specsValue(18); }
165 
169  float constantNoise() const { return specsValue(22); }
170 
174  float e_pF() const { return specsValue(23); }
175 
181  //@@ Why 1/sqrt(time)?!?
182  float wireNoise(float timeInterval) const {
183  const float WIRE_CAPACITANCE = 8.; // in pF
184  return (constantNoise() + nWiresPerGroup() * WIRE_CAPACITANCE) / sqrt(timeInterval / 100.);
185  }
186 
187  float stripNoise(float timeInterval) const;
188 
189  //@@ The following is nonsense to be fixed at some stage
190  // float adcThreshold() const {return 9.99;}
191 
195  bool gangedStrips() const { return gangedStrips_; }
196 
197  // STATIC FUNCTION
198 
202  static int whatChamberType(int istation, int iring);
203 
204 private:
206  float specsValue(int index) const { return theSpecsValues[index]; }
207 
208  // A ChamberSpecs has 4 associated LayerGeometry's
213 
214  // theChamberType is a unique integer 1-10 for a station, ring pair.
215 
216  // The type value is defined as <br>
217  // 1 for S = 1 and R=A=4 split strips in ME11 <br>
218  // 2,3,4 = R+1 for S = 1 and R = 1,2,3 <br>
219  // 5-10 = 2*S+R for S = 2,3,4 and R = 1,2 <br>
220 
222 
223  // Careful that the following order of data members is required to ensure
224  // correct initialization in constructor initialization list!
225 
226  // Store for specs parameter values
228 
229  int nstrips; // no. of strips per layer
230  float stripDeltaPhi; // Delta-phi width of strip in this chamber type (in mrad)
231  float centreToIntersectionOffset; // Possible correction to whereStripsMeet
232 
234 
235  // Names of chamber types
236  static const std::string theName[10];
237 
238  // Name of this class
239  static const std::string myName;
240 };
241 
242 #endif // Geometry_CSCGeometry_CSCChamberSpecs_H
const CSCLayerGeometry * evenLayerGeometry(int iendcap) const
CSCLayerGeometry * poszOddLayerGeometry
int chamberType() const
float constantNoise() const
float wireSpacing() const
float electronAttraction() const
float wireNoise(float timeInterval) const
CSCLayerGeometry * negzOddLayerGeometry
static int whatChamberType(int istation, int iring)
float e_pF() const
float efficiency() const
float timeWindow() const
float anodeCathodeSpacing() const
std::string chamberTypeName() const
~CSCChamberSpecs() override
Destructor.
float centreToIntersectionOffset
float voltage() const
float stripResolution() const
T sqrt(T t)
Definition: SSEVec.h:19
int nStrips() const
CSCLayerGeometry * negzEvenLayerGeometry
static const std::string myName
bool operator==(const CSCChamberSpecs &specs) const
float fractionQS() const
float shaperPeakingTime() const
float stripNoise(float timeInterval) const
CSCLayerGeometry * poszEvenLayerGeometry
float stripPhiPitch() const
int nFloatingStrips() const
const CSCLayerGeometry * oddLayerGeometry(int iendcap) const
Accessors for LayerGeometry&#39;s.
float wireRadius() const
bool operator!=(const CSCChamberSpecs &specs) const
Allow comparison of Specs objects.
int nNodes() const
float calibrationError() const
CSCChamberSpecs()
Default ctor.
float wireResolution() const
float specsValue(int index) const
Accessor to chamber specs values.
bool gangedStrips() const
float neutronRate() const
std::vector< float > CSCSpecsParcel
float gasGain() const
CSCSpecsParcel theSpecsValues
float ctiOffset() const
float chargePerCount() const
int nWiresPerGroup() const
static const std::string theName[10]
const Topology & topology() const override
Returns StripTopology of the odd-layer, positive-z geometry.