CMS 3D CMS Logo

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