ATLAS Offline Software
SCT_FastRDOAnalysis.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "SCT_FastRDOAnalysis.h"
6 #include "StoreGate/ReadHandle.h"
7 
8 #include "TH1.h"
9 #include "TString.h"
10 #include "TTree.h"
11 
12 #include <algorithm>
13 #include <cmath>
14 #include <functional>
15 #include <iostream>
16 
17 SCT_FastRDOAnalysis::SCT_FastRDOAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
18  : AthAlgorithm(name, pSvcLocator)
19  , m_hitsTimeBin3{nullptr}
20  , m_siCol{nullptr}
21  , m_siRow{nullptr}
22  , m_siPhiR{nullptr}
23  , m_siZ{nullptr}
24  , m_siPos_x{nullptr}
25  , m_siPos_y{nullptr}
26  , m_siPos_z{nullptr}
27  , m_siGangPix{nullptr}
28  , m_siDetID{nullptr}
29  , m_siDetPix{nullptr}
30  , m_siDetSCT{nullptr}
31  , m_siDetBrl{nullptr}
32  , m_siDetEc{nullptr}
33  , m_siDetBlay{nullptr}
34  , m_siDetInPixLay{nullptr}
35  , m_siDetNtInPixLay{nullptr}
36  , m_siDetDBM{nullptr}
37  , m_siDetHitDepthDir{nullptr}
38  , m_siDetHitPhiDir{nullptr}
39  , m_siDetHitEtaDir{nullptr}
40  , m_siDetMinR{nullptr}
41  , m_siDetMaxR{nullptr}
42  , m_siDetMinZ{nullptr}
43  , m_siDetMaxZ{nullptr}
44  , m_siDetMinPhi{nullptr}
45  , m_siDetMaxPhi{nullptr}
46  , m_siDetWidth{nullptr}
47  , m_siDetMinWidth{nullptr}
48  , m_siDetMaxWidth{nullptr}
49  , m_siDetLength{nullptr}
50  , m_siDetThick{nullptr}
51  , m_siDetEtaPitch{nullptr}
52  , m_siDetPhiPitch{nullptr}
53  , m_clusID{nullptr}
54  , m_locpos_x{nullptr}
55  , m_locpos_y{nullptr}
56  , m_rdoID_prd{nullptr}
57 
58  , m_h_hitsTimeBin3{nullptr}
59  , m_h_siCol{nullptr}
60  , m_h_siRow{nullptr}
61  , m_h_siPhiR{nullptr}
62  , m_h_siZ{nullptr}
63  , m_h_siPos_x{nullptr}
64  , m_h_siPos_y{nullptr}
65  , m_h_siPos_z{nullptr}
66  , m_h_siGangPix{nullptr}
67  , m_h_siDetID{nullptr}
68  , m_h_siDetPix{nullptr}
69  , m_h_siDetSCT{nullptr}
70  , m_h_siDetBrl{nullptr}
71  , m_h_siDetEc{nullptr}
72  , m_h_siDetBlay{nullptr}
73  , m_h_siDetInPixLay{nullptr}
74  , m_h_siDetNtInPixLay{nullptr}
75  , m_h_siDetDBM{nullptr}
76  , m_h_siDetHitDepthDir{nullptr}
77  , m_h_siDetHitPhiDir{nullptr}
78  , m_h_siDetHitEtaDir{nullptr}
79  , m_h_siDetMinR{nullptr}
80  , m_h_siDetMaxR{nullptr}
81  , m_h_siDetMinZ{nullptr}
82  , m_h_siDetMaxZ{nullptr}
83  , m_h_siDetMinPhi{nullptr}
84  , m_h_siDetMaxPhi{nullptr}
85  , m_h_siDetWidth{nullptr}
86  , m_h_siDetMinWidth{nullptr}
87  , m_h_siDetMaxWidth{nullptr}
88  , m_h_siDetLength{nullptr}
89  , m_h_siDetThick{nullptr}
90  , m_h_siDetEtaPitch{nullptr}
91  , m_h_siDetPhiPitch{nullptr}
92  , m_h_clusID{nullptr}
93  , m_h_locpos_x{nullptr}
94  , m_h_locpos_y{nullptr}
95  , m_h_rdoID_prd{nullptr}
96 
97  , m_tree{nullptr}
98  , m_thistSvc{"THistSvc", name}
99 {
100 }
101 
103  ATH_MSG_DEBUG( "Initializing SCT_FastRDOAnalysis" );
104 
105  // This will check that the properties were initialized
106  // properly by job configuration.
108 
109  // Read Cond Handle Key
111 
112  // Grab Ntuple and histogramming service for tree
113  ATH_CHECK(m_thistSvc.retrieve());
114 
115  m_tree = new TTree(TString(m_ntupleTreeName.value()), "SCT_FastRDOAna");
116  std::string fullNtupleName = m_ntupleFileName.value() + m_ntupleDirName.value() + m_ntupleTreeName.value();
117  ATH_CHECK(m_thistSvc->regTree(fullNtupleName, m_tree));
118  if (m_tree) {
119  // TREE BRANCHES
120  // SCT_Cluster
121  m_tree->Branch("hitsTimeBin3", &m_hitsTimeBin3);
122  // SiCluster
123  m_tree->Branch("siCol", &m_siCol);
124  m_tree->Branch("siRow", &m_siRow);
125  m_tree->Branch("siPhiR", &m_siPhiR);
126  m_tree->Branch("siZ", &m_siZ);
127  m_tree->Branch("siPos_x", &m_siPos_x);
128  m_tree->Branch("siPos_y", &m_siPos_y);
129  m_tree->Branch("siPos_z", &m_siPos_z);
130  m_tree->Branch("siGangPix", &m_siGangPix);
131  m_tree->Branch("siDetID", &m_siDetID);
132  m_tree->Branch("siDetPix", &m_siDetPix);
133  m_tree->Branch("siDetSCT", &m_siDetSCT);
134  m_tree->Branch("siDetBrl", &m_siDetBrl);
135  m_tree->Branch("siDetEc", &m_siDetEc);
136  m_tree->Branch("siDetBlay", &m_siDetBlay);
137  m_tree->Branch("siDetInPixLay", &m_siDetInPixLay);
138  m_tree->Branch("siDetNtInPixLay", &m_siDetNtInPixLay);
139  m_tree->Branch("siDetDBM", &m_siDetDBM);
140  m_tree->Branch("siDetHitDepthDir", &m_siDetHitDepthDir);
141  m_tree->Branch("siDetHitPhiDir", &m_siDetHitPhiDir);
142  m_tree->Branch("siDetHitEtaDir", &m_siDetHitEtaDir);
143  m_tree->Branch("siDetMinR", &m_siDetMinR);
144  m_tree->Branch("siDetMaxR", &m_siDetMaxR);
145  m_tree->Branch("siDetMinZ", &m_siDetMinZ);
146  m_tree->Branch("siDetMaxZ", &m_siDetMaxZ);
147  m_tree->Branch("siDetMinPhi", &m_siDetMinPhi);
148  m_tree->Branch("siDetMaxPhi", &m_siDetMaxPhi);
149  m_tree->Branch("siDetWidth", &m_siDetWidth);
150  m_tree->Branch("siDetMinWidth", &m_siDetMinWidth);
151  m_tree->Branch("siDetMaxWidth", &m_siDetMaxWidth);
152  m_tree->Branch("siDetLength", &m_siDetLength);
153  m_tree->Branch("siDetThick", &m_siDetThick);
154  m_tree->Branch("siDetEtaPitch", &m_siDetEtaPitch);
155  m_tree->Branch("siDetPhiPitch", &m_siDetPhiPitch);
156  // Trk::PrepRawData
157  m_tree->Branch("clusID", &m_clusID);
158  m_tree->Branch("locpos_x", &m_locpos_x);
159  m_tree->Branch("locpos_y", &m_locpos_y);
160  m_tree->Branch("rdoID_prd", &m_rdoID_prd);
161 
162  }
163  else {
164  ATH_MSG_ERROR("No tree found!");
165  }
166 
167  // HISTOGRAMS
168  m_h_hitsTimeBin3 = new TH1F("h_hitsTimeBin3", "hitsTimeBine3", 100, 0, 2);
169  m_h_hitsTimeBin3->StatOverflows();
170  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_hitsTimeBin3->GetName(), m_h_hitsTimeBin3));
171 
172  m_h_siCol = new TH1F("h_siCol", "siCol", 100, 0, 25);
173  m_h_siCol->StatOverflows();
174  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siCol->GetName(), m_h_siCol));
175 
176  m_h_siRow = new TH1F("h_siRow", "siRow", 100, 0, 2);
177  m_h_siRow->StatOverflows();
178  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siRow->GetName(), m_h_siRow));
179 
180  m_h_siPhiR = new TH1F("h_siPhiR", "siPhiR", 100, 0, 3.5);
181  m_h_siPhiR->StatOverflows();
182  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siPhiR->GetName(), m_h_siPhiR));
183 
184  m_h_siZ = new TH1F("h_siZ", "siZ", 100, 0, 130);
185  m_h_siZ->StatOverflows();
186  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siZ->GetName(), m_h_siZ));
187 
188  m_h_siPos_x = new TH1F("h_siPos_x", "siPos_x", 100, -600, 600);
189  m_h_siPos_x->StatOverflows();
190  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siPos_x->GetName(), m_h_siPos_x));
191 
192  m_h_siPos_y = new TH1F("h_siPos_y", "siPos_y", 100, -600, 600);
193  m_h_siPos_y->StatOverflows();
194  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siPos_y->GetName(), m_h_siPos_y));
195 
196  m_h_siPos_z = new TH1F("h_siPos_z", "siPos_z", 100, -3000, 3000);
197  m_h_siPos_z->StatOverflows();
198  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siPos_z->GetName(), m_h_siPos_z));
199 
200  m_h_siGangPix = new TH1F("h_siGangPix", "siGangPix", 100, 0, 2);
201  m_h_siGangPix->StatOverflows();
202  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siGangPix->GetName(), m_h_siGangPix));
203 
204  m_h_siDetID = new TH1F("h_siDetID", "siDetID", 100, 0, 1e18);
205  m_h_siDetID->StatOverflows();
206  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetID->GetName(), m_h_siDetID));
207 
208  m_h_siDetPix = new TH1F("h_siDetPix", "siDetPix", 100, 0, 2);
209  m_h_siDetPix->StatOverflows();
210  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetPix->GetName(), m_h_siDetPix));
211 
212  m_h_siDetSCT = new TH1F("h_siDetSCT", "siDetSCT", 100, 0, 2);
213  m_h_siDetSCT->StatOverflows();
214  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetSCT->GetName(), m_h_siDetSCT));
215 
216  m_h_siDetBrl = new TH1F("h_siDetBrl", "siDetBrl", 100, 0, 2);
217  m_h_siDetBrl->StatOverflows();
218  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetBrl->GetName(), m_h_siDetBrl));
219 
220  m_h_siDetEc = new TH1F("h_siDetEc", "siDetEc", 100, 0, 2);
221  m_h_siDetEc->StatOverflows();
222  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetEc->GetName(), m_h_siDetEc));
223 
224  m_h_siDetBlay = new TH1F("h_siDetBlay", "siDetBlay", 100, 0, 2);
225  m_h_siDetBlay->StatOverflows();
226  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetBlay->GetName(), m_h_siDetBlay));
227 
228  m_h_siDetInPixLay = new TH1F("h_siDetInPixLay", "siDetInPixLay", 100, 0, 2);
229  m_h_siDetInPixLay->StatOverflows();
230  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetInPixLay->GetName(), m_h_siDetInPixLay));
231 
232  m_h_siDetNtInPixLay = new TH1F("h_siDetNtInPixLay", "siDetNtInPixLay", 100, 0, 2);
233  m_h_siDetNtInPixLay->StatOverflows();
234  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetNtInPixLay->GetName(), m_h_siDetNtInPixLay));
235 
236  m_h_siDetDBM = new TH1F("h_siDetDBM", "siDetDBM", 100, 0, 2);
237  m_h_siDetDBM->StatOverflows();
238  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetDBM->GetName(), m_h_siDetDBM));
239 
240  m_h_siDetHitDepthDir = new TH1F("h_siDetHitDepthDir", "siDetHitDepthDir", 100, -2, 2);
241  m_h_siDetHitDepthDir->StatOverflows();
242  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetHitDepthDir->GetName(), m_h_siDetHitDepthDir));
243 
244  m_h_siDetHitPhiDir = new TH1F("h_siDetHitPhiDir", "siDetHitPhiDir", 100, -2, 2);
245  m_h_siDetHitPhiDir->StatOverflows();
246  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetHitPhiDir->GetName(), m_h_siDetHitPhiDir));
247 
248  m_h_siDetHitEtaDir = new TH1F("h_siDetHitEtaDir", "siDetHitEtaDir", 100, -2, 2);
249  m_h_siDetHitEtaDir->StatOverflows();
250  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetHitEtaDir->GetName(), m_h_siDetHitEtaDir));
251 
252  m_h_siDetMinR = new TH1F("h_siDetMinR", "siDetMinR", 100, 0, 600);
253  m_h_siDetMinR->StatOverflows();
254  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMinR->GetName(), m_h_siDetMinR));
255 
256  m_h_siDetMaxR = new TH1F("h_siDetMaxR", "siDetMaxR", 100, 0, 600);
257  m_h_siDetMaxR->StatOverflows();
258  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMaxR->GetName(), m_h_siDetMaxR));
259 
260  m_h_siDetMinZ = new TH1F("h_siDetMinZ", "siDetMinZ", 100, -3000, 3000);
261  m_h_siDetMinZ->StatOverflows();
262  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMinZ->GetName(), m_h_siDetMinZ));
263 
264  m_h_siDetMaxZ = new TH1F("h_siDetMaxZ", "siDetMaxZ", 100, -3000, 3000);
265  m_h_siDetMaxZ->StatOverflows();
266  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMaxZ->GetName(), m_h_siDetMaxZ));
267 
268  m_h_siDetMinPhi = new TH1F("h_siDetMinPhi", "siDetMinPhi", 100, -3.5, 3.5);
269  m_h_siDetMinPhi->StatOverflows();
270  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMinPhi->GetName(), m_h_siDetMinPhi));
271 
272  m_h_siDetMaxPhi = new TH1F("h_siDetMaxPhi", "siDetMaxPhi", 100, 3.5, 3.5);
273  m_h_siDetMaxPhi->StatOverflows();
274  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMaxPhi->GetName(), m_h_siDetMaxPhi));
275 
276  m_h_siDetWidth = new TH1F("h_siDetWidth", "siDetWidth", 100, 0, 75);
277  m_h_siDetWidth->StatOverflows();
278  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetWidth->GetName(), m_h_siDetWidth));
279 
280  m_h_siDetMinWidth = new TH1F("h_siDetMinWidth", "siDetMinWidth", 100, 0, 75);
281  m_h_siDetMinWidth->StatOverflows();
282  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMinWidth->GetName(), m_h_siDetMinWidth));
283 
284  m_h_siDetMaxWidth = new TH1F("h_siDetMaxWidth", "siDetMaxWidth", 100, 0, 75);
285  m_h_siDetMaxWidth->StatOverflows();
286  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetMaxWidth->GetName(), m_h_siDetMaxWidth));
287 
288  m_h_siDetLength = new TH1F("h_siDetLength", "siDetLength", 100, 0, 150);
289  m_h_siDetLength->StatOverflows();
290  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetLength->GetName(), m_h_siDetLength));
291 
292  m_h_siDetThick = new TH1F("h_siDetThick", "siDetThick", 100, 0, 1);
293  m_h_siDetThick->StatOverflows();
294  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetThick->GetName(), m_h_siDetThick));
295 
296  m_h_siDetEtaPitch = new TH1F("h_siDetEtaPitch", "siDetEtaPitch", 100, 0, 150);
297  m_h_siDetEtaPitch->StatOverflows();
298  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetEtaPitch->GetName(), m_h_siDetEtaPitch));
299 
300  m_h_siDetPhiPitch = new TH1F("h_siDetPhiPitch", "siDetPhiPitch", 100, 0, 0.1);
301  m_h_siDetPhiPitch->StatOverflows();
302  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_siDetPhiPitch->GetName(), m_h_siDetPhiPitch));
303 
304  m_h_clusID = new TH1F("h_clusID", "clusID", 100, 0, 1e18);
305  m_h_clusID->StatOverflows();
306  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_clusID->GetName(), m_h_clusID));
307 
308  m_h_locpos_x = new TH1F("h_locpos_x", "locpos_x", 100, -40, 40);
309  m_h_locpos_x->StatOverflows();
310  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_locpos_x->GetName(), m_h_locpos_x));
311 
312  m_h_locpos_y = new TH1F("h_locpos_y", "locpos_y", 100, -1, 1);
313  m_h_locpos_y->StatOverflows();
314  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_locpos_y->GetName(), m_h_locpos_y));
315 
316  m_h_rdoID_prd = new TH1F("h_rdoID_prd", "rdoID_prd", 100, 0, 1e18);
317  m_h_rdoID_prd->StatOverflows();
318  ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_rdoID_prd->GetName(), m_h_rdoID_prd));
319 
320  return StatusCode::SUCCESS;
321 }
322 
324  ATH_MSG_DEBUG( "In SCT_FastRDOAnalysis::execute()" );
325 
326  // clear branches
327  m_hitsTimeBin3->clear();
328 
329  m_siCol->clear();
330  m_siRow->clear();
331  m_siPhiR->clear();
332  m_siZ->clear();
333  m_siPos_x->clear();
334  m_siPos_y->clear();
335  m_siPos_z->clear();
336  m_siGangPix->clear();
337  m_siDetID->clear();
338  m_siDetPix->clear();
339  m_siDetSCT->clear();
340  m_siDetBrl->clear();
341  m_siDetEc->clear();
342  m_siDetBlay->clear();
343  m_siDetInPixLay->clear();
344  m_siDetNtInPixLay->clear();
345  m_siDetDBM->clear();
346  m_siDetHitDepthDir->clear();
347  m_siDetHitPhiDir->clear();
348  m_siDetHitEtaDir->clear();
349  m_siDetMinR->clear();
350  m_siDetMaxR->clear();
351  m_siDetMinZ->clear();
352  m_siDetMaxZ->clear();
353  m_siDetMinPhi->clear();
354  m_siDetMaxPhi->clear();
355  m_siDetWidth->clear();
356  m_siDetMinWidth->clear();
357  m_siDetMaxWidth->clear();
358  m_siDetLength->clear();
359  m_siDetThick->clear();
360  m_siDetEtaPitch->clear();
361  m_siDetPhiPitch->clear();
362 
363  m_clusID->clear();
364  m_locpos_x->clear();
365  m_locpos_y->clear();
366  m_rdoID_prd->clear();
367 
368  // get containers -- fill branches + histos
370  if(p_sctClus_cont.isValid()) {
371  // loop over cluster container
372  InDet::SCT_ClusterContainer::const_iterator clusCont_itr(p_sctClus_cont->begin());
373  const InDet::SCT_ClusterContainer::const_iterator clusCont_end(p_sctClus_cont->end());
374  for ( ; clusCont_itr != clusCont_end; ++clusCont_itr ) {
375  const InDet::SCT_ClusterCollection* p_sctClus_coll(*clusCont_itr);
376  InDet::SCT_ClusterCollection::const_iterator clus_itr(p_sctClus_coll->begin());
377  const InDet::SCT_ClusterCollection::const_iterator clus_end(p_sctClus_coll->end());
378  for ( ; clus_itr != clus_end; ++clus_itr ) {
379  // SCT_Cluster
380  const uint16_t hitsTimeBin3((*clus_itr)->hitsInThirdTimeBin());
381  m_hitsTimeBin3->push_back(hitsTimeBin3);
382 
383  m_h_hitsTimeBin3->Fill(hitsTimeBin3);
384 
385  // SiCluster
386  const InDet::SiWidth& siWidth((*clus_itr)->SiCluster::width());
387  const Amg::Vector2D& siColRow(siWidth.colRow());
388  const float siCol(siColRow.x());
389  const float siRow(siColRow.y());
390  const Amg::Vector2D& siPhiRZ(siWidth.widthPhiRZ());
391  const float siPhiR(siPhiRZ.x());
392  const float siZ(siPhiRZ.y());
393 
394  const Amg::Vector3D& siPos((*clus_itr)->SiCluster::globalPosition());
395  const float siPos_x(siPos.x());
396  const float siPos_y(siPos.y());
397  const float siPos_z(siPos.z());
398 
399  const bool siGangPix((*clus_itr)->SiCluster::gangedPixel());
400 
401  const InDetDD::SiDetectorElement* siDetEl((*clus_itr)->SiCluster::detectorElement());
402  const Identifier siDetID((*siDetEl).identify());
403  //const AtlasDetectorID* siDetAtlasID((*siDetEl).getIdHelper());
404  const bool siDetPix((*siDetEl).isPixel());
405  const bool siDetSCT((*siDetEl).isSCT());
406  const bool siDetBrl((*siDetEl).isBarrel());
407  const bool siDetEc((*siDetEl).isEndcap());
408  const bool siDetBlay((*siDetEl).isBlayer());
409  const bool siDetInPixLay((*siDetEl).isInnermostPixelLayer());
410  const bool siDetNtInPixLay((*siDetEl).isNextToInnermostPixelLayer());
411  const bool siDetDBM((*siDetEl).isDBM());
412  const double siDetHitDepthDir((*siDetEl).hitDepthDirection());
413  const double siDetHitPhiDir((*siDetEl).hitPhiDirection());
414  const double siDetHitEtaDir((*siDetEl).hitEtaDirection());
415  const double siDetMinR((*siDetEl).rMin());
416  const double siDetMaxR((*siDetEl).rMax());
417  const double siDetMinZ((*siDetEl).zMin());
418  const double siDetMaxZ((*siDetEl).zMax());
419  const double siDetMinPhi((*siDetEl).phiMin());
420  const double siDetMaxPhi((*siDetEl).phiMax());
421  const double siDetWidth((*siDetEl).width());
422  const double siDetMinWidth((*siDetEl).minWidth());
423  const double siDetMaxWidth((*siDetEl).maxWidth());
424  const double siDetLength((*siDetEl).length());
425  const double siDetThick((*siDetEl).thickness());
426  const double siDetEtaPitch((*siDetEl).etaPitch());
427  const double siDetPhiPitch((*siDetEl).phiPitch());
428 
429  const unsigned long long siDetID_int = siDetID.get_compact();
430 
431  m_siCol->push_back(siCol);
432  m_siRow->push_back(siRow);
433  m_siPhiR->push_back(siPhiR);
434  m_siZ->push_back(siZ);
435  m_siPos_x->push_back(siPos_x);
436  m_siPos_y->push_back(siPos_y);
437  m_siPos_z->push_back(siPos_z);
438  m_siGangPix->push_back(siGangPix);
439  m_siDetID->push_back(siDetID_int);
440  m_siDetPix->push_back(siDetPix);
441  m_siDetSCT->push_back(siDetSCT);
442  m_siDetBrl->push_back(siDetBrl);
443  m_siDetEc->push_back(siDetEc);
444  m_siDetBlay->push_back(siDetBlay);
445  m_siDetInPixLay->push_back(siDetInPixLay);
446  m_siDetNtInPixLay->push_back(siDetNtInPixLay);
447  m_siDetDBM->push_back(siDetDBM);
448  m_siDetHitDepthDir->push_back(siDetHitDepthDir);
449  m_siDetHitPhiDir->push_back(siDetHitPhiDir);
450  m_siDetHitEtaDir->push_back(siDetHitEtaDir);
451  m_siDetMinR->push_back(siDetMinR);
452  m_siDetMaxR->push_back(siDetMaxR);
453  m_siDetMinZ->push_back(siDetMinZ);
454  m_siDetMaxZ->push_back(siDetMaxZ);
455  m_siDetMinPhi->push_back(siDetMinPhi);
456  m_siDetMaxPhi->push_back(siDetMaxPhi);
457  m_siDetWidth->push_back(siDetWidth);
458  m_siDetMinWidth->push_back(siDetMinWidth);
459  m_siDetMaxWidth->push_back(siDetMaxWidth);
460  m_siDetLength->push_back(siDetLength);
461  m_siDetThick->push_back(siDetThick);
462  m_siDetEtaPitch->push_back(siDetEtaPitch);
463  m_siDetPhiPitch->push_back(siDetPhiPitch);
464 
465  m_h_siCol->Fill(siCol);
466  m_h_siRow->Fill(siRow);
467  m_h_siPhiR->Fill(siPhiR);
468  m_h_siZ->Fill(siZ);
469  m_h_siPos_x->Fill(siPos_x);
470  m_h_siPos_y->Fill(siPos_y);
471  m_h_siPos_z->Fill(siPos_z);
472  m_h_siGangPix->Fill(siGangPix);
473  m_h_siDetID->Fill(siDetID_int);
474  m_h_siDetPix->Fill(siDetPix);
475  m_h_siDetSCT->Fill(siDetSCT);
476  m_h_siDetBrl->Fill(siDetBrl);
477  m_h_siDetEc->Fill(siDetEc);
478  m_h_siDetBlay->Fill(siDetBlay);
479  m_h_siDetInPixLay->Fill(siDetInPixLay);
480  m_h_siDetNtInPixLay->Fill(siDetNtInPixLay);
481  m_h_siDetDBM->Fill(siDetDBM);
482  m_h_siDetHitDepthDir->Fill(siDetHitDepthDir);
483  m_h_siDetHitPhiDir->Fill(siDetHitPhiDir);
484  m_h_siDetHitEtaDir->Fill(siDetHitEtaDir);
485  m_h_siDetMinR->Fill(siDetMinR);
486  m_h_siDetMaxR->Fill(siDetMaxR);
487  m_h_siDetMinZ->Fill(siDetMinZ);
488  m_h_siDetMaxZ->Fill(siDetMaxZ);
489  m_h_siDetMinPhi->Fill(siDetMinPhi);
490  m_h_siDetMaxPhi->Fill(siDetMaxPhi);
491  m_h_siDetWidth->Fill(siDetWidth);
492  m_h_siDetMinWidth->Fill(siDetMinWidth);
493  m_h_siDetMaxWidth->Fill(siDetMaxWidth);
494  m_h_siDetLength->Fill(siDetLength);
495  m_h_siDetThick->Fill(siDetThick);
496  m_h_siDetEtaPitch->Fill(siDetEtaPitch);
497  m_h_siDetPhiPitch->Fill(siDetPhiPitch);
498 
499  // Trk::PrepRawData
500  const Identifier clusID((*clus_itr)->PrepRawData::identify());
501  const unsigned long long clusID_int = clusID.get_compact();
502 
503  const Amg::Vector2D& locPos((*clus_itr)->PrepRawData::localPosition());
504  float locpos_x(locPos.x());
505  float locpos_y(locPos.y());
506 
507  const std::vector<Identifier>& rdoID_v((*clus_itr)->PrepRawData::rdoList());
508 
509  m_clusID->push_back(clusID_int);
510  m_locpos_x->push_back(locpos_x);
511  m_locpos_y->push_back(locpos_y);
512  for (size_t k = 0; k != rdoID_v.size(); ++k) {
513  const unsigned long long rdoID_prd_int = rdoID_v.at(k).get_compact();
514  m_rdoID_prd->push_back(rdoID_prd_int);
515  m_h_rdoID_prd->Fill(rdoID_prd_int);
516  }
517 
518  m_h_clusID->Fill(clusID_int);
519  m_h_locpos_x->Fill(locpos_x);
520  m_h_locpos_y->Fill(locpos_y);
521  }
522  }
523  }
524 
525  if (m_tree) {
526  m_tree->Fill();
527  }
528 
529  return StatusCode::SUCCESS;
530 }
531 
533  return StatusCode::SUCCESS;
534 }
SCT_FastRDOAnalysis::m_h_siDetMaxZ
TH1 * m_h_siDetMaxZ
Definition: SCT_FastRDOAnalysis.h:109
SCT_FastRDOAnalysis::m_h_siDetHitPhiDir
TH1 * m_h_siDetHitPhiDir
Definition: SCT_FastRDOAnalysis.h:104
SCT_FastRDOAnalysis::m_siDetMaxWidth
std::vector< double > * m_siDetMaxWidth
Definition: SCT_FastRDOAnalysis.h:72
SCT_FastRDOAnalysis::m_h_rdoID_prd
TH1 * m_h_rdoID_prd
Definition: SCT_FastRDOAnalysis.h:122
SCT_FastRDOAnalysis::m_h_siPos_y
TH1 * m_h_siPos_y
Definition: SCT_FastRDOAnalysis.h:91
SCT_FastRDOAnalysis::execute
virtual StatusCode execute() override final
Definition: SCT_FastRDOAnalysis.cxx:323
SCT_FastRDOAnalysis::m_h_siCol
TH1 * m_h_siCol
Definition: SCT_FastRDOAnalysis.h:86
SCT_FastRDOAnalysis::m_h_siDetMinZ
TH1 * m_h_siDetMinZ
Definition: SCT_FastRDOAnalysis.h:108
SCT_FastRDOAnalysis::m_h_siDetLength
TH1 * m_h_siDetLength
Definition: SCT_FastRDOAnalysis.h:115
SCT_FastRDOAnalysis::m_h_siDetHitEtaDir
TH1 * m_h_siDetHitEtaDir
Definition: SCT_FastRDOAnalysis.h:105
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SCT_FastRDOAnalysis::m_h_siDetMaxR
TH1 * m_h_siDetMaxR
Definition: SCT_FastRDOAnalysis.h:107
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
SCT_FastRDOAnalysis::m_siDetBrl
std::vector< bool > * m_siDetBrl
Definition: SCT_FastRDOAnalysis.h:55
SCT_FastRDOAnalysis::m_ntupleFileName
StringProperty m_ntupleFileName
Definition: SCT_FastRDOAnalysis.h:125
InDet::SiWidth::widthPhiRZ
const Amg::Vector2D & widthPhiRZ() const
Definition: SiWidth.h:121
SCT_FastRDOAnalysis::m_siDetWidth
std::vector< double > * m_siDetWidth
Definition: SCT_FastRDOAnalysis.h:70
SCT_FastRDOAnalysis.h
SCT_FastRDOAnalysis::m_h_siDetWidth
TH1 * m_h_siDetWidth
Definition: SCT_FastRDOAnalysis.h:112
SCT_FastRDOAnalysis::m_h_siDetMinWidth
TH1 * m_h_siDetMinWidth
Definition: SCT_FastRDOAnalysis.h:113
SCT_FastRDOAnalysis::m_siDetMaxZ
std::vector< double > * m_siDetMaxZ
Definition: SCT_FastRDOAnalysis.h:67
SCT_FastRDOAnalysis::m_siDetBlay
std::vector< bool > * m_siDetBlay
Definition: SCT_FastRDOAnalysis.h:57
SCT_FastRDOAnalysis::m_siDetID
std::vector< unsigned long long > * m_siDetID
Definition: SCT_FastRDOAnalysis.h:52
SCT_FastRDOAnalysis::m_h_siPhiR
TH1 * m_h_siPhiR
Definition: SCT_FastRDOAnalysis.h:88
SCT_FastRDOAnalysis::m_siPos_y
std::vector< float > * m_siPos_y
Definition: SCT_FastRDOAnalysis.h:49
Identifier::get_compact
value_type get_compact() const
Get the compact id.
SCT_FastRDOAnalysis::m_siDetDBM
std::vector< bool > * m_siDetDBM
Definition: SCT_FastRDOAnalysis.h:60
SCT_FastRDOAnalysis::m_siDetEc
std::vector< bool > * m_siDetEc
Definition: SCT_FastRDOAnalysis.h:56
SCT_FastRDOAnalysis::m_siDetMinR
std::vector< double > * m_siDetMinR
Definition: SCT_FastRDOAnalysis.h:64
SCT_FastRDOAnalysis::m_clusID
std::vector< unsigned long long > * m_clusID
Definition: SCT_FastRDOAnalysis.h:79
SCT_FastRDOAnalysis::m_siPos_z
std::vector< float > * m_siPos_z
Definition: SCT_FastRDOAnalysis.h:50
SCT_FastRDOAnalysis::m_siPos_x
std::vector< float > * m_siPos_x
Definition: SCT_FastRDOAnalysis.h:48
SCT_FastRDOAnalysis::m_h_siZ
TH1 * m_h_siZ
Definition: SCT_FastRDOAnalysis.h:89
SCT_FastRDOAnalysis::m_path
StringProperty m_path
Definition: SCT_FastRDOAnalysis.h:128
SCT_FastRDOAnalysis::m_siDetMaxPhi
std::vector< double > * m_siDetMaxPhi
Definition: SCT_FastRDOAnalysis.h:69
SCT_FastRDOAnalysis::m_ntupleDirName
StringProperty m_ntupleDirName
Definition: SCT_FastRDOAnalysis.h:126
SCT_FastRDOAnalysis::m_h_siDetBrl
TH1 * m_h_siDetBrl
Definition: SCT_FastRDOAnalysis.h:97
SCT_FastRDOAnalysis::m_inputKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_inputKey
Definition: SCT_FastRDOAnalysis.h:36
SCT_FastRDOAnalysis::m_h_siDetMaxPhi
TH1 * m_h_siDetMaxPhi
Definition: SCT_FastRDOAnalysis.h:111
SCT_FastRDOAnalysis::SCT_FastRDOAnalysis
SCT_FastRDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_FastRDOAnalysis.cxx:17
SCT_FastRDOAnalysis::m_h_siDetDBM
TH1 * m_h_siDetDBM
Definition: SCT_FastRDOAnalysis.h:102
SCT_FastRDOAnalysis::m_siDetHitEtaDir
std::vector< double > * m_siDetHitEtaDir
Definition: SCT_FastRDOAnalysis.h:63
SCT_FastRDOAnalysis::m_siDetMaxR
std::vector< double > * m_siDetMaxR
Definition: SCT_FastRDOAnalysis.h:65
SCT_FastRDOAnalysis::m_h_siDetEtaPitch
TH1 * m_h_siDetEtaPitch
Definition: SCT_FastRDOAnalysis.h:117
SCT_FastRDOAnalysis::m_h_siPos_z
TH1 * m_h_siPos_z
Definition: SCT_FastRDOAnalysis.h:92
SCT_FastRDOAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: SCT_FastRDOAnalysis.h:130
SCT_FastRDOAnalysis::m_siZ
std::vector< float > * m_siZ
Definition: SCT_FastRDOAnalysis.h:47
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
SCT_FastRDOAnalysis::m_siDetNtInPixLay
std::vector< bool > * m_siDetNtInPixLay
Definition: SCT_FastRDOAnalysis.h:59
SCT_FastRDOAnalysis::m_h_siDetThick
TH1 * m_h_siDetThick
Definition: SCT_FastRDOAnalysis.h:116
SCT_FastRDOAnalysis::m_h_siDetSCT
TH1 * m_h_siDetSCT
Definition: SCT_FastRDOAnalysis.h:96
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SCT_FastRDOAnalysis::m_siDetHitPhiDir
std::vector< double > * m_siDetHitPhiDir
Definition: SCT_FastRDOAnalysis.h:62
SCT_FastRDOAnalysis::m_h_siGangPix
TH1 * m_h_siGangPix
Definition: SCT_FastRDOAnalysis.h:93
SCT_FastRDOAnalysis::m_h_siDetMinR
TH1 * m_h_siDetMinR
Definition: SCT_FastRDOAnalysis.h:106
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT_FastRDOAnalysis::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_FastRDOAnalysis.h:41
SCT_FastRDOAnalysis::m_siRow
std::vector< float > * m_siRow
Definition: SCT_FastRDOAnalysis.h:45
SCT_FastRDOAnalysis::m_h_siDetNtInPixLay
TH1 * m_h_siDetNtInPixLay
Definition: SCT_FastRDOAnalysis.h:101
SCT_FastRDOAnalysis::m_h_hitsTimeBin3
TH1 * m_h_hitsTimeBin3
Definition: SCT_FastRDOAnalysis.h:85
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SCT_FastRDOAnalysis::m_siDetMinPhi
std::vector< double > * m_siDetMinPhi
Definition: SCT_FastRDOAnalysis.h:68
SCT_FastRDOAnalysis::m_locpos_x
std::vector< float > * m_locpos_x
Definition: SCT_FastRDOAnalysis.h:80
SCT_FastRDOAnalysis::m_siCol
std::vector< float > * m_siCol
Definition: SCT_FastRDOAnalysis.h:44
SCT_FastRDOAnalysis::m_siDetPix
std::vector< bool > * m_siDetPix
Definition: SCT_FastRDOAnalysis.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_FastRDOAnalysis::m_h_siDetPhiPitch
TH1 * m_h_siDetPhiPitch
Definition: SCT_FastRDOAnalysis.h:118
SCT_FastRDOAnalysis::m_h_siDetMinPhi
TH1 * m_h_siDetMinPhi
Definition: SCT_FastRDOAnalysis.h:110
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SCT_FastRDOAnalysis::initialize
virtual StatusCode initialize() override final
Definition: SCT_FastRDOAnalysis.cxx:102
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SCT_FastRDOAnalysis::m_h_siDetHitDepthDir
TH1 * m_h_siDetHitDepthDir
Definition: SCT_FastRDOAnalysis.h:103
SCT_FastRDOAnalysis::m_siDetInPixLay
std::vector< bool > * m_siDetInPixLay
Definition: SCT_FastRDOAnalysis.h:58
SCT_FastRDOAnalysis::m_h_siDetBlay
TH1 * m_h_siDetBlay
Definition: SCT_FastRDOAnalysis.h:99
SCT_FastRDOAnalysis::m_siDetThick
std::vector< double > * m_siDetThick
Definition: SCT_FastRDOAnalysis.h:74
SCT_FastRDOAnalysis::m_h_siRow
TH1 * m_h_siRow
Definition: SCT_FastRDOAnalysis.h:87
SCT_FastRDOAnalysis::m_h_locpos_y
TH1 * m_h_locpos_y
Definition: SCT_FastRDOAnalysis.h:121
SCT_FastRDOAnalysis::m_siDetSCT
std::vector< bool > * m_siDetSCT
Definition: SCT_FastRDOAnalysis.h:54
SCT_FastRDOAnalysis::m_tree
TTree * m_tree
Definition: SCT_FastRDOAnalysis.h:124
SCT_FastRDOAnalysis::m_h_siDetMaxWidth
TH1 * m_h_siDetMaxWidth
Definition: SCT_FastRDOAnalysis.h:114
SCT_FastRDOAnalysis::m_h_locpos_x
TH1 * m_h_locpos_x
Definition: SCT_FastRDOAnalysis.h:120
SCT_FastRDOAnalysis::m_h_siDetEc
TH1 * m_h_siDetEc
Definition: SCT_FastRDOAnalysis.h:98
SCT_FastRDOAnalysis::m_siDetMinZ
std::vector< double > * m_siDetMinZ
Definition: SCT_FastRDOAnalysis.h:66
SCT_FastRDOAnalysis::m_locpos_y
std::vector< float > * m_locpos_y
Definition: SCT_FastRDOAnalysis.h:81
SCT_FastRDOAnalysis::m_hitsTimeBin3
std::vector< uint16_t > * m_hitsTimeBin3
Definition: SCT_FastRDOAnalysis.h:38
InDet::SiWidth
Definition: SiWidth.h:25
InDet::SiWidth::colRow
const Amg::Vector2D & colRow() const
Definition: SiWidth.h:115
SCT_FastRDOAnalysis::m_siDetHitDepthDir
std::vector< double > * m_siDetHitDepthDir
Definition: SCT_FastRDOAnalysis.h:61
SCT_FastRDOAnalysis::m_siDetMinWidth
std::vector< double > * m_siDetMinWidth
Definition: SCT_FastRDOAnalysis.h:71
SCT_FastRDOAnalysis::m_siDetPhiPitch
std::vector< double > * m_siDetPhiPitch
Definition: SCT_FastRDOAnalysis.h:76
SCT_FastRDOAnalysis::finalize
virtual StatusCode finalize() override final
Definition: SCT_FastRDOAnalysis.cxx:532
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
SCT_FastRDOAnalysis::m_rdoID_prd
std::vector< unsigned long long > * m_rdoID_prd
Definition: SCT_FastRDOAnalysis.h:82
SCT_FastRDOAnalysis::m_ntupleTreeName
StringProperty m_ntupleTreeName
Definition: SCT_FastRDOAnalysis.h:127
ReadHandle.h
Handle class for reading from StoreGate.
SCT_FastRDOAnalysis::m_siDetLength
std::vector< double > * m_siDetLength
Definition: SCT_FastRDOAnalysis.h:73
InDet::SCT_ClusterCollection
Trk::PrepRawDataCollection< SCT_Cluster > SCT_ClusterCollection
Definition: SCT_ClusterCollection.h:26
SCT_FastRDOAnalysis::m_siGangPix
std::vector< bool > * m_siGangPix
Definition: SCT_FastRDOAnalysis.h:51
SCT_FastRDOAnalysis::m_h_clusID
TH1 * m_h_clusID
Definition: SCT_FastRDOAnalysis.h:119
SCT_FastRDOAnalysis::m_h_siDetInPixLay
TH1 * m_h_siDetInPixLay
Definition: SCT_FastRDOAnalysis.h:100
SCT_FastRDOAnalysis::m_h_siDetPix
TH1 * m_h_siDetPix
Definition: SCT_FastRDOAnalysis.h:95
SCT_FastRDOAnalysis::m_siPhiR
std::vector< float > * m_siPhiR
Definition: SCT_FastRDOAnalysis.h:46
fitman.k
k
Definition: fitman.py:528
SCT_FastRDOAnalysis::m_h_siDetID
TH1 * m_h_siDetID
Definition: SCT_FastRDOAnalysis.h:94
SCT_FastRDOAnalysis::m_h_siPos_x
TH1 * m_h_siPos_x
Definition: SCT_FastRDOAnalysis.h:90
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_FastRDOAnalysis::m_siDetEtaPitch
std::vector< double > * m_siDetEtaPitch
Definition: SCT_FastRDOAnalysis.h:75