CMS 3D CMS Logo

EcalTBHodoscopeGeometry.cc
Go to the documentation of this file.
3 
5 
6 EcalTBHodoscopeGeometry::EcalTBHodoscopeGeometry() : m_cellVec(nPlanes_ * nFibres_) {}
7 
9 
10 float EcalTBHodoscopeGeometry::getFibreLp(int plane, int fibre) {
11  if (plane < nPlanes_ && fibre < nFibres_) {
12  return fibrePos_[plane][fibre].lp;
13  } else {
14  return -99999.;
15  }
16 }
17 
18 float EcalTBHodoscopeGeometry::getFibreRp(int plane, int fibre) {
19  if (plane < nPlanes_ && fibre < nFibres_) {
20  return fibrePos_[plane][fibre].rp;
21  } else {
22  return -99999.;
23  }
24 }
25 
27 
29 
31  const GlobalPoint& f1, const GlobalPoint& f2, const GlobalPoint& f3, const CCGFloat* parm, const DetId& detId) {
32  const HodoscopeDetId hid(detId);
33 
34  const unsigned int cellIndex(hid.denseIndex());
35 
36  m_cellVec[cellIndex] = PreshowerStrip(f1, cornersMgr(), parm);
37  addValidID(detId);
38 }
39 
42  {
43  // Position is in mm
44  // FIBRES POSITIONS
45  //
46  // - PLANE 0 -
47  // transverse with respect beam axis
48 
49  {-16.326, -15.367}, // fibre33
50  {-15.849, -14.889}, // fibre1
51  {-15.326, -14.368}, // fibre34
52  {-14.845, -13.886}, // fibre2
53  {-14.326, -13.367}, // fibre35
54  {-13.843, -12.887}, // fibre3
55  {-13.323, -12.366}, // fibre36
56  {-12.845, -11.883}, // fibre4
57  {-12.322, -11.361}, // fibre37
58  {-11.841, -10.882}, // fibre5
59  {-11.319, -10.359}, // fibre38
60  {-10.836, -9.876}, // fibre6
61  {-10.318, -9.359}, // fibre39
62  {-9.831, -8.873}, // fibre7
63  {-9.318, -8.357}, // fibre40
64  {-8.83, -7.869}, // fibre8
65  {-8.316, -7.359}, // fibre41
66  {-7.826, -6.871}, // fibre9
67  {-7.317, -6.359}, // fibre42
68  {-6.822, -5.867}, // fibre10
69  {-6.32, -5.356}, // fibre43
70  {-5.824, -4.87}, // fibre11
71  {-5.315, -4.357}, // fibre44
72  {-4.824, -3.866}, // fibre12
73  {-4.316, -3.361}, // fibre45
74  {-3.821, -2.867}, // fibre13
75  {-3.318, -2.362}, // fibre46
76  {-2.826, -1.867}, // fibre14
77  {-2.319, -1.354}, // fibre47
78  {-1.825, -0.864}, // fibre15
79  {-1.313, -0.351}, // fibre48
80  {-0.825, 0.136}, // fibre16
81  {-0.31, 0.653}, // fibre49
82  {0.177, 1.135}, // fibre17
83  {0.696, 1.653}, // fibre50
84  {1.176, 2.137}, // fibre18
85  {1.695, 2.652}, // fibre51
86  {2.179, 3.138}, // fibre19
87  {2.694, 3.651}, // fibre52
88  {3.178, 4.136}, // fibre20
89  {3.692, 4.648}, // fibre53
90  {4.179, 5.134}, // fibre21
91  {4.689, 5.651}, // fibre54
92  {5.177, 6.133}, // fibre22
93  {5.697, 6.649}, // fibre55
94  {6.17, 7.134}, // fibre23
95  {6.69, 7.651}, // fibre56
96  {7.176, 8.134}, // fibre24
97  {7.688, 8.652}, // fibre57
98  {8.172, 9.138}, // fibre25
99  {8.691, 9.654}, // fibre58
100  {9.178, 10.13}, // fibre26
101  {9.693, 10.655}, // fibre59
102  {10.173, 11.132}, // fibre27
103  {10.697, 11.66}, // fibre60
104  {11.172, 12.129}, // fibre28
105  {11.701, 12.653}, // fibre61
106  {12.17, 13.128}, // fibre29
107  {12.691, 13.658}, // fibre62
108  {13.168, 14.13}, // fibre30
109  {13.7, 14.656}, // fibre63
110  {14.172, 15.134}, // fibre31
111  {14.697, 15.649}, // fibre64
112  {15.177, 16.13} // fibre32
113  },
114  {
115  // FIBRES POSITIONS
116  //
117  // - PLANE 1 -
118  // transverse with respect beam axis
119 
120  {-16.175, -15.229}, // fibre33
121  {-15.719, -14.772}, // fibre1
122  {-15.185, -14.226}, // fibre34
123  {-14.727, -13.77}, // fibre2
124  {-14.184, -13.235}, // fibre35
125  {-13.727, -12.777}, // fibre3
126  {-13.192, -12.232}, // fibre36
127  {-12.733, -11.77}, // fibre4
128  {-12.191, -11.239}, // fibre37
129  {-11.736, -10.773}, // fibre5
130  {-11.195, -10.242}, // fibre38
131  {-10.735, -9.782}, // fibre6
132  {-10.198, -9.239}, // fibre39
133  {-9.738, -8.783}, // fibre7
134  {-9.206, -8.236}, // fibre40
135  {-8.739, -7.788}, // fibre8
136  {-8.211, -7.239}, // fibre41
137  {-7.74, -6.783}, // fibre9
138  {-7.215, -6.241}, // fibre42
139  {-6.743, -5.781}, // fibre10
140  {-6.207, -5.248}, // fibre43
141  {-5.74, -4.782}, // fibre11
142  {-5.207, -4.247}, // fibre44
143  {-4.743, -3.78}, // fibre12
144  {-4.217, -3.249}, // fibre45
145  {-3.746, -2.78}, // fibre13
146  {-3.214, -2.247}, // fibre46
147  {-2.746, -1.781}, // fibre14
148  {-2.214, -1.249}, // fibre47
149  {-1.742, -0.786}, // fibre15
150  {-1.209, -0.248}, // fibre48
151  {-0.744, 0.207}, // fibre16
152  {-0.21, 0.751}, // fibre49
153  {0.245, 1.208}, // fibre17
154  {0.792, 1.757}, // fibre50
155  {1.248, 2.207}, // fibre18
156  {1.792, 2.756}, // fibre51
157  {2.25, 3.208}, // fibre19
158  {2.793, 3.757}, // fibre52
159  {3.247, 4.209}, // fibre20
160  {3.795, 4.754}, // fibre53
161  {4.244, 5.208}, // fibre21
162  {4.799, 5.752}, // fibre54
163  {5.246, 6.209}, // fibre22
164  {5.792, 6.75}, // fibre55
165  {6.245, 7.215}, // fibre23
166  {6.792, 7.753}, // fibre56
167  {7.253, 8.212}, // fibre24
168  {7.782, 8.753}, // fibre57
169  {8.253, 9.217}, // fibre25
170  {8.781, 9.748}, // fibre58
171  {9.257, 10.22}, // fibre26
172  {9.783, 10.745}, // fibre59
173  {10.255, 11.218}, // fibre27
174  {10.787, 11.746}, // fibre60
175  {11.255, 12.219}, // fibre28
176  {11.786, 12.744}, // fibre61
177  {12.252, 13.222}, // fibre29
178  {12.787, 13.741}, // fibre62
179  {13.248, 14.21}, // fibre30
180  {13.782, 14.735}, // fibre63
181  {14.251, 15.218}, // fibre31
182  {14.779, 15.731}, // fibre64
183  {15.25, 16.209} // fibre32
184  },
185  {
186  // FIBRES POSITIONS
187  //
188  // - PLANE 2 -
189  // transverse with respect beam axis
190 
191  {-16.256, -15.305}, // fibre33
192  {-15.774, -14.818}, // fibre1
193  {-15.264, -14.306}, // fibre34
194  {-14.776, -13.82}, // fibre2
195  {-14.267, -13.32}, // fibre35
196  {-13.779, -12.819}, // fibre3
197  {-13.277, -12.323}, // fibre36
198  {-12.778, -11.815}, // fibre4
199  {-12.286, -11.324}, // fibre37
200  {-11.776, -10.821}, // fibre5
201  {-11.285, -10.324}, // fibre38
202  {-10.779, -9.819}, // fibre6
203  {-10.283, -9.33}, // fibre39
204  {-9.778, -8.826}, // fibre7
205  {-9.284, -8.329}, // fibre40
206  {-8.779, -7.824}, // fibre8
207  {-8.288, -7.329}, // fibre41
208  {-7.785, -6.828}, // fibre9
209  {-7.29, -6.329}, // fibre42
210  {-6.785, -5.831}, // fibre10
211  {-6.289, -5.329}, // fibre43
212  {-5.789, -4.836}, // fibre11
213  {-5.289, -4.332}, // fibre44
214  {-4.791, -3.833}, // fibre12
215  {-4.289, -3.335}, // fibre45
216  {-3.791, -2.837}, // fibre13
217  {-3.294, -2.334}, // fibre46
218  {-2.796, -1.836}, // fibre14
219  {-2.292, -1.34}, // fibre47
220  {-1.792, -0.842}, // fibre15
221  {-1.299, -0.344}, // fibre48
222  {-0.8, 0.158}, // fibre16
223  {-0.306, 0.655}, // fibre49
224  {0.2, 1.156}, // fibre17
225  {0.691, 1.655}, // fibre50
226  {1.196, 2.154}, // fibre18
227  {1.696, 2.653}, // fibre51
228  {2.194, 3.153}, // fibre19
229  {2.694, 3.646}, // fibre52
230  {3.194, 4.144}, // fibre20
231  {3.692, 4.649}, // fibre53
232  {4.185, 5.141}, // fibre21
233  {4.687, 5.647}, // fibre54
234  {5.181, 6.14}, // fibre22
235  {5.691, 6.646}, // fibre55
236  {6.183, 7.138}, // fibre23
237  {6.686, 7.647}, // fibre56
238  {7.178, 8.139}, // fibre24
239  {7.689, 8.649}, // fibre57
240  {8.179, 9.133}, // fibre25
241  {8.687, 9.643}, // fibre58
242  {9.176, 10.133}, // fibre26
243  {9.683, 10.643}, // fibre59
244  {10.173, 11.13}, // fibre27
245  {10.681, 11.637}, // fibre60
246  {11.167, 12.122}, // fibre28
247  {11.678, 12.639}, // fibre61
248  {12.163, 13.119}, // fibre29
249  {12.676, 13.637}, // fibre62
250  {13.16, 14.118}, // fibre30
251  {13.677, 14.636}, // fibre63
252  {14.16, 15.12}, // fibre31
253  {14.675, 15.635}, // fibre64
254  {15.162, 16.119} // fibre32
255  },
256  {
257  // FIBRES POSITIONS
258  //
259  // - PLANE 3 -
260  // transverse with respect beam axis
261 
262  {-16.225, -15.271}, // fibre33
263  {-15.74, -14.782}, // fibre1
264  {-15.227, -14.269}, // fibre34
265  {-14.74, -13.779}, // fibre2
266  {-14.227, -13.264}, // fibre35
267  {-13.738, -12.776}, // fibre3
268  {-13.223, -12.267}, // fibre36
269  {-12.734, -11.77}, // fibre4
270  {-12.234, -11.266}, // fibre37
271  {-11.728, -10.769}, // fibre5
272  {-11.226, -10.268}, // fibre38
273  {-10.73, -9.766}, // fibre6
274  {-10.228, -9.268}, // fibre39
275  {-9.726, -8.762}, // fibre7
276  {-9.228, -8.268}, // fibre40
277  {-8.72, -7.758}, // fibre8
278  {-8.227, -7.266}, // fibre41
279  {-7.713, -6.75}, // fibre9
280  {-7.224, -6.258}, // fibre42
281  {-6.707, -5.747}, // fibre10
282  {-6.22, -5.256}, // fibre43
283  {-5.703, -4.742}, // fibre11
284  {-5.217, -4.254}, // fibre44
285  {-4.703, -3.736}, // fibre12
286  {-4.211, -3.25}, // fibre45
287  {-3.697, -2.735}, // fibre13
288  {-3.208, -2.246}, // fibre46
289  {-2.696, -1.736}, // fibre14
290  {-2.205, -1.242}, // fibre47
291  {-1.696, -0.735}, // fibre15
292  {-1.201, -0.245}, // fibre48
293  {-0.695, 0.267}, // fibre16
294  {-0.199, 0.759}, // fibre49
295  {0.303, 1.266}, // fibre17
296  {0.801, 1.76}, // fibre50
297  {1.308, 2.27}, // fibre18
298  {1.799, 2.761}, // fibre51
299  {2.312, 3.268}, // fibre19
300  {2.803, 3.762}, // fibre52
301  {3.31, 4.263}, // fibre20
302  {3.803, 4.765}, // fibre53
303  {4.308, 5.267}, // fibre21
304  {4.807, 5.768}, // fibre54
305  {5.308, 6.269}, // fibre22
306  {5.807, 6.768}, // fibre55
307  {6.311, 7.272}, // fibre23
308  {6.808, 7.764}, // fibre56
309  {7.315, 8.275}, // fibre24
310  {7.809, 8.771}, // fibre57
311  {8.315, 9.277}, // fibre25
312  {8.812, 9.773}, // fibre58
313  {9.32, 10.279}, // fibre26
314  {9.815, 10.775}, // fibre59
315  {10.323, 11.278}, // fibre27
316  {10.817, 11.778}, // fibre60
317  {11.322, 12.277}, // fibre28
318  {11.821, 12.782}, // fibre61
319  {12.324, 13.276}, // fibre29
320  {12.825, 13.789}, // fibre62
321  {13.321, 14.274}, // fibre30
322  {13.83, 14.789}, // fibre63
323  {14.318, 15.271}, // fibre31
324  {14.829, 15.786}, // fibre64
325  {15.315, 16.264} // fibre32
326  }};
327 
328 std::vector<int> EcalTBHodoscopeGeometry::getFiredFibresInPlane(float xtr, int plane) {
329  std::vector<int> firedFibres;
330 
332  return firedFibres;
333 
334  for (int i(0); i != nFibres_; ++i) {
335  if ((xtr >= fibrePos_[plane][i].lp) && (xtr <= fibrePos_[plane][i].rp))
336  firedFibres.emplace_back(i);
337  }
338  return firedFibres;
339 }
340 
342  // Modify the RawPtr class
343  const CaloCellGeometry* cell(&m_cellVec[index]);
344  return (m_cellVec.size() < index || nullptr == cell->param() ? nullptr : cell);
345 }
EcalTBHodoscopeGeometry::getFibreRp
static float getFibreRp(int plane, int fibre)
Definition: EcalTBHodoscopeGeometry.cc:18
mps_fire.i
i
Definition: mps_fire.py:428
EcalTBHodoscopeGeometry.h
CaloCellGeometry::CCGFloat
float CCGFloat
Definition: CaloCellGeometry.h:52
EcalTBHodoscopeGeometry::EcalTBHodoscopeGeometry
EcalTBHodoscopeGeometry()
Definition: EcalTBHodoscopeGeometry.cc:6
EcalTBHodoscopeGeometry::getFibreLp
static float getFibreLp(int plane, int fibre)
Definition: EcalTBHodoscopeGeometry.cc:10
DetId
Definition: DetId.h:17
CaloSubdetectorGeometry::CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: CaloSubdetectorGeometry.h:25
EcalTBHodoscopeGeometry::getFiredFibresInPlane
static std::vector< int > getFiredFibresInPlane(float xtr, int plane)
Definition: EcalTBHodoscopeGeometry.cc:328
EcalTBHodoscopeGeometry::~EcalTBHodoscopeGeometry
~EcalTBHodoscopeGeometry() override
Definition: EcalTBHodoscopeGeometry.cc:8
EcalTBHodoscopeGeometry::fibre_pos::rp
float rp
Definition: EcalTBHodoscopeGeometry.h:42
Point3DBase< float, GlobalTag >
EcalTBHodoscopeGeometry::getNFibres
static int getNFibres()
Definition: EcalTBHodoscopeGeometry.cc:28
EcalTBHodoscopeGeometry::newCell
void newCell(const GlobalPoint &f1, const GlobalPoint &f2, const GlobalPoint &f3, const CCGFloat *parm, const DetId &detId) override
Definition: EcalTBHodoscopeGeometry.cc:30
CaloCellGeometry
Definition: CaloCellGeometry.h:50
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
CaloCellGeometry::param
const CCGFloat * param() const
Definition: CaloCellGeometry.h:99
HodoscopeDetId.h
CCGFloat
CaloCellGeometry::CCGFloat CCGFloat
Definition: EcalTBHodoscopeGeometry.cc:4
CaloSubdetectorGeometry::addValidID
void addValidID(const DetId &id)
Definition: CaloSubdetectorGeometry.cc:27
EBDetId::denseIndex
uint32_t denseIndex() const
Definition: EBDetId.h:84
EcalTBHodoscopeGeometry::m_cellVec
CellVec m_cellVec
Definition: EcalTBHodoscopeGeometry.h:49
EcalTBHodoscopeGeometry::nFibres_
static const int nFibres_
Definition: EcalTBHodoscopeGeometry.h:46
CaloSubdetectorGeometry::cornersMgr
CaloCellGeometry::CornersMgr * cornersMgr()
Definition: CaloSubdetectorGeometry.h:82
EcalTBHodoscopeGeometry::getNPlanes
static int getNPlanes()
Definition: EcalTBHodoscopeGeometry.cc:26
EcalTBHodoscopeGeometry::fibrePos_
static const fibre_pos fibrePos_[nPlanes_][nFibres_]
Definition: EcalTBHodoscopeGeometry.h:47
HodoscopeDetId
Definition: HodoscopeDetId.h:20
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalTBHodoscopeGeometry::getGeometryRawPtr
const CaloCellGeometry * getGeometryRawPtr(uint32_t index) const override
Definition: EcalTBHodoscopeGeometry.cc:341
PreshowerStrip
A base class to handle the shape of preshower strips.
Definition: PreshowerStrip.h:21
EcalTBHodoscopeGeometry::fibre_pos::lp
float lp
Definition: EcalTBHodoscopeGeometry.h:42
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
EcalTBHodoscopeGeometry::fibre_pos
Definition: EcalTBHodoscopeGeometry.h:41
EcalTBHodoscopeGeometry::nPlanes_
static const int nPlanes_
Definition: EcalTBHodoscopeGeometry.h:45