Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:09

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     // Pixel-Strip or 2Strip module
0029     bool psModule() const { return psModule_; }
0030     // main sensor inside or outside
0031     bool flipped() const { return flipped_; }
0032     // TTStub row needs flip of sign
0033     bool signRow() const { return signRow_; }
0034     // TTStub col needs flip of sign
0035     bool signCol() const { return signCol_; }
0036     // TTStub bend needs flip of sign
0037     bool signBend() const { return signBend_; }
0038     // number of columns [2S=2,PS=8]
0039     int numColumns() const { return numColumns_; }
0040     // number of rows [2S=8*127,PS=8*120]
0041     int numRows() const { return numRows_; }
0042     // layer id [1-6,11-15]
0043     int layerId() const { return layerId_; }
0044     // module radius in cm
0045     double r() const { return r_; }
0046     // module phi w.r.t. detector region centre in rad
0047     double phi() const { return phi_; }
0048     // module z in cm
0049     double z() const { return z_; }
0050     // sensor separation in cm
0051     double sep() const { return sep_; }
0052     // sensor pitch in cm [strip=.009,pixel=.01]
0053     double pitchRow() const { return pitchRow_; }
0054     // sensor length in cm [strip=5,pixel=.15625]
0055     double pitchCol() const { return pitchCol_; }
0056     // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0057     double tilt() const { return tilt_; }
0058     // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0059     double sinTilt() const { return sinTilt_; }
0060     // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
0061     double cosTilt() const { return cosTilt_; }
0062     // encoded radius of disk2S stubs, used in Hybrid
0063     int encodedR() const { return encodedR_; }
0064     // stub radius offset for barrelPS, barrel2S, used in Hybrid
0065     double offsetR() const { return offsetR_; }
0066     // stub z offset for diskPS, disk2S, used in Hybrid
0067     double offsetZ() const { return offsetZ_; }
0068     // bend window size in half strip units
0069     int windowSize() const { return windowSize_; }
0070     //
0071     double tiltCorrection(double cot) const { return std::abs(tiltCorrectionSlope_ * cot) + tiltCorrectionIntercept_; }
0072 
0073     unsigned int ringId(const Setup* setup) const;
0074 
0075   private:
0076     enum TypeTilt { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
0077     // cmssw det id
0078     DetId detId_;
0079     // dtc id [0-215]
0080     int dtcId_;
0081     // module on dtc id [0-71]
0082     int modId_;
0083     // +z or -z
0084     bool side_;
0085     // barrel or endcap
0086     bool barrel_;
0087     // Pixel-Strip or 2Strip module
0088     bool psModule_;
0089     // main sensor inside or outside
0090     bool flipped_;
0091     // TTStub row needs flip of sign
0092     bool signRow_;
0093     // TTStub col needs flip of sign
0094     bool signCol_;
0095     // TTStub bend needs flip of sign
0096     bool signBend_;
0097     // number of columns [2S=2,PS=8]
0098     int numColumns_;
0099     // number of rows [2S=8*127,PS=8*120]
0100     int numRows_;
0101     // layer id [1-6,11-15]
0102     int layerId_;
0103     // module radius in cm
0104     double r_;
0105     // module phi w.r.t. detector region centre in rad
0106     double phi_;
0107     // module z in cm
0108     double z_;
0109     // sensor separation in cm
0110     double sep_;
0111     // sensor pitch in cm [strip=.009,pixel=.01]
0112     double pitchRow_;
0113     // sensor length in cm [strip=5,pixel=.15625]
0114     double pitchCol_;
0115     // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0116     double tilt_;
0117     // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
0118     double sinTilt_;
0119     // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
0120     double cosTilt_;
0121     // module type (barrelPS, barrel2S, diskPS, disk2S)
0122     Type type_;
0123     // encoded radius of disk2S stubs, used in Hybrid
0124     int encodedR_;
0125     // stub radius offset for barrelPS, barrel2S, used in Hybrid
0126     double offsetR_;
0127     // stub z offset for diskPS, disk2S, used in Hybrid
0128     double offsetZ_;
0129     // bend window size in half strip units
0130     int windowSize_;
0131     // tilt correction parameter used to project r to z uncertainty
0132     double tiltCorrectionSlope_;
0133     // tilt correction parameter used to project r to z uncertainty
0134     double tiltCorrectionIntercept_;
0135   };
0136 
0137 }  // namespace tt
0138 
0139 #endif