CMS 3D CMS Logo

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