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  private:
74  enum TypeTilt { nonBarrel = 0, tiltedMinus = 1, tiltedPlus = 2, flat = 3 };
75  // cmssw det id
77  // dtc id [0-215]
78  int dtcId_;
79  // module on dtc id [0-71]
80  int modId_;
81  // +z or -z
82  bool side_;
83  // barrel or endcap
84  bool barrel_;
85  // Pixel-Strip or 2Strip module
86  bool psModule_;
87  // main sensor inside or outside
88  bool flipped_;
89  // TTStub row needs flip of sign
90  bool signRow_;
91  // TTStub col needs flip of sign
92  bool signCol_;
93  // TTStub bend needs flip of sign
94  bool signBend_;
95  // number of columns [2S=2,PS=8]
97  // number of rows [2S=8*127,PS=8*120]
98  int numRows_;
99  // layer id [1-6,11-15]
100  int layerId_;
101  // module radius in cm
102  double r_;
103  // module phi w.r.t. detector region centre in rad
104  double phi_;
105  // module z in cm
106  double z_;
107  // sensor separation in cm
108  double sep_;
109  // sensor pitch in cm [strip=.009,pixel=.01]
110  double pitchRow_;
111  // sensor length in cm [strip=5,pixel=.15625]
112  double pitchCol_;
113  // module tilt angle measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
114  double tilt_;
115  // sinus of module tilt measured w.r.t. beam axis (0=barrel), tk layout measures w.r.t. radial axis
116  double sinTilt_;
117  // cosinus of module tilt measured w.r.t. beam axis (+-1=endcap), tk layout measures w.r.t. radial axis
118  double cosTilt_;
119  // module type (barrelPS, barrel2S, diskPS, disk2S)
121  // encoded radius of disk2S stubs, used in Hybrid
123  // stub radius offset for barrelPS, barrel2S, used in Hybrid
124  double offsetR_;
125  // stub z offset for diskPS, disk2S, used in Hybrid
126  double offsetZ_;
127  // bend window size in half strip units
129  // tilt correction parameter used to project r to z uncertainty
131  // tilt correction parameter used to project r to z uncertainty
133  };
134 
135 } // namespace tt
136 
137 #endif
double tiltCorrectionIntercept_
Definition: SensorModule.h:132
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:130
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
bool signRow() const
Definition: SensorModule.h:33