CMS 3D CMS Logo

CSCChamberSpecs.cc
Go to the documentation of this file.
7 
8 using namespace GeomDetEnumerators;
9 
11  int iChamberType,
13  const CSCSpecsParcel& fupar,
14  const CSCWireGroupPackage& wg)
15  : GeomDetType("CSC", CSC),
16  theChamberType(iChamberType),
17  theSpecsValues(fupar),
18  nstrips(static_cast<int>(specsValue(5))),
19  stripDeltaPhi(specsValue(29)),
20  centreToIntersectionOffset(specsValue(30)),
21  gangedStrips_(false) {
22  LogTrace("CSCChamberSpecs|CSC") << myName << ": constructing specs for chamber " << theName[iChamberType - 1]
23  << ", type=" << iChamberType << ", this =" << this;
24 
25  // Reset gangedStrips_ for ME1A from config parameter
26  if (iChamberType == 1)
27  gangedStrips_ = geom->gangedStrips();
28 
29  // Most wire info now comes from wire group section of DDD, but this doesn't...
30  float wireAngleInDegrees = specsValue(12);
31 
32  // Related to strip geometry...
33  float stripOffset1 = specsValue(20);
34  float stripOffset2 = specsValue(21);
35  float globalRadialPositionOfAlignmentPin = specsValue(24);
36  float distanceFrameToAlignmentPin = specsValue(25);
37  float lengthOfChamber = specsValue(26);
38  float distanceEndOfStripToAlignmentPin = specsValue(27);
39  float extentOfStripPlane = specsValue(28);
40 
41  // local y of alignment pin
42  float yAlignmentPin = -lengthOfChamber / 2. + distanceFrameToAlignmentPin;
43 
44  // distance from alignment pin to symmetry centre of strip plane
45  float alignmentPinToCentreOfStripPlane = distanceEndOfStripToAlignmentPin + extentOfStripPlane / 2.;
46 
47  // local y of symmetry centre of strip plane
48  float yCentreOfStripPlane = yAlignmentPin + alignmentPinToCentreOfStripPlane;
49 
50  // distance from intersection of strips to symmetry centre of strip plane
51  float whereStripsMeet = globalRadialPositionOfAlignmentPin + alignmentPinToCentreOfStripPlane;
52 
53  // Possibly 'correct' distance to strip intersection
54  // if ( useCentreTIOffsets ) {
55  // float ctiOffset = this->ctiOffset();
56  // whereStripsMeet += ctiOffset;
57  // }
58  whereStripsMeet += centreToIntersectionOffset; // will have been reset to zero if not active
59 
60  // local y value of 1st wire in wire plane
61  double yOfFirstWire = yAlignmentPin + wg.alignmentPinToFirstWire / 10.; //@@ in cm
62 
63  // Build the unique LayerGeometry objects we require for each chamber type.
64  // - There are 2 endcaps
65  // - Alternate layers of strips are offset w.r.t. each other
66  // - In ME11 the wire tilt angle needs to be a constant
67  // global value; in the CMS local coordinates this is positive in +z
68  // and negative in -z (magnitude 29 degrees as of 2002)
69 
70  // Thus we need 4 LGs differing in strip offset and wire angle
71 
72  float phiPitch = this->stripPhiPitch();
73 
74  // Layer thickness can come from specs too
75  float hThickness = specsValue(32) / 10. / 2.; // mm->cm, and then want half the thickness
76 
78  iChamberType,
79  bounds,
80  nstrips,
81  -stripOffset1,
82  phiPitch,
83  whereStripsMeet,
84  extentOfStripPlane,
85  yCentreOfStripPlane,
86  wg,
87  wireAngleInDegrees,
88  yOfFirstWire,
89  hThickness);
90 
92  iChamberType,
93  bounds,
94  nstrips,
95  -stripOffset2,
96  phiPitch,
97  whereStripsMeet,
98  extentOfStripPlane,
99  yCentreOfStripPlane,
100  wg,
101  wireAngleInDegrees,
102  yOfFirstWire,
103  hThickness);
104 
106  iChamberType,
107  bounds,
108  nstrips,
109  -stripOffset1,
110  phiPitch,
111  whereStripsMeet,
112  extentOfStripPlane,
113  yCentreOfStripPlane,
114  wg,
115  -wireAngleInDegrees,
116  yOfFirstWire,
117  hThickness);
118 
120  iChamberType,
121  bounds,
122  nstrips,
123  -stripOffset2,
124  phiPitch,
125  whereStripsMeet,
126  extentOfStripPlane,
127  yCentreOfStripPlane,
128  wg,
129  -wireAngleInDegrees,
130  yOfFirstWire,
131  hThickness);
132 }
133 
135  LogTrace("CSCChamberSpecs|CSC") << myName << " destroying this=" << this;
136 
137  delete poszOddLayerGeometry;
138  delete poszEvenLayerGeometry;
139  delete negzOddLayerGeometry;
140  delete negzEvenLayerGeometry;
141 }
142 
144  if ((theChamberType != specs.theChamberType))
145  return true;
146  else
147  return false;
148 }
149 
151 
153 
155 
157 
158 // Build theChamberType value for a (station, ring) pair
159 // an integer 1-10 corresponding to
160 // 1 for S = 1 and R=A=4 split strips in ME11
161 // 2,3,4 = R+1 for S = 1 and R = 1,2,3
162 // 5-10 = 2*S+R for S = 2,3,4 and R = 1,2
163 
164 int CSCChamberSpecs::whatChamberType(int istation, int iring) {
165  int i = 2 * istation + iring; // i=2S+R
166  if (istation == 1) {
167  --i; // ring 1R -> i=1+R (2S+R-1=1+R for S=1)
168  if (i > 4) {
169  i = 1; // But ring 1A (R=4) -> i=1
170  }
171  }
172  return i;
173 }
174 
176 
178  const float pF_cm = 0.75;
179  return (constantNoise() + e_pF() * pF_cm * poszOddLayerGeometry->length()) / sqrt(timeInterval / 100.);
180 }
181 
183  // ME1/1 makes up for its small gap by a big electronics gain
184  // so use one gas gain value for all chambers (=300000)
185  return 3.0e05;
186 }
187 
189  if (theChamberType <= 2) {
190  return 0.25;
191  } else {
192  return 0.5;
193  }
194 }
195 
196 // STATICS
197 
198 // Define the name of each chamber type
200  "ME1/a", "ME1/b", "ME1/2", "ME1/3", "ME2/1", "ME2/2", "ME3/1", "ME3/2", "ME4/1", "ME4/2"};
201 
202 // Define name of this class
203 const std::string CSCChamberSpecs::myName = "CSCChamberSpecs";
CSCLayerGeometry * poszOddLayerGeometry
int chamberType() const
float constantNoise() const
float wireSpacing() const
CSCLayerGeometry * negzOddLayerGeometry
static int whatChamberType(int istation, int iring)
float e_pF() const
std::string chamberTypeName() const
~CSCChamberSpecs() override
Destructor.
#define LogTrace(id)
float centreToIntersectionOffset
T sqrt(T t)
Definition: SSEVec.h:19
CSCLayerGeometry * negzEvenLayerGeometry
static const std::string myName
bool operator==(const CSCChamberSpecs &specs) const
float length() const override
float stripNoise(float timeInterval) const
CSCLayerGeometry * poszEvenLayerGeometry
float stripPhiPitch() const
float wirePitch() const
bool operator!=(const CSCChamberSpecs &specs) const
Allow comparison of Specs objects.
CSCChamberSpecs()
Default ctor.
float specsValue(int index) const
Accessor to chamber specs values.
const CSCStripTopology * topology() const
std::vector< float > CSCSpecsParcel
float gasGain() const
float chargePerCount() const
static const std::string theName[10]
const Topology & topology() const override
Returns StripTopology of the odd-layer, positive-z geometry.