Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-03 00:12:28

0001 #ifndef L1Trigger_TrackTrigger_SensorModule_h
0002 #define L1Trigger_TrackTrigger_SensorModule_h
0003 
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 
0006 namespace tt {
0007 
0008   class Setup;
0009 
0010   // representation of an outer tracker sensormodule
0011   class SensorModule {
0012   public:
0013     SensorModule(const Setup* setup, const DetId& detId, int dtcId, int modId);
0014     ~SensorModule() {}
0015 
0016     enum Type { BarrelPS, Barrel2S, DiskPS, Disk2S, NumTypes };
0017 
0018     // module type (BarrelPS, Barrel2S, DiskPS, Disk2S)
0019     Type type() const { return type_; }
0020     // dtc id [0-215]
0021     int dtcId() const { return dtcId_; }
0022     // module on dtc id [0-71]
0023     int modId() const { return modId_; }
0024     // +z or -z
0025     bool side() const { return side_; }
0026     // barrel or endcap
0027     bool barrel() const { return barrel_; }
0028     // tilted barrel or flat barrel
0029     bool tilted() const { return tilted_; }
0030     // Pixel-Strip or 2Strip module
0031     bool psModule() const { return psModule_; }
0032     // main sensor inside or outside
0033     bool flipped() const { return flipped_; }
0034     // TTStub row needs flip of sign
0035     bool signRow() const { return signRow_; }
0036     // TTStub col needs flip of sign
0037     bool signCol() const { return signCol_; }
0038     // TTStub bend needs flip of sign
0039     bool signBend() const { return signBend_; }
0040     // number of columns [2S=2,PS=8]
0041     int numColumns() const { return numColumns_; }
0042     // number of rows [2S=8*127,PS=8*120]
0043     int numRows() const { return numRows_; }
0044     // layer id [1-6,11-15]
0045     int layerId() const { return layerId_; }
0046     // module radius in cm
0047     double r() const { return r_; }
0048     // module phi w.r.t. detector region centre in rad
0049     double phi() const { return phi_; }
0050     // module z in cm
0051     double z() const { return z_; }
0052     // sensor separation in cm
0053     double sep() const { return sep_; }
0054     // sensor pitch in cm [strip=.009,pixel=.01]
0055     double pitchRow() const { return pitchRow_; }
0056     // sensor length in cm [strip=5,pixel=.15625]
0057     double pitchCol() const { return pitchCol_; }
0058     // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0059     double tilt() const { return tilt_; }
0060     // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0061     double sinTilt() const { return sinTilt_; }
0062     // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
0063     double cosTilt() const { return cosTilt_; }
0064     // encoded radius of disk2S stubs, used in Hybrid
0065     int encodedR() const { return encodedR_; }
0066     // stub radius offset for barrelPS, barrel2S, used in Hybrid
0067     double offsetR() const { return offsetR_; }
0068     // stub z offset for diskPS, disk2S, used in Hybrid
0069     double offsetZ() const { return offsetZ_; }
0070     // bend window size in half strip units
0071     int windowSize() const { return windowSize_; }
0072     //
0073     double tiltCorrection(double cot) const { return std::abs(tiltCorrectionSlope_ * cot) + tiltCorrectionIntercept_; }
0074     //
0075     double dPhi(double inv2R) const { return dPhi_ + (dR_ + scattering_) * std::abs(inv2R); }
0076     //
0077     double dZ() const { return dZ_; }
0078 
0079     unsigned int ringId(const Setup* setup) const;
0080 
0081   private:
0082     enum TypeTilt { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
0083     // cmssw det id
0084     DetId detId_;
0085     // dtc id [0-215]
0086     int dtcId_;
0087     // module on dtc id [0-71]
0088     int modId_;
0089     // +z or -z
0090     bool side_;
0091     // barrel or endcap
0092     bool barrel_;
0093     // tilted barrel or flat barrel
0094     bool tilted_;
0095     // Pixel-Strip or 2Strip module
0096     bool psModule_;
0097     // main sensor inside or outside
0098     bool flipped_;
0099     // TTStub row needs flip of sign
0100     bool signRow_;
0101     // TTStub col needs flip of sign
0102     bool signCol_;
0103     // TTStub bend needs flip of sign
0104     bool signBend_;
0105     // number of columns [2S=2,PS=8]
0106     int numColumns_;
0107     // number of rows [2S=8*127,PS=8*120]
0108     int numRows_;
0109     // layer id [1-6,11-15]
0110     int layerId_;
0111     // module radius in cm
0112     double r_;
0113     // module phi w.r.t. detector region centre in rad
0114     double phi_;
0115     // module z in cm
0116     double z_;
0117     // sensor separation in cm
0118     double sep_;
0119     // sensor pitch in cm [strip=.009,pixel=.01]
0120     double pitchRow_;
0121     // sensor length in cm [strip=5,pixel=.15625]
0122     double pitchCol_;
0123     // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0124     double tilt_;
0125     // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0126     double sinTilt_;
0127     // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
0128     double cosTilt_;
0129     // module type (barrelPS, barrel2S, diskPS, disk2S)
0130     Type type_;
0131     // encoded radius of disk2S stubs, used in Hybrid
0132     int encodedR_;
0133     // stub radius offset for barrelPS, barrel2S, used in Hybrid
0134     double offsetR_;
0135     // stub z offset for diskPS, disk2S, used in Hybrid
0136     double offsetZ_;
0137     // bend window size in half strip units
0138     int windowSize_;
0139     // tilt correction parameter used to project r to z uncertainty
0140     double tiltCorrectionSlope_;
0141     // tilt correction parameter used to project r to z uncertainty
0142     double tiltCorrectionIntercept_;
0143     //
0144     double scattering_;
0145     //
0146     double dR_;
0147     //
0148     double dPhi_;
0149     //
0150     double dZ_;
0151   };
0152 
0153 }  // namespace tt
0154 
0155 #endif