ATLAS Offline Software
Loading...
Searching...
No Matches
PixelFastRDOAnalysis.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
8
9#include "TTree.h"
10#include "TString.h"
11
12#include <algorithm>
13#include <math.h>
14#include <functional>
15#include <iostream>
16
17PixelFastRDOAnalysis::PixelFastRDOAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
18 : AthAlgorithm(name, pSvcLocator)
19 , m_inputKey("PixelClusters")
20 , m_omegax(0)
21 , m_omegay(0)
22 , m_tot(0)
23 , m_totalTot(0)
24 , m_charge(0)
25 , m_totalCharge(0)
26 , m_eLoss(0)
27 , m_fake(0)
28 , m_ambig(0)
29 , m_split(0)
30 , m_splitProb1(0)
31 , m_splitProb2(0)
33 , m_LVL1A(0)
34
35 , m_siCol(0)
36 , m_siRow(0)
37 , m_siPhiR(0)
38 , m_siZ(0)
39 , m_siPos_x(0)
40 , m_siPos_y(0)
41 , m_siPos_z(0)
42 , m_siGangPix(0)
43 , m_siDetID(0)
44 , m_siDetPix(0)
45 , m_siDetSCT(0)
46 , m_siDetBrl(0)
47 , m_siDetEc(0)
48 , m_siDetBlay(0)
51 , m_siDetDBM(0)
55 , m_siDetMinR(0)
56 , m_siDetMaxR(0)
57 , m_siDetMinZ(0)
58 , m_siDetMaxZ(0)
59 , m_siDetMinPhi(0)
60 , m_siDetMaxPhi(0)
61 , m_siDetWidth(0)
64 , m_siDetLength(0)
65 , m_siDetThick(0)
68 , m_clusID(0)
69 , m_locpos_x(0)
70 , m_locpos_y(0)
71 , m_rdoID_prd(0)
72
73 , m_h_omegax(0)
74 , m_h_omegay(0)
75 , m_h_tot(0)
76 , m_h_totalTot(0)
77 , m_h_charge(0)
79 , m_h_eLoss(0)
80 , m_h_fake(0)
81 , m_h_ambig(0)
82 , m_h_split(0)
86 , m_h_LVL1A(0)
87 , m_h_siCol(0)
88 , m_h_siRow(0)
89 , m_h_siPhiR(0)
90 , m_h_siZ(0)
91 , m_h_siPos_x(0)
92 , m_h_siPos_y(0)
93 , m_h_siPos_z(0)
94 , m_h_siGangPix(0)
95 , m_h_siDetID(0)
96 , m_h_siDetPix(0)
97 , m_h_siDetSCT(0)
98 , m_h_siDetBrl(0)
99 , m_h_siDetEc(0)
100 , m_h_siDetBlay(0)
103 , m_h_siDetDBM(0)
107 , m_h_siDetMinR(0)
108 , m_h_siDetMaxR(0)
109 , m_h_siDetMinZ(0)
110 , m_h_siDetMaxZ(0)
111 , m_h_siDetMinPhi(0)
112 , m_h_siDetMaxPhi(0)
113 , m_h_siDetWidth(0)
116 , m_h_siDetLength(0)
117 , m_h_siDetThick(0)
120 , m_h_clusID(0)
121 , m_h_locpos_x(0)
122 , m_h_locpos_y(0)
123 , m_h_rdoID_prd(0)
124
125 , m_tree(0)
126 , m_ntupleFileName("/ntuples/file1")
127 , m_ntupleDirName("/PixelFastRDOAnalysis/")
128 , m_ntupleTreeName("/PixelFastRDOAna")
129 , m_path("/PixelFastRDOAnalysis/")
130 , m_thistSvc("THistSvc", name)
131{
132 declareProperty("InputKey", m_inputKey);
133 declareProperty("NtupleFileName", m_ntupleFileName);
134 declareProperty("NtupleDirectoryName", m_ntupleDirName);
135 declareProperty("NtupleTreeName", m_ntupleTreeName);
136 declareProperty("HistPath", m_path);
137}
138
140 ATH_MSG_DEBUG( "Initializing PixelFastRDOAnalysis" );
141
142 // This will check that the properties were initialized
143 // properly by job configuration.
144 ATH_CHECK( m_inputKey.initialize() );
145
146 // Grab Ntuple and histogramming service for tree
147 ATH_CHECK(m_thistSvc.retrieve());
148
149 m_tree = new TTree(TString(m_ntupleTreeName), "PixelFastRDOAna");
150 std::string fullNtupleName = m_ntupleFileName + m_ntupleDirName + m_ntupleTreeName;
151 ATH_CHECK(m_thistSvc->regTree(fullNtupleName, m_tree));
152 if (m_tree) {
153 // TREE BRANCHES
154 // PixelCluster
155 m_tree->Branch("omegax", &m_omegax);
156 m_tree->Branch("omegay", &m_omegay);
157 m_tree->Branch("tot", &m_tot);
158 m_tree->Branch("totalTot", &m_totalTot);
159 m_tree->Branch("charge", &m_charge);
160 m_tree->Branch("totalCharge", &m_totalCharge);
161 m_tree->Branch("eLoss", &m_eLoss);
162 m_tree->Branch("fake", &m_fake);
163 m_tree->Branch("ambig", &m_ambig);
164 m_tree->Branch("split", &m_split);
165 m_tree->Branch("splitProb1", &m_splitProb1);
166 m_tree->Branch("splitProb2", &m_splitProb2);
167 m_tree->Branch("splitInfoRaw", &m_splitInfoRaw);
168 m_tree->Branch("LVL1A", &m_LVL1A);
169 // SiCluster
170 m_tree->Branch("siCol", &m_siCol);
171 m_tree->Branch("siRow", &m_siRow);
172 m_tree->Branch("siPhiR", &m_siPhiR);
173 m_tree->Branch("siZ", &m_siZ);
174 m_tree->Branch("siPos_x", &m_siPos_x);
175 m_tree->Branch("siPos_y", &m_siPos_y);
176 m_tree->Branch("siPos_z", &m_siPos_z);
177 m_tree->Branch("siGangPix", &m_siGangPix);
178 m_tree->Branch("siDetID", &m_siDetID);
179 m_tree->Branch("siDetPix", &m_siDetPix);
180 m_tree->Branch("siDetSCT", &m_siDetSCT);
181 m_tree->Branch("siDetBrl", &m_siDetBrl);
182 m_tree->Branch("siDetEc", &m_siDetEc);
183 m_tree->Branch("siDetBlay", &m_siDetBlay);
184 m_tree->Branch("siDetInPixLay", &m_siDetInPixLay);
185 m_tree->Branch("siDetNtInPixLay", &m_siDetNtInPixLay);
186 m_tree->Branch("siDetDBM", &m_siDetDBM);
187 m_tree->Branch("siDetHitDepthDir", &m_siDetHitDepthDir);
188 m_tree->Branch("siDetHitPhiDir", &m_siDetHitPhiDir);
189 m_tree->Branch("siDetHitEtaDir", &m_siDetHitEtaDir);
190 m_tree->Branch("siDetMinR", &m_siDetMinR);
191 m_tree->Branch("siDetMaxR", &m_siDetMaxR);
192 m_tree->Branch("siDetMinZ", &m_siDetMinZ);
193 m_tree->Branch("siDetMaxZ", &m_siDetMaxZ);
194 m_tree->Branch("siDetMinPhi", &m_siDetMinPhi);
195 m_tree->Branch("siDetMaxPhi", &m_siDetMaxPhi);
196 m_tree->Branch("siDetWidth", &m_siDetWidth);
197 m_tree->Branch("siDetMinWidth", &m_siDetMinWidth);
198 m_tree->Branch("siDetMaxWidth", &m_siDetMaxWidth);
199 m_tree->Branch("siDetLength", &m_siDetLength);
200 m_tree->Branch("siDetThick", &m_siDetThick);
201 m_tree->Branch("siDetEtaPitch", &m_siDetEtaPitch);
202 m_tree->Branch("siDetPhiPitch", &m_siDetPhiPitch);
203 // Trk::PrepRawData
204 m_tree->Branch("clusID", &m_clusID);
205 m_tree->Branch("locpos_x", &m_locpos_x);
206 m_tree->Branch("locpos_y", &m_locpos_y);
207 m_tree->Branch("rdoID_prd", &m_rdoID_prd);
208 }
209 else {
210 ATH_MSG_ERROR("No tree found!");
211 }
212
213 // HISTOGRAMS
214 m_h_omegax = new TH1F("h_omegax", "omegax", 100, -3, 3);
215 m_h_omegax->StatOverflows();
216 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_omegax->GetName(), m_h_omegax));
217
218 m_h_omegay = new TH1F("h_omegay", "omegay", 100, -3, 3);
219 m_h_omegay->StatOverflows();
220 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_omegay->GetName(), m_h_omegay));
221
222 // LOOK AT
223 m_h_tot = new TH1F("h_tot", "tot", 100, -3, 3);
224 m_h_tot->StatOverflows();
225 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_tot->GetName(), m_h_tot));
226
227 m_h_totalTot = new TH1F("h_totalTot", "totalTot", 100, 0, 255);
228 m_h_totalTot->StatOverflows();
229 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_totalTot->GetName(), m_h_totalTot));
230
231 m_h_charge = new TH1F("h_charge", "charge", 100, 0, 2e6);
232 m_h_charge->StatOverflows();
233 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_charge->GetName(), m_h_charge));
234
235 m_h_totalCharge = new TH1F("h_totalCharge", "totalCharge", 100, 0, 2e6);
236 m_h_totalCharge->StatOverflows();
238
239 m_h_eLoss = new TH1F("h_eLoss", "eLoss", 100, -2000, 0);
240 m_h_eLoss->StatOverflows();
241 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_eLoss->GetName(), m_h_eLoss));
242
243 m_h_fake = new TH1F("h_fake", "fake", 100, 0, 2);
244 m_h_fake->StatOverflows();
245 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_fake->GetName(), m_h_fake));
246
247 m_h_ambig = new TH1F("h_ambig", "ambig", 100, 0, 2);
248 m_h_ambig->StatOverflows();
249 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ambig->GetName(), m_h_ambig));
250
251 m_h_split = new TH1F("h_split", "split", 100, -1, 1);
252 m_h_split->StatOverflows();
253 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_split->GetName(), m_h_split));
254
255 m_h_splitProb1 = new TH1F("h_splitProb1", "splitProb1", 100, -1, 1);
256 m_h_splitProb1->StatOverflows();
258
259 m_h_splitProb2 = new TH1F("h_splitProb2", "splitProb2", 100, -1, 1);
260 m_h_splitProb2->StatOverflows();
262
263 // LOOK AT
264 m_h_splitInfoRaw = new TH1F("h_splitInfoRaw", "splitInfoRaw", 100, -1, 1);
265 m_h_splitInfoRaw->StatOverflows();
267
268 m_h_LVL1A = new TH1F("h_LVL1A", "LVL1A", 100, -1, 1);
269 m_h_LVL1A->StatOverflows();
270 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_LVL1A->GetName(), m_h_LVL1A));
271
272 m_h_siCol = new TH1F("h_siCol", "siCol", 100, 0, 40);
273 m_h_siCol->StatOverflows();
274 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siCol->GetName(), m_h_siCol));
275
276 m_h_siRow = new TH1F("h_siRow", "siRow", 100, 0, 2);
277 m_h_siRow->StatOverflows();
278 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siRow->GetName(), m_h_siRow));
279
280 m_h_siPhiR = new TH1F("h_siPhiR", "siPhiR", 100, 0, 3.5);
281 m_h_siPhiR->StatOverflows();
282 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siPhiR->GetName(), m_h_siPhiR));
283
284 m_h_siZ = new TH1F("h_siZ", "siZ", 100, 0, 20);
285 m_h_siZ->StatOverflows();
286 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siZ->GetName(), m_h_siZ));
287
288 m_h_siPos_x = new TH1F("h_siPos_x", "siPos_x", 100, -600, 600);
289 m_h_siPos_x->StatOverflows();
290 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siPos_x->GetName(), m_h_siPos_x));
291
292 m_h_siPos_y = new TH1F("h_siPos_y", "siPos_y", 100, -600, 600);
293 m_h_siPos_y->StatOverflows();
294 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siPos_y->GetName(), m_h_siPos_y));
295
296 m_h_siPos_z = new TH1F("h_siPos_z", "siPos_z", 100, -3000, 3000);
297 m_h_siPos_z->StatOverflows();
298 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siPos_z->GetName(), m_h_siPos_z));
299
300 m_h_siGangPix = new TH1F("h_siGangPix", "siGangPix", 100, 0, 2);
301 m_h_siGangPix->StatOverflows();
302 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siGangPix->GetName(), m_h_siGangPix));
303
304 m_h_siDetID = new TH1F("h_siDetID", "siDetID", 100, 0, 4e17);
305 m_h_siDetID->StatOverflows();
306 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetID->GetName(), m_h_siDetID));
307
308 m_h_siDetPix = new TH1F("h_siDetPix", "siDetPix", 100, 0, 2);
309 m_h_siDetPix->StatOverflows();
310 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetPix->GetName(), m_h_siDetPix));
311
312 m_h_siDetSCT = new TH1F("h_siDetSCT", "siDetSCT", 100, 0, 2);
313 m_h_siDetSCT->StatOverflows();
314 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetSCT->GetName(), m_h_siDetSCT));
315
316 m_h_siDetBrl = new TH1F("h_siDetBrl", "siDetBrl", 100, 0, 2);
317 m_h_siDetBrl->StatOverflows();
318 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetBrl->GetName(), m_h_siDetBrl));
319
320 m_h_siDetEc = new TH1F("h_siDetEc", "siDetEc", 100, 0, 2);
321 m_h_siDetEc->StatOverflows();
322 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetEc->GetName(), m_h_siDetEc));
323
324 m_h_siDetBlay = new TH1F("h_siDetBlay", "siDetBlay", 100, 0, 2);
325 m_h_siDetBlay->StatOverflows();
326 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetBlay->GetName(), m_h_siDetBlay));
327
328 m_h_siDetInPixLay = new TH1F("h_siDetInPixLay", "siDetInPixLay", 100, 0, 2);
329 m_h_siDetInPixLay->StatOverflows();
331
332 m_h_siDetNtInPixLay = new TH1F("h_siDetNtInPixLay", "siDetNtInPixLay", 100, 0, 2);
333 m_h_siDetNtInPixLay->StatOverflows();
335
336 m_h_siDetDBM = new TH1F("h_siDetDBM", "siDetDBM", 100, 0, 2);
337 m_h_siDetDBM->StatOverflows();
338 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetDBM->GetName(), m_h_siDetDBM));
339
340 m_h_siDetHitDepthDir = new TH1F("h_siDetHitDepthDir", "siDetHitDepthDir", 100, -2, 2);
341 m_h_siDetHitDepthDir->StatOverflows();
343
344 m_h_siDetHitPhiDir = new TH1F("h_siDetHitPhiDir", "siDetHitPhiDir", 100, -2, 2);
345 m_h_siDetHitPhiDir->StatOverflows();
347
348 m_h_siDetHitEtaDir = new TH1F("h_siDetHitEtaDir", "siDetHitEtaDir", 100, -2, 2);
349 m_h_siDetHitEtaDir->StatOverflows();
351
352 m_h_siDetMinR = new TH1F("h_siDetMinR", "siDetMinR", 100, 0, 200);
353 m_h_siDetMinR->StatOverflows();
354 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetMinR->GetName(), m_h_siDetMinR));
355
356 m_h_siDetMaxR = new TH1F("h_siDetMaxR", "siDetMaxR", 100, 0, 200);
357 m_h_siDetMaxR->StatOverflows();
358 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetMaxR->GetName(), m_h_siDetMaxR));
359
360 m_h_siDetMinZ = new TH1F("h_siDetMinZ", "siDetMinZ", 100, -1500, 1500);
361 m_h_siDetMinZ->StatOverflows();
362 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetMinZ->GetName(), m_h_siDetMinZ));
363
364 m_h_siDetMaxZ = new TH1F("h_siDetMaxZ", "siDetMaxZ", 100, -3000, 3000);
365 m_h_siDetMaxZ->StatOverflows();
366 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_siDetMaxZ->GetName(), m_h_siDetMaxZ));
367
368 m_h_siDetMinPhi = new TH1F("h_siDetMinPhi", "siDetMinPhi", 100, -3.5, 3.5);
369 m_h_siDetMinPhi->StatOverflows();
371
372 m_h_siDetMaxPhi = new TH1F("h_siDetMaxPhi", "siDetMaxPhi", 100, 3.5, 3.5);
373 m_h_siDetMaxPhi->StatOverflows();
375
376 m_h_siDetWidth = new TH1F("h_siDetWidth", "siDetWidth", 100, 0, 25);
377 m_h_siDetWidth->StatOverflows();
379
380 m_h_siDetMinWidth = new TH1F("h_siDetMinWidth", "siDetMinWidth", 100, 0, 25);
381 m_h_siDetMinWidth->StatOverflows();
383
384 m_h_siDetMaxWidth = new TH1F("h_siDetMaxWidth", "siDetMaxWidth", 100, 0, 25);
385 m_h_siDetMaxWidth->StatOverflows();
387
388 m_h_siDetLength = new TH1F("h_siDetLength", "siDetLength", 100, 0, 75);
389 m_h_siDetLength->StatOverflows();
391
392 m_h_siDetThick = new TH1F("h_siDetThick", "siDetThick", 100, 0, 1);
393 m_h_siDetThick->StatOverflows();
395
396 m_h_siDetEtaPitch = new TH1F("h_siDetEtaPitch", "siDetEtaPitch", 100, 0, 1);
397 m_h_siDetEtaPitch->StatOverflows();
399
400 m_h_siDetPhiPitch = new TH1F("h_siDetPhiPitch", "siDetPhiPitch", 100, 0, 0.1);
401 m_h_siDetPhiPitch->StatOverflows();
403
404 m_h_clusID = new TH1F("h_clusID", "clusID", 100, 0, 4e17);
405 m_h_clusID->StatOverflows();
406 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_clusID->GetName(), m_h_clusID));
407
408 m_h_locpos_x = new TH1F("h_locpos_x", "locpos_x", 100, -15, 15);
409 m_h_locpos_x->StatOverflows();
410 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_locpos_x->GetName(), m_h_locpos_x));
411
412 m_h_locpos_y = new TH1F("h_locpos_y", "locpos_y", 100, -35, 35);
413 m_h_locpos_y->StatOverflows();
414 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_locpos_y->GetName(), m_h_locpos_y));
415
416 m_h_rdoID_prd = new TH1F("h_rdoID_prd", "rdoID_prd", 100, 0, 4e17);
417 m_h_rdoID_prd->StatOverflows();
418 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_rdoID_prd->GetName(), m_h_rdoID_prd));
419
420 return StatusCode::SUCCESS;
421}
422
424 ATH_MSG_DEBUG( "In PixelFastRDOAnalysis::execute()" );
425
426 // clear branches
427 m_omegax->clear();
428 m_omegay->clear();
429 m_tot->clear();
430 m_totalTot->clear();
431 m_charge->clear();
432 m_totalCharge->clear();
433 m_eLoss->clear();
434 m_fake->clear();
435 m_ambig->clear();
436 m_split->clear();
437 m_splitProb1->clear();
438 m_splitProb2->clear();
439 m_splitInfoRaw->clear();
440 m_LVL1A->clear();
441
442 m_siCol->clear();
443 m_siRow->clear();
444 m_siPhiR->clear();
445 m_siZ->clear();
446 m_siPos_x->clear();
447 m_siPos_y->clear();
448 m_siPos_z->clear();
449 m_siGangPix->clear();
450 m_siDetID->clear();
451 m_siDetPix->clear();
452 m_siDetSCT->clear();
453 m_siDetBrl->clear();
454 m_siDetEc->clear();
455 m_siDetBlay->clear();
456 m_siDetInPixLay->clear();
457 m_siDetNtInPixLay->clear();
458 m_siDetDBM->clear();
459 m_siDetHitDepthDir->clear();
460 m_siDetHitPhiDir->clear();
461 m_siDetHitEtaDir->clear();
462 m_siDetMinR->clear();
463 m_siDetMaxR->clear();
464 m_siDetMinZ->clear();
465 m_siDetMaxZ->clear();
466 m_siDetMinPhi->clear();
467 m_siDetMaxPhi->clear();
468 m_siDetWidth->clear();
469 m_siDetMinWidth->clear();
470 m_siDetMaxWidth->clear();
471 m_siDetLength->clear();
472 m_siDetThick->clear();
473 m_siDetEtaPitch->clear();
474 m_siDetPhiPitch->clear();
475
476 m_clusID->clear();
477 m_locpos_x->clear();
478 m_locpos_y->clear();
479 m_rdoID_prd->clear();
480
481
482 // get containers -- fill branches + histos
484 if(p_pixelClus_cont.isValid()) {
485 // loop over cluster container
486 InDet::PixelClusterContainer::const_iterator clusCont_itr(p_pixelClus_cont->begin());
487 const InDet::PixelClusterContainer::const_iterator clusCont_end(p_pixelClus_cont->end());
488 for ( ; clusCont_itr != clusCont_end; ++clusCont_itr ) {
489 const InDet::PixelClusterCollection* p_pixelClus_coll(*clusCont_itr);
490 InDet::PixelClusterCollection::const_iterator clus_itr(p_pixelClus_coll->begin());
491 const InDet::PixelClusterCollection::const_iterator clus_end(p_pixelClus_coll->end());
492 for ( ; clus_itr != clus_end; ++clus_itr ) {
493 // PixelCluster
494 const float omegax((*clus_itr)->omegax());
495 const float omegay((*clus_itr)->omegay());
496 const std::vector<int>& tot_v((*clus_itr)->totList());
497 const int totalTot((*clus_itr)->totalToT());
498 const std::vector<float>& charge_v((*clus_itr)->chargeList());
499 const float totalCharge((*clus_itr)->totalCharge());
500 const float eLoss((*clus_itr)->energyLoss());
501 const bool fake((*clus_itr)->isFake());
502 const bool ambig((*clus_itr)->isAmbiguous());
503 const bool split((*clus_itr)->isSplit());
504 const double splitProb1((*clus_itr)->splitProbability1());
505 const double splitProb2((*clus_itr)->splitProbability2());
506 //const int splitInfoRaw((*clus_itr)->splitInfoRaw());
507 const int LVL1A((*clus_itr)->LVL1A());
508
509 m_omegax->push_back(omegax);
510 m_omegay->push_back(omegay);
511 for (size_t i = 0; i != tot_v.size(); ++i) {
512 m_tot->push_back(tot_v.at(i));
513 m_h_tot->Fill(tot_v.at(i));
514 }
515 m_totalTot->push_back(totalTot);
516 for (size_t j = 0; j != charge_v.size(); ++j) {
517 m_charge->push_back(charge_v.at(j));
518 m_h_charge->Fill(charge_v.at(j));
519 }
520 m_totalCharge->push_back(totalCharge);
521 m_eLoss->push_back(eLoss);
522 m_fake->push_back(fake);
523 m_ambig->push_back(ambig);
524 m_split->push_back(split);
525 m_splitProb1->push_back(splitProb1);
526 m_splitProb2->push_back(splitProb2);
527 //m_splitInfoRaw->push_back(splitInfoRaw);
528 m_LVL1A->push_back(LVL1A);
529
530 m_h_omegax->Fill(omegax);
531 m_h_omegay->Fill(omegay);
532 m_h_totalTot->Fill(totalTot);
533 m_h_totalCharge->Fill(totalCharge);
534 m_h_eLoss->Fill(eLoss);
535 m_h_fake->Fill(fake);
536 m_h_ambig->Fill(ambig);
537 m_h_split->Fill(split);
538 m_h_splitProb1->Fill(splitProb1);
539 m_h_splitProb2->Fill(splitProb2);
540 //m_h_splitInfoRaw->Fill(splitInfoRaw);
541 m_h_LVL1A->Fill(LVL1A);
542
543 // SiCluster
544 const InDet::SiWidth& siWidth((*clus_itr)->SiCluster::width());
545 const Amg::Vector2D& siColRow(siWidth.colRow());
546 const float siCol(siColRow.x());
547 const float siRow(siColRow.y());
548 const Amg::Vector2D& siPhiRZ(siWidth.widthPhiRZ());
549 const float siPhiR(siPhiRZ.x());
550 const float siZ(siPhiRZ.y());
551
552 const Amg::Vector3D& siPos((*clus_itr)->SiCluster::globalPosition());
553 const float siPos_x(siPos.x());
554 const float siPos_y(siPos.y());
555 const float siPos_z(siPos.z());
556
557 const bool siGangPix((*clus_itr)->SiCluster::gangedPixel());
558
559 const InDetDD::SiDetectorElement* siDetEl((*clus_itr)->SiCluster::detectorElement());
560 const Identifier siDetID((*siDetEl).identify());
561 //const AtlasDetectorID* siDetAtlasID((*siDetEl).getIdHelper());
562 const bool siDetPix((*siDetEl).isPixel());
563 const bool siDetSCT((*siDetEl).isSCT());
564 const bool siDetBrl((*siDetEl).isBarrel());
565 const bool siDetEc((*siDetEl).isEndcap());
566 const bool siDetBlay((*siDetEl).isBlayer());
567 const bool siDetInPixLay((*siDetEl).isInnermostPixelLayer());
568 const bool siDetNtInPixLay((*siDetEl).isNextToInnermostPixelLayer());
569 const bool siDetDBM((*siDetEl).isDBM());
570 const double siDetHitDepthDir((*siDetEl).hitDepthDirection());
571 const double siDetHitPhiDir((*siDetEl).hitPhiDirection());
572 const double siDetHitEtaDir((*siDetEl).hitEtaDirection());
573 const double siDetMinR((*siDetEl).rMin());
574 const double siDetMaxR((*siDetEl).rMax());
575 const double siDetMinZ((*siDetEl).zMin());
576 const double siDetMaxZ((*siDetEl).zMax());
577 const double siDetMinPhi((*siDetEl).phiMin());
578 const double siDetMaxPhi((*siDetEl).phiMax());
579 const double siDetWidth((*siDetEl).width());
580 const double siDetMinWidth((*siDetEl).minWidth());
581 const double siDetMaxWidth((*siDetEl).maxWidth());
582 const double siDetLength((*siDetEl).length());
583 const double siDetThick((*siDetEl).thickness());
584 const double siDetEtaPitch((*siDetEl).etaPitch());
585 const double siDetPhiPitch((*siDetEl).phiPitch());
586
587 const unsigned long long siDetID_int = siDetID.get_compact();
588
589 m_siCol->push_back(siCol);
590 m_siRow->push_back(siRow);
591 m_siPhiR->push_back(siPhiR);
592 m_siZ->push_back(siZ);
593 m_siPos_x->push_back(siPos_x);
594 m_siPos_y->push_back(siPos_y);
595 m_siPos_z->push_back(siPos_z);
596 m_siGangPix->push_back(siGangPix);
597 m_siDetID->push_back(siDetID_int);
598 m_siDetPix->push_back(siDetPix);
599 m_siDetSCT->push_back(siDetSCT);
600 m_siDetBrl->push_back(siDetBrl);
601 m_siDetEc->push_back(siDetEc);
602 m_siDetBlay->push_back(siDetBlay);
603 m_siDetInPixLay->push_back(siDetInPixLay);
604 m_siDetNtInPixLay->push_back(siDetNtInPixLay);
605 m_siDetDBM->push_back(siDetDBM);
606 m_siDetHitDepthDir->push_back(siDetHitDepthDir);
607 m_siDetHitPhiDir->push_back(siDetHitPhiDir);
608 m_siDetHitEtaDir->push_back(siDetHitEtaDir);
609 m_siDetMinR->push_back(siDetMinR);
610 m_siDetMaxR->push_back(siDetMaxR);
611 m_siDetMinZ->push_back(siDetMinZ);
612 m_siDetMaxZ->push_back(siDetMaxZ);
613 m_siDetMinPhi->push_back(siDetMinPhi);
614 m_siDetMaxPhi->push_back(siDetMaxPhi);
615 m_siDetWidth->push_back(siDetWidth);
616 m_siDetMinWidth->push_back(siDetMinWidth);
617 m_siDetMaxWidth->push_back(siDetMaxWidth);
618 m_siDetLength->push_back(siDetLength);
619 m_siDetThick->push_back(siDetThick);
620 m_siDetEtaPitch->push_back(siDetEtaPitch);
621 m_siDetPhiPitch->push_back(siDetPhiPitch);
622
623 m_h_siCol->Fill(siCol);
624 m_h_siRow->Fill(siRow);
625 m_h_siPhiR->Fill(siPhiR);
626 m_h_siZ->Fill(siZ);
627 m_h_siPos_x->Fill(siPos_x);
628 m_h_siPos_y->Fill(siPos_y);
629 m_h_siPos_z->Fill(siPos_z);
630 m_h_siGangPix->Fill(siGangPix);
631 m_h_siDetID->Fill(siDetID_int);
632 m_h_siDetPix->Fill(siDetPix);
633 m_h_siDetSCT->Fill(siDetSCT);
634 m_h_siDetBrl->Fill(siDetBrl);
635 m_h_siDetEc->Fill(siDetEc);
636 m_h_siDetBlay->Fill(siDetBlay);
637 m_h_siDetInPixLay->Fill(siDetInPixLay);
638 m_h_siDetNtInPixLay->Fill(siDetNtInPixLay);
639 m_h_siDetDBM->Fill(siDetDBM);
640 m_h_siDetHitDepthDir->Fill(siDetHitDepthDir);
641 m_h_siDetHitPhiDir->Fill(siDetHitPhiDir);
642 m_h_siDetHitEtaDir->Fill(siDetHitEtaDir);
643 m_h_siDetMinR->Fill(siDetMinR);
644 m_h_siDetMaxR->Fill(siDetMaxR);
645 m_h_siDetMinZ->Fill(siDetMinZ);
646 m_h_siDetMaxZ->Fill(siDetMaxZ);
647 m_h_siDetMinPhi->Fill(siDetMinPhi);
648 m_h_siDetMaxPhi->Fill(siDetMaxPhi);
649 m_h_siDetWidth->Fill(siDetWidth);
650 m_h_siDetMinWidth->Fill(siDetMinWidth);
651 m_h_siDetMaxWidth->Fill(siDetMaxWidth);
652 m_h_siDetLength->Fill(siDetLength);
653 m_h_siDetThick->Fill(siDetThick);
654 m_h_siDetEtaPitch->Fill(siDetEtaPitch);
655 m_h_siDetPhiPitch->Fill(siDetPhiPitch);
656
657 // Trk::PrepRawData
658 const Identifier clusID((*clus_itr)->PrepRawData::identify());
659 const unsigned long long clusID_int = clusID.get_compact();
660
661 const Amg::Vector2D& locPos((*clus_itr)->PrepRawData::localPosition());
662 float locpos_x(locPos.x());
663 float locpos_y(locPos.y());
664
665 const std::vector<Identifier>& rdoID_v((*clus_itr)->PrepRawData::rdoList());
666
667 m_clusID->push_back(clusID_int);
668 m_locpos_x->push_back(locpos_x);
669 m_locpos_y->push_back(locpos_y);
670 for (size_t k = 0; k != rdoID_v.size(); ++k) {
671 const unsigned long long rdoID_prd_int = rdoID_v.at(k).get_compact();
672 m_rdoID_prd->push_back(rdoID_prd_int);
673 m_h_rdoID_prd->Fill(rdoID_prd_int);
674 }
675
676 m_h_clusID->Fill(clusID_int);
677 m_h_locpos_x->Fill(locpos_x);
678 m_h_locpos_y->Fill(locpos_y);
679 }
680 }
681 }
682
683 if (m_tree) {
684 m_tree->Fill();
685 }
686
687 return StatusCode::SUCCESS;
688}
689
691 return StatusCode::SUCCESS;
692}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Handle class for reading from StoreGate.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
value_type get_compact() const
Get the compact id.
Class to hold geometrical description of a silicon detector element.
const Amg::Vector2D & widthPhiRZ() const
Definition SiWidth.h:121
const Amg::Vector2D & colRow() const
Definition SiWidth.h:115
std::vector< double > * m_siDetPhiPitch
PixelFastRDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< float > * m_siPhiR
std::vector< bool > * m_siDetInPixLay
std::vector< double > * m_siDetMaxR
std::vector< double > * m_siDetMinZ
std::vector< float > * m_locpos_x
std::vector< float > * m_siPos_z
std::vector< float > * m_omegay
virtual StatusCode initialize() override final
std::vector< double > * m_siDetHitPhiDir
std::vector< bool > * m_siDetBrl
std::vector< double > * m_splitProb1
std::vector< double > * m_siDetHitDepthDir
std::vector< double > * m_siDetThick
std::vector< double > * m_siDetWidth
std::vector< double > * m_siDetMinPhi
std::vector< bool > * m_siDetNtInPixLay
std::vector< bool > * m_siDetDBM
std::vector< bool > * m_siDetSCT
std::vector< double > * m_siDetHitEtaDir
std::vector< float > * m_siPos_y
std::vector< double > * m_siDetMinR
std::vector< float > * m_siRow
std::vector< float > * m_totalCharge
std::vector< float > * m_charge
std::vector< int > * m_splitInfoRaw
std::vector< double > * m_siDetMinWidth
std::vector< unsigned long long > * m_clusID
std::vector< bool > * m_siDetBlay
std::vector< int > * m_totalTot
std::vector< bool > * m_siDetEc
std::vector< float > * m_eLoss
std::vector< double > * m_siDetLength
std::vector< double > * m_siDetEtaPitch
std::vector< double > * m_siDetMaxZ
std::vector< unsigned long long > * m_rdoID_prd
std::vector< int > * m_tot
std::vector< bool > * m_split
std::vector< double > * m_siDetMaxPhi
std::vector< unsigned long long > * m_siDetID
std::vector< float > * m_siCol
std::vector< float > * m_siZ
std::vector< bool > * m_siDetPix
std::vector< double > * m_splitProb2
std::vector< int > * m_LVL1A
virtual StatusCode execute() override final
ServiceHandle< ITHistSvc > m_thistSvc
SG::ReadHandleKey< InDet::PixelClusterContainer > m_inputKey
std::vector< double > * m_siDetMaxWidth
virtual StatusCode finalize() override final
std::vector< bool > * m_siGangPix
std::vector< float > * m_locpos_y
std::vector< float > * m_omegax
std::vector< bool > * m_fake
std::vector< bool > * m_ambig
std::vector< float > * m_siPos_x
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition hcg.cxx:177
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D