CMS 3D CMS Logo

SensorModule.h
Go to the documentation of this file.
1 #ifndef L1Trigger_TrackTrigger_SensorModule_h
2 #define L1Trigger_TrackTrigger_SensorModule_h
3 
5 
6 namespace tt {
7 
8  class Setup;
9 
10  // representation of an outer tracker sensormodule
11  class SensorModule {
12  public:
13  SensorModule(const Setup* setup, const DetId& detId, int dtcId, int modId);
15 
17 
18  // module type (BarrelPS, Barrel2S, DiskPS, Disk2S)
19  Type type() const { return type_; }
20  // dtc id [0-215]
21  int dtcId() const { return dtcId_; }
22  // module on dtc id [0-71]
23  int modId() const { return modId_; }
24  // +z or -z
25  bool side() const { return side_; }
26  // barrel or endcap
27  bool barrel() const { return barrel_; }
28  // Pixel-Strip or 2Strip module
29  bool psModule() const { return psModule_; }
30  // main sensor inside or outside
31  bool flipped() const { return flipped_; }
32  // TTStub row needs flip of sign
33  bool signRow() const { return signRow_; }
34  // TTStub col needs flip of sign
35  bool signCol() const { return signCol_; }
36  // TTStub bend needs flip of sign
37  bool signBend() const { return signBend_; }
38  // number of columns [2S=2,PS=8]
39  int numColumns() const { return numColumns_; }
40  // number of rows [2S=8*127,PS=8*120]
41  int numRows() const { return numRows_; }
42  // layer id [1-6,11-15]
43  int layerId() const { return layerId_; }
44  // module radius in cm
45  double r() const { return r_; }
46  // module phi w.r.t. detector region centre in rad
47  double phi() const { return phi_; }
48  // module z in cm
49  double z() const { return z_; }
50  // sensor separation in cm
51  double sep() const { return sep_; }
52  // sensor pitch in cm [strip=.009,pixel=.01]
53  double pitchRow() const { return pitchRow_; }
54  // sensor length in cm [strip=5,pixel=.15625]
55  double pitchCol() const { return pitchCol_; }
56  // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
57  double tilt() const { return tilt_; }
58  // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
59  double sinTilt() const { return sinTilt_; }
60  // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
61  double cosTilt() const { return cosTilt_; }
62  // encoded radius of disk2S stubs, used in Hybrid
63  int encodedR() const { return encodedR_; }
64  // stub radius offset for barrelPS, barrel2S, used in Hybrid
65  double offsetR() const { return offsetR_; }
66  // stub z offset for diskPS, disk2S, used in Hybrid
67  double offsetZ() const { return offsetZ_; }
68  // bend window size in half strip units
69  int windowSize() const { return windowSize_; }
70  //
71  double tiltCorrection(double cot) const { return std::abs(tiltCorrectionSlope_ * cot) + tiltCorrectionIntercept_; }
72 
73  unsigned int ringId(const Setup* setup) const;
74 
75  private:
76  enum TypeTilt { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
77  // cmssw det id
79  // dtc id [0-215]
80  int dtcId_;
81  // module on dtc id [0-71]
82  int modId_;
83  // +z or -z
84  bool side_;
85  // barrel or endcap
86  bool barrel_;
87  // Pixel-Strip or 2Strip module
88  bool psModule_;
89  // main sensor inside or outside
90  bool flipped_;
91  // TTStub row needs flip of sign
92  bool signRow_;
93  // TTStub col needs flip of sign
94  bool signCol_;
95  // TTStub bend needs flip of sign
96  bool signBend_;
97  // number of columns [2S=2,PS=8]
99  // number of rows [2S=8*127,PS=8*120]
100  int numRows_;
101  // layer id [1-6,11-15]
102  int layerId_;
103  // module radius in cm
104  double r_;
105  // module phi w.r.t. detector region centre in rad
106  double phi_;
107  // module z in cm
108  double z_;
109  // sensor separation in cm
110  double sep_;
111  // sensor pitch in cm [strip=.009,pixel=.01]
112  double pitchRow_;
113  // sensor length in cm [strip=5,pixel=.15625]
114  double pitchCol_;
115  // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
116  double tilt_;
117  // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
118  double sinTilt_;
119  // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
120  double cosTilt_;
121  // module type (barrelPS, barrel2S, diskPS, disk2S)
123  // encoded radius of disk2S stubs, used in Hybrid
125  // stub radius offset for barrelPS, barrel2S, used in Hybrid
126  double offsetR_;
127  // stub z offset for diskPS, disk2S, used in Hybrid
128  double offsetZ_;
129  // bend window size in half strip units
131  // tilt correction parameter used to project r to z uncertainty
133  // tilt correction parameter used to project r to z uncertainty
135  };
136 
137 } // namespace tt
138 
139 #endif
double tiltCorrectionIntercept_
Definition: SensorModule.h:134
double offsetR() const
Definition: SensorModule.h:65
int numRows() const
Definition: SensorModule.h:41
double tilt() const
Definition: SensorModule.h:57
Type type() const
Definition: SensorModule.h:19
Class to process and provide run-time constants used by Track Trigger emulators.
Definition: Setup.h:44
bool flipped() const
Definition: SensorModule.h:31
bool psModule() const
Definition: SensorModule.h:29
int modId() const
Definition: SensorModule.h:23
double tiltCorrectionSlope_
Definition: SensorModule.h:132
Definition: TTTypes.h:54
double offsetZ() const
Definition: SensorModule.h:67
double cosTilt() const
Definition: SensorModule.h:61
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool signBend() const
Definition: SensorModule.h:37
double r() const
Definition: SensorModule.h:45
int dtcId() const
Definition: SensorModule.h:21
bool barrel() const
Definition: SensorModule.h:27
bool side() const
Definition: SensorModule.h:25
double pitchRow() const
Definition: SensorModule.h:53
Definition: DetId.h:17
int numColumns() const
Definition: SensorModule.h:39
double phi() const
Definition: SensorModule.h:47
double tiltCorrection(double cot) const
Definition: SensorModule.h:71
double sep() const
Definition: SensorModule.h:51
double pitchCol() const
Definition: SensorModule.h:55
double z() const
Definition: SensorModule.h:49
int windowSize() const
Definition: SensorModule.h:69
SensorModule(const Setup *setup, const DetId &detId, int dtcId, int modId)
Definition: SensorModule.cc:15
int encodedR() const
Definition: SensorModule.h:63
double sinTilt() const
Definition: SensorModule.h:59
int layerId() const
Definition: SensorModule.h:43
bool signCol() const
Definition: SensorModule.h:35
unsigned int ringId(const Setup *setup) const
bool signRow() const
Definition: SensorModule.h:33