ATLAS Offline Software
TBTree_CaloClusterH6.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // class TBTree_CaloClusterH6 // make ROOT Tree for H6 CaloCluster
6 //
7 // author: A.Minaenko
8 // date: 25/07/2006
9 
10 #include "TBTree_CaloClusterH6.h"
11 #include "TBRec/TBH6RunHeader.h"
13 
15 
16 #include <TFile.h>
17 #include <TTree.h>
18 
22 #include "CaloGeoHelpers/CaloSampling.h"
23 #include "CaloEvent/CaloCell.h"
25 #include "CaloEvent/CaloCluster.h"
26 #include "CaloEvent/CaloClusterContainer.h"
27 
30 
31 #include "TBEvent/TBEventInfo.h"
32 #include "TBEvent/TBTrack.h"
33 #include "TBEvent/TBTailCatcher.h"
34 
35 #include <fstream>
36 
38  ISvcLocator* pSvcLocator) :
39  AthAlgorithm(name, pSvcLocator), m_suffix(""),
40  m_nEvent(0),
41  m_nEventRejected(0),
42  m_nEventAccepted(0),
43  m_nEventRandomTrigger(0),
44  m_addMoments(false),
45  m_addGain(false),
46  m_addTime(false),
47  m_addQuality(false),
48  m_addBeamTrack(false),
49  m_addWTC(false),
50  m_useEMTBCluster(false),
51  m_first(true),
52  m_nRun(0),
53  m_beamMom(0),
54  m_xCryo(-9999), m_yTable(-9999), m_zCalo(30000),
55  m_evType(0),
56  m_eTotal(0),
57  m_etaTotal(0),
58  m_phiTotal(0),
59  m_eEME2(0),
60  m_eEME3(0),
61  m_eHEC0(0),
62  m_eHEC1(0),
63  m_eHEC2(0),
64  m_eFCAL0(0),
65  m_eFCAL1(0),
66  m_eFCAL2(0),
67  m_nClusters(0),
68  m_nCellCluster(0),
69  m_eCluster(0),
70  m_etaCluster (0),
71  m_phiCluster (0),
72  m_m1_eta(0),
73  m_m1_phi(0),
74  m_m2_r(0),
75  m_m2_lambda(0),
76  m_delta_phi(0),
77  m_delta_theta(0),
78  m_delta_alpha(0),
79  m_center_x(0),
80  m_center_y(0),
81  m_center_z(0),
82  m_center_lambda(0),
83  m_lateral(0),
84  m_longitudinal(0),
85  m_eng_frac_em(0),
86  m_eng_frac_max(0),
87  m_eng_frac_core(0),
88  m_m1_dens(0),
89  m_m2_dens(0),
90  m_nCells(0),
91  m_cell_id(0),
92  m_cell_ind_cluster(0),
93  m_cell_energy(0),
94  m_cell_gain(0),
95  m_cell_time(0),
96  m_cell_quality(0),
97  m_beam_coor_x(0),
98  m_beam_coor_y(0),
99  m_beam_chi2_x(0),
100  m_beam_chi2_y(0),
101  m_beam_intercept_x(0),
102  m_beam_intercept_y(0),
103  m_beam_slope_x(0),
104  m_beam_slope_y(0),
105  m_wtcNOverflow(0),
106  m_wtcSignal(0),
107  m_caloCellContainerName("AllCalo"),
108  m_clusterContainerName("TBClusters"),
109  m_WTCContainerName("TailCatcher"),
110  m_TBTreeName("TBH6Tree"),
111  m_rootfile_name("tbh6tree.root"),
112  m_rootfile(0),
113  m_tree(0),
114  m_txtFileWithXY("xcryo_ytable.txt")
115 {
116  declareProperty("ClusterContainer",m_clusterContainerName);
117  declareProperty("CellContainer",m_caloCellContainerName);
118  declareProperty("RootFileName",m_rootfile_name);
119  declareProperty("TBTreeName",m_TBTreeName);
120  declareProperty("Suffix", m_suffix);
121  declareProperty("addBeamTrack", m_addBeamTrack);
122  declareProperty("addMoments", m_addMoments);
123  declareProperty("addGain", m_addGain);
124  declareProperty("addTime", m_addTime);
125  declareProperty("addWTC", m_addWTC);
126  declareProperty("addQuality", m_addQuality);
127  declareProperty("useEMTBCluster", m_useEMTBCluster);
128  declareProperty("zCalo", m_zCalo);
129 }
130 
132 { }
133 
135 {
136  ATH_MSG_INFO ( "in initialize()" );
137 
138  // Cluster vectors
139  m_nCellCluster = new std::vector<int>;
140  m_eCluster = new std::vector<float>;
141  m_etaCluster = new std::vector<float>;
142  m_phiCluster = new std::vector<float>;
143  // Cluster moments
144  if (m_addMoments) {
145  m_m1_eta = new std::vector<float>;
146  m_m1_phi = new std::vector<float>;
147  m_m2_r = new std::vector<float>;
148  m_m2_lambda = new std::vector<float>;
149  m_delta_phi = new std::vector<float>;
150  m_delta_theta = new std::vector<float>;
151  m_delta_alpha = new std::vector<float>;
152  m_center_x = new std::vector<float>;
153  m_center_y = new std::vector<float>;
154  m_center_z = new std::vector<float>;
155  m_center_lambda = new std::vector<float>;
156  m_lateral = new std::vector<float>;
157  m_longitudinal = new std::vector<float>;
158  m_eng_frac_em = new std::vector<float>;
159  m_eng_frac_max = new std::vector<float>;
160  m_eng_frac_core = new std::vector<float>;
161  m_m1_dens = new std::vector<float>;
162  m_m2_dens = new std::vector<float>;
163  }
164  // Cell vectors
165  m_cell_id = new std::vector<int>;
166  m_cell_ind_cluster = new std::vector<int>;
167  m_cell_energy = new std::vector<float>;
168  if (m_addGain) m_cell_gain = new std::vector<int>;
169  if (m_addTime) m_cell_time = new std::vector<float>;
170  if (m_addQuality) m_cell_quality = new std::vector<float>;
171  if (m_addWTC) {
172  m_wtcNOverflow = new std::vector<short>;
173  m_wtcSignal = new std::vector<float>;
174  }
175 
176  // Open file and create TTree
177  m_rootfile = new TFile(m_rootfile_name.data(), "RECREATE");
178  if (!m_rootfile->IsOpen()) {
179  ATH_MSG_FATAL ( "Cann't open Root file" );
180  return StatusCode::FAILURE;
181  }
182  m_tree = new TTree(m_TBTreeName.c_str(), m_TBTreeName.c_str());
183 
184  // Define branches
185  //Event type
186  m_tree->Branch(("ev_type"+m_suffix).c_str(),&m_evType,
187  ("ev_type"+m_suffix+"/s").c_str());
188  // Parameters of the sum of clusters (TB particle)
189  m_tree->Branch(("eTotal"+m_suffix).c_str(),&m_eTotal,
190  ("eTotal"+m_suffix+"/F").c_str());
191  m_tree->Branch(("etaTotal"+m_suffix).c_str(),&m_etaTotal,
192  ("etaTotal"+m_suffix+"/F").c_str());
193  m_tree->Branch(("phiTotal"+m_suffix).c_str(),&m_phiTotal,
194  ("phiTotal"+m_suffix+"/F").c_str());
195  m_tree->Branch(("e_emec2"+m_suffix).c_str(),&m_eEME2,
196  ("e_emec2"+m_suffix+"/F").c_str());
197  m_tree->Branch(("e_emec3"+m_suffix).c_str(),&m_eEME3,
198  ("e_emec3"+m_suffix+"/F").c_str());
199  m_tree->Branch(("e_hec0"+m_suffix).c_str(),&m_eHEC0,
200  ("e_hec0"+m_suffix+"/F").c_str());
201  m_tree->Branch(("e_hec1"+m_suffix).c_str(),&m_eHEC1,
202  ("e_hec1"+m_suffix+"/F").c_str());
203  m_tree->Branch(("e_hec2"+m_suffix).c_str(),&m_eHEC2,
204  ("e_hec2"+m_suffix+"/F").c_str());
205  m_tree->Branch(("e_fcal0"+m_suffix).c_str(),&m_eFCAL0,
206  ("e_fcal0"+m_suffix+"/F").c_str());
207  m_tree->Branch(("e_fcal1"+m_suffix).c_str(),&m_eFCAL1,
208  ("e_fcal1"+m_suffix+"/F").c_str());
209  m_tree->Branch(("e_fcal2"+m_suffix).c_str(),&m_eFCAL2,
210  ("e_fcal2"+m_suffix+"/F").c_str());
211  // Claster parameters
212  m_tree->Branch(("cl_num"+m_suffix).c_str(),&m_nClusters,
213  ("cl_num"+m_suffix+"/I").c_str());
214  m_tree->Branch(("cl_cell_num"+m_suffix).c_str(),&m_nCellCluster);
215  m_tree->Branch(("cl_ener"+m_suffix).c_str(),&m_eCluster);
216  m_tree->Branch(("cl_eta"+m_suffix).c_str(),&m_etaCluster);
217  m_tree->Branch(("cl_phi"+m_suffix).c_str(),&m_phiCluster);
218  if (m_addMoments) {
219  m_tree->Branch(("cl_m1_eta"+m_suffix).c_str(),& m_m1_eta);
220  m_tree->Branch(("cl_m1_phi"+m_suffix).c_str(), &m_m1_phi);
221  m_tree->Branch(("cl_m2_r"+m_suffix).c_str(),&m_m2_r);
222  m_tree->Branch(("cl_m2_lambda"+m_suffix).c_str(), &m_m2_lambda);
223  m_tree->Branch(("cl_delta_phi"+m_suffix).c_str(), &m_delta_phi);
224  m_tree->Branch(("cl_delta_theta"+m_suffix).c_str(), &m_delta_theta);
225  m_tree->Branch(("cl_delta_alpha"+m_suffix).c_str(), &m_delta_alpha);
226  m_tree->Branch(("cl_center_x"+m_suffix).c_str(), &m_center_x);
227  m_tree->Branch(("cl_center_y"+m_suffix).c_str(), &m_center_y);
228  m_tree->Branch(("cl_center_z"+m_suffix).c_str(), &m_center_z);
229  m_tree->Branch(("cl_center_lambda"+m_suffix).c_str(), &m_center_lambda);
230  m_tree->Branch(("cl_lateral"+m_suffix).c_str(), &m_lateral);
231  m_tree->Branch(("cl_longitudinal"+m_suffix).c_str(), &m_longitudinal);
232  m_tree->Branch(("cl_eng_frac_em"+m_suffix).c_str(), &m_eng_frac_em);
233  m_tree->Branch(("cl_eng_frac_max"+m_suffix).c_str(), &m_eng_frac_max);
234  m_tree->Branch(("cl_eng_frac_core"+m_suffix).c_str(), &m_eng_frac_core);
235  m_tree->Branch(("cl_m1_dens"+m_suffix).c_str(), &m_m1_dens);
236  m_tree->Branch(("cl_m2_dens"+m_suffix).c_str(), &m_m2_dens);
237  }
238  // Cell parameters
239  m_tree->Branch(("cl_ncells"+m_suffix).c_str(),&m_nCells,
240  ("cl_ncells"+m_suffix+"/I").c_str());
241  m_tree->Branch(("cl_cell_id"+m_suffix).c_str(), &m_cell_id);
242  m_tree->Branch(("cl_cell_clu_ind"+m_suffix).c_str(), &m_cell_ind_cluster);
243  m_tree->Branch(("cl_cell_ener"+m_suffix).c_str(), &m_cell_energy);
244  if (m_addGain)
245  m_tree->Branch(("cl_cell_gain"+m_suffix).c_str(), &m_cell_gain);
246  if (m_addTime)
247  m_tree->Branch(("cl_cell_time"+m_suffix).c_str(), &m_cell_time);
248  if (m_addQuality)
249  m_tree->Branch(("cl_cell_quality"+m_suffix).c_str(), &m_cell_quality);
250 
251  // Add beam track parameters
252  if (m_addBeamTrack) {
253  m_tree->Branch(("bm_x"+m_suffix).c_str(), &m_beam_coor_x,
254  ("bm_x"+m_suffix).c_str());
255  m_tree->Branch(("bm_y"+m_suffix).c_str(), &m_beam_coor_y,
256  ("bm_y"+m_suffix).c_str());
257  m_tree->Branch(("bm_chi2_x"+m_suffix).c_str(), &m_beam_chi2_x,
258  ("bm_chi2_x"+m_suffix).c_str());
259  m_tree->Branch(("bm_chi2_y"+m_suffix).c_str(), &m_beam_chi2_y,
260  ("bm_chi2_y"+m_suffix).c_str());
261  m_tree->Branch(("bm_x0"+m_suffix).c_str(), &m_beam_intercept_x,
262  ("bm_x0"+m_suffix).c_str());
263  m_tree->Branch(("bm_y0"+m_suffix).c_str(), &m_beam_intercept_y,
264  ("bm_y0"+m_suffix).c_str());
265  m_tree->Branch(("bm_slope_x"+m_suffix).c_str(),&m_beam_slope_x,
266  ("bm_slope_x"+m_suffix).c_str());
267  m_tree->Branch(("bm_slope_y"+m_suffix).c_str(),&m_beam_slope_y,
268  ("bm_slope_y"+m_suffix).c_str());
269  }
270 
271  // Add Warm TailCatcher data
272  if (m_addWTC) {
273  m_tree->Branch(("wtc_n_overflow"+m_suffix).c_str(), &m_wtcNOverflow);
274  m_tree->Branch(("wtc_signal"+m_suffix).c_str(), &m_wtcSignal);
275  }
276 
277  // pointer to Cell ID helper:
278  ATH_CHECK(detStore()->retrieve(m_calo_id,"CaloCell_ID"));
279 
281 
282  ATH_MSG_INFO ( "end of initialize()" );
283  return StatusCode::SUCCESS;
284 }
285 
286 
288 {
289  m_tree->AutoSave();
290  ATH_MSG_INFO ( "finalize(): (invoked/accept/reject/random) ("<< m_nEvent
291  << "/" << m_nEventAccepted << "/" << m_nEventRejected
292  << "/" << m_nEventRandomTrigger << ")" );
293  ATH_MSG_INFO ( "Print contents of " << m_TBTreeName );
294  m_rootfile->Print();
295  m_rootfile->Close();
296  return StatusCode::SUCCESS;
297 }
298 
300 {
301  m_eTotal = 0.;
302  m_etaTotal = 0.;
303  m_phiTotal = 0.;
304  m_eEME2 = 0.;
305  m_eEME3 = 0.;
306  m_eHEC0 = 0.;
307  m_eHEC1 = 0.;
308  m_eHEC2 = 0.;
309  m_eFCAL0 = 0.;
310  m_eFCAL1 = 0.;
311  m_eFCAL2 = 0.;
312  m_nClusters = 0;
313  m_nCellCluster->clear();
314  m_eCluster->clear();
315  m_etaCluster->clear();
316  m_phiCluster->clear();
317  if (m_addMoments) {
318  m_m1_eta->clear();
319  m_m1_phi->clear();
320  m_m2_r->clear();
321  m_m2_lambda->clear();
322  m_delta_phi->clear();
323  m_delta_theta->clear();
324  m_delta_alpha->clear();
325  m_center_x->clear();
326  m_center_y->clear();
327  m_center_z->clear();
328  m_center_lambda->clear();
329  m_lateral->clear();
330  m_longitudinal->clear();
331  m_eng_frac_em->clear();
332  m_eng_frac_max->clear();
333  m_eng_frac_core->clear();
334  m_m1_dens->clear();
335  m_m2_dens->clear();
336  }
337  m_nCells=0;
338  m_cell_id->clear();
339  m_cell_ind_cluster->clear();
340  m_cell_energy->clear();
341  if (m_addGain) m_cell_gain->clear();
342  if (m_addTime) m_cell_time->clear();
343  if (m_addQuality) m_cell_quality->clear();
344  if (m_addWTC) {
345  m_wtcNOverflow->clear();
346  m_wtcSignal->clear();
347  }
348 }
349 
351 {
352  const int lastScintInLayer[] = {11, 23, 29, 35, 41, 47};
353  m_nEvent++;
354  ATH_MSG_DEBUG ( "Executing TBTree_CaloClusterH6 for "
356 
357  // Retrieve Event Info
358  const TBEventInfo* theEventInfo = nullptr;
359  StatusCode sc = evtStore()->retrieve(theEventInfo,"TBEventInfo");
360  if ( sc.isFailure() ) {
362  ( "Cannot retrieve TBEventInfo from StoreGate" );
364  return StatusCode::FAILURE;
365  }
366  m_evType = theEventInfo->getEventType();
367  ATH_MSG_DEBUG ( "Event Type found " << m_evType );
368  if (m_evType != 1 && m_evType != 3 && m_evType != 0) {
370  return StatusCode::FAILURE;
371  }
372  if (m_evType == 3) { // Random trigger
373  if (m_cell_id->size() == 0) {
375  ( "No filled cell_id vector for random trigger event" );
377  return StatusCode::FAILURE;
378  }
379  m_beam_coor_x = 9999.;
380  m_beam_coor_y = 9999.;
381  m_beam_chi2_x = 9999.;
382  m_beam_chi2_y = 9999.;
383  m_beam_intercept_x = 9999.;
384  m_beam_intercept_y = 9999.;
385  m_beam_slope_x = 0.;
386  m_beam_slope_y = 0.;
387  m_eTotal = 0.;
388  m_eEME2 = 0.;
389  m_eEME3 = 0.;
390  m_eHEC0 = 0.;
391  m_eHEC1 = 0.;
392  m_eHEC2 = 0.;
393  m_eFCAL0 = 0.;
394  m_eFCAL1 = 0.;
395  m_eFCAL2 = 0.;
396  for (int i=0; i<(int)m_eCluster->size(); i++) (*m_eCluster)[i] = 0;
397  for (int i=0; i<(int)m_cell_energy->size(); i++) (*m_cell_energy)[i] = 0;
398  if (m_addGain) m_cell_gain->clear();
399  if (m_addTime) m_cell_time->clear();
400  if (m_addQuality) m_cell_quality->clear();
401  // Get cell information
402  const CaloCellContainer* cellContainer = nullptr;
403  sc = evtStore()->retrieve(cellContainer, m_caloCellContainerName);
404  if (sc.isFailure()) {
407  ( "cannot allocate CaloCellContainer with key <"
409  << "> for random trigger event");
410  return sc;
411  }
412  // Cell loop
413  for (const CaloCell* cell : *cellContainer) {
414  const Identifier id = cell->ID();
415  for (int icell=0; icell<(int)m_cell_id->size(); icell++) {
416  if ((int)id.get_identifier32().get_compact() == (*m_cell_id)[icell]) {
417  m_eTotal += (float)cell->energy();
418  (*m_cell_energy)[icell] = (float)cell->energy();
419  int ind = (*m_cell_ind_cluster)[icell];
420  (*m_eCluster)[ind] += (float)cell->energy();
421  break;
422  }
423  }
424  }
425  // Fill the tree
426  m_tree->Fill();
428  return StatusCode::SUCCESS;
429  }
430 
431  // Do first event initialization (run header filling)
432  if (m_first) {
434 
435  m_first = false;
436  // Fill run header
437  m_nRun = theEventInfo->getRunNum();
438  m_beamMom = theEventInfo->getBeamMomentum();
439  // Get xcryo and ytable from a file
440  if (!this->getXcryoYtable(m_xCryo, m_yTable, m_beamMom)) {
441  ATH_MSG_ERROR ( "xCryo and yTable are not found for run " <<
442  m_nRun << " in file " << m_txtFileWithXY );
443  if (m_addBeamTrack) return StatusCode::FAILURE;
444  }
445  ATH_MSG_INFO ( "nRun = " << m_nRun << ", beamMomentum = "
446  << m_beamMom << " GeV, CryoX = " << m_xCryo << ", tableY = "
447  << m_yTable );
448 
449  // Fill the run header and attach it to the tree
452  rh->SetXCryo(m_xCryo);
453  rh->SetYTable(m_yTable);
454  rh->SetZCalo(m_zCalo);
455 
456  // Get cell information
457  const CaloCellContainer* cellContainer = nullptr;
458  ATH_CHECK( evtStore()->retrieve(cellContainer, m_caloCellContainerName) );
459  m_nCells = cellContainer->size();
460  ATH_MSG_DEBUG ( "CaloCellContainer container size = " << m_nCells );
461 
462  if (m_nCells > CELLMAX) {
463  ATH_MSG_ERROR ( "CaloCellContainer container size = " <<
464  m_nCells << " > CELLMAX = " << CELLMAX );
465  return StatusCode::FAILURE;
466  }
467 
468  // Cell loop
469  int icell=0;
470  for (const CaloCell* cell : *cellContainer) {
471  const CaloDetDescrElement* caloDDE = cell->caloDDE();
472  const Identifier id = cell->ID();
473  rh->SetCellID(icell,id.get_identifier32().get_compact());
474  rh->SetCellEta(icell,cell->eta());
475  rh->SetCellPhi(icell,cell->phi());
476  rh->SetCellX(icell,caloDDE->x());
477  rh->SetCellY(icell,caloDDE->y());
478  rh->SetCellZ(icell,caloDDE->z());
479  rh->SetCellR(icell,caloDDE->r());
480  rh->SetCelldEta(icell,caloDDE->deta());
481  rh->SetCelldPhi(icell,caloDDE->dphi());
482  rh->SetCelldZ(icell,caloDDE->dz());
483  rh->SetCelldR(icell,caloDDE->dr());
484  rh->SetCellVolume(icell,caloDDE->volume());
485  rh->SetCelliEta(icell,m_calo_id->eta(id));
486  rh->SetCelliPhi(icell,m_calo_id->phi(id));
488  rh->SetCellRegion(icell,0);
489  else rh->SetCellRegion(icell,m_calo_id->region(id));
493  elecNoise->getNoise(id, cell->gain()));
494  icell++;
495  }
496  rh->SetCellNum(icell+1);
497 
498  // Attach rh to the tree
499  m_tree->GetUserInfo()->Add(rh);
500  } // if (m_first)
501 
502  this->clear();
503 
504  // Get beam coordinates
505  if (m_addBeamTrack && (m_evType == 1 || m_evType == 0)) {
506  TBTrack *track = nullptr;
507  sc = evtStore()->retrieve(track, "Track");
508  if (sc.isFailure()){
509  ATH_MSG_ERROR ( "Retrieval of beam track failed" );
511  return StatusCode::FAILURE;
512  }
513  m_beam_coor_x = track->getUslope()*m_zCalo + track->getUintercept()
514  + m_xCryo;
515  m_beam_coor_y = track->getVslope()*m_zCalo + track->getVintercept();
516  m_beam_chi2_x = track->getChi2_u();
517  m_beam_chi2_y = track->getChi2_v();
518  m_beam_intercept_x = track->getUintercept();
519  m_beam_intercept_y = track->getVintercept();
520  m_beam_slope_x = track->getUslope();
521  m_beam_slope_y = track->getVslope();
522  }
523  // Warm TailCatcher data
524  if (m_addWTC) {
525  TBTailCatcher * wtc = nullptr;
526  sc = evtStore()->retrieve(wtc, m_WTCContainerName);
527  if (sc.isFailure()){
528  ATH_MSG_ERROR ( "Retrieval of WTC data failed" );
530  return StatusCode::FAILURE;
531  }
532  ATH_MSG_VERBOSE("scint name/signal/overflow flag:");
533  short novflow = 0;
534  float signal = 0;
535  int nScint = 0; int nLayer = 0;
536  for (const TBScintillator* scint : *wtc) {
537  ATH_MSG_VERBOSE(scint->getDetectorName()<<"/"<<scint->getSignal()<<
538  "/"<<scint->isSignalOverflow()<<" ");
539  if (scint->isSignalOverflow()) novflow++;
540  signal += scint->getSignal();
541  if (nScint == lastScintInLayer[nLayer]) {
542  m_wtcNOverflow->push_back(novflow);
543  m_wtcSignal->push_back(signal);
544  novflow = 0; signal = 0;
545  nLayer++;
546  }
547  nScint++;
548  }
549  if (msgLvl(MSG::VERBOSE)) {
550  msg()<<MSG::VERBOSE<<"nOverflow: ";
551  for (int i=0; i<nLayer; i++) {
552  msg()<<MSG::VERBOSE<<(*m_wtcNOverflow)[i]<<" ";
553  }
554  msg()<<MSG::VERBOSE<<endmsg;
555  msg()<<MSG::VERBOSE<<"Signals: ";
556  for (int i=0; i<nLayer; i++) {
557  msg()<<MSG::VERBOSE<<(*m_wtcSignal)[i]<<" ";
558  }
559  msg()<<MSG::VERBOSE<<endmsg;
560  }
561  }
562 
563  // Reject hadrons in 10 GeV electron beam
564  if (m_useEMTBCluster && fabs(m_beamMom-10.) < 0.5) {
565  const CaloClusterContainer* clusterContainer = nullptr;
566  sc = evtStore()->retrieve(clusterContainer, "EMTBClusters");
567  if (sc.isFailure()) {
569  ( "cannot allocate CaloClusterContainer with key <"
570  << "EMTBClusters" << ">" );
572  return sc;
573  }
574  if ( clusterContainer->size()== 1) {
575  CaloClusterContainer::const_iterator it_clu = clusterContainer->begin();
576  const CaloCluster* cluster = (*it_clu);
577  float e = (float)cluster->energy();
578  float ecut = 6000;
579  if ( m_yTable < -100) ecut = 4000;
580  if (e < ecut) {
582  return StatusCode::FAILURE;
583  }
584  }
585  }
586  // Reject muons in 40 GeV pion beam
587  if (m_useEMTBCluster && fabs(m_beamMom-40.) < 0.5) {
588  const CaloClusterContainer* clusterContainer = nullptr;
589  sc = evtStore()->retrieve(clusterContainer, "EMTBClusters");
590  if (sc.isFailure()) {
592  ( "cannot allocate CaloClusterContainer with key <"
593  << "EMTBClusters" << ">" );
595  return sc;
596  }
597  if ( clusterContainer->size()== 1) {
598  CaloClusterContainer::const_iterator it_clu = clusterContainer->begin();
599  const CaloCluster* cluster = (*it_clu);
600  float e = (float)cluster->energy();
601  float ecut = 9000;
602  //if ( m_yTable < -100) ecut = 4000;
603  if (e < ecut) {
605  return StatusCode::FAILURE;
606  }
607  }
608  }
609  // Clusters
610  const CaloClusterContainer* clusterContainer = nullptr;
611  sc = evtStore()->retrieve(clusterContainer, m_clusterContainerName);
612  if (sc.isFailure()) {
614  ( "cannot allocate CaloClusterContainer with key <"
616  << ">");
618  return sc;
619  }
620  m_nClusters = clusterContainer->size();
621  ATH_MSG_DEBUG ( "CaloClusterContainer container size = " <<
622  m_nClusters );
623  if ( clusterContainer->size() < 1) {
624  ATH_MSG_ERROR ( " wrong CaloClusterContainer container size = " <<
625  m_nClusters );
627  return StatusCode::FAILURE;
628  }
629 
630  int clu_ind = 0;
631  float eAbsTotal = 0.;
632  for (const CaloCluster* cluster : *clusterContainer) {
633  m_nCells += cluster->getNumberOfCells();
634  m_nCellCluster->push_back((int)cluster->getNumberOfCells());
635  m_eCluster->push_back((float)cluster->energy());
636  m_etaCluster->push_back((float)cluster->eta());
637  m_phiCluster->push_back((float)cluster->phi());
638  m_eTotal += (float)cluster->energy();
639  eAbsTotal += fabs((float)cluster->energy());
640  m_etaTotal += fabs((float)cluster->energy())*(float)cluster->eta();
641  m_phiTotal += fabs((float)cluster->energy())*(float)cluster->phi();
642  //m_cell_energy->reserve(m_nCells);
643  //if (m_addGain) m_cell_gain->reserve(m_nCells);
644  //if (m_addTime) m_cell_time->reserve(m_nCells);
645  //if (m_addQuality) m_cell_quality->reserve(m_nCells);
646 
647  // Loop through cluster cells
648  CaloCluster::cell_iterator itc=cluster->cell_begin();
649  for (; itc!=cluster->cell_end(); itc++) {
650  const CaloCell* cell = (*itc);
651  const Identifier id = cell->ID();
652  m_cell_id->push_back(id.get_identifier32().get_compact());
653  m_cell_ind_cluster->push_back(clu_ind);
654  m_cell_energy->push_back((float)cell->energy());
655  if (m_addGain) m_cell_gain->push_back((int)cell->gain());
656  if (m_addTime) m_cell_time->push_back((float)cell->time());
657  if (m_addQuality) m_cell_quality->push_back((float)cell->quality());
659  m_eEME2 += (float)cell->energy();
661  m_eEME3 += (float)cell->energy();
663  m_eHEC0 += (float)cell->energy();
665  m_eHEC1 += (float)cell->energy();
667  m_eHEC2 += (float)cell->energy();
669  m_eFCAL0 += (float)cell->energy();
671  m_eFCAL1 += (float)cell->energy();
673  m_eFCAL2 += (float)cell->energy();
674  }
675 
676  // Add cluster moments
677  if (m_addMoments) {
678  float m1_eta = -9999;
679  float m1_phi = -9999;
680  float m2_r = -9999;
681  float m2_lambda = -9999;
682  float delta_phi = -9999;
683  float delta_theta = -9999;
684  float delta_alpha = -9999;
685  float center_x = -9999;
686  float center_y = -9999;
687  float center_z = -9999;
688  float center_lambda = -9999;
689  float lateral = -9999;
690  float longitudinal = -9999;
691  float eng_frac_em = -9999;
692  float eng_frac_max = -9999;
693  float eng_frac_core = -9999;
694  float m1_dens = -9999;
695  float m2_dens = -9999;
696  CaloCluster::moment_iterator it_mom=cluster->beginMoment(false);
697  for (; it_mom != cluster->endMoment(false); ++it_mom) {
698  switch ( it_mom.getMomentType() ) {
700  m1_eta = it_mom.getMoment().getValue();
701  break;
703  m1_phi = it_mom.getMoment().getValue();
704  break;
706  m2_r = it_mom.getMoment().getValue();
707  break;
709  m2_lambda = it_mom.getMoment().getValue();
710  break;
712  delta_phi = it_mom.getMoment().getValue();
713  break;
715  delta_theta = it_mom.getMoment().getValue();
716  break;
718  delta_alpha = it_mom.getMoment().getValue();
719  break;
721  center_x = it_mom.getMoment().getValue();
722  break;
724  center_y = it_mom.getMoment().getValue();
725  break;
727  center_z = it_mom.getMoment().getValue();
728  break;
730  center_lambda = it_mom.getMoment().getValue();
731  break;
733  lateral = it_mom.getMoment().getValue();
734  break;
736  longitudinal = it_mom.getMoment().getValue();
737  break;
739  eng_frac_em = it_mom.getMoment().getValue();
740  break;
742  eng_frac_max = it_mom.getMoment().getValue();
743  break;
745  eng_frac_core = it_mom.getMoment().getValue();
746  break;
748  m1_dens = it_mom.getMoment().getValue();
749  break;
751  m2_dens = it_mom.getMoment().getValue();
752  break;
753  default:
754  break;
755  }
756  }
757  m_m1_eta->push_back(m1_eta);
758  m_m1_phi->push_back(m1_phi);
759  m_m2_r->push_back(m2_r);
760  m_m2_lambda->push_back(m2_lambda);
761  m_delta_phi->push_back(delta_phi);
762  m_delta_theta->push_back(delta_theta);
763  m_delta_alpha->push_back(delta_alpha);
764  m_center_x->push_back(center_x);
765  m_center_y->push_back(center_y);
766  m_center_z->push_back(center_z);
767  m_center_lambda->push_back(center_lambda);
768  m_lateral->push_back(lateral);
769  m_longitudinal->push_back(longitudinal);
770  m_eng_frac_em->push_back(eng_frac_em);
771  m_eng_frac_max->push_back(eng_frac_max);
772  m_eng_frac_core->push_back(eng_frac_core);
773  m_m1_dens->push_back(m1_dens);
774  m_m2_dens->push_back(m2_dens);
775  }
776  clu_ind++;
777  } // end of cluster loop
778 
779  if (eAbsTotal > 0.) {
780  const float inv_eAbsTotal = 1. / eAbsTotal;
781  m_etaTotal *= inv_eAbsTotal;
782  m_phiTotal *= inv_eAbsTotal;
783  }
784 
785  // Fill the tree
786  m_tree->Fill();
788 
789  return sc;
790 }
791 
793 
794  ATH_MSG_DEBUG ( "in getXcryoYtable(float x, float y)" );
795 
796  std::ifstream xyFile;
797  std::string line;
798  std::string filename = PathResolver::find_file(m_txtFileWithXY, "DATAPATH");
799  xyFile.open(filename.c_str());
800  if (!xyFile.is_open()) {
801  ATH_MSG_ERROR ( "File " << m_txtFileWithXY << " fail to open in $DATAPATH");
802  return StatusCode::FAILURE;
803  }
804 
805  while ( getline(xyFile, line, '\n') ) {
806  int run;
807  std::istringstream buf(line);
808  e = 0;
809  buf >> run >> x >> y >> e;
810  ATH_MSG_DEBUG ( "run,x,y,e= "<<run<<" "<<x<<" "<<y<<" "<<e);
811  if (run == m_nRun && xyFile.good()) return StatusCode::SUCCESS;
812  }
813 
814  return StatusCode::FAILURE;
815 }
816 
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CaloClusterMoment::ENG_FRAC_MAX
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
Definition: CaloClusterMoment.h:54
CaloClusterMoment::LONGITUDINAL
@ LONGITUDINAL
Normalized longitudinal moment.
Definition: CaloClusterMoment.h:52
TBTree_CaloClusterH6::m_evType
unsigned short m_evType
z-coordinate of the calorimeter surface at which beam coordinates calculated
Definition: TBTree_CaloClusterH6.h:65
TBTree_CaloClusterH6::m_center_x
std::vector< float > * m_center_x
Definition: TBTree_CaloClusterH6.h:92
CaloCell_Base_ID::LARFCAL
@ LARFCAL
Definition: CaloCell_Base_ID.h:46
TBH6RunHeader::SetXCryo
void SetXCryo(float x)
Definition: TBH6RunHeader.cxx:70
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
TBH6RunHeader::SetYTable
void SetYTable(float y)
Definition: TBH6RunHeader.cxx:71
TBTree_CaloClusterH6::m_first
bool m_first
Definition: TBTree_CaloClusterH6.h:52
CaloCell_Base_ID::region
int region(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TBTree_CaloClusterH6::m_m1_eta
std::vector< float > * m_m1_eta
Definition: TBTree_CaloClusterH6.h:85
TBTrack
Definition: TBTrack.h:20
WriteCellNoiseToCool.icell
icell
Definition: WriteCellNoiseToCool.py:339
TBH6RunHeader::SetCellNum
void SetCellNum(int nCell)
Definition: TBH6RunHeader.cxx:73
TBTree_CaloClusterH6::TBTree_CaloClusterH6
TBTree_CaloClusterH6(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TBTree_CaloClusterH6.cxx:37
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloClusterMoment::SECOND_R
@ SECOND_R
Second Moment in .
Definition: CaloClusterMoment.h:41
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
TBTree_CaloClusterH6::m_beam_intercept_y
float m_beam_intercept_y
Definition: TBTree_CaloClusterH6.h:118
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TBTree_CaloClusterH6::m_yTable
float m_yTable
CryoX.
Definition: TBTree_CaloClusterH6.h:58
TBTree_CaloClusterH6::m_addTime
bool m_addTime
Definition: TBTree_CaloClusterH6.h:47
TBTree_CaloClusterH6::m_addGain
bool m_addGain
Definition: TBTree_CaloClusterH6.h:46
TBTree_CaloClusterH6::m_etaTotal
float m_etaTotal
Definition: TBTree_CaloClusterH6.h:68
CELLMAX
#define CELLMAX
Definition: TBH6RunHeader.h:7
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloClusterMoment::SECOND_ENG_DENS
@ SECOND_ENG_DENS
Second Moment in E/V.
Definition: CaloClusterMoment.h:57
TBTree_CaloClusterH6::m_delta_alpha
std::vector< float > * m_delta_alpha
Definition: TBTree_CaloClusterH6.h:91
CaloClusterContainer
Storable container for CaloCluster.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloClusterContainer.h:37
TBEventInfo::getRunNum
unsigned int getRunNum() const
Definition: TBEventInfo.h:67
CaloCluster::MomentStoreIter
Internal cell iterator.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:155
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TBTree_CaloClusterH6::m_cell_ind_cluster
std::vector< int > * m_cell_ind_cluster
Definition: TBTree_CaloClusterH6.h:106
TBTree_CaloClusterH6::m_center_z
std::vector< float > * m_center_z
Definition: TBTree_CaloClusterH6.h:94
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
TBTree_CaloClusterH6::m_eEME3
float m_eEME3
Definition: TBTree_CaloClusterH6.h:71
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
TBH6RunHeader::SetCellRegion
void SetCellRegion(const int i, const int reg)
Definition: TBH6RunHeader.cxx:95
TBTree_CaloClusterH6::m_beam_slope_x
float m_beam_slope_x
Definition: TBTree_CaloClusterH6.h:119
TBTree_CaloClusterH6::m_beam_intercept_x
float m_beam_intercept_x
Definition: TBTree_CaloClusterH6.h:117
CaloCell.h
CaloClusterMoment::CENTER_Y
@ CENTER_Y
Cluster Centroid ( ).
Definition: CaloClusterMoment.h:47
TBTree_CaloClusterH6::m_center_y
std::vector< float > * m_center_y
Definition: TBTree_CaloClusterH6.h:93
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
CaloClusterMoment::LATERAL
@ LATERAL
Normalized lateral moment.
Definition: CaloClusterMoment.h:51
CaloClusterMoment::DELTA_PHI
@ DELTA_PHI
Angular shower axis deviation ( ) from IP-to-Center.
Definition: CaloClusterMoment.h:43
TBTree_CaloClusterH6::m_calo_id
const CaloCell_ID * m_calo_id
Definition: TBTree_CaloClusterH6.h:135
TBEventInfo::getEventType
int getEventType() const
Definition: TBEventInfo.h:66
TBH6RunHeader::SetZCalo
void SetZCalo(float z)
Definition: TBH6RunHeader.cxx:72
CaloCell_ID_FCS::HEC2
@ HEC2
Definition: FastCaloSim_CaloCell_ID.h:29
CaloCell_Base_ID::calo_sample
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
Definition: CaloCell_Base_ID.cxx:141
TBH6RunHeader::SetCellID
void SetCellID(const int i, const int id)
Definition: TBH6RunHeader.cxx:74
TBTree_CaloClusterH6::m_tree
TTree * m_tree
Definition: TBTree_CaloClusterH6.h:133
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TBH6RunHeader::SetBeamMomentum
void SetBeamMomentum(float mom)
Definition: TBH6RunHeader.cxx:69
TBTree_CaloClusterH6::m_rootfile
TFile * m_rootfile
Definition: TBTree_CaloClusterH6.h:132
CaloNoise::getNoise
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
Definition: CaloNoise.h:34
TBTree_CaloClusterH6::m_eng_frac_max
std::vector< float > * m_eng_frac_max
Definition: TBTree_CaloClusterH6.h:99
CaloClusterMoment::FIRST_ENG_DENS
@ FIRST_ENG_DENS
First Moment in E/V.
Definition: CaloClusterMoment.h:56
TBTree_CaloClusterH6::m_m1_phi
std::vector< float > * m_m1_phi
Definition: TBTree_CaloClusterH6.h:86
x
#define x
TBTree_CaloClusterH6::m_addQuality
bool m_addQuality
Definition: TBTree_CaloClusterH6.h:48
TBTree_CaloClusterH6::m_delta_phi
std::vector< float > * m_delta_phi
Definition: TBTree_CaloClusterH6.h:89
ReadCondHandle.h
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
TBTailCatcher
Definition: TBTailCatcher.h:25
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TBTree_CaloClusterH6::m_suffix
std::string m_suffix
Definition: TBTree_CaloClusterH6.h:40
CaloCell_ID.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
CaloClusterMoment::FIRST_PHI
@ FIRST_PHI
First Moment in .
Definition: CaloClusterMoment.h:39
TBH6RunHeader::SetCellPhi
void SetCellPhi(const int i, const float phi)
Definition: TBH6RunHeader.cxx:78
CaloCompositeKineBase::energy
virtual double energy() const
Return energy.
Definition: CaloCompositeKineBase.h:70
TBTree_CaloClusterH6::m_m2_r
std::vector< float > * m_m2_r
Definition: TBTree_CaloClusterH6.h:87
TBH6RunHeader::SetCelldR
void SetCelldR(const int i, const float dr)
Definition: TBH6RunHeader.cxx:88
TBTree_CaloClusterH6::getXcryoYtable
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
Get Xcryo and Ytable from a text file.
Definition: TBTree_CaloClusterH6.cxx:792
TBH6RunHeader::SetCellCalo
void SetCellCalo(const int i, const int calo)
Definition: TBH6RunHeader.cxx:97
TBTree_CaloClusterH6::m_nCellCluster
std::vector< int > * m_nCellCluster
Definition: TBTree_CaloClusterH6.h:80
TBTree_CaloClusterH6::initialize
virtual StatusCode initialize() override
Definition: TBTree_CaloClusterH6.cxx:134
CaloDetDescrElement::dz
float dz() const
cell dz
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:379
TBTree_CaloClusterH6::m_phiTotal
float m_phiTotal
Definition: TBTree_CaloClusterH6.h:69
TBTree_CaloClusterH6::m_delta_theta
std::vector< float > * m_delta_theta
Definition: TBTree_CaloClusterH6.h:90
TBH6RunHeader::SetCelliPhi
void SetCelliPhi(const int i, const int iphi)
Definition: TBH6RunHeader.cxx:93
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CaloCluster::cell_iterator
CaloCompositeCellBase< CaloClusterNavigable >::cell_iterator cell_iterator
Iterator on CaloCell s.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:115
TBTree_CaloClusterH6::m_nEventRejected
int m_nEventRejected
Definition: TBTree_CaloClusterH6.h:42
TBH6RunHeader::SetCelldZ
void SetCelldZ(const int i, const float dz)
Definition: TBH6RunHeader.cxx:87
CaloCell_ID_FCS::HEC1
@ HEC1
Definition: FastCaloSim_CaloCell_ID.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TBTree_CaloClusterH6::m_wtcNOverflow
std::vector< short > * m_wtcNOverflow
Definition: TBTree_CaloClusterH6.h:123
TBTree_CaloClusterH6::clear
void clear()
Definition: TBTree_CaloClusterH6.cxx:299
TBTree_CaloClusterH6::m_elecNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
Definition: TBTree_CaloClusterH6.h:138
lumiFormat.i
int i
Definition: lumiFormat.py:92
TBTree_CaloClusterH6::m_nEvent
int m_nEvent
Definition: TBTree_CaloClusterH6.h:41
TBTree_CaloClusterH6::m_m2_lambda
std::vector< float > * m_m2_lambda
Definition: TBTree_CaloClusterH6.h:88
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
TBTree_CaloClusterH6::execute
virtual StatusCode execute() override
Definition: TBTree_CaloClusterH6.cxx:350
CaloClusterMoment::DELTA_THETA
@ DELTA_THETA
Angular shower axis deviation ( ) from IP-to-Center.
Definition: CaloClusterMoment.h:44
TBTree_CaloClusterH6::m_addBeamTrack
bool m_addBeamTrack
Definition: TBTree_CaloClusterH6.h:49
TBTree_CaloClusterH6::m_m1_dens
std::vector< float > * m_m1_dens
Definition: TBTree_CaloClusterH6.h:101
CaloCell_Base_ID::eta
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
TBTree_CaloClusterH6::m_longitudinal
std::vector< float > * m_longitudinal
Definition: TBTree_CaloClusterH6.h:97
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
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.
TBTree_CaloClusterH6::m_txtFileWithXY
std::string m_txtFileWithXY
Text file containing xCryo and yTable.
Definition: TBTree_CaloClusterH6.h:141
TBTree_CaloClusterH6::m_WTCContainerName
std::string m_WTCContainerName
Definition: TBTree_CaloClusterH6.h:129
CaloClusterMoment::SECOND_LAMBDA
@ SECOND_LAMBDA
Second Moment in .
Definition: CaloClusterMoment.h:42
TBTree_CaloClusterH6::m_addMoments
bool m_addMoments
Definition: TBTree_CaloClusterH6.h:45
TBTree_CaloClusterH6::m_cell_id
std::vector< int > * m_cell_id
Definition: TBTree_CaloClusterH6.h:105
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TBTrack.h
TBTree_CaloClusterH6::m_useEMTBCluster
bool m_useEMTBCluster
Definition: TBTree_CaloClusterH6.h:51
TBTree_CaloClusterH6::m_caloCellContainerName
std::string m_caloCellContainerName
Definition: TBTree_CaloClusterH6.h:127
run
Definition: run.py:1
TBTree_CaloClusterH6::m_rootfile_name
std::string m_rootfile_name
Definition: TBTree_CaloClusterH6.h:131
CaloClusterMoment::getValue
const double & getValue() const
returns the value of this moment
Definition: CaloClusterMoment.h:153
CaloClusterMoment::FIRST_ETA
@ FIRST_ETA
First Moment in .
Definition: CaloClusterMoment.h:40
TBTree_CaloClusterH6::m_zCalo
float m_zCalo
TableY.
Definition: TBTree_CaloClusterH6.h:59
TBTree_CaloClusterH6::m_cell_gain
std::vector< int > * m_cell_gain
Definition: TBTree_CaloClusterH6.h:108
TBTree_CaloClusterH6::m_eCluster
std::vector< float > * m_eCluster
Definition: TBTree_CaloClusterH6.h:81
TBTree_CaloClusterH6::m_beam_slope_y
float m_beam_slope_y
Definition: TBTree_CaloClusterH6.h:120
AthAlgorithm
Definition: AthAlgorithm.h:47
TBTree_CaloClusterH6::~TBTree_CaloClusterH6
virtual ~TBTree_CaloClusterH6()
Definition: TBTree_CaloClusterH6.cxx:131
TBH6RunHeader::SetCellVolume
void SetCellVolume(const int i, const float vol)
Definition: TBH6RunHeader.cxx:89
TBTree_CaloClusterH6::m_nEventAccepted
int m_nEventAccepted
Definition: TBTree_CaloClusterH6.h:43
CaloCluster::MomentStoreIter::getMomentType
moment_type getMomentType() const
Function access to moment type.
Definition: CaloCluster.cxx:1572
TBTree_CaloClusterH6::m_eFCAL0
float m_eFCAL0
Definition: TBTree_CaloClusterH6.h:75
TBTree_CaloClusterH6::m_cell_quality
std::vector< float > * m_cell_quality
Definition: TBTree_CaloClusterH6.h:110
TBTree_CaloClusterH6::m_beam_chi2_y
float m_beam_chi2_y
Definition: TBTree_CaloClusterH6.h:116
TBH6RunHeader::SetCellZ
void SetCellZ(const int i, const float z)
Definition: TBH6RunHeader.cxx:81
TBTree_CaloClusterH6::m_nEventRandomTrigger
int m_nEventRandomTrigger
Definition: TBTree_CaloClusterH6.h:44
PathResolver.h
TBTree_CaloClusterH6::m_addWTC
bool m_addWTC
Definition: TBTree_CaloClusterH6.h:50
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:64
TBTree_CaloClusterH6::m_nClusters
int m_nClusters
Definition: TBTree_CaloClusterH6.h:79
TBTree_CaloClusterH6::m_eHEC2
float m_eHEC2
Definition: TBTree_CaloClusterH6.h:74
CaloDetDescrElement::volume
float volume() const
cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:381
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
TBTree_CaloClusterH6::m_beam_coor_x
float m_beam_coor_x
Definition: TBTree_CaloClusterH6.h:113
TBTree_CaloClusterH6::m_phiCluster
std::vector< float > * m_phiCluster
Definition: TBTree_CaloClusterH6.h:83
TBH6RunHeader
Definition: TBH6RunHeader.h:16
TBTree_CaloClusterH6::m_lateral
std::vector< float > * m_lateral
Definition: TBTree_CaloClusterH6.h:96
TBH6RunHeader::SetCelldPhi
void SetCelldPhi(const int i, const float dphi)
Definition: TBH6RunHeader.cxx:85
TBH6RunHeader::SetCellSampling
void SetCellSampling(const int i, const int subc)
Definition: TBH6RunHeader.cxx:99
TBTree_CaloClusterH6.h
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloClusterMoment::ENG_FRAC_EM
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
Definition: CaloClusterMoment.h:53
CaloCell_Base_ID::phi
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
LArDigitContainer.h
TBTree_CaloClusterH6::m_eFCAL1
float m_eFCAL1
Definition: TBTree_CaloClusterH6.h:76
TBH6RunHeader.h
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TBH6RunHeader::SetCellR
void SetCellR(const int i, const float r)
Definition: TBH6RunHeader.cxx:82
TBTree_CaloClusterH6::m_clusterContainerName
std::string m_clusterContainerName
Definition: TBTree_CaloClusterH6.h:128
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
CaloCluster::MomentStoreIter::getMoment
const CaloClusterMoment & getMoment() const
Function access to CaloClusterMoment.
Definition: CaloCluster.cxx:1570
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
TBTree_CaloClusterH6::finalize
virtual StatusCode finalize() override
Definition: TBTree_CaloClusterH6.cxx:287
TBTree_CaloClusterH6::m_nRun
int m_nRun
Definition: TBTree_CaloClusterH6.h:55
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
TBTree_CaloClusterH6::m_eEME2
float m_eEME2
Definition: TBTree_CaloClusterH6.h:70
TBTree_CaloClusterH6::m_center_lambda
std::vector< float > * m_center_lambda
Definition: TBTree_CaloClusterH6.h:95
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
TBTree_CaloClusterH6::m_eng_frac_core
std::vector< float > * m_eng_frac_core
Definition: TBTree_CaloClusterH6.h:100
y
#define y
TBTree_CaloClusterH6::m_eTotal
float m_eTotal
Definition: TBTree_CaloClusterH6.h:67
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
TBEventInfo
Definition: TBEventInfo.h:27
ILArPedestal.h
TBTailCatcher.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TBTree_CaloClusterH6::m_etaCluster
std::vector< float > * m_etaCluster
Definition: TBTree_CaloClusterH6.h:82
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
CaloClusterMoment::CENTER_LAMBDA
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
Definition: CaloClusterMoment.h:50
eFEXNTuple.delta_phi
def delta_phi(phi1, phi2)
Definition: eFEXNTuple.py:15
TBTree_CaloClusterH6::m_wtcSignal
std::vector< float > * m_wtcSignal
Definition: TBTree_CaloClusterH6.h:124
TBTree_CaloClusterH6::m_eHEC1
float m_eHEC1
Definition: TBTree_CaloClusterH6.h:73
CaloClusterMoment::CENTER_X
@ CENTER_X
Cluster Centroid ( ).
Definition: CaloClusterMoment.h:46
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TBTree_CaloClusterH6::m_beam_chi2_x
float m_beam_chi2_x
Definition: TBTree_CaloClusterH6.h:115
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
TBScintillator
Definition: TBScintillator.h:25
TBEventInfo::getBeamMomentum
float getBeamMomentum() const
Definition: TBEventInfo.h:68
TBH6RunHeader::SetCelldEta
void SetCelldEta(const int i, const float deta)
Definition: TBH6RunHeader.cxx:83
TBH6RunHeader::SetCellY
void SetCellY(const int i, const float y)
Definition: TBH6RunHeader.cxx:80
CaloClusterMoment::CENTER_Z
@ CENTER_Z
Cluster Centroid ( ).
Definition: CaloClusterMoment.h:48
TBH6RunHeader::SetCellNoiseRMS
void SetCellNoiseRMS(const int i, const float rms)
Definition: TBH6RunHeader.cxx:75
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
TBTree_CaloClusterH6::m_beamMom
float m_beamMom
Run number.
Definition: TBTree_CaloClusterH6.h:56
TBTree_CaloClusterH6::m_beam_coor_y
float m_beam_coor_y
Definition: TBTree_CaloClusterH6.h:114
TBEventInfo.h
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
CaloClusterMoment::DELTA_ALPHA
@ DELTA_ALPHA
Angular shower axis deviation from IP-to-Center.
Definition: CaloClusterMoment.h:45
TBTree_CaloClusterH6::m_TBTreeName
std::string m_TBTreeName
Definition: TBTree_CaloClusterH6.h:130
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
TBTree_CaloClusterH6::m_eHEC0
float m_eHEC0
Definition: TBTree_CaloClusterH6.h:72
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
CaloGain.h
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
TBH6RunHeader::SetCellX
void SetCellX(const int i, const float x)
Definition: TBH6RunHeader.cxx:79
TBTree_CaloClusterH6::m_eFCAL2
float m_eFCAL2
Definition: TBTree_CaloClusterH6.h:77
TBTree_CaloClusterH6::m_cell_energy
std::vector< float > * m_cell_energy
Definition: TBTree_CaloClusterH6.h:107
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TBTree_CaloClusterH6::m_cell_time
std::vector< float > * m_cell_time
Definition: TBTree_CaloClusterH6.h:109
TBTree_CaloClusterH6::m_nCells
int m_nCells
Definition: TBTree_CaloClusterH6.h:104
TBH6RunHeader::SetCellEta
void SetCellEta(const int i, const float eta)
Definition: TBH6RunHeader.cxx:77
TBTree_CaloClusterH6::m_eng_frac_em
std::vector< float > * m_eng_frac_em
Definition: TBTree_CaloClusterH6.h:98
readCCLHist.float
float
Definition: readCCLHist.py:83
TBH6RunHeader::SetCelliEta
void SetCelliEta(const int i, const int ieta)
Definition: TBH6RunHeader.cxx:91
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
TBTree_CaloClusterH6::m_m2_dens
std::vector< float > * m_m2_dens
Definition: TBTree_CaloClusterH6.h:102
CaloClusterMoment::ENG_FRAC_CORE
@ ENG_FRAC_CORE
Energy fraction of the sum of the hottest cells in each sampling.
Definition: CaloClusterMoment.h:55
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TBTree_CaloClusterH6::m_xCryo
float m_xCryo
Beam momentum.
Definition: TBTree_CaloClusterH6.h:57