ATLAS Offline Software
TileCalibHitCntNtup.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 // Atlas includes
8 #include "GaudiKernel/MsgStream.h"
9 #include "Gaudi/Property.h"
11 
12 // ROOT includes
13 #include "TTree.h"
14 
15 static const InterfaceID IID_ITileCalibHitCntNtup("TileCalibHitCntNtup", 1, 0);
16 
17 const InterfaceID&
19  return IID_ITileCalibHitCntNtup;
20 }
21 
25 TileCalibHitCntNtup::TileCalibHitCntNtup(const std::string& type, const std::string& name, const IInterface* parent)
27  m_thistSvc("THistSvc", name),
28  m_streamName("AANT"),
29  m_ntupleID("TileCalibHitCnt"),
30  m_treeSize(16000000000LL),
31  m_ntuplePtr(0),
32  m_act_nchan(0),
33  m_inact_nchan(0),
34  m_dm_nchan(0),
35  m_act_totE(0),
36  m_act_visE(0),
37  m_inact_totE(0),
38  m_inact_visE(0),
39  m_DM_totE(0),
40  m_DM_visE(0),
41  m_barr_totE(0),
42  m_barr_Em(0),
43  m_barr_NonEm(0),
44  m_barr_Invisible(0),
45  m_barr_Escaped(0),
46  m_inact_barr_totE(0),
47  m_inact_barr_Em(0),
48  m_inact_barr_NonEm(0),
49  m_inact_barr_Invisible(0),
50  m_inact_barr_Escaped(0),
51  m_ext_totE(0),
52  m_ext_Em(0),
53  m_ext_NonEm(0),
54  m_ext_Invisible(0),
55  m_ext_Escaped(0),
56  m_inact_ext_totE(0),
57  m_inact_ext_Em(0),
58  m_inact_ext_NonEm(0),
59  m_inact_ext_Invisible(0),
60  m_inact_ext_Escaped(0),
61  m_itc_totE(0),
62  m_itc_Em(0),
63  m_itc_NonEm(0),
64  m_itc_Invisible(0),
65  m_itc_Escaped(0),
66  m_inact_itc_totE(0),
67  m_inact_itc_Em(0),
68  m_inact_itc_NonEm(0),
69  m_inact_itc_Invisible(0),
70  m_inact_itc_Escaped(0),
71  m_gscin_totE(0),
72  m_gscin_Em(0),
73  m_gscin_NonEm(0),
74  m_gscin_Invisible(0),
75  m_gscin_Escaped(0),
76  m_inact_gscin_totE(0),
77  m_inact_gscin_Em(0),
78  m_inact_gscin_NonEm(0),
79  m_inact_gscin_Invisible(0),
80  m_inact_gscin_Escaped(0),
81  m_Total(0),
82  m_Em(0),
83  m_NonEm(0),
84  m_Invisible(0),
85  m_Escaped(0),
86  m_subCalo(0),
87  m_section(0),
88  m_side(0),
89  m_module(0),
90  m_tower(0),
91  m_sample(0),
92  m_inact_Total(0),
93  m_inact_Em(0),
94  m_inact_NonEm(0),
95  m_inact_Invisible(0),
96  m_inact_Escaped(0),
97  m_inact_subCalo(0),
98  m_inact_section(0),
99  m_inact_side(0),
100  m_inact_module(0),
101  m_inact_tower(0),
102  m_inact_sample(0),
103  m_dm_ene(0),
104  m_dm_vis(0),
105  m_dm_subDet(0),
106  m_dm_type(0),
107  m_dm_sampling(0),
108  m_dm_region(0),
109  m_dm_eta(0),
110  m_dm_phi(0),
111  m_caloCell_ID(0),
112  m_caloDM_ID(0),
113  m_max_chan(4999)
114 {
115  declareInterface<TileCalibHitCntNtup>(this);
116 
117  declareProperty("THistSvc", m_thistSvc);
118  declareProperty("StreamName", m_streamName);
119  declareProperty("NTupleID", m_ntupleID);
120  declareProperty("TreeSize", m_treeSize);
121 
122  m_ActiveHitContainer = "TileCalibHitActiveCell";
123  m_InactiveHitContainer = "TileCalibHitInactiveCell";
124  m_dmHitContainer = "TileCalibHitDeadMaterial";
125 
126  declareProperty("ActiveHitCnt", m_ActiveHitContainer);
127  declareProperty("InactiveHitCnt", m_InactiveHitContainer);
128  declareProperty("DMCalibHitCnt", m_dmHitContainer);
129 
130 }
131 
136 }
137 
142 
143  ATH_MSG_INFO("in initialize()");
144 
145  // retrieve ID helpers from det store
147 
149 
150  CHECK(m_thistSvc.retrieve());
151 
152  m_ntuplePtr = new TTree(m_ntupleID.c_str(), "TileCalibHitCntNtuple");
153  m_ntuplePtr->SetMaxTreeSize(m_treeSize);
154 
155  // The fields characterizing the Event
156  m_ntuplePtr->Branch("Tile_Nhit_Active", &m_act_nchan, "Tile_Nhit_Active/I");
157  m_ntuplePtr->Branch("Tile_Nhit_Inact", &m_inact_nchan, "Tile_Nhit_Inact/I");
158  m_ntuplePtr->Branch("Tile_Nhit_DM", &m_dm_nchan, "Tile_Nhit_DM/I");
159 
160  m_ntuplePtr->Branch("Tile_Active_Total_Ene", &m_act_totE, "Tile_Active_Total_Ene/F");
161  m_ntuplePtr->Branch("Tile_Active_Vis_Ene", &m_act_visE, "Tile_Active_Vis_Ene/F");
162  m_ntuplePtr->Branch("Tile_Inact_Total_Ene", &m_inact_totE, "Tile_Inact_Total_Ene/F");
163  m_ntuplePtr->Branch("Tile_Inact_Vis_Ene", &m_inact_visE, "Tile_Inact_Vis_Ene/F");
164  m_ntuplePtr->Branch("Tile_DM_Total_Ene", &m_DM_totE, "Tile_DM_Total_Ene/F");
165  m_ntuplePtr->Branch("Tile_DM_Vis_Ene", &m_DM_visE, "Tile_DM_Vis_Ene/F");
166 
167  m_ntuplePtr->Branch("Barr_Active_Total_Ene", &m_barr_totE, "Barr_Active_Total_Ene/F");
168  m_ntuplePtr->Branch("Barr_Active_Em_Ene", &m_barr_Em, "Barr_Active_Em_Ene/F");
169  m_ntuplePtr->Branch("Barr_Active_NonEm_Ene", &m_barr_NonEm, "Barr_Active_NonEm_Ene/F");
170  m_ntuplePtr->Branch("Barr_Active_Invisible_Ene", &m_barr_Invisible, "Barr_Active_Invisible_Ene/F");
171  m_ntuplePtr->Branch("Barr_Active_Escaped_Ene", &m_barr_Escaped, "Barr_Active_Escaped_Ene/F");
172 
173  m_ntuplePtr->Branch("Barr_Inact_Total_Ene", &m_inact_barr_totE, "Barr_Inact_Total_Ene/F");
174  m_ntuplePtr->Branch("Barr_Inact_Em_Ene", &m_inact_barr_Em, "Barr_Inact_Em_Ene/F");
175  m_ntuplePtr->Branch("Barr_Inact_NonEm_Ene", &m_inact_barr_NonEm, "Barr_Inact_NonEm_Ene/F");
176  m_ntuplePtr->Branch("Barr_Inact_Invisible_Ene", &m_inact_barr_Invisible, "Barr_Inact_Invisible_Ene/F");
177  m_ntuplePtr->Branch("Barr_Inact_Escaped_Ene", &m_inact_barr_Escaped, "Barr_Inact_Escaped_Ene/F");
178 
179  m_ntuplePtr->Branch("Ext_Active_Total_Ene", &m_ext_totE, "Ext_Active_Total_Ene/F");
180  m_ntuplePtr->Branch("Ext_Active_Em_Ene", &m_ext_Em, "Ext_Active_Em_Ene/F");
181  m_ntuplePtr->Branch("Ext_Active_NonEm_Ene", &m_ext_NonEm, "Ext_Active_NonEm_Ene/F");
182  m_ntuplePtr->Branch("Ext_Active_Invisible_Ene", &m_ext_Invisible, "Ext_Active_Invisible_Ene/F");
183  m_ntuplePtr->Branch("Ext_Active_Escaped_Ene", &m_ext_Escaped, "Ext_Active_Escaped_Ene/F");
184 
185  m_ntuplePtr->Branch("Ext_Inact_Total_Ene", &m_inact_ext_totE, "Ext_Inact_Total_Ene/F");
186  m_ntuplePtr->Branch("Ext_Inact_Em_Ene", &m_inact_ext_Em, "Ext_Inact_Em_Ene/F");
187  m_ntuplePtr->Branch("Ext_Inact_NonEm_Ene", &m_inact_ext_NonEm, "Ext_Inact_NonEm_Ene/F");
188  m_ntuplePtr->Branch("Ext_Inact_Invisible_Ene", &m_inact_ext_Invisible, "Ext_Inact_Invisible_Ene/F");
189  m_ntuplePtr->Branch("Ext_Inact_Escaped_Ene", &m_inact_ext_Escaped, "Ext_Inact_Escaped_Ene/F");
190 
191  m_ntuplePtr->Branch("ITC_Active_Total_Ene", &m_itc_totE, "ITC_Active_Total_Ene/F");
192  m_ntuplePtr->Branch("ITC_Active_Em_Ene", &m_itc_Em, "ITC_Active_Em_Ene/F");
193  m_ntuplePtr->Branch("ITC_Active_NonEm_Ene", &m_itc_NonEm, "ITC_Active_NonEm_Ene/F");
194  m_ntuplePtr->Branch("ITC_Active_Invisible_Ene", &m_itc_Invisible, "ITC_Active_Invisible_Ene/F");
195  m_ntuplePtr->Branch("ITC_Active_Escaped_Ene", &m_itc_Escaped, "ITC_Active_Escaped_Ene/F");
196 
197  m_ntuplePtr->Branch("ITC_Inact_Total_Ene", &m_inact_itc_totE, "ITC_Inact_Total_Ene/F");
198  m_ntuplePtr->Branch("ITC_Inact_Em_Ene", &m_inact_itc_Em, "ITC_Inact_Em_Ene/F");
199  m_ntuplePtr->Branch("ITC_Inact_NonEm_Ene", &m_inact_itc_NonEm, "ITC_Inact_NonEm_Ene/F");
200  m_ntuplePtr->Branch("ITC_Inact_Invisible_Ene", &m_inact_itc_Invisible, "ITC_Inact_Invisible_Ene/F");
201  m_ntuplePtr->Branch("ITC_Inact_Escaped_Ene", &m_inact_itc_Escaped, "ITC_Inact_Escaped_Ene/F");
202 
203  m_ntuplePtr->Branch("GapScin_Active_Total_Ene", &m_gscin_totE, "GapScin_Active_Total_Ene/F");
204  m_ntuplePtr->Branch("GapScin_Active_Em_Ene", &m_gscin_Em, "GapScin_Active_Em_Ene/F");
205  m_ntuplePtr->Branch("GapScin_Active_NonEm_Ene", &m_gscin_NonEm, "GapScin_Active_NonEm_Ene/F");
206  m_ntuplePtr->Branch("GapScin_Active_Invisible_Ene", &m_gscin_Invisible, "GapScin_Active_Invisible_Ene/F");
207  m_ntuplePtr->Branch("GapScin_Active_Escaped_Ene", &m_gscin_Escaped, "GapScin_Active_Escaped_Ene/F");
208 
209  m_ntuplePtr->Branch("GapScin_Inact_Total_Ene", &m_inact_gscin_totE, "GapScin_Inact_Total_Ene/F");
210  m_ntuplePtr->Branch("GapScin_Inact_Em_Ene", &m_inact_gscin_Em, "GapScin_Inact_Em_Ene/F");
211  m_ntuplePtr->Branch("GapScin_Inact_NonEm_Ene", &m_inact_gscin_NonEm, "GapScin_Inact_NonEm_Ene/F");
212  m_ntuplePtr->Branch("GapScin_Inact_Invisible_Ene", &m_inact_gscin_Invisible, "GapScin_Inact_Invisible_Ene/F");
213  m_ntuplePtr->Branch("GapScin_Inact_Escaped_Ene", &m_inact_gscin_Escaped, "GapScin_Inact_Escaped_Ene/F");
214 
215  // The fields characterizing the Hit
216  m_ntuplePtr->Branch("Tile_Active_Total_Ene", &m_Total);
217  m_ntuplePtr->Branch("Tile_Active_Em_Ene", &m_Em);
218  m_ntuplePtr->Branch("Tile_Active_NonEm_Ene", &m_NonEm);
219  m_ntuplePtr->Branch("Tile_Active_Invisible_Ene", &m_Invisible);
220  m_ntuplePtr->Branch("Tile_Active_Escaped_Ene", &m_Escaped);
221  m_ntuplePtr->Branch("Tile_Active_subCalo", &m_subCalo);
222  m_ntuplePtr->Branch("Tile_Active_section", &m_section);
223  m_ntuplePtr->Branch("Tile_Active_side", &m_side);
224  m_ntuplePtr->Branch("Tile_Active_module", &m_module);
225  m_ntuplePtr->Branch("Tile_Active_tower", &m_tower);
226  m_ntuplePtr->Branch("Tile_Active_sample", &m_sample);
227 
228  m_ntuplePtr->Branch("Tile_Inact_Total_Ene", &m_inact_Total);
229  m_ntuplePtr->Branch("Tile_Inact_Em_Ene", &m_inact_Em);
230  m_ntuplePtr->Branch("Tile_Inact_NonEm_Ene", &m_inact_NonEm);
231  m_ntuplePtr->Branch("Tile_Inact_Invisible_Ene", &m_inact_Invisible);
232  m_ntuplePtr->Branch("Tile_Inact_Escaped_Ene", &m_inact_Escaped);
233  m_ntuplePtr->Branch("Tile_Inact_subCalo", &m_inact_subCalo);
234  m_ntuplePtr->Branch("Tile_Inact_section", &m_inact_section);
235  m_ntuplePtr->Branch("Tile_Inact_side", &m_inact_side);
236  m_ntuplePtr->Branch("Tile_Inact_module", &m_inact_module);
237  m_ntuplePtr->Branch("Tile_Inact_tower", &m_inact_tower);
238  m_ntuplePtr->Branch("Tile_Inact_sample", &m_inact_sample);
239 
240  m_ntuplePtr->Branch("Tile_DM_Ene", &m_dm_ene);
241  m_ntuplePtr->Branch("Tile_DM_Vis", &m_dm_vis);
242  m_ntuplePtr->Branch("Tile_DM_subDetector", &m_dm_subDet);
243  m_ntuplePtr->Branch("Tile_DM_type", &m_dm_type);
244  m_ntuplePtr->Branch("Tile_DM_sampling", &m_dm_sampling);
245  m_ntuplePtr->Branch("Tile_DM_region", &m_dm_region);
246  m_ntuplePtr->Branch("Tile_DM_eta", &m_dm_eta);
247  m_ntuplePtr->Branch("Tile_DM_phi", &m_dm_phi);
248 
249  CHECK(m_thistSvc->regTree("/" + m_streamName + "/" + m_ntupleID, m_ntuplePtr));
250 
251  return StatusCode::SUCCESS;
252 }
253 
258  const CaloCalibrationHitContainer* InactiveHitCnt,
259  const CaloCalibrationHitContainer* dmHitCnt) {
260 
262 
264 
265  m_barr_totE = 0.;
266  m_ext_totE = 0.;
267  m_itc_totE = 0.;
268  m_gscin_totE = 0.;
269  m_barr_Em = 0.;
270  m_ext_Em = 0.;
271  m_itc_Em = 0.;
272  m_gscin_Em = 0.;
273  m_barr_NonEm = 0.;
274  m_ext_NonEm = 0.;
275  m_itc_NonEm = 0.;
276  m_gscin_NonEm = 0.;
277  m_barr_Invisible = 0.;
278  m_ext_Invisible = 0.;
279  m_itc_Invisible = 0.;
280  m_gscin_Invisible = 0.;
281  m_barr_Escaped = 0.;
282  m_ext_Escaped = 0.;
283  m_itc_Escaped = 0.;
284  m_gscin_Escaped = 0.;
285 
286  m_inact_barr_totE = 0.;
287  m_inact_ext_totE = 0.;
288  m_inact_itc_totE = 0.;
289  m_inact_gscin_totE = 0.;
290  m_inact_barr_Em = 0.;
291  m_inact_ext_Em = 0.;
292  m_inact_itc_Em = 0.;
293  m_inact_gscin_Em = 0.;
294  m_inact_barr_NonEm = 0.;
295  m_inact_ext_NonEm = 0.;
296  m_inact_itc_NonEm = 0.;
297  m_inact_gscin_NonEm = 0.;
303  m_inact_ext_Escaped = 0.;
304  m_inact_itc_Escaped = 0.;
306 
307  m_Total->clear();
308  m_Em->clear();
309  m_NonEm->clear();
310  m_Invisible->clear();
311  m_Escaped->clear();
312 
313  m_subCalo->clear();
314  m_section->clear();
315  m_side->clear();
316  m_module->clear();
317  m_tower->clear();
318  m_sample->clear();
319 
320  m_inact_Total->clear();
321  m_inact_Em->clear();
322  m_inact_NonEm->clear();
323  m_inact_Invisible->clear();
324  m_inact_Escaped->clear();
325 
326  m_inact_subCalo->clear();
327  m_inact_section->clear();
328  m_inact_side->clear();
329  m_inact_module->clear();
330  m_inact_tower->clear();
331  m_inact_sample->clear();
332 
333  m_dm_ene->clear();
334  m_dm_vis->clear();
335  m_dm_subDet->clear();
336  m_dm_type->clear();
337  m_dm_sampling->clear();
338  m_dm_region->clear();
339  m_dm_eta->clear();
340  m_dm_phi->clear();
341 
342  //------------ Go inside the CalibHit containers ------------
343  int nhit;
344  char text_info[100];
345  if (ActiveHitCnt) {
346  nhit = ActiveHitCnt->Size();
347  sprintf(text_info, "Number of CalibHits in Tile ActiveCell container = %d", nhit);
348  ATH_MSG_INFO(text_info);
349 
350  if (nhit != 0) {
351  for (const CaloCalibrationHit* hit : *ActiveHitCnt) {
352  m_act_totE += hit->energyTotal();
353  m_act_visE += hit->energyEM() + hit->energyNonEM();
354 
355  m_Total->push_back( hit->energyTotal());
356  m_Em->push_back( hit->energyEM());
357  m_NonEm->push_back( hit->energyNonEM());
358  m_Invisible->push_back( hit->energyInvisible());
359  m_Escaped->push_back( hit->energyEscaped());
360 
361  Identifier id = hit->cellID();
362 
363  m_subCalo->push_back(m_caloCell_ID->sub_calo(id));
364  m_section->push_back(m_caloCell_ID->section(id));
365  m_side->push_back(m_caloCell_ID->side(id));
366  m_module->push_back(m_caloCell_ID->module(id));
367  m_tower->push_back(m_caloCell_ID->tower(id));
368  m_sample->push_back(m_caloCell_ID->sample(id));
369 
370  if (m_caloCell_ID->is_tile_barrel(id)) {
371  m_barr_totE += hit->energyTotal();
372  m_barr_Em += hit->energyEM();
373  m_barr_NonEm += hit->energyNonEM();
374  m_barr_Invisible += hit->energyInvisible();
375  m_barr_Escaped += hit->energyEscaped();
376  } else if (m_caloCell_ID->is_tile_extbarrel(id)) {
377  m_ext_totE += hit->energyTotal();
378  m_ext_Em += hit->energyEM();
379  m_ext_NonEm += hit->energyNonEM();
380  m_ext_Invisible += hit->energyInvisible();
381  m_ext_Escaped += hit->energyEscaped();
382  } else if (m_caloCell_ID->is_tile_gapscin(id)) {
383  m_gscin_totE += hit->energyTotal();
384  m_gscin_Em += hit->energyEM();
385  m_gscin_NonEm += hit->energyNonEM();
386  m_gscin_Invisible += hit->energyInvisible();
387  m_gscin_Escaped += hit->energyEscaped();
388  } else if (m_caloCell_ID->is_tile_gap(id)) {
389  m_itc_totE += hit->energyTotal();
390  m_itc_Em += hit->energyEM();
391  m_itc_NonEm += hit->energyNonEM();
392  m_itc_Invisible += hit->energyInvisible();
393  m_itc_Escaped += hit->energyEscaped();
394  } else {
395  ATH_MSG_WARNING("CalibHit in TileCalibHitActiveCell container hasn't Tile Identifier");
396  }
397  ++m_act_nchan;
398  if (m_act_nchan >= m_max_chan) break;
399  } // loop over container's hit
400  }
401  } else {
402  ATH_MSG_WARNING("TileCalibHitActiveCell not exists for this event");
403  }
404 
405  if (InactiveHitCnt) {
406  nhit = InactiveHitCnt->Size();
407  sprintf(text_info, "Number of CalibHits in Tile InactiveCell container = %d", nhit);
408  ATH_MSG_INFO(text_info);
409 
410  if (nhit != 0) {
411  for (const CaloCalibrationHit* hit : *InactiveHitCnt) {
412  m_inact_totE += hit->energyTotal();
413  m_inact_visE += hit->energyEM() + hit->energyNonEM();
414 
415  m_inact_Total->push_back( hit->energyTotal());
416  m_inact_Em->push_back( hit->energyEM());
417  m_inact_NonEm->push_back( hit->energyNonEM());
418  m_inact_Invisible->push_back( hit->energyInvisible());
419  m_inact_Escaped->push_back( hit->energyEscaped());
420 
421  Identifier id = hit->cellID();
422 
423  m_inact_subCalo->push_back(m_caloCell_ID->sub_calo(id));
424  m_inact_section->push_back(m_caloCell_ID->section(id));
425  m_inact_side->push_back(m_caloCell_ID->side(id));
426  m_inact_module->push_back(m_caloCell_ID->module(id));
427  m_inact_tower->push_back(m_caloCell_ID->tower(id));
428  m_inact_sample->push_back(m_caloCell_ID->sample(id));
429 
430  if (m_caloCell_ID->is_tile_barrel(id)) {
431  m_inact_barr_totE += hit->energyTotal();
432  m_inact_barr_Em += hit->energyEM();
433  m_inact_barr_NonEm += hit->energyNonEM();
434  m_inact_barr_Invisible += hit->energyInvisible();
435  m_inact_barr_Escaped += hit->energyEscaped();
436  } else if (m_caloCell_ID->is_tile_extbarrel(id)) {
437  m_inact_ext_totE += hit->energyTotal();
438  m_inact_ext_Em += hit->energyEM();
439  m_inact_ext_NonEm += hit->energyNonEM();
440  m_inact_ext_Invisible += hit->energyInvisible();
441  m_inact_ext_Escaped += hit->energyEscaped();
442  } else if (m_caloCell_ID->is_tile_gapscin(id)) {
443  m_inact_gscin_totE += hit->energyTotal();
444  m_inact_gscin_Em += hit->energyEM();
445  m_inact_gscin_NonEm += hit->energyNonEM();
446  m_inact_gscin_Invisible += hit->energyInvisible();
447  m_inact_gscin_Escaped += hit->energyEscaped();
448  } else if (m_caloCell_ID->is_tile_gap(id)) {
449  m_inact_itc_totE += hit->energyTotal();
450  m_inact_itc_Em += hit->energyEM();
451  m_inact_itc_NonEm += hit->energyNonEM();
452  m_inact_itc_Invisible += hit->energyInvisible();
453  m_inact_itc_Escaped += hit->energyEscaped();
454  } else {
455  ATH_MSG_WARNING("CalibHit in TileCalibHitInactiveCell container hasn't Tile Identifier");
456  }
457  ++m_inact_nchan;
458  if (m_inact_nchan >= m_max_chan) break;
459  } // loop over container's hit
460  }
461  } else {
462  ATH_MSG_WARNING("TileCalibHitInactiveCell not exists for this event");
463  }
464 
465  if (dmHitCnt) {
466  nhit = dmHitCnt->Size();
467  sprintf(text_info, "Number of CalibHits in Tile DeadMaterial container = %d", nhit);
468  ATH_MSG_INFO(text_info);
469 
470  if (nhit != 0) {
471  for (const CaloCalibrationHit* hit : *dmHitCnt) {
472  m_DM_totE += hit->energyTotal();
473  m_DM_visE += hit->energyEM() + hit->energyNonEM();
474 
475  Identifier id = hit->cellID();
476 
477  m_dm_ene->push_back( hit->energyTotal());
478  m_dm_vis->push_back( hit->energyEM() + hit->energyNonEM());
479  m_dm_subDet->push_back(m_caloDM_ID->pos_neg_z(id));
480  m_dm_type->push_back(m_caloDM_ID->dmat(id));
481  m_dm_sampling->push_back(m_caloDM_ID->sampling(id));
482  m_dm_region->push_back(m_caloDM_ID->region(id));
483  m_dm_eta->push_back(m_caloDM_ID->eta(id));
484  m_dm_phi->push_back(m_caloDM_ID->phi(id));
485 
486  ++m_dm_nchan;
487  if (m_dm_nchan >= m_max_chan) break;
488  }
489  }
490  } else {
491  ATH_MSG_WARNING("TileCalibHitDeadMaterial not exists for this event");
492  }
493 
494  if (m_ntuplePtr->Fill()==0) {
495  ATH_MSG_ERROR("StoreCNT(): Unable to Fill Cnt Ntuple");
496  return StatusCode::FAILURE;
497  } else {
498  ATH_MSG_INFO("StoreCNT() completed successfully");
499  return StatusCode::SUCCESS;
500  }
501 }
502 
507  ATH_MSG_INFO("Finalizing");
508  return StatusCode::SUCCESS;
509 }
510 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileCalibHitCntNtup::m_inact_totE
float m_inact_totE
Definition: TileCalibHitCntNtup.h:82
TileCalibHitCntNtup::m_act_totE
float m_act_totE
Definition: TileCalibHitCntNtup.h:80
CaloCalibrationHitContainer
Definition: CaloCalibrationHitContainer.h:25
CaloDM_ID::dmat
int dmat(const Identifier &id) const
return DMtype according to :
Definition: CaloDM_ID.h:669
TileCalibHitCntNtup::m_gscin_NonEm
float m_gscin_NonEm
Definition: TileCalibHitCntNtup.h:125
TileCalibHitCntNtup::m_section
std::vector< long > * m_section
Definition: TileCalibHitCntNtup.h:141
TileCalibHitCntNtup::m_itc_Escaped
float m_itc_Escaped
Definition: TileCalibHitCntNtup.h:115
TileCalibHitCntNtup::m_inact_barr_Em
float m_inact_barr_Em
Definition: TileCalibHitCntNtup.h:94
TileCalibHitCntNtup::initialize
virtual StatusCode initialize()
intialize method
Definition: TileCalibHitCntNtup.cxx:141
TileCalibHitCntNtup::m_inact_gscin_totE
float m_inact_gscin_totE
Definition: TileCalibHitCntNtup.h:129
TileCalibHitCntNtup::m_inact_gscin_NonEm
float m_inact_gscin_NonEm
Definition: TileCalibHitCntNtup.h:131
TileCalibHitCntNtup.h
CaloCell_Base_ID::tower
int tower(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileCalibHitCntNtup::m_Invisible
std::vector< float > * m_Invisible
Definition: TileCalibHitCntNtup.h:138
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TileCalibHitCntNtup::m_inact_ext_Escaped
float m_inact_ext_Escaped
Definition: TileCalibHitCntNtup.h:109
TileCalibHitCntNtup::m_inact_barr_NonEm
float m_inact_barr_NonEm
Definition: TileCalibHitCntNtup.h:95
TileCalibHitCntNtup::m_inact_gscin_Em
float m_inact_gscin_Em
Definition: TileCalibHitCntNtup.h:130
TileCalibHitCntNtup::m_gscin_Invisible
float m_gscin_Invisible
Definition: TileCalibHitCntNtup.h:126
TileCalibHitCntNtup::m_subCalo
std::vector< long > * m_subCalo
Definition: TileCalibHitCntNtup.h:140
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TileCalibHitCntNtup::m_tower
std::vector< long > * m_tower
Definition: TileCalibHitCntNtup.h:144
TileCalibHitCntNtup::m_ext_NonEm
float m_ext_NonEm
Definition: TileCalibHitCntNtup.h:101
CaloDM_ID::region
int region(const Identifier &id) const
return region according to :
Definition: CaloDM_ID.h:651
TileCalibHitCntNtup::m_inact_itc_Invisible
float m_inact_itc_Invisible
Definition: TileCalibHitCntNtup.h:120
TileCalibHitCntNtup::m_treeSize
int64_t m_treeSize
Definition: TileCalibHitCntNtup.h:70
TileCalibHitCntNtup::m_caloCell_ID
const CaloCell_ID * m_caloCell_ID
Definition: TileCalibHitCntNtup.h:172
TileCalibHitCntNtup::m_side
std::vector< long > * m_side
Definition: TileCalibHitCntNtup.h:142
TileCalibHitCntNtup::m_inact_section
std::vector< long > * m_inact_section
Definition: TileCalibHitCntNtup.h:153
TileCalibHitCntNtup::m_ntuplePtr
TTree * m_ntuplePtr
Definition: TileCalibHitCntNtup.h:73
TileCalibHitCntNtup::m_itc_totE
float m_itc_totE
Definition: TileCalibHitCntNtup.h:111
TileCalibHitCntNtup::m_inact_ext_totE
float m_inact_ext_totE
Definition: TileCalibHitCntNtup.h:105
TileCalibHitCntNtup::m_module
std::vector< long > * m_module
Definition: TileCalibHitCntNtup.h:143
TileCalibHitCntNtup::m_gscin_Em
float m_gscin_Em
Definition: TileCalibHitCntNtup.h:124
TileCalibHitCntNtup::m_act_visE
float m_act_visE
Definition: TileCalibHitCntNtup.h:81
TileCalibHitCntNtup::m_inact_Escaped
std::vector< float > * m_inact_Escaped
Definition: TileCalibHitCntNtup.h:151
TileCalibHitCntNtup::m_ext_Escaped
float m_ext_Escaped
Definition: TileCalibHitCntNtup.h:103
TileCalibHitCntNtup::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: TileCalibHitCntNtup.h:65
CaloCell_Base_ID::module
int module(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileCalibHitCntNtup::m_Escaped
std::vector< float > * m_Escaped
Definition: TileCalibHitCntNtup.h:139
CaloCell_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier id) const
test if the id belongs to the Tiles barrel
TileCalibHitCntNtup::m_streamName
std::string m_streamName
Definition: TileCalibHitCntNtup.h:68
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
TileCalibHitCntNtup::~TileCalibHitCntNtup
virtual ~TileCalibHitCntNtup()
Destructor.
Definition: TileCalibHitCntNtup.cxx:135
TileCalibHitCntNtup::m_caloDM_ID
const CaloDM_ID * m_caloDM_ID
Definition: TileCalibHitCntNtup.h:173
TileCalibHitCntNtup::m_inact_side
std::vector< long > * m_inact_side
Definition: TileCalibHitCntNtup.h:154
TileCalibHitCntNtup::m_inact_itc_Em
float m_inact_itc_Em
Definition: TileCalibHitCntNtup.h:118
TileCalibHitCntNtup::m_itc_NonEm
float m_itc_NonEm
Definition: TileCalibHitCntNtup.h:113
TileCalibHitCntNtup::m_inact_NonEm
std::vector< float > * m_inact_NonEm
Definition: TileCalibHitCntNtup.h:149
TileCalibHitCntNtup::m_barr_Em
float m_barr_Em
Definition: TileCalibHitCntNtup.h:88
TileCalibHitCntNtup::m_inact_subCalo
std::vector< long > * m_inact_subCalo
Definition: TileCalibHitCntNtup.h:152
TileCalibHitCntNtup::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: TileCalibHitCntNtup.cxx:18
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TileCalibHitCntNtup::m_inact_itc_totE
float m_inact_itc_totE
Definition: TileCalibHitCntNtup.h:117
TileCalibHitCntNtup::m_ntupleID
std::string m_ntupleID
Definition: TileCalibHitCntNtup.h:69
CaloCell_Base_ID::sample
int sample(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileCalibHitCntNtup::m_inact_gscin_Escaped
float m_inact_gscin_Escaped
Definition: TileCalibHitCntNtup.h:133
TileCalibHitCntNtup::m_inact_barr_Escaped
float m_inact_barr_Escaped
Definition: TileCalibHitCntNtup.h:97
TileCalibHitCntNtup::m_dm_subDet
std::vector< long > * m_dm_subDet
Definition: TileCalibHitCntNtup.h:161
TileCalibHitCntNtup::m_barr_Invisible
float m_barr_Invisible
Definition: TileCalibHitCntNtup.h:90
TileCalibHitCntNtup::m_inact_barr_totE
float m_inact_barr_totE
Definition: TileCalibHitCntNtup.h:93
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileCalibHitCntNtup::finalize
virtual StatusCode finalize()
finalize method
Definition: TileCalibHitCntNtup.cxx:506
CaloCell_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier id) const
test if the id belongs to the Tiles extended barrel
CaloDM_ID::pos_neg_z
int pos_neg_z(const Identifier &id) const
return pos_neg_z according to :
Definition: CaloDM_ID.h:639
TileCalibHitCntNtup::m_dm_ene
std::vector< float > * m_dm_ene
Definition: TileCalibHitCntNtup.h:159
TileCalibHitCntNtup::m_inact_Invisible
std::vector< float > * m_inact_Invisible
Definition: TileCalibHitCntNtup.h:150
TileCalibHitCntNtup::TileCalibHitCntNtup
TileCalibHitCntNtup(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: TileCalibHitCntNtup.cxx:25
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCell_Base_ID::sub_calo
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
TileCalibHitCntNtup::m_gscin_totE
float m_gscin_totE
Definition: TileCalibHitCntNtup.h:123
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TileCalibHitCntNtup::m_dm_phi
std::vector< long > * m_dm_phi
Definition: TileCalibHitCntNtup.h:166
TileCalibHitCntNtup::m_inact_barr_Invisible
float m_inact_barr_Invisible
Definition: TileCalibHitCntNtup.h:96
TileCalibHitCntNtup::m_inact_tower
std::vector< long > * m_inact_tower
Definition: TileCalibHitCntNtup.h:156
TileCalibHitCntNtup::m_ext_Em
float m_ext_Em
Definition: TileCalibHitCntNtup.h:100
TileCalibHitCntNtup::m_inact_visE
float m_inact_visE
Definition: TileCalibHitCntNtup.h:83
TileCalibHitCntNtup::m_dmHitContainer
std::string m_dmHitContainer
Definition: TileCalibHitCntNtup.h:170
TileCalibHitCntNtup::m_inact_sample
std::vector< long > * m_inact_sample
Definition: TileCalibHitCntNtup.h:157
CaloCalibrationHit
Class to store calorimeter calibration hit.
Definition: CaloCalibrationHit.h:23
TileCalibHitCntNtup::m_ext_totE
float m_ext_totE
Definition: TileCalibHitCntNtup.h:99
TileCalibHitCntNtup::m_itc_Invisible
float m_itc_Invisible
Definition: TileCalibHitCntNtup.h:114
TileCalibHitCntNtup::m_InactiveHitContainer
std::string m_InactiveHitContainer
Definition: TileCalibHitCntNtup.h:169
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
errorcheck.h
Helpers for checking error return status codes and reporting errors.
TileCalibHitCntNtup::m_dm_type
std::vector< long > * m_dm_type
Definition: TileCalibHitCntNtup.h:162
TileCalibHitCntNtup::StoreCNT
virtual StatusCode StoreCNT(const CaloCalibrationHitContainer *ActiveHitCnt, const CaloCalibrationHitContainer *InactiveHitCnt, const CaloCalibrationHitContainer *dmHitCnt)
Executer.
Definition: TileCalibHitCntNtup.cxx:257
TileCalibHitCntNtup::m_inact_Em
std::vector< float > * m_inact_Em
Definition: TileCalibHitCntNtup.h:148
CaloDM_ID::sampling
int sampling(const Identifier &id) const
return sampling according to :
Definition: CaloDM_ID.h:645
TileCalibHitCntNtup::m_act_nchan
long m_act_nchan
Definition: TileCalibHitCntNtup.h:76
TileCalibHitCntNtup::m_ext_Invisible
float m_ext_Invisible
Definition: TileCalibHitCntNtup.h:102
TileCalibHitCntNtup::m_sample
std::vector< long > * m_sample
Definition: TileCalibHitCntNtup.h:145
TileCalibHitCntNtup::m_inact_Total
std::vector< float > * m_inact_Total
Definition: TileCalibHitCntNtup.h:147
TileCalibHitCntNtup::m_inact_ext_Invisible
float m_inact_ext_Invisible
Definition: TileCalibHitCntNtup.h:108
TileCalibHitCntNtup::m_barr_NonEm
float m_barr_NonEm
Definition: TileCalibHitCntNtup.h:89
CaloDM_ID::eta
int eta(const Identifier &id) const
return eta
Definition: CaloDM_ID.h:657
TileCalibHitCntNtup::m_ActiveHitContainer
std::string m_ActiveHitContainer
Definition: TileCalibHitCntNtup.h:168
TileCalibHitCntNtup::m_inact_module
std::vector< long > * m_inact_module
Definition: TileCalibHitCntNtup.h:155
CaloCell_Base_ID::side
int side(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileCalibHitCntNtup::m_dm_sampling
std::vector< long > * m_dm_sampling
Definition: TileCalibHitCntNtup.h:163
AthenaHitsVector::Size
int Size() const
Definition: AthenaHitsVector.h:96
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TileCalibHitCntNtup::m_dm_vis
std::vector< float > * m_dm_vis
Definition: TileCalibHitCntNtup.h:160
TileCalibHitCntNtup::m_inact_ext_Em
float m_inact_ext_Em
Definition: TileCalibHitCntNtup.h:106
CaloDM_ID::phi
int phi(const Identifier &id) const
return phi
Definition: CaloDM_ID.h:663
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileCalibHitCntNtup::m_itc_Em
float m_itc_Em
Definition: TileCalibHitCntNtup.h:112
TileCalibHitCntNtup::m_barr_totE
float m_barr_totE
Definition: TileCalibHitCntNtup.h:87
TileCalibHitCntNtup::m_inact_itc_Escaped
float m_inact_itc_Escaped
Definition: TileCalibHitCntNtup.h:121
TileCalibHitCntNtup::m_dm_region
std::vector< long > * m_dm_region
Definition: TileCalibHitCntNtup.h:164
TileCalibHitCntNtup::m_DM_totE
float m_DM_totE
Definition: TileCalibHitCntNtup.h:84
TileCalibHitCntNtup::m_inact_nchan
long m_inact_nchan
Definition: TileCalibHitCntNtup.h:77
TileCalibHitCntNtup::m_Total
std::vector< float > * m_Total
Definition: TileCalibHitCntNtup.h:135
TileCalibHitCntNtup::m_inact_gscin_Invisible
float m_inact_gscin_Invisible
Definition: TileCalibHitCntNtup.h:132
TileCalibHitCntNtup::m_Em
std::vector< float > * m_Em
Definition: TileCalibHitCntNtup.h:136
TileCalibHitCntNtup::m_DM_visE
float m_DM_visE
Definition: TileCalibHitCntNtup.h:85
TileCalibHitCntNtup::m_max_chan
int m_max_chan
Definition: TileCalibHitCntNtup.h:175
TileCalibHitCntNtup::m_inact_itc_NonEm
float m_inact_itc_NonEm
Definition: TileCalibHitCntNtup.h:119
TileCalibHitCntNtup::m_NonEm
std::vector< float > * m_NonEm
Definition: TileCalibHitCntNtup.h:137
AthAlgTool
Definition: AthAlgTool.h:26
CaloCell_Base_ID::is_tile_gap
bool is_tile_gap(const Identifier id) const
test if the id belongs to the Tiles gap
CaloCell_Base_ID::is_tile_gapscin
bool is_tile_gapscin(const Identifier id) const
TileCalibHitCntNtup::m_dm_eta
std::vector< long > * m_dm_eta
Definition: TileCalibHitCntNtup.h:165
TileCalibHitCntNtup::m_dm_nchan
long m_dm_nchan
Definition: TileCalibHitCntNtup.h:78
TileCalibHitCntNtup::m_inact_ext_NonEm
float m_inact_ext_NonEm
Definition: TileCalibHitCntNtup.h:107
TileCalibHitCntNtup::m_barr_Escaped
float m_barr_Escaped
Definition: TileCalibHitCntNtup.h:91
CaloCell_Base_ID::section
int section(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
TileCalibHitCntNtup::m_gscin_Escaped
float m_gscin_Escaped
Definition: TileCalibHitCntNtup.h:127
Identifier
Definition: IdentifierFieldParser.cxx:14