File indexing completed on 2024-04-06 12:14:24
0001 #include <Geometry/CSCGeometry/interface/CSCGeometry.h>
0002 #include <Geometry/CSCGeometry/interface/CSCChamberSpecs.h>
0003 #include <Geometry/CSCGeometry/interface/CSCLayerGeometry.h>
0004 #include <Geometry/CSCGeometry/interface/CSCWireGroupPackage.h>
0005 #include <DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h>
0006 #include <FWCore/MessageLogger/interface/MessageLogger.h>
0007
0008 using namespace GeomDetEnumerators;
0009
0010 CSCChamberSpecs::CSCChamberSpecs(const CSCGeometry* geom,
0011 int iChamberType,
0012 const TrapezoidalPlaneBounds& bounds,
0013 const CSCSpecsParcel& fupar,
0014 const CSCWireGroupPackage& wg)
0015 : GeomDetType("CSC", CSC),
0016 theChamberType(iChamberType),
0017 theSpecsValues(fupar),
0018 nstrips(static_cast<int>(specsValue(5))),
0019 stripDeltaPhi(specsValue(29)),
0020 centreToIntersectionOffset(specsValue(30)),
0021 gangedStrips_(false) {
0022 LogTrace("CSCChamberSpecs|CSC") << myName << ": constructing specs for chamber " << theName[iChamberType - 1]
0023 << ", type=" << iChamberType << ", this =" << this;
0024
0025
0026 if (iChamberType == 1)
0027 gangedStrips_ = geom->gangedStrips();
0028
0029
0030 float wireAngleInDegrees = specsValue(12);
0031
0032
0033 float stripOffset1 = specsValue(20);
0034 float stripOffset2 = specsValue(21);
0035 float globalRadialPositionOfAlignmentPin = specsValue(24);
0036 float distanceFrameToAlignmentPin = specsValue(25);
0037 float lengthOfChamber = specsValue(26);
0038 float distanceEndOfStripToAlignmentPin = specsValue(27);
0039 float extentOfStripPlane = specsValue(28);
0040
0041
0042 float yAlignmentPin = -lengthOfChamber / 2. + distanceFrameToAlignmentPin;
0043
0044
0045 float alignmentPinToCentreOfStripPlane = distanceEndOfStripToAlignmentPin + extentOfStripPlane / 2.;
0046
0047
0048 float yCentreOfStripPlane = yAlignmentPin + alignmentPinToCentreOfStripPlane;
0049
0050
0051 float whereStripsMeet = globalRadialPositionOfAlignmentPin + alignmentPinToCentreOfStripPlane;
0052
0053
0054
0055
0056
0057
0058 whereStripsMeet += centreToIntersectionOffset;
0059
0060
0061 double yOfFirstWire = yAlignmentPin + wg.alignmentPinToFirstWire / 10.;
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072 float phiPitch = this->stripPhiPitch();
0073
0074
0075 float hThickness = specsValue(32) / 10. / 2.;
0076
0077 poszOddLayerGeometry = new CSCLayerGeometry(geom,
0078 iChamberType,
0079 bounds,
0080 nstrips,
0081 -stripOffset1,
0082 phiPitch,
0083 whereStripsMeet,
0084 extentOfStripPlane,
0085 yCentreOfStripPlane,
0086 wg,
0087 wireAngleInDegrees,
0088 yOfFirstWire,
0089 hThickness);
0090
0091 poszEvenLayerGeometry = new CSCLayerGeometry(geom,
0092 iChamberType,
0093 bounds,
0094 nstrips,
0095 -stripOffset2,
0096 phiPitch,
0097 whereStripsMeet,
0098 extentOfStripPlane,
0099 yCentreOfStripPlane,
0100 wg,
0101 wireAngleInDegrees,
0102 yOfFirstWire,
0103 hThickness);
0104
0105 negzOddLayerGeometry = new CSCLayerGeometry(geom,
0106 iChamberType,
0107 bounds,
0108 nstrips,
0109 -stripOffset1,
0110 phiPitch,
0111 whereStripsMeet,
0112 extentOfStripPlane,
0113 yCentreOfStripPlane,
0114 wg,
0115 -wireAngleInDegrees,
0116 yOfFirstWire,
0117 hThickness);
0118
0119 negzEvenLayerGeometry = new CSCLayerGeometry(geom,
0120 iChamberType,
0121 bounds,
0122 nstrips,
0123 -stripOffset2,
0124 phiPitch,
0125 whereStripsMeet,
0126 extentOfStripPlane,
0127 yCentreOfStripPlane,
0128 wg,
0129 -wireAngleInDegrees,
0130 yOfFirstWire,
0131 hThickness);
0132 }
0133
0134 CSCChamberSpecs::~CSCChamberSpecs() {
0135 LogTrace("CSCChamberSpecs|CSC") << myName << " destroying this=" << this;
0136
0137 delete poszOddLayerGeometry;
0138 delete poszEvenLayerGeometry;
0139 delete negzOddLayerGeometry;
0140 delete negzEvenLayerGeometry;
0141 }
0142
0143 bool CSCChamberSpecs::operator!=(const CSCChamberSpecs& specs) const {
0144 if ((theChamberType != specs.theChamberType))
0145 return true;
0146 else
0147 return false;
0148 }
0149
0150 bool CSCChamberSpecs::operator==(const CSCChamberSpecs& specs) const { return !(operator!=(specs)); }
0151
0152 const Topology& CSCChamberSpecs::topology() const { return *(poszOddLayerGeometry->topology()); }
0153
0154 int CSCChamberSpecs::chamberType() const { return theChamberType; }
0155
0156 std::string CSCChamberSpecs::chamberTypeName() const { return theName[chamberType() - 1]; }
0157
0158
0159
0160
0161
0162
0163
0164 int CSCChamberSpecs::whatChamberType(int istation, int iring) {
0165 int i = 2 * istation + iring;
0166 if (istation == 1) {
0167 --i;
0168 if (i > 4) {
0169 i = 1;
0170 }
0171 }
0172 return i;
0173 }
0174
0175 float CSCChamberSpecs::wireSpacing() const { return poszOddLayerGeometry->wirePitch(); }
0176
0177 float CSCChamberSpecs::stripNoise(float timeInterval) const {
0178 const float pF_cm = 0.75;
0179 return (constantNoise() + e_pF() * pF_cm * poszOddLayerGeometry->length()) / sqrt(timeInterval / 100.);
0180 }
0181
0182 float CSCChamberSpecs::gasGain() const {
0183
0184
0185 return 3.0e05;
0186 }
0187
0188 float CSCChamberSpecs::chargePerCount() const {
0189 if (theChamberType <= 2) {
0190 return 0.25;
0191 } else {
0192 return 0.5;
0193 }
0194 }
0195
0196
0197
0198
0199 const std::string CSCChamberSpecs::theName[] = {
0200 "ME1/a", "ME1/b", "ME1/2", "ME1/3", "ME2/1", "ME2/2", "ME3/1", "ME3/2", "ME4/1", "ME4/2"};
0201
0202
0203 const std::string CSCChamberSpecs::myName = "CSCChamberSpecs";