ATLAS Offline Software
ISF_HitAnalysis.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 // Section of includes for LAr calo tests
11 #include "CaloDetDescr/CaloDetDescrElement.h"
13 
14 // Section of includes for tile calo tests
20 
22 #include "CaloIdentifier/TileID.h"
24 #include "TileSimEvent/TileHit.h"
26 
27 //Track Record
29 
30 //CaloCell
35 
36 #include "GaudiKernel/MsgStream.h"
37 
39 
40 #include "TTree.h"
41 #include "TFile.h"
42 #include "TString.h"
43 #include "TVector3.h"
44 #include <sstream>
45 
46 // For MC Truth information:
48 
49 
50 //####################
55 #include "TrkSurfaces/DiscBounds.h"
59 #include "GaudiKernel/IPartPropSvc.h"
60 #include "HepPDT/ParticleData.hh"
61 #include "HepPDT/ParticleDataTable.hh"
62 //#########################
63 
64 
65 #include <algorithm>
66 #include <cmath>
67 #include <functional>
68 #include <iostream>
69 
70 ISF_HitAnalysis::ISF_HitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
71 : AthAlgorithm(name, pSvcLocator)
72  //Note that m_xxx are pointers to vectors set to 0, not set to empty vector! see note around TBranch
73 {
74  m_surfacelist.resize(0);
80 }
81 
83 = default;
84 
86 {
87  ATH_MSG_INFO( "Updating the Sim+Digi MetaData" );
88 
89  // Reset the internal settings:
90  bool run_update = false;
91 
92  // Check what kind of keys we got. In principle the function should only
93  // receive the "/Digitization/Parameters" and "/Simulation/Parameters" key.
94  ATH_MSG_DEBUG("Update called with " <<I<< " folder " << keys.size() << " keys:");
95  std::list< std::string >::const_iterator itr = keys.begin();
96  std::list< std::string >::const_iterator end = keys.end();
97  for( ; itr != end; ++itr )
98  {
99  if( *itr == m_MC_DIGI_PARAM ) run_update = true;
100  if( *itr == m_MC_SIM_PARAM ) run_update = true;
101  }
102  // If that's not the key that we received after all, let's just return
103  // silently...
104  if( ! run_update ) return StatusCode::SUCCESS;
105 
106  const AthenaAttributeList* simParam;
107  if( detStore()->retrieve( simParam, m_MC_SIM_PARAM ).isFailure() )
108  {
109  ATH_MSG_WARNING("Retrieving MC SIM metadata failed");
110  }
111  else
112  {
113  AthenaAttributeList::const_iterator attr_itr = simParam->begin();
114  AthenaAttributeList::const_iterator attr_end = simParam->end();
115  for( ; attr_itr != attr_end; ++attr_itr )
116  {
117  std::stringstream outstr;
118  attr_itr->toOutputStream(outstr);
119  ATH_MSG_INFO("MetaData: " << outstr.str());
120  }
121  }
122 
123  return StatusCode::SUCCESS;
124 }
125 
126 
128 {
129  ATH_MSG_VERBOSE( "Initializing ISF_HitAnalysis" );
130  //
131  // Register the callback(s):
132  //
133  ATH_CHECK(m_geoModel.retrieve());
134  ATH_CHECK(detStore()->retrieve(m_tileMgr));
135  ATH_CHECK(detStore()->retrieve(m_tileID));
136 
137  const CaloIdManager* caloIdManager{nullptr};
138  ATH_CHECK(detStore()->retrieve(caloIdManager));
139  m_larEmID=caloIdManager->getEM_ID();
140  if(m_larEmID==nullptr)
141  throw std::runtime_error("ISF_HitAnalysis: Invalid LAr EM ID helper");
142  m_larFcalID=caloIdManager->getFCAL_ID();
143  if(m_larFcalID==nullptr)
144  throw std::runtime_error("ISF_HitAnalysis: Invalid FCAL ID helper");
145  m_larHecID=caloIdManager->getHEC_ID();
146  if(m_larHecID==nullptr)
147  throw std::runtime_error("ISF_HitAnalysis: Invalid HEC ID helper");
148  m_tileID=caloIdManager->getTileID();
149  if(m_tileID==nullptr)
150  throw std::runtime_error("ISF_HitAnalysis: Invalid Tile ID helper");
151 
152  ATH_CHECK( m_fSamplKey.initialize() );
153 
154  ATH_CHECK(detStore()->retrieve(m_tileHWID));
155  ATH_CHECK( m_tileSamplingFractionKey.initialize() );
156 
157  ATH_CHECK( m_tileCablingSvc.retrieve() );
158  m_tileCabling = m_tileCablingSvc->cablingService();
159 
160  ATH_CHECK(m_caloMgrKey.initialize());
161 
162  // Get TimedExtrapolator ***************************************************************************************************
163  if (!m_extrapolator.empty() && m_extrapolator.retrieve().isFailure()) {
164  return StatusCode::FAILURE;
165  }
166  ATH_MSG_DEBUG("Extrapolator retrieved "<< m_extrapolator);
167 
168  ATH_CHECK(m_calo_tb_coord.retrieve());
169  ATH_MSG_VERBOSE("retrieved " << m_calo_tb_coord);
170 
171  if( detStore()->contains< AthenaAttributeList >( m_MC_DIGI_PARAM ) )
172  {
174  if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_DIGI_PARAM, true ).isFailure() )
175  {
176  ATH_MSG_ERROR( "Could not register callback for "<< m_MC_DIGI_PARAM );
177  return StatusCode::FAILURE;
178  }
179  }
180  else
181  {
182  ATH_MSG_WARNING( "MetaData not found for "<< m_MC_DIGI_PARAM );
183  }
184 
185  if(detStore()->contains< AthenaAttributeList >( m_MC_SIM_PARAM ) )
186  {
188  if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_SIM_PARAM, true ).isFailure() )
189  {
190  ATH_MSG_ERROR( "Could not register callback for "<< m_MC_SIM_PARAM );
191  return StatusCode::FAILURE;
192  }
193  }
194  else {
195  ATH_MSG_WARNING( "MetaData not found for "<< m_MC_SIM_PARAM );
196  }
197 
198  // Get FastCaloSimCaloExtrapolation
199  ATH_CHECK (m_FastCaloSimCaloExtrapolation.retrieve());
200 
201  // Grab the Ntuple and histogramming service for the tree
202  ATH_CHECK(m_thistSvc.retrieve());
203 
204  //#########################
205  IPartPropSvc* p_PartPropSvc = nullptr;
206  ATH_CHECK(service("PartPropSvc",p_PartPropSvc));
207 
208  m_particleDataTable = (HepPDT::ParticleDataTable*) p_PartPropSvc->PDT();
209  if(m_particleDataTable == nullptr)
210  {
211  ATH_MSG_ERROR("PDG table not found");
212  return StatusCode::FAILURE;
213  }
214  //#########################
215  std::unique_ptr<TFile> dummyFile = std::unique_ptr<TFile>(TFile::Open("dummyFile.root", "RECREATE")); //This is added to suppress the error messages about memory-resident trees
216  m_tree = new TTree("FCS_ParametrizationInput", "FCS_ParametrizationInput");
217  std::string fullNtupleName = "/"+m_ntupleFileName+"/"+m_ntupleTreeName;
218  StatusCode sc = m_thistSvc->regTree(fullNtupleName, m_tree);
219  if (sc.isFailure() || !m_tree )
220  {
221  ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
222  return StatusCode::FAILURE;
223  }
224 
226  if (m_tree)
227  {
228  ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
229  //initialize the variables before creating the branches
230  m_hit_x = new std::vector<float>;
231  m_hit_y = new std::vector<float>;
232  m_hit_z = new std::vector<float>;
233  m_hit_energy = new std::vector<float>;
234  m_hit_time = new std::vector<float>;
235  m_hit_identifier = new std::vector<Long64_t>;
236  m_hit_cellidentifier = new std::vector<Long64_t>;
237  m_islarbarrel = new std::vector<bool>;
238  m_islarendcap = new std::vector<bool>;
239  m_islarhec = new std::vector<bool>;
240  m_islarfcal = new std::vector<bool>;
241  m_istile = new std::vector<bool>;
242  m_hit_sampling = new std::vector<int>;
243  m_hit_samplingfraction = new std::vector<float>;
244 
245  m_truth_energy = new std::vector<float>;
246  m_truth_px = new std::vector<float>;
247  m_truth_py = new std::vector<float>;
248  m_truth_pz = new std::vector<float>;
249  m_truth_pdg = new std::vector<int>;
250  m_truth_barcode = new std::vector<int>;
251  m_truth_vtxbarcode = new std::vector<int>;
252 
253  m_cluster_energy = new std::vector<float>;
254  m_cluster_eta = new std::vector<float>;
255  m_cluster_phi = new std::vector<float>;
256  m_cluster_size = new std::vector<unsigned>;
257  m_cluster_cellID = new std::vector<std::vector<Long64_t > >;
258 
259  m_cell_identifier = new std::vector<Long64_t>;
260  m_cell_energy = new std::vector<float>;
261  m_cell_sampling = new std::vector<int>;
262 
263  m_g4hit_energy = new std::vector<float>;
264  m_g4hit_time = new std::vector<float>;
265  m_g4hit_identifier = new std::vector<Long64_t>;
266  m_g4hit_cellidentifier = new std::vector<Long64_t>;
267  m_g4hit_samplingfraction = new std::vector<float>;
268  m_g4hit_sampling = new std::vector<int>;
269 
270  m_total_cell_e = 0;
271  m_total_hit_e = 0;
272  m_total_g4hit_e = 0;
273 
274  m_final_cell_energy = new std::vector<Float_t>;
275  m_final_hit_energy = new std::vector<Float_t>;
276  m_final_g4hit_energy = new std::vector<Float_t>;
277 
278  m_newTTC_entrance_eta = new std::vector<std::vector<float> >;
279  m_newTTC_entrance_phi = new std::vector<std::vector<float> >;
280  m_newTTC_entrance_r = new std::vector<std::vector<float> >;
281  m_newTTC_entrance_z = new std::vector<std::vector<float> >;
282  m_newTTC_entrance_detaBorder = new std::vector<std::vector<float> >;
283  m_newTTC_entrance_OK = new std::vector<std::vector<bool> >;
284  m_newTTC_back_eta = new std::vector<std::vector<float> >;
285  m_newTTC_back_phi = new std::vector<std::vector<float> >;
286  m_newTTC_back_r = new std::vector<std::vector<float> >;
287  m_newTTC_back_z = new std::vector<std::vector<float> >;
288  m_newTTC_back_detaBorder = new std::vector<std::vector<float> >;
289  m_newTTC_back_OK = new std::vector<std::vector<bool> >;
290  m_newTTC_mid_eta = new std::vector<std::vector<float> >;
291  m_newTTC_mid_phi = new std::vector<std::vector<float> >;
292  m_newTTC_mid_r = new std::vector<std::vector<float> >;
293  m_newTTC_mid_z = new std::vector<std::vector<float> >;
294  m_newTTC_mid_detaBorder = new std::vector<std::vector<float> >;
295  m_newTTC_mid_OK = new std::vector<std::vector<bool> >;
296  m_newTTC_IDCaloBoundary_eta = new std::vector<float>;
297  m_newTTC_IDCaloBoundary_phi = new std::vector<float>;
298  m_newTTC_IDCaloBoundary_r = new std::vector<float>;
299  m_newTTC_IDCaloBoundary_z = new std::vector<float>;
300  m_newTTC_Angle3D = new std::vector<float>;
301  m_newTTC_AngleEta = new std::vector<float>;
302 
303  m_MuonEntryLayer_E = new std::vector<float>;
304  m_MuonEntryLayer_px = new std::vector<float>;
305  m_MuonEntryLayer_py = new std::vector<float>;
306  m_MuonEntryLayer_pz = new std::vector<float>;
307  m_MuonEntryLayer_x = new std::vector<float>;
308  m_MuonEntryLayer_y = new std::vector<float>;
309  m_MuonEntryLayer_z = new std::vector<float>;
310  m_MuonEntryLayer_pdg = new std::vector<int>;
311 
312  // Optional branches
313  if(m_saveAllBranches){
314  m_tree->Branch("HitX", &m_hit_x);
315  m_tree->Branch("HitY", &m_hit_y);
316  m_tree->Branch("HitZ", &m_hit_z);
317  m_tree->Branch("HitE", &m_hit_energy);
318  m_tree->Branch("HitT", &m_hit_time);
319  m_tree->Branch("HitIdentifier", &m_hit_identifier);
320  m_tree->Branch("HitCellIdentifier", &m_hit_cellidentifier);
321  m_tree->Branch("HitIsLArBarrel", &m_islarbarrel);
322  m_tree->Branch("HitIsLArEndCap", &m_islarendcap);
323  m_tree->Branch("HitIsHEC", &m_islarhec);
324  m_tree->Branch("HitIsFCAL", &m_islarfcal);
325  m_tree->Branch("HitIsTile", &m_istile);
326  m_tree->Branch("HitSampling", &m_hit_sampling);
327  m_tree->Branch("HitSamplingFraction", &m_hit_samplingfraction);
328 
329  m_tree->Branch("CellIdentifier", &m_cell_identifier);
330  m_tree->Branch("CellE", &m_cell_energy);
331  m_tree->Branch("CellSampling", &m_cell_sampling);
332 
333  m_tree->Branch("G4HitE", &m_g4hit_energy);
334  m_tree->Branch("G4HitT", &m_g4hit_time);
335  m_tree->Branch("G4HitIdentifier", &m_g4hit_identifier);
336  m_tree->Branch("G4HitCellIdentifier", &m_g4hit_cellidentifier);
337  m_tree->Branch("G4HitSamplingFraction",&m_g4hit_samplingfraction);
338  m_tree->Branch("G4HitSampling", &m_g4hit_sampling);
339  }
340 
341  //CaloHitAna output variables
342  m_tree->Branch("TruthE", &m_truth_energy);
343  m_tree->Branch("TruthPx", &m_truth_px);
344  m_tree->Branch("TruthPy", &m_truth_py);
345  m_tree->Branch("TruthPz", &m_truth_pz);
346  m_tree->Branch("TruthPDG", &m_truth_pdg);
347  m_tree->Branch("TruthBarcode", &m_truth_barcode);
348  m_tree->Branch("TruthVtxBarcode", &m_truth_vtxbarcode);
349 
350  if(m_doClusterInfo){
351  m_tree->Branch("ClusterE", &m_cluster_energy);
352  m_tree->Branch("ClusterEta", &m_cluster_eta);
353  m_tree->Branch("ClusterPhi", &m_cluster_phi);
354  m_tree->Branch("ClusterSize", &m_cluster_size);
355  m_tree->Branch("ClusterCellID", &m_cluster_cellID);
356  }
357 
358  m_oneeventcells = new FCS_matchedcellvector;
359  if(m_doAllCells){
360  m_tree->Branch("AllCells", &m_oneeventcells);
361  }
362 
363  //write cells per layer
364  if(m_doLayers){
365  for (Int_t i = 0; i < MAX_LAYER; i++)
366  {
367  TString branchname = "Sampling_";
368  branchname += i;
369  m_layercells[i] = new FCS_matchedcellvector;
370  m_tree->Branch(branchname, &m_layercells[i]);
371  }
372  }
373 
374  if(m_doLayerSums){
375  //write also energies per layer:
376  m_tree->Branch("cell_energy", &m_final_cell_energy);
377  m_tree->Branch("hit_energy", &m_final_hit_energy);
378  m_tree->Branch("g4hit_energy", &m_final_g4hit_energy);
379 
380  //This is a duplicate of cell_energy[25]
381  m_tree->Branch("total_cell_energy", &m_total_cell_e);
382  m_tree->Branch("total_hit_energy", &m_total_hit_e);
383  m_tree->Branch("total_g4hit_energy", &m_total_g4hit_e);
384  }
385 
386  m_tree->Branch("newTTC_back_eta",&m_newTTC_back_eta);
387  m_tree->Branch("newTTC_back_phi",&m_newTTC_back_phi);
388  m_tree->Branch("newTTC_back_r",&m_newTTC_back_r);
389  m_tree->Branch("newTTC_back_z",&m_newTTC_back_z);
390  m_tree->Branch("newTTC_back_detaBorder",&m_newTTC_back_detaBorder);
391  m_tree->Branch("newTTC_back_OK",&m_newTTC_back_OK);
392  m_tree->Branch("newTTC_entrance_eta",&m_newTTC_entrance_eta);
393  m_tree->Branch("newTTC_entrance_phi",&m_newTTC_entrance_phi);
394  m_tree->Branch("newTTC_entrance_r",&m_newTTC_entrance_r);
395  m_tree->Branch("newTTC_entrance_z",&m_newTTC_entrance_z);
396  m_tree->Branch("newTTC_entrance_detaBorder",&m_newTTC_entrance_detaBorder);
397  m_tree->Branch("newTTC_entrance_OK",&m_newTTC_entrance_OK);
398  m_tree->Branch("newTTC_mid_eta",&m_newTTC_mid_eta);
399  m_tree->Branch("newTTC_mid_phi",&m_newTTC_mid_phi);
400  m_tree->Branch("newTTC_mid_r",&m_newTTC_mid_r);
401  m_tree->Branch("newTTC_mid_z",&m_newTTC_mid_z);
402  m_tree->Branch("newTTC_mid_detaBorder",&m_newTTC_mid_detaBorder);
403  m_tree->Branch("newTTC_mid_OK",&m_newTTC_mid_OK);
404  m_tree->Branch("newTTC_IDCaloBoundary_eta",&m_newTTC_IDCaloBoundary_eta);
405  m_tree->Branch("newTTC_IDCaloBoundary_phi",&m_newTTC_IDCaloBoundary_phi);
406  m_tree->Branch("newTTC_IDCaloBoundary_r",&m_newTTC_IDCaloBoundary_r);
407  m_tree->Branch("newTTC_IDCaloBoundary_z",&m_newTTC_IDCaloBoundary_z);
408  m_tree->Branch("newTTC_Angle3D",&m_newTTC_Angle3D);
409  m_tree->Branch("newTTC_AngleEta",&m_newTTC_AngleEta);
410 
411  m_tree->Branch("MuonEntryLayer_E",&m_MuonEntryLayer_E);
412  m_tree->Branch("MuonEntryLayer_px",&m_MuonEntryLayer_px);
413  m_tree->Branch("MuonEntryLayer_py",&m_MuonEntryLayer_py);
414  m_tree->Branch("MuonEntryLayer_pz",&m_MuonEntryLayer_pz);
415  m_tree->Branch("MuonEntryLayer_x",&m_MuonEntryLayer_x);
416  m_tree->Branch("MuonEntryLayer_y",&m_MuonEntryLayer_y);
417  m_tree->Branch("MuonEntryLayer_z",&m_MuonEntryLayer_z);
418  m_tree->Branch("MuonEntryLayer_pdg",&m_MuonEntryLayer_pdg);
419  }
420  dummyFile->Close();
421  return StatusCode::SUCCESS;
422 } //initialize
423 
425 {
426 
427  ATH_MSG_VERBOSE( "doing finalize()" );
428  std::unique_ptr<TFile> dummyGeoFile = std::unique_ptr<TFile>(TFile::Open("dummyGeoFile.root", "RECREATE")); //This is added to suppress the error messages about memory-resident trees
429  TTree* geo = new TTree( m_geoModel->atlasVersion().c_str() , m_geoModel->atlasVersion().c_str() );
430  std::string fullNtupleName = "/"+m_geoFileName+"/"+m_geoModel->atlasVersion();
431  StatusCode sc = m_thistSvc->regTree(fullNtupleName, geo);
432  if(sc.isFailure() || !geo )
433  {
434  ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
435  return StatusCode::FAILURE;
436  }
437 
440  using GEOCELL = struct
441  {
442  Long64_t identifier;
443  Int_t calosample;
444  float eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw;
445  float deta,dphi,dr,dx,dy,dz;
446  };
447 
448  static GEOCELL geocell;
449 
450  if(geo)
451  {
452  ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
453  //this actually creates the vector itself! And only if it succeeds! Note that the result is not checked! And the code is probably leaking memory in the end
454  //geo->Branch("cells", &geocell,"identifier/L:eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw/F:Deta,Dphi,Dr,Dx,Dy,Dz/F");
455  geo->Branch("identifier", &geocell.identifier,"identifier/L");
456  geo->Branch("calosample", &geocell.calosample,"calosample/I");
457 
458  geo->Branch("eta", &geocell.eta,"eta/F");
459  geo->Branch("phi", &geocell.phi,"phi/F");
460  geo->Branch("r", &geocell.r,"r/F");
461  geo->Branch("eta_raw", &geocell.eta_raw,"eta_raw/F");
462  geo->Branch("phi_raw", &geocell.phi_raw,"phi_raw/F");
463  geo->Branch("r_raw", &geocell.r_raw,"r_raw/F");
464 
465  geo->Branch("x", &geocell.x,"x/F");
466  geo->Branch("y", &geocell.y,"y/F");
467  geo->Branch("z", &geocell.z,"z/F");
468  geo->Branch("x_raw", &geocell.x_raw,"x_raw/F");
469  geo->Branch("y_raw", &geocell.y_raw,"y_raw/F");
470  geo->Branch("z_raw", &geocell.z_raw,"z_raw/F");
471 
472  geo->Branch("deta", &geocell.deta,"deta/F");
473  geo->Branch("dphi", &geocell.dphi,"dphi/F");
474  geo->Branch("dr", &geocell.dr,"dr/F");
475  geo->Branch("dx", &geocell.dx,"dx/F");
476  geo->Branch("dy", &geocell.dy,"dy/F");
477  geo->Branch("dz", &geocell.dz,"dz/F");
478  }
479 
480  SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey,Gaudi::Hive::currentContext()};
481  ATH_CHECK(caloMgrHandle.isValid());
482  const CaloDetDescrManager* calo_dd_man = *caloMgrHandle;
483 
484  int ncells=0;
485  for (const CaloDetDescrElement* theDDE : calo_dd_man->element_range())
486  {
487  if(theDDE)
488  {
489  CaloCell_ID::CaloSample sample=theDDE->getSampling();
490  //CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
491  ++ncells;
492  if(geo)
493  {
494  geocell.identifier=theDDE->identify().get_compact();
495  geocell.calosample=sample;
496  geocell.eta=theDDE->eta();
497  geocell.phi=theDDE->phi();
498  geocell.r=theDDE->r();
499  geocell.eta_raw=theDDE->eta_raw();
500  geocell.phi_raw=theDDE->phi_raw();
501  geocell.r_raw=theDDE->r_raw();
502  geocell.x=theDDE->x();
503  geocell.y=theDDE->y();
504  geocell.z=theDDE->z();
505  geocell.x_raw=theDDE->x_raw();
506  geocell.y_raw=theDDE->y_raw();
507  geocell.z_raw=theDDE->z_raw();
508  geocell.deta=theDDE->deta();
509  geocell.dphi=theDDE->dphi();
510  geocell.dr=theDDE->dr();
511  geocell.dx=theDDE->dx();
512  geocell.dy=theDDE->dy();
513  geocell.dz=theDDE->dz();
514 
515  geo->Fill();
516  }
517  }
518  }
519 
520  ATH_MSG_INFO( ncells<<" cells found" );
521 
522  dummyGeoFile->Close();
523  return StatusCode::SUCCESS;
524 } //finalize
525 
526 
528 {
529 
530  ATH_MSG_DEBUG( "In ISF_HitAnalysis::execute()" );
531 
532  if (! m_tree)
533  {
534  ATH_MSG_ERROR( "tree not registered" );
535  return StatusCode::FAILURE;
536  }
537 
538  SG::ReadCondHandle<ILArfSampl> fSamplHdl(m_fSamplKey,Gaudi::Hive::currentContext());
539  const ILArfSampl* fSampl=*fSamplHdl;
540 
541  SG::ReadCondHandle<TileSamplingFraction> tileSamplingFraction(m_tileSamplingFractionKey,Gaudi::Hive::currentContext());
542  ATH_CHECK( tileSamplingFraction.isValid() );
543 
544 
545  //now if the branches were created correctly, the pointers point to something and it is possible to clear the vectors
546  TVector3 vectest;
547  vectest.SetPtEtaPhi(1.,1.,1.);
548  m_hit_x->clear();
549  m_hit_y->clear();
550  m_hit_z->clear();
551  m_hit_energy->clear();
552  m_hit_time->clear();
553  m_hit_identifier->clear();
554  m_hit_cellidentifier->clear();
555  m_islarbarrel->clear();
556  m_islarendcap->clear();
557  m_islarhec->clear();
558  m_islarfcal->clear();
559  m_istile->clear();
560  m_hit_sampling->clear();
561  m_hit_samplingfraction->clear();
562  m_truth_energy->clear();
563  m_truth_px->clear();
564  m_truth_py->clear();
565  m_truth_pz->clear();
566  m_truth_pdg->clear();
567  m_truth_barcode->clear();
568  m_truth_vtxbarcode->clear();
569  m_cluster_energy->clear();
570  m_cluster_eta->clear();
571  m_cluster_phi->clear();
572  m_cluster_size->clear();
573  m_cluster_cellID->clear();
574  m_cell_identifier->clear();
575  m_cell_energy->clear();
576  m_cell_sampling->clear();
577  m_g4hit_energy->clear();
578  m_g4hit_time->clear();
579  m_g4hit_identifier->clear();
580  m_g4hit_cellidentifier->clear();
581  m_g4hit_sampling->clear();
582  m_g4hit_samplingfraction->clear();
583  //which fails for this one!!
584  //m_matched_cells->clear();
585  std::map<Long64_t, FCS_cell> cells; //read all objects and collect them by identifier (Long64_t)
586  std::map<Long64_t, std::vector<FCS_g4hit> > g4hits;
587  std::map<Long64_t, std::vector<FCS_hit> > hits;
588 
589  cells.clear();
590  g4hits.clear();
591  hits.clear();
592 
593  FCS_cell one_cell{}; //note that this is not extra safe if I don't have a clear method!
594  FCS_g4hit one_g4hit{};
595  FCS_hit one_hit{};
596  FCS_matchedcell one_matchedcell;
597 
598  m_oneeventcells->m_vector.clear();
599  m_final_g4hit_energy->clear();
600  m_final_hit_energy->clear();
601  m_final_cell_energy->clear();
602 
603  m_newTTC_back_eta->clear();
604  m_newTTC_back_phi->clear();
605  m_newTTC_back_r->clear();
606  m_newTTC_back_z->clear();
607  m_newTTC_back_detaBorder->clear();
608  m_newTTC_back_OK->clear();
609  m_newTTC_entrance_eta->clear();
610  m_newTTC_entrance_phi->clear();
611  m_newTTC_entrance_r->clear();
612  m_newTTC_entrance_z->clear();
614  m_newTTC_entrance_OK->clear();
615  m_newTTC_mid_eta->clear();
616  m_newTTC_mid_phi->clear();
617  m_newTTC_mid_r->clear();
618  m_newTTC_mid_z->clear();
619  m_newTTC_mid_detaBorder->clear();
620  m_newTTC_mid_OK->clear();
623  m_newTTC_IDCaloBoundary_r->clear();
624  m_newTTC_IDCaloBoundary_z->clear();
625  m_newTTC_Angle3D->clear();
626  m_newTTC_AngleEta->clear();
627 
628 
629  m_MuonEntryLayer_E->clear();
630  m_MuonEntryLayer_x->clear();
631  m_MuonEntryLayer_y->clear();
632  m_MuonEntryLayer_z->clear();
633  m_MuonEntryLayer_px->clear();
634  m_MuonEntryLayer_py->clear();
635  m_MuonEntryLayer_pz->clear();
636  m_MuonEntryLayer_pdg->clear();
637 
638  //##########################
639 
640  SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey,Gaudi::Hive::currentContext()};
641  ATH_CHECK(caloMgrHandle.isValid());
642  const CaloDetDescrManager* calo_dd_man = *caloMgrHandle;
643 
644  //Get the FastCaloSim step info collection from store
646  StatusCode sc = evtStore()->retrieve(eventStepsES, "MergedEventSteps");
647  if (sc.isFailure()) {
648  ATH_MSG_WARNING( "No FastCaloSim steps read from StoreGate?" );
649  //return StatusCode::FAILURE;
650  } else {
651  ATH_MSG_INFO("Read: "<<eventStepsES->size()<<" position hits");
652  for (ISF_FCS_Parametrization::FCS_StepInfoCollection::const_iterator it = eventStepsES->begin(); it != eventStepsES->end(); ++it) {
653  m_hit_x->push_back( (*it)->x() );
654  m_hit_y->push_back( (*it)->y() );
655  m_hit_z->push_back( (*it)->z() );
656  m_hit_energy->push_back( (*it)->energy() );
657  m_hit_time->push_back( (*it)->time());
658 
659  //Try to get the samplings, sampling fractions from identifiers
660  bool larbarrel=false;
661  bool larendcap=false;
662  bool larhec=false;
663  bool larfcal=false;
664  bool tile=false;
665  int sampling=-1;
666  double sampfrac=0.0;
667 
668  Identifier id = (*it)->identify();
669  Identifier cell_id = (*it)->identify(); //to be replaced by cell_id in tile
670 
671  if(calo_dd_man->get_element(id)) {
673  sampling = layer; //use CaloCell layer immediately
674  } else {
675  ATH_MSG_WARNING( "Warning no sampling info for "<<id.getString());
676  }
677 
678  if(m_larEmID->is_lar_em(id) || m_larHecID->is_lar_hec(id) || m_larFcalID->is_lar_fcal(id)) sampfrac=fSampl->FSAMPL(id);
679  if (m_tileID->is_tile(id)) {
682  int drawerIdx = m_tileHWID->drawerIdx(channel_id);
683  sampfrac = tileSamplingFraction->getSamplingFraction(drawerIdx, channel);
684  }
685  if(m_larEmID->is_lar_em(id)) {
686  //LAr EM cells
687  if (m_larEmID->is_em_barrel(id)) larbarrel=true;
688  else if(m_larEmID->is_em_endcap(id)) larendcap=true;
689  } else if(m_larHecID->is_lar_hec(id)) {
690  //LAr HEC cells
691  larhec = true;
692  } else if(m_larFcalID->is_lar_fcal(id)) {
693  //LAr FCal cells
694  larfcal = true;
695  } else if (m_tileID->is_tile_aux(id)) {
696  // special case for E4'
697  tile = true;
698  cell_id = m_tileID->cell_id(id);
699  sampling = CaloCell_ID::TileGap3;
700  } else if(m_tileID->is_tile_barrel(id) || m_tileID->is_tile_extbarrel(id) || m_tileID->is_tile_gap(id)) {
701  // all other Tile cells
702  tile = true;
703  cell_id = m_tileID->cell_id(id);
704  Int_t tile_sampling = -1;
705  if(calo_dd_man->get_element(cell_id)) {
706  tile_sampling = calo_dd_man->get_element(cell_id)->getSampling();
707  }
708  if(tile_sampling!= -1) sampling = tile_sampling; //calo_dd_man needs to be called with cell_id not pmt_id!!
709  } else {
710  ATH_MSG_WARNING( "This hit is somewhere. Please check!");
711  }
712 
713  m_hit_identifier->push_back(id.get_compact());
714  m_hit_cellidentifier->push_back(cell_id.get_compact());
715  //push things into vectors:
716  m_islarbarrel->push_back(larbarrel);
717  m_islarendcap->push_back(larendcap);
718  m_islarhec->push_back(larhec);
719  m_islarfcal->push_back(larfcal);
720  m_istile->push_back(tile);
721  m_hit_sampling->push_back(sampling);
722  m_hit_samplingfraction->push_back(sampfrac);
723 
724  } //event steps
725  }//event steps read correctly
726 
727  //Get truth particle info
728  //Note that there can be more truth particles, the first one is usually the one we need.
729  const McEventCollection* mcEvent;
730  sc = evtStore()->retrieve(mcEvent,"TruthEvent");
731  if(sc.isFailure()) {
732  ATH_MSG_WARNING( "No truth event!");
733  } else {
734  if(mcEvent) {
735  //std::cout<<"ISF_HitAnalysis: MC event size: "<<mcEvent->size()<<std::endl;
736  if(!mcEvent->empty()) {
737  int particleIndex=0;
738  int loopEnd = m_NtruthParticles;
739  int particles_size=(*mcEvent->begin())->particles_size();
740  if(loopEnd==-1) {
741  loopEnd = particles_size; //is this the correct thing?
742  }
743 #ifdef HEPMC3
744  for (const auto& part: *(*mcEvent->begin()))
745 #else
746  for (const auto part: *(*mcEvent->begin()))
747 #endif
748  {
749 
750  ATH_MSG_DEBUG("Number truth particles="<<particles_size<<" loopEnd="<<loopEnd);
751  particleIndex++;
752 
753  if (particleIndex>loopEnd) break; //enough particles
754 
755  //UPDATE EXTRAPOLATION WITH ALGTOOL***********************************************
756 
757  TFCSTruthState truth(part->momentum().px(),part->momentum().py(),part->momentum().pz(),part->momentum().e(),part->pdg_id());
758 
759  //calculate the vertex
760  TVector3 moment;
761  moment.SetXYZ(part->momentum().px(),part->momentum().py(),part->momentum().pz());
762  TVector3 direction=moment.Unit();
763 
764  //does it hit the barrel or the EC?
765 
766  if(std::abs(direction.Z())/m_CaloBoundaryZ < direction.Perp()/m_CaloBoundaryR) {
767  //BARREL
768  direction*=m_CaloBoundaryR/direction.Perp();
769  } else {
770  //EC
771  direction*=m_CaloBoundaryZ/abs(direction.Z());
772  }
773 
774  if((part)->production_vertex()) {
775  truth.set_vertex((part)->production_vertex()->position().x(), (part)->production_vertex()->position().y(), (part)->production_vertex()->position().z());
776  } else {
777  truth.set_vertex(direction.X(),direction.Y(),direction.Z());
778  ATH_MSG_WARNING("No particle production vetext, use VERTEX from direction: x "<<direction.X()<<" y "<<direction.Y()<<" z "<<direction.Z());
779  }
780 
781  if( std::abs(direction.X()-truth.vertex().X())>0.1 || std::abs(direction.Y()-truth.vertex().Y())>0.1 || std::abs(direction.Z()-truth.vertex().Z())>0.1 ) {
782  ATH_MSG_WARNING("VERTEX from direction: x "<<direction.X()<<" y "<<direction.Y()<<" z "<<direction.Z());
783  ATH_MSG_WARNING("but VERTEX from hepmc: x "<<truth.vertex().X()<<" y "<<truth.vertex().Y()<<" z "<<truth.vertex().Z());
784  }
785 
787  m_FastCaloSimCaloExtrapolation->extrapolate(result,&truth);
788 
789  //write the result into the ntuple variables:
790 
791  ATH_MSG_DEBUG("IDCaloBoundary_eta() "<<result.IDCaloBoundary_eta());
792  ATH_MSG_DEBUG("IDCaloBoundary_phi() "<<result.IDCaloBoundary_phi());
793  ATH_MSG_DEBUG("IDCaloBoundary_r() "<<result.IDCaloBoundary_r());
794  ATH_MSG_DEBUG("IDCaloBoundary_z() "<<result.IDCaloBoundary_z());
795  ATH_MSG_DEBUG("AngleEta "<<result.IDCaloBoundary_AngleEta());
796  ATH_MSG_DEBUG("Angle3D "<<result.IDCaloBoundary_Angle3D());
797 
798  m_newTTC_IDCaloBoundary_eta->push_back(float(result.IDCaloBoundary_eta()));
799  m_newTTC_IDCaloBoundary_phi->push_back(float(result.IDCaloBoundary_phi()));
800  m_newTTC_IDCaloBoundary_r->push_back(float(result.IDCaloBoundary_r()));
801  m_newTTC_IDCaloBoundary_z->push_back(float(result.IDCaloBoundary_z()));
802  m_newTTC_Angle3D ->push_back(float(result.IDCaloBoundary_Angle3D()));
803  m_newTTC_AngleEta->push_back(float(result.IDCaloBoundary_AngleEta()));
804 
805  std::vector<float> eta_vec_ENT;
806  std::vector<float> phi_vec_ENT;
807  std::vector<float> r_vec_ENT;
808  std::vector<float> z_vec_ENT;
809  std::vector<float> detaBorder_vec_ENT;
810  std::vector<bool> OK_vec_ENT;
811 
812  std::vector<float> eta_vec_EXT;
813  std::vector<float> phi_vec_EXT;
814  std::vector<float> r_vec_EXT;
815  std::vector<float> z_vec_EXT;
816  std::vector<float> detaBorder_vec_EXT;
817  std::vector<bool> OK_vec_EXT;
818 
819  std::vector<float> eta_vec_MID;
820  std::vector<float> phi_vec_MID;
821  std::vector<float> r_vec_MID;
822  std::vector<float> z_vec_MID;
823  std::vector<float> detaBorder_vec_MID;
824  std::vector<bool> OK_vec_MID;
825 
827  ATH_MSG_DEBUG("sample "<<sample);
828  ATH_MSG_DEBUG(" eta ENT "<<result.eta(sample,1)<<" eta EXT "<<result.eta(sample,2));
829  ATH_MSG_DEBUG(" phi ENT "<<result.phi(sample,1)<<" phi EXT "<<result.phi(sample,2));
830  ATH_MSG_DEBUG(" r ENT "<<result.r(sample,1) <<" r EXT "<<result.r(sample,2) );
831  ATH_MSG_DEBUG(" z ENT "<<result.z(sample,1) <<" z EXT "<<result.z(sample,2) );
832  ATH_MSG_DEBUG(" detaBorder ENT "<<result.detaBorder(sample,1) <<" detaBorder EXT "<<result.detaBorder(sample,2) );
833  ATH_MSG_DEBUG(" OK ENT "<<result.OK(sample,1) <<" OK EXT "<<result.OK(sample,2) );
834  eta_vec_ENT.push_back(float(result.eta(sample,TFCSExtrapolationState::SUBPOS_ENT)));
835  eta_vec_EXT.push_back(float(result.eta(sample,TFCSExtrapolationState::SUBPOS_EXT)));
836  eta_vec_MID.push_back(float(result.eta(sample,TFCSExtrapolationState::SUBPOS_MID)));
837  phi_vec_ENT.push_back(float(result.phi(sample,TFCSExtrapolationState::SUBPOS_ENT)));
838  phi_vec_EXT.push_back(float(result.phi(sample,TFCSExtrapolationState::SUBPOS_EXT)));
839  phi_vec_MID.push_back(float(result.phi(sample,TFCSExtrapolationState::SUBPOS_MID)));
840  r_vec_ENT.push_back(float(result.r(sample,TFCSExtrapolationState::SUBPOS_ENT)));
841  r_vec_EXT.push_back(float(result.r(sample,TFCSExtrapolationState::SUBPOS_EXT)));
842  r_vec_MID.push_back(float(result.r(sample,TFCSExtrapolationState::SUBPOS_MID)));
843  z_vec_ENT.push_back(float(result.z(sample,TFCSExtrapolationState::SUBPOS_ENT)));
844  z_vec_EXT.push_back(float(result.z(sample,TFCSExtrapolationState::SUBPOS_EXT)));
845  z_vec_MID.push_back(float(result.z(sample,TFCSExtrapolationState::SUBPOS_MID)));
846  detaBorder_vec_ENT.push_back(float(result.detaBorder(sample,TFCSExtrapolationState::SUBPOS_ENT)));
847  detaBorder_vec_EXT.push_back(float(result.detaBorder(sample,TFCSExtrapolationState::SUBPOS_EXT)));
848  detaBorder_vec_MID.push_back(float(result.detaBorder(sample,TFCSExtrapolationState::SUBPOS_MID)));
849  OK_vec_ENT.push_back(result.OK(sample,TFCSExtrapolationState::SUBPOS_ENT));
850  OK_vec_EXT.push_back(result.OK(sample,TFCSExtrapolationState::SUBPOS_EXT));
851  OK_vec_MID.push_back(result.OK(sample,TFCSExtrapolationState::SUBPOS_MID));
852  }
853 
854  m_newTTC_back_eta->push_back(eta_vec_EXT);
855  m_newTTC_back_phi->push_back(phi_vec_EXT);
856  m_newTTC_back_r ->push_back(r_vec_EXT);
857  m_newTTC_back_z ->push_back(z_vec_EXT);
858  m_newTTC_back_detaBorder ->push_back(detaBorder_vec_EXT);
859  m_newTTC_back_OK ->push_back(OK_vec_EXT);
860  m_newTTC_entrance_eta->push_back(eta_vec_ENT);
861  m_newTTC_entrance_phi->push_back(phi_vec_ENT);
862  m_newTTC_entrance_r ->push_back(r_vec_ENT);
863  m_newTTC_entrance_z ->push_back(z_vec_ENT);
864  m_newTTC_entrance_detaBorder ->push_back(detaBorder_vec_ENT);
865  m_newTTC_entrance_OK ->push_back(OK_vec_ENT);
866  m_newTTC_mid_eta->push_back(eta_vec_MID);
867  m_newTTC_mid_phi->push_back(phi_vec_MID);
868  m_newTTC_mid_r ->push_back(r_vec_MID);
869  m_newTTC_mid_z ->push_back(z_vec_MID);
870  m_newTTC_mid_detaBorder ->push_back(detaBorder_vec_MID);
871  m_newTTC_mid_OK ->push_back(OK_vec_MID);
872 
873  m_truth_energy->push_back((part)->momentum().e());
874  m_truth_px->push_back((part)->momentum().px());
875  m_truth_py->push_back((part)->momentum().py());
876  m_truth_pz->push_back((part)->momentum().pz());
877  m_truth_pdg->push_back((part)->pdg_id());
878  m_truth_barcode->push_back(HepMC::barcode(part));
879 
880  } //for mcevent
881  } //mcevent size
882  } //mcEvent
883  }//truth event
884 
885  //Retrieve and save MuonEntryLayer information
886  const TrackRecordCollection *MuonEntry = nullptr;
887  sc = evtStore()->retrieve(MuonEntry, "MuonEntryLayer");
888  if (sc.isFailure())
889  {
890  ATH_MSG_WARNING( "Couldn't read MuonEntry from StoreGate");
891  //return NULL;
892  }
893  else{
894  for ( const TrackRecord &record : *MuonEntry){
895  m_MuonEntryLayer_E->push_back((record).GetEnergy());
896  m_MuonEntryLayer_px->push_back((record).GetMomentum().getX());
897  m_MuonEntryLayer_py->push_back((record).GetMomentum().getY());
898  m_MuonEntryLayer_pz->push_back((record).GetMomentum().getZ());
899  m_MuonEntryLayer_x->push_back((record).GetPosition().getX());
900  m_MuonEntryLayer_y->push_back((record).GetPosition().getY());
901  m_MuonEntryLayer_z->push_back((record).GetPosition().getZ());
902  m_MuonEntryLayer_pdg->push_back((record).GetPDGCode());
903  }
904  }
905 
906  // Get the reco clusters if available
907 // retreiving cluster container
908  const xAOD::CaloClusterContainer* theClusters;
909  std::string clusterContainerName = "CaloCalTopoClusters"; //Local hadron calibrated Topo-clusters , raw is the EM scale
910  sc = evtStore()->retrieve(theClusters, clusterContainerName);
911  if (sc.isFailure()) {
912  ATH_MSG_WARNING(" Couldn't get cluster container '" << clusterContainerName << "'");
913  return StatusCode::SUCCESS;
914  }
915  xAOD::CaloClusterContainer::const_iterator itrClus = theClusters->begin();
916  xAOD::CaloClusterContainer::const_iterator itrLastClus = theClusters->end();
917  for ( ; itrClus!=itrLastClus; ++itrClus){
918  const xAOD::CaloCluster *cluster =(*itrClus);
919  m_cluster_energy->push_back(cluster->e(xAOD::CaloCluster::UNCALIBRATED)); // getRawE, cluster->e() is the Local hadron calibrated topo-clusters
920  m_cluster_eta->push_back(cluster->eta(xAOD::CaloCluster::UNCALIBRATED));
921  m_cluster_phi->push_back(cluster->phi(xAOD::CaloCluster::UNCALIBRATED));
922  ATH_MSG_VERBOSE("Cluster energy: " << cluster->e() << " EMscale: " << cluster->e(xAOD::CaloCluster::UNCALIBRATED) << " cells: " << " links: " << cluster->getCellLinks());
923 
924  const CaloClusterCellLink* cellLinks = cluster->getCellLinks();
925  if (!cellLinks) {
926  ATH_MSG_DEBUG( "No cell links for this cluster" );
927  continue;
928  }
929 
930  const CaloCellContainer* cellCont=cellLinks->getCellContainer();
931  if (!cellCont) {
932  ATH_MSG_DEBUG( "DataLink to cell container is broken" );
933  continue;
934  }
935  unsigned cellcount = 0;
936  std::vector<Long64_t> cellIDs_in_cluster;
938  xAOD::CaloCluster::const_cell_iterator cellIterEnd =cluster->cell_end();
939  for ( ;cellIter !=cellIterEnd;cellIter++) {
940  ++cellcount;
941  const CaloCell* cell= (*cellIter);
942  cellIDs_in_cluster.push_back(cell->ID().get_compact());
943  float EnergyCell=cell->energy(); //ID, time, phi, eta
944  ATH_MSG_DEBUG(" Cell energy: " << EnergyCell);
945  }// end of cells inside cluster loop
946  m_cluster_size->push_back(cellcount);
947  m_cluster_cellID->push_back(cellIDs_in_cluster);
948  }
949 
950  //Get reco cells if available
951  const CaloCellContainer *cellColl = nullptr;
952  sc = evtStore()->retrieve(cellColl, "AllCalo");
953 
954  if (sc.isFailure())
955  {
956  ATH_MSG_WARNING( "Couldn't read AllCalo cells from StoreGate");
957  }
958  else
959  {
960  ATH_MSG_INFO( "Found: "<<cellColl->size()<<" calorimeter cells");
961  CaloCellContainer::const_iterator itrCell = cellColl->begin();
962  CaloCellContainer::const_iterator itrLastCell = cellColl->end();
963  for ( ; itrCell!=itrLastCell; ++itrCell)
964  {
965  m_cell_energy->push_back((*itrCell)->energy());
966  m_cell_identifier->push_back((*itrCell)->ID().get_compact());
967  if (m_tileID->is_tile_aux((*itrCell)->ID())) {
968  // special case for E4'
970  }
971  else if (calo_dd_man->get_element((*itrCell)->ID()))
972  {
973  // all other Tile cells
974  CaloCell_ID::CaloSample layer = calo_dd_man->get_element((*itrCell)->ID())->getSampling();
975  m_cell_sampling->push_back(layer);
976  }
977  else
978  m_cell_sampling->push_back(-1);
979  }
980  } //calorimeter cells
981 
982  //Get all G4Hits (from CaloHitAnalysis)
983  std::string lArKey [4] = {"LArHitEMB", "LArHitEMEC", "LArHitFCAL", "LArHitHEC"};
984  for (unsigned int i=0;i<4;i++)
985  {
986  const LArHitContainer* iter;
987  ATH_MSG_DEBUG( "Checking G4Hits: "<<lArKey[i]);
988  if(evtStore()->retrieve(iter,lArKey[i])==StatusCode::SUCCESS)
989  {
991  int hitnumber = 0;
992  for (hi=(*iter).begin();hi!=(*iter).end();++hi) {
993  hitnumber++;
994  const LArHit* larHit = *hi;
995  const CaloDetDescrElement *hitElement = calo_dd_man->get_element(larHit->cellID());
996  if(!hitElement)
997  continue;
998  Identifier larhitid = hitElement->identify();
999  if(calo_dd_man->get_element(larhitid)) {
1000  CaloCell_ID::CaloSample larlayer = calo_dd_man->get_element(larhitid)->getSampling();
1001 
1002  float larsampfrac=fSampl->FSAMPL(larhitid);
1003  m_g4hit_energy->push_back( larHit->energy() );
1004  m_g4hit_time->push_back( larHit->time() );
1005  m_g4hit_identifier->push_back( larhitid.get_compact() );
1006  m_g4hit_cellidentifier->push_back( larhitid.get_compact() );
1007  m_g4hit_sampling->push_back( larlayer);
1008  m_g4hit_samplingfraction->push_back( larsampfrac );
1009  }
1010  } // End while LAr hits
1011  ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from "<<lArKey[i]);
1012  }
1013  else
1014  {
1015  ATH_MSG_INFO( "Can't retrieve LAr hits");
1016  }// End statuscode success upon retrieval of hits
1017  //std::cout <<"ZH G4Hit size: "<<m_g4hit_e->size()<<std::endl;
1018  }// End detector type loop
1019 
1020  const TileHitVector * hitVec = nullptr;
1021  if (evtStore()->retrieve(hitVec,"TileHitVec")==StatusCode::SUCCESS && m_tileMgr && m_tileID )
1022  {
1023  int hitnumber = 0;
1024  for(TileHitVecConstIterator i_hit=hitVec->begin() ; i_hit!=hitVec->end() ; ++i_hit)
1025  {
1026  hitnumber++;
1027  Identifier pmt_id = (*i_hit).identify();
1028  Identifier cell_id = m_tileID->cell_id(pmt_id);
1029 
1030  if (calo_dd_man->get_element(cell_id)){
1031  CaloCell_ID::CaloSample layer = calo_dd_man->get_element(cell_id)->getSampling();
1032 
1035  int drawerIdx = m_tileHWID->drawerIdx(channel_id);
1036  float tilesampfrac = tileSamplingFraction->getSamplingFraction(drawerIdx, channel);
1037 
1038  //could there be more subhits??
1039  for (int tilesubhit_i = 0; tilesubhit_i<(*i_hit).size(); tilesubhit_i++)
1040  {
1041  m_g4hit_energy->push_back( (*i_hit).energy(tilesubhit_i) );
1042  m_g4hit_time->push_back( (*i_hit).time(tilesubhit_i) );
1043  m_g4hit_identifier->push_back( pmt_id.get_compact() );
1044  m_g4hit_cellidentifier->push_back( cell_id.get_compact() );
1045  m_g4hit_sampling->push_back( layer );
1046  m_g4hit_samplingfraction->push_back( tilesampfrac );
1047  }
1048  }
1049  }
1050  ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from TileHitVec");
1051  }
1052 
1053 
1054  // CaloHitAna
1055  ATH_MSG_DEBUG("CaloHitAna begin!");
1056 
1057  //cells
1058  for (unsigned int cell_i = 0; cell_i < m_cell_identifier->size(); cell_i++){
1059  if (cells.find((*m_cell_identifier)[cell_i]) == cells.end()) { //doesn't exist
1060  one_cell.cell_identifier = (*m_cell_identifier)[cell_i];
1061  one_cell.sampling = (*m_cell_sampling)[cell_i];
1062  one_cell.energy = (*m_cell_energy)[cell_i];
1063  one_cell.center_x = 0.0; //for now
1064  one_cell.center_y = 0.0;
1065  one_cell.center_z = 0.0;
1066  cells.insert(std::pair<Long64_t, FCS_cell>(one_cell.cell_identifier, one_cell));
1067  }
1068  else
1069  {
1070  //there shouldn't be a cell with the same identifier in this event
1071  ATH_MSG_DEBUG("ISF_HitAnalysis: Same cell???? ERROR");
1072  }
1073  }
1074 
1075  // g4 hits
1076  if(m_doG4Hits){
1077  for (unsigned int g4hit_i = 0; g4hit_i < m_g4hit_identifier->size(); g4hit_i++)
1078  {
1079  if ((*m_g4hit_sampling)[g4hit_i] >= 0 && (*m_g4hit_sampling)[g4hit_i] <= 25 && (*m_g4hit_time)[g4hit_i] > m_TimingCut)
1080  {
1081  ATH_MSG_DEBUG("Ignoring G4hit, time too large: " << g4hit_i << " time: " << (*m_g4hit_time)[g4hit_i]);
1082  continue;
1083  }
1084 
1085  if (g4hits.find((*m_g4hit_cellidentifier)[g4hit_i]) == g4hits.end())
1086  {
1087  //this G4 hit doesn't exist yet
1088  one_g4hit.identifier = (*m_g4hit_identifier)[g4hit_i];
1089  one_g4hit.cell_identifier = (*m_g4hit_cellidentifier)[g4hit_i];
1090  one_g4hit.sampling = (*m_g4hit_sampling)[g4hit_i];
1091  one_g4hit.hit_time = (*m_g4hit_time)[g4hit_i];
1092  //scale the hit energy with the sampling fraction
1093  if (one_g4hit.sampling >= 12 && one_g4hit.sampling <= 20)
1094  { //tile
1095  if ((*m_g4hit_samplingfraction)[g4hit_i])
1096  {
1097  one_g4hit.hit_energy = (*m_g4hit_energy)[g4hit_i] * (*m_g4hit_samplingfraction)[g4hit_i];
1098  }
1099  else one_g4hit.hit_energy = 0.;
1100  }
1101  else
1102  {
1103  one_g4hit.hit_energy = (*m_g4hit_energy)[g4hit_i] / (*m_g4hit_samplingfraction)[g4hit_i];
1104  }
1105  g4hits.insert(std::pair<Long64_t, std::vector<FCS_g4hit> >(one_g4hit.cell_identifier, std::vector<FCS_g4hit>(1, one_g4hit)));
1106  }
1107  else
1108  {
1109  //G4 hit exists in this identifier -> push_back new to the vector //FCS_g4hit one_g4hit;
1110  one_g4hit.identifier = (*m_g4hit_identifier)[g4hit_i];
1111  one_g4hit.cell_identifier = (*m_g4hit_cellidentifier)[g4hit_i];
1112  one_g4hit.sampling = (*m_g4hit_sampling)[g4hit_i];
1113  one_g4hit.hit_time = (*m_g4hit_time)[g4hit_i];
1114  if (one_g4hit.sampling >= 12 && one_g4hit.sampling <= 20)
1115  { //tile
1116  if ((*m_g4hit_samplingfraction)[g4hit_i])
1117  {
1118  one_g4hit.hit_energy = (*m_g4hit_energy)[g4hit_i] * (*m_g4hit_samplingfraction)[g4hit_i];
1119  }
1120  else one_g4hit.hit_energy = 0.;
1121  }
1122  else
1123  {
1124  one_g4hit.hit_energy = (*m_g4hit_energy)[g4hit_i] / (*m_g4hit_samplingfraction)[g4hit_i];
1125  }
1126  g4hits[(*m_g4hit_cellidentifier)[g4hit_i]].push_back(one_g4hit);
1127  }
1128  }
1129  }
1130 
1131  //hits
1132  for (unsigned int hit_i = 0; hit_i < m_hit_identifier->size(); hit_i++)
1133  {
1134  if ((*m_hit_sampling)[hit_i] >= 0 && (*m_hit_sampling)[hit_i] <= 25 && (*m_hit_time)[hit_i] > m_TimingCut)
1135  {
1136  ATH_MSG_DEBUG("Ignoring FCS hit, time too large: " << hit_i << " time: " << (*m_hit_time)[hit_i]);
1137  continue;
1138  }
1139  if (hits.find((*m_hit_cellidentifier)[hit_i]) == hits.end())
1140  {
1141  //Detailed hit doesn't exist yet
1142  one_hit.identifier = (*m_hit_identifier)[hit_i];
1143  one_hit.cell_identifier = (*m_hit_cellidentifier)[hit_i];
1144  one_hit.sampling = (*m_hit_sampling)[hit_i];
1145 
1146  if (one_hit.sampling >= 12 && one_hit.sampling <= 20)
1147  { //tile
1148  if ((*m_hit_samplingfraction)[hit_i])
1149  {
1150  one_hit.hit_energy = (*m_hit_energy)[hit_i] * (*m_hit_samplingfraction)[hit_i];
1151  }
1152  else one_hit.hit_energy = 0.;
1153  }
1154  else
1155  {
1156  one_hit.hit_energy = (*m_hit_energy)[hit_i] / (*m_hit_samplingfraction)[hit_i];
1157  }
1158  //one_hit.hit_sampfrac = (*m_hit_samplingfraction)[hit_i];
1159  one_hit.hit_time = (*m_hit_time)[hit_i];
1160  one_hit.hit_x = (*m_hit_x)[hit_i];
1161  one_hit.hit_y = (*m_hit_y)[hit_i];
1162  one_hit.hit_z = (*m_hit_z)[hit_i];
1163  hits.insert(std::pair<Long64_t, std::vector<FCS_hit> >(one_hit.cell_identifier, std::vector<FCS_hit>(1, one_hit)));
1164  }
1165  else
1166  {
1167  //Detailed hit exists in this identifier -> push_back new to the vector
1168  one_hit.identifier = (*m_hit_identifier)[hit_i];
1169  one_hit.cell_identifier = (*m_hit_cellidentifier)[hit_i];
1170  one_hit.sampling = (*m_hit_sampling)[hit_i];
1171  //one_hit.hit_energy = (*m_hit_energy)[hit_i];
1172  if (one_hit.sampling >= 12 && one_hit.sampling <= 20)
1173  { //tile
1174  if ((*m_hit_samplingfraction)[hit_i])
1175  {
1176  one_hit.hit_energy = (*m_hit_energy)[hit_i] * (*m_hit_samplingfraction)[hit_i];
1177  }
1178  else one_hit.hit_energy = 0.;
1179  }
1180  else
1181  {
1182  one_hit.hit_energy = (*m_hit_energy)[hit_i] / (*m_hit_samplingfraction)[hit_i];
1183  }
1184  //one_hit.hit_sampfrac = (*m_hit_samplingfraction)[hit_i];
1185  one_hit.hit_time = (*m_hit_time)[hit_i];
1186  one_hit.hit_x = (*m_hit_x)[hit_i];
1187  one_hit.hit_y = (*m_hit_y)[hit_i];
1188  one_hit.hit_z = (*m_hit_z)[hit_i];
1189  hits[(*m_hit_cellidentifier)[hit_i]].push_back(one_hit);
1190  }
1191  }
1192 
1193  //Start matching:
1194  for (std::map<Long64_t, FCS_cell>::iterator it = cells.begin(); it != cells.end(); )
1195  {
1196  one_matchedcell.clear(); //maybe not completely necessery, as we're not pushing_back into vectors
1197  //set the cell part
1198  one_matchedcell.cell = it->second;
1199  //now look for FCS detailed hits in this cell
1200  std::map<Long64_t, std::vector<FCS_hit> >::iterator it2 = hits.find(it->first);
1201  if (it2 != hits.end())
1202  {
1203  //std::cout <<"FCS hits found in this cell"<<std::endl;
1204  one_matchedcell.hit = it2->second;
1205  hits.erase(it2); //remove it
1206  }
1207  else
1208  {
1209  //no hit found for this cell
1210  one_matchedcell.hit.clear(); //important!
1211  }
1212  //now look for G4hits in this cell
1213  std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
1214  if (it3 != g4hits.end())
1215  {
1216  one_matchedcell.g4hit = it3->second;
1217  g4hits.erase(it3);
1218  }
1219  else
1220  {
1221  //no g4hit found for this cell
1222  one_matchedcell.g4hit.clear();//important!
1223  }
1224  cells.erase(it++);
1225  //push_back matched cell for event jentry
1226  m_oneeventcells->push_back(one_matchedcell);
1227  }
1228 
1229  //ok, cells should be empty, what about hits and g4hits?
1230  //There could be G4hits/FCS hits for which we don't have a cell ->create a dummy empty cell with 0 energy, take the cell identifier from the hit
1231  ATH_MSG_DEBUG("ISF_HitAnalysis Check after cells: " << cells.size() << " " << g4hits.size() << " " << hits.size());
1232 
1233  for (std::map<Long64_t, std::vector<FCS_hit> >::iterator it = hits.begin(); it != hits.end();)
1234  {
1235  one_matchedcell.clear();
1236  one_matchedcell.cell.cell_identifier = it->first;
1237  //std::cout <<"This hit didn't exist in cell: "<<it->first<<std::endl;
1238  if (!it->second.empty())
1239  {
1240  one_matchedcell.cell.sampling = (it->second)[0].sampling;
1241  }
1242  else
1243  {
1244  one_matchedcell.cell.sampling = -1; //
1245  //ok, but you really shouldn't be here
1246  ATH_MSG_DEBUG("ERROR: You shouldn't really be here");
1247  }
1248  one_matchedcell.cell.energy = 0.;
1249  one_matchedcell.cell.center_x = 0.0;
1250  one_matchedcell.cell.center_y = 0.0;
1251  one_matchedcell.cell.center_z = 0.0;
1252  one_matchedcell.hit = it->second;
1253  std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
1254  if (it3 != g4hits.end())
1255  {
1256  one_matchedcell.g4hit = it3->second;
1257  g4hits.erase(it3);
1258  }
1259  else
1260  {
1261  //no g4hit found for this cell
1262  one_matchedcell.g4hit.clear(); //important!
1263  }
1264  hits.erase(it++);
1265  m_oneeventcells->push_back(one_matchedcell);
1266 
1267  }
1268 
1269  //ok, hits should be empty, what about g4hits?
1270  ATH_MSG_DEBUG("ISF_HitAnalysis Check after hits: " << cells.size() << " " << g4hits.size() << " " << hits.size());
1271  for (std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it = g4hits.begin(); it != g4hits.end();)
1272  {
1273  one_matchedcell.clear(); //maybe not so important
1274  one_matchedcell.cell.cell_identifier = it->first;
1275  if (!it->second.empty())
1276  {
1277  one_matchedcell.cell.sampling = (it->second)[0].sampling;
1278  }
1279  else
1280  {
1281  one_matchedcell.cell.sampling = -1; //
1282  //not really
1283  ATH_MSG_DEBUG("ERROR: You shouldn't really be here");
1284  }
1285  one_matchedcell.cell.energy = 0.;
1286  one_matchedcell.cell.center_x = 0.0;
1287  one_matchedcell.cell.center_y = 0.0;
1288  one_matchedcell.cell.center_z = 0.0;
1289  one_matchedcell.g4hit = it->second;
1290  one_matchedcell.hit.clear(); //important!!
1291  g4hits.erase(it++);
1292  m_oneeventcells->push_back(one_matchedcell);
1293  }
1294 
1295  //Can fill the output tree already here:
1296  m_total_cell_e = 0;
1297  m_total_hit_e = 0;
1298  m_total_g4hit_e = 0;
1299 
1300  for (int j = 0; j < MAX_LAYER - 1; j++)
1301  {
1303  }
1304 
1305  //this is for invalid cells
1307  for (int i = 0; i < MAX_LAYER; i++)
1308  {
1309  m_final_cell_energy->push_back(0.0); //zero for each event!
1310  m_final_hit_energy->push_back(0.0);
1311  m_final_g4hit_energy->push_back(0.0);
1312 
1313  for (unsigned int cellindex = 0; cellindex < m_layercells[i]->size(); cellindex++)
1314  {
1315  if (i != MAX_LAYER - 1)
1316  {
1317  m_final_cell_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).cell.energy;
1318  m_total_cell_e += m_layercells[i]->m_vector.at(cellindex).cell.energy;
1319  }
1320  else
1321  {
1322  //don't add the energy in the invalid layer to the total energy (if there is any (shouldn't)
1323  m_final_cell_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).cell.energy; //this should be here anyway
1324  }
1325 
1326  //sum energy of all FCS detailed hits in this layer/cell
1327  for (unsigned int j = 0; j < m_layercells[i]->m_vector.at(cellindex).hit.size(); j++)
1328  {
1329  if (i != MAX_LAYER - 1)
1330  {
1331  m_total_hit_e += m_layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
1332  m_final_hit_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
1333  }
1334  else
1335  {
1336  //again, don't add invalid layer energy to the sum
1337  m_final_hit_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
1338  }
1339  }
1340 
1341  //sum energy of all G4 hits in this layer/cell
1342  for (unsigned int j = 0; j < m_layercells[i]->m_vector.at(cellindex).g4hit.size(); j++)
1343  {
1344  if (i != MAX_LAYER - 1)
1345  {
1346  m_total_g4hit_e += m_layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
1347  m_final_g4hit_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
1348  }
1349  else
1350  {
1351  //don't add invalied layer energy to the sum
1352  m_final_g4hit_energy->at(i) += m_layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
1353  }
1354  }
1355  }
1356  }
1357 
1358  // push_back for total energy
1359  m_final_cell_energy->push_back(0.0);
1360  m_final_hit_energy->push_back(0.0);
1361  m_final_g4hit_energy->push_back(0.0);
1362 
1366 
1367  //Fill the tree and finish
1368  if (m_tree) m_tree->Fill();
1369 
1370  return StatusCode::SUCCESS;
1371 
1372 } //execute
1373 
1374 std::vector<Trk::HitInfo>* ISF_HitAnalysis::caloHits(const HepMC::GenParticle& part) const
1375 {
1376  // Start calo extrapolation
1377  ATH_MSG_DEBUG ("[ fastCaloSim transport ] processing particle "<<part.pdg_id() );
1378 
1379  std::vector<Trk::HitInfo>* hitVector = new std::vector<Trk::HitInfo>;
1380 
1381  int pdgId = part.pdg_id();
1382  double charge = HepPDT::ParticleID(pdgId).charge();
1383 
1384  // particle Hypothesis for the extrapolation
1386 
1387  ATH_MSG_DEBUG ("particle hypothesis "<< pHypothesis );
1388 
1389  // geantinos not handled by PdgToParticleHypothesis - fix there
1390  if( pdgId == 999 ) pHypothesis = Trk::geantino;
1391 
1392  auto vtx = part.production_vertex();
1393  Amg::Vector3D pos(0.,0.,0.); // default
1394 
1395  if (vtx)
1396  {
1397  pos = Amg::Vector3D( vtx->position().x(),vtx->position().y(), vtx->position().z());
1398  }
1399 
1400  Amg::Vector3D mom(part.momentum().x(),part.momentum().y(),part.momentum().z());
1401  ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting transport from position eta="<<pos.eta()<<" phi="<<pos.phi()<<" d="<<pos.mag()<<" pT="<<mom.perp() );
1402 
1403  // input parameters : curvilinear parameters
1405 
1406  // stable vs. unstable check : ADAPT for FASTCALOSIM
1407  //double freepath = ( !m_particleDecayHelper.empty()) ? m_particleDecayHelper->freePath(isp) : - 1.;
1408  double freepath = -1.;
1409  //ATH_MSG_VERBOSE( "[ fatras transport ] Particle free path : " << freepath);
1410  // path limit -> time limit ( TODO : extract life-time directly from decay helper )
1411  double tDec = freepath > 0. ? freepath : -1.;
1412  int decayProc = 0;
1413 
1414  /* uncomment if unstable particles used by FastCaloSim
1415  // beta calculated here for further use in validation
1416  double mass = m_particleMasses.mass[pHypothesis];
1417  double mom = isp.momentum().mag();
1418  double beta = mom/sqrt(mom*mom+mass*mass);
1419 
1420  if ( tDec>0.)
1421  {
1422  tDec = tDec/beta/CLHEP::c_light + isp.timeStamp();
1423  decayProc = 201;
1424  }
1425  */
1426 
1427  Trk::TimeLimit timeLim(tDec,0.,decayProc); // TODO: set vertex time info
1428 
1429  // prompt decay ( uncomment if unstable particles used )
1430  //if ( freepath>0. && freepath<0.01 ) {
1431  // if (!m_particleDecayHelper.empty()) {
1432  // ATH_MSG_VERBOSE( "[ fatras transport ] Decay is triggered for input particle.");
1433  // m_particleDecayHelper->decay(isp);
1434  // }
1435  // return 0;
1436  //}
1437 
1438  // presample interactions - ADAPT FOR FASTCALOSIM
1439  Trk::PathLimit pathLim(-1.,0);
1440  //if (absPdg!=999 && pHypothesis<99) pathLim = m_samplingTool->sampleProcess(mom,isp.charge(),pHypothesis);
1441 
1443 
1444  // first extrapolation to reach the ID boundary
1445  ATH_MSG_DEBUG( "[ fastCaloSim transport ] before calo entrance ");
1446 
1447  // get CaloEntrance if not done already
1448  if (!m_caloEntrance.get())
1449  {
1450  m_caloEntrance.set(m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName));
1451  if(!m_caloEntrance.get())
1452  ATH_MSG_INFO("CaloEntrance not found ");
1453  else
1454  ATH_MSG_INFO("CaloEntrance found ");
1455  }
1456 
1457  ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo entrance ");
1458 
1459  std::unique_ptr<const Trk::TrackParameters> caloEntry = nullptr;
1460 
1461  if(m_caloEntrance.get() && m_caloEntrance.get()->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance.get(),0.001))
1462  {
1463  std::vector<Trk::HitInfo>* dummyHitVector = nullptr;
1464  if (charge == 0) {
1465  caloEntry =
1466  m_extrapolator->transportNeutralsWithPathLimit(inputPar,
1467  pathLim,
1468  timeLim,
1470  pHypothesis,
1471  dummyHitVector,
1472  nextGeoID,
1473  m_caloEntrance.get());
1474  } else {
1475  caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,
1476  pathLim,
1477  timeLim,
1479  pHypothesis,
1480  dummyHitVector,
1481  nextGeoID,
1482  m_caloEntrance.get());
1483  }
1484  } else{
1485  caloEntry = inputPar.uniqueClone();
1486  }
1487 
1488  ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo caloEntry ");
1489 
1490  if(caloEntry)
1491  {
1492  std::unique_ptr<const Trk::TrackParameters> eParameters = nullptr;
1493 
1494  // save Calo entry hit (fallback info)
1495  hitVector->push_back(Trk::HitInfo(caloEntry->uniqueClone(),timeLim.time,nextGeoID,0.));
1496 
1497  ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
1498 
1499  if (charge == 0) {
1500  eParameters =
1501  m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,
1502  pathLim,
1503  timeLim,
1505  pHypothesis,
1506  hitVector,
1507  nextGeoID);
1508  } else {
1509  eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,
1510  pathLim,
1511  timeLim,
1513  pHypothesis,
1514  hitVector,
1515  nextGeoID);
1516  }
1517  // save Calo exit hit (fallback info)
1518  if (eParameters) hitVector->push_back(Trk::HitInfo(std::move(eParameters),timeLim.time,nextGeoID,0.));
1519  //delete eParameters; // HitInfo took ownership
1520  }
1521 
1522  if(msgLvl(MSG::DEBUG))
1523  {
1525  while (it < hitVector->end() )
1526  {
1527  int sample=(*it).detID;
1528  Amg::Vector3D hitPos = (*it).trackParms->position();
1529  ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
1530  ++it;
1531  }
1532  }
1533 
1534  return hitVector;
1535 } //caloHits
ISF_HitAnalysis::m_truth_vtxbarcode
std::vector< int > * m_truth_vtxbarcode
Definition: ISF_HitAnalysis.h:168
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
ISF_HitAnalysis::m_MuonEntryLayer_E
std::vector< float > * m_MuonEntryLayer_E
Definition: ISF_HitAnalysis.h:238
ISF_HitAnalysis::m_MC_DIGI_PARAM
StringProperty m_MC_DIGI_PARAM
Definition: ISF_HitAnalysis.h:134
TileSamplingFraction::getSamplingFraction
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
Definition: TileSamplingFraction.h:53
Tile_Base_ID::is_tile_aux
bool is_tile_aux(const Identifier &id) const
Definition: Tile_Base_ID.cxx:232
beamspotman.r
def r
Definition: beamspotman.py:676
ISF_HitAnalysis::m_pdgToParticleHypothesis
Trk::PdgToParticleHypothesis m_pdgToParticleHypothesis
Definition: ISF_HitAnalysis.h:250
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
CaloDetDescrManager_Base::element_range
calo_element_range element_range() const
Range over element vector.
Definition: CaloDetDescrManager.cxx:123
ISF_HitAnalysis::m_newTTC_back_detaBorder
std::vector< std::vector< float > > * m_newTTC_back_detaBorder
Definition: ISF_HitAnalysis.h:223
ISF_HitAnalysis::m_truth_pz
std::vector< float > * m_truth_pz
Definition: ISF_HitAnalysis.h:165
EnergyLoss.h
ISF_HitAnalysis::m_FastCaloSimCaloExtrapolation
PublicToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
The FastCaloSimCaloExtrapolation tool.
Definition: ISF_HitAnalysis.h:123
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Definition: CaloCluster_v1.h:812
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
FCS_StepInfoCollection.h
ISF_HitAnalysis::m_newTTC_entrance_eta
std::vector< std::vector< float > > * m_newTTC_entrance_eta
Definition: ISF_HitAnalysis.h:213
LArEM_ID.h
get_generator_info.result
result
Definition: get_generator_info.py:21
test_pyathena.px
px
Definition: test_pyathena.py:18
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
ISF_HitAnalysis::m_final_hit_energy
std::vector< Float_t > * m_final_hit_energy
Definition: ISF_HitAnalysis.h:197
DiscBounds.h
TrackParameters.h
ISF_HitAnalysis::m_cluster_phi
std::vector< float > * m_cluster_phi
Definition: ISF_HitAnalysis.h:172
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ISF_HitAnalysis::m_cell_energy
std::vector< float > * m_cell_energy
Definition: ISF_HitAnalysis.h:178
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ISF_HitAnalysis::m_cluster_energy
std::vector< float > * m_cluster_energy
Definition: ISF_HitAnalysis.h:170
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF_HitAnalysis::m_CaloBoundaryZ
DoubleProperty m_CaloBoundaryZ
Definition: ISF_HitAnalysis.h:125
Trk::PdgToParticleHypothesis::convert
Trk::ParticleHypothesis convert(int pdg, bool &stable, bool &exiting, double charge=1.) const
Converter method : PDG -> Particle Hyptothesis.
ISF_HitAnalysis::m_newTTC_Angle3D
std::vector< float > * m_newTTC_Angle3D
Definition: ISF_HitAnalysis.h:235
CaloCell_ID_FCS::FirstSample
@ FirstSample
Definition: FastCaloSim_CaloCell_ID.h:18
ISF_HitAnalysis::m_newTTC_mid_r
std::vector< std::vector< float > > * m_newTTC_mid_r
Definition: ISF_HitAnalysis.h:227
ISF_HitAnalysis::m_newTTC_entrance_r
std::vector< std::vector< float > > * m_newTTC_entrance_r
Definition: ISF_HitAnalysis.h:215
AtlasDetectorID::is_lar_fcal
bool is_lar_fcal(Identifier id) const
Definition: AtlasDetectorID.h:839
Tile_Base_ID::is_tile_gap
bool is_tile_gap(const Identifier &id) const
Definition: Tile_Base_ID.cxx:223
FCS_matchedcell::clear
void clear()
Definition: FCS_Cell.h:63
TileHitVecConstIterator
AtlasHitsVector< TileHit >::const_iterator TileHitVecConstIterator
Definition: TileHitVector.h:30
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
FCS_matchedcell::cell
FCS_cell cell
Definition: FCS_Cell.h:60
Trk::ParametersBase::uniqueClone
std::unique_ptr< ParametersBase< DIM, T > > uniqueClone() const
clone method for polymorphic deep copy returning unique_ptr; it is not overriden, but uses the existi...
Definition: ParametersBase.h:97
ATLAS_NOT_THREAD_SAFE
StatusCode ISF_HitAnalysis::initialize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition: ISF_HitAnalysis.cxx:127
ISF_HitAnalysis::m_tileID
const TileID * m_tileID
Definition: ISF_HitAnalysis.h:140
ISF_HitAnalysis::ISF_HitAnalysis
ISF_HitAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ISF_HitAnalysis.cxx:70
ISF_HitAnalysis::m_oneeventcells
FCS_matchedcellvector * m_oneeventcells
Definition: ISF_HitAnalysis.h:189
ISF_HitAnalysis::m_TimingCut
IntegerProperty m_TimingCut
Definition: ISF_HitAnalysis.h:133
initialize
void initialize()
Definition: run_EoverP.cxx:894
FCS_g4hit
Definition: FCS_Cell.h:48
ISF_HitAnalysis.h
ISF_HitAnalysis::m_MuonEntryLayer_pz
std::vector< float > * m_MuonEntryLayer_pz
Definition: ISF_HitAnalysis.h:241
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
ISF_HitAnalysis::m_MC_SIM_PARAM
StringProperty m_MC_SIM_PARAM
Definition: ISF_HitAnalysis.h:135
FCS_hit
Definition: FCS_Cell.h:34
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
ISF_HitAnalysis::m_truth_barcode
std::vector< int > * m_truth_barcode
Definition: ISF_HitAnalysis.h:167
hitVector
std::vector< FPGATrackSimHit > hitVector
Definition: FPGATrackSimCluster.h:23
ISF_HitAnalysis::MAX_LAYER
static const int MAX_LAYER
Definition: ISF_HitAnalysis.h:85
AtlasHitsVector
Definition: AtlasHitsVector.h:33
skel.it
it
Definition: skel.GENtoEVGEN.py:423
ISF_HitAnalysis::m_caloEntranceName
StringProperty m_caloEntranceName
Definition: ISF_HitAnalysis.h:121
ISF_HitAnalysis::m_islarendcap
std::vector< bool > * m_islarendcap
Definition: ISF_HitAnalysis.h:155
CaloDepthTool.h
Declaration of CaloDepthTool. Created by Claire Bourdarios, 25.10.2004.
ISF_HitAnalysis::m_newTTC_IDCaloBoundary_eta
std::vector< float > * m_newTTC_IDCaloBoundary_eta
Definition: ISF_HitAnalysis.h:231
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:206
CaloCell_ID_FCS::EME1
@ EME1
Definition: FastCaloSim_CaloCell_ID.h:24
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Tile_Base_ID::is_tile_extbarrel
bool is_tile_extbarrel(const Identifier &id) const
Definition: Tile_Base_ID.cxx:214
ISF_HitAnalysis::m_hit_samplingfraction
std::vector< float > * m_hit_samplingfraction
Definition: ISF_HitAnalysis.h:160
TileInfo.h
LArHit::energy
double energy() const
Definition: LArHit.h:113
LArHitContainer
Hit collection.
Definition: LArHitContainer.h:26
IExtrapolator.h
TFCSExtrapolationState::SUBPOS_ENT
@ SUBPOS_ENT
Definition: TFCSExtrapolationState.h:21
ISF_HitAnalysis::m_final_cell_energy
std::vector< Float_t > * m_final_cell_energy
Definition: ISF_HitAnalysis.h:196
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
ISF_HitAnalysis::m_cell_sampling
std::vector< int > * m_cell_sampling
Definition: ISF_HitAnalysis.h:179
IOVSVC_CALLBACK_ARGS_P
#define IOVSVC_CALLBACK_ARGS_P(I, K)
short hand for IOVSvc call back argument list, to be used when access to formal arguments is needed,...
Definition: IOVSvcDefs.h:42
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
ISF_HitAnalysis::m_newTTC_IDCaloBoundary_z
std::vector< float > * m_newTTC_IDCaloBoundary_z
Definition: ISF_HitAnalysis.h:234
ISF_HitAnalysis::m_hit_x
std::vector< float > * m_hit_x
Simple variables by Ketevi.
Definition: ISF_HitAnalysis.h:147
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
TFCSExtrapolationState::SUBPOS_MID
@ SUBPOS_MID
Definition: TFCSExtrapolationState.h:20
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LArHEC_ID.h
IDTPM::getZ
float getZ(const xAOD::TrackParticle &)
Accessor utility function for getting the value of prodZ.
Definition: TrackParametersHelper.h:104
CaloCell_ID_FCS::EME2
@ EME2
Definition: FastCaloSim_CaloCell_ID.h:25
HWIdentifier
Definition: HWIdentifier.h:13
Trk::Calo
@ Calo
Definition: GeometrySignature.h:28
AtlasHitsVector::begin
const_iterator begin() const
Definition: AtlasHitsVector.h:131
x
#define x
ISF_HitAnalysis::m_hit_sampling
std::vector< int > * m_hit_sampling
Definition: ISF_HitAnalysis.h:159
TFCSExtrapolationState::SUBPOS_EXT
@ SUBPOS_EXT
Definition: TFCSExtrapolationState.h:22
AthenaAttributeList.h
ISF_HitAnalysis::m_hit_identifier
std::vector< Long64_t > * m_hit_identifier
Definition: ISF_HitAnalysis.h:152
ISF_HitAnalysis::m_MuonEntryLayer_x
std::vector< float > * m_MuonEntryLayer_x
Definition: ISF_HitAnalysis.h:242
ISF_HitAnalysis::m_islarbarrel
std::vector< bool > * m_islarbarrel
Definition: ISF_HitAnalysis.h:154
ISF_HitAnalysis::m_istile
std::vector< bool > * m_istile
Definition: ISF_HitAnalysis.h:158
FCS_matchedcell::g4hit
std::vector< FCS_g4hit > g4hit
Definition: FCS_Cell.h:61
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
PowhegPy8EG_H2a.pdgId
dictionary pdgId
Definition: PowhegPy8EG_H2a.py:128
TFCSTruthState::vertex
const TLorentzVector & vertex() const
Definition: TFCSTruthState.h:28
ISF_HitAnalysis::m_g4hit_identifier
std::vector< Long64_t > * m_g4hit_identifier
Definition: ISF_HitAnalysis.h:183
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
ISF_HitAnalysis::m_newTTC_entrance_OK
std::vector< std::vector< bool > > * m_newTTC_entrance_OK
Definition: ISF_HitAnalysis.h:218
TileID.h
TileDetDescrManager.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CxxUtils::CachedPointer::set
void set(pointer_t elt) const
Set the element, assuming it is currently null.
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
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
RTTAlgmain.branchname
string branchname
Definition: RTTAlgmain.py:60
ISF_HitAnalysis::m_newTTC_mid_z
std::vector< std::vector< float > > * m_newTTC_mid_z
Definition: ISF_HitAnalysis.h:228
AthenaHitsVector< LArHit >::const_iterator
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
Definition: AthenaHitsVector.h:58
ISF_HitAnalysis::m_newTTC_IDCaloBoundary_r
std::vector< float > * m_newTTC_IDCaloBoundary_r
Definition: ISF_HitAnalysis.h:233
ReadCellNoiseFromCool.tile
tile
Definition: ReadCellNoiseFromCool.py:92
ISF_HitAnalysis::m_tileHWID
const TileHWID * m_tileHWID
Definition: ISF_HitAnalysis.h:141
ISF_HitAnalysis::m_hit_energy
std::vector< float > * m_hit_energy
Definition: ISF_HitAnalysis.h:150
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
ISF_HitAnalysis::m_cluster_size
std::vector< unsigned > * m_cluster_size
Definition: ISF_HitAnalysis.h:173
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ISF_HitAnalysis::m_newTTC_entrance_phi
std::vector< std::vector< float > > * m_newTTC_entrance_phi
Definition: ISF_HitAnalysis.h:214
ISF_HitAnalysis::m_total_g4hit_e
Float_t m_total_g4hit_e
Definition: ISF_HitAnalysis.h:194
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloCell_ID_FCS::MaxSample
@ MaxSample
Definition: FastCaloSim_CaloCell_ID.h:47
Trk::GeometrySignature
GeometrySignature
Definition: GeometrySignature.h:24
ISF_HitAnalysis::m_layercells
FCS_matchedcellvector * m_layercells[MAX_LAYER]
Definition: ISF_HitAnalysis.h:190
FCS_cell::center_x
float center_x
Definition: FCS_Cell.h:35
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
ISF_HitAnalysis::m_cluster_eta
std::vector< float > * m_cluster_eta
Definition: ISF_HitAnalysis.h:171
TileHWID.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ISF_HitAnalysis::m_hit_y
std::vector< float > * m_hit_y
Definition: ISF_HitAnalysis.h:148
FCS_matchedcell
Definition: FCS_Cell.h:59
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
McEventCollection.h
FCS_cell::sampling
int sampling
Definition: FCS_Cell.h:33
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
ISF_HitAnalysis::m_newTTC_IDCaloBoundary_phi
std::vector< float > * m_newTTC_IDCaloBoundary_phi
Definition: ISF_HitAnalysis.h:232
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCluster.h
z
#define z
ISF_HitAnalysis::m_g4hit_sampling
std::vector< int > * m_g4hit_sampling
Definition: ISF_HitAnalysis.h:186
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
ILArfSampl::FSAMPL
virtual const float & FSAMPL(const HWIdentifier &id) const =0
FCS_matchedcellvector::push_back
void push_back(FCS_matchedcell cell)
Definition: FCS_Cell.h:80
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LArHit::time
double time() const
Definition: LArHit.h:118
ISF_HitAnalysis::m_total_cell_e
Float_t m_total_cell_e
Definition: ISF_HitAnalysis.h:192
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
CylinderSurface.h
Trk::geantino
@ geantino
Definition: ParticleHypothesis.h:26
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
ISF_HitAnalysis::m_MuonEntryLayer_pdg
std::vector< int > * m_MuonEntryLayer_pdg
Definition: ISF_HitAnalysis.h:245
ISF_HitAnalysis::m_newTTC_back_z
std::vector< std::vector< float > > * m_newTTC_back_z
Definition: ISF_HitAnalysis.h:222
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
ISF_HitAnalysis::m_larFcalID
const LArFCAL_ID * m_larFcalID
Definition: ISF_HitAnalysis.h:138
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FCS_cell::center_z
float center_z
Definition: FCS_Cell.h:37
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
AtlasDetectorID::is_tile
bool is_tile(Identifier id) const
Definition: AtlasDetectorID.h:695
ISF_HitAnalysis::m_final_g4hit_energy
std::vector< Float_t > * m_final_g4hit_energy
Definition: ISF_HitAnalysis.h:198
AtlasDetectorID::is_lar_hec
bool is_lar_hec(Identifier id) const
Definition: AtlasDetectorID.h:829
FCS_cell::cell_identifier
Long64_t cell_identifier
Definition: FCS_Cell.h:32
ISF_HitAnalysis::m_NtruthParticles
IntegerProperty m_NtruthParticles
Definition: ISF_HitAnalysis.h:116
ISF_HitAnalysis::m_g4hit_cellidentifier
std::vector< Long64_t > * m_g4hit_cellidentifier
Definition: ISF_HitAnalysis.h:184
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
ISF_HitAnalysis::m_tileCabling
const TileCablingService * m_tileCabling
Definition: ISF_HitAnalysis.h:142
ISF_HitAnalysis::m_newTTC_back_eta
std::vector< std::vector< float > > * m_newTTC_back_eta
Definition: ISF_HitAnalysis.h:219
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
Trk::TimeLimit
Definition: HelperStructs.h:58
ISF_HitAnalysis::m_tileSamplingFractionKey
SG::ReadCondHandleKey< TileSamplingFraction > m_tileSamplingFractionKey
Name of TileSamplingFraction in condition store.
Definition: ISF_HitAnalysis.h:105
ISF_HitAnalysis::m_newTTC_entrance_detaBorder
std::vector< std::vector< float > > * m_newTTC_entrance_detaBorder
Definition: ISF_HitAnalysis.h:217
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
FCS_matchedcellvector::size
unsigned int size()
Definition: FCS_Cell.h:79
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
AthAlgorithm
Definition: AthAlgorithm.h:47
ISF_HitAnalysis::m_newTTC_back_phi
std::vector< std::vector< float > > * m_newTTC_back_phi
Definition: ISF_HitAnalysis.h:220
ISF_HitAnalysis::m_MuonEntryLayer_y
std::vector< float > * m_MuonEntryLayer_y
Definition: ISF_HitAnalysis.h:243
ISF_HitAnalysis::m_cell_identifier
std::vector< Long64_t > * m_cell_identifier
Definition: ISF_HitAnalysis.h:177
LArHit::cellID
Identifier cellID() const
Definition: LArHit.h:108
FCS_matchedcellvector
Definition: FCS_Cell.h:73
xAOD::CaloCluster_v1::UNCALIBRATED
@ UNCALIBRATED
Definition: CaloCluster_v1.h:306
ISF_HitAnalysis::m_total_hit_e
Float_t m_total_hit_e
Definition: ISF_HitAnalysis.h:193
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
Amg::py
@ py
Definition: GeoPrimitives.h:39
TileHitVector.h
ISF_HitAnalysis::execute
virtual StatusCode execute() override
Definition: ISF_HitAnalysis.cxx:527
TileHit.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ISF_HitAnalysis::m_islarfcal
std::vector< bool > * m_islarfcal
Definition: ISF_HitAnalysis.h:157
TileHWID::drawerIdx
int drawerIdx(const HWIdentifier &id) const
construct drawer index from HW identifier
Definition: TileHWID.h:175
ISF_HitAnalysis::m_doG4Hits
BooleanProperty m_doG4Hits
Definition: ISF_HitAnalysis.h:132
ISF_HitAnalysis::m_CaloBoundaryR
DoubleProperty m_CaloBoundaryR
Definition: ISF_HitAnalysis.h:124
ISF_HitAnalysis::m_newTTC_entrance_z
std::vector< std::vector< float > > * m_newTTC_entrance_z
Definition: ISF_HitAnalysis.h:216
TrackRecordCollection.h
charge
double charge(const T &p)
Definition: AtlasPID.h:494
FCS_cell::energy
float energy
Definition: FCS_Cell.h:34
ISF_HitAnalysis::~ISF_HitAnalysis
~ISF_HitAnalysis()
Trk::PathLimit
Definition: HelperStructs.h:34
ISF_HitAnalysis::m_hit_z
std::vector< float > * m_hit_z
Definition: ISF_HitAnalysis.h:149
DataHandle< AthenaAttributeList >
LArHit
Class to store hit energy and time in LAr cell from G4 simulation.
Definition: LArHit.h:25
ISF_HitAnalysis::m_newTTC_AngleEta
std::vector< float > * m_newTTC_AngleEta
Definition: ISF_HitAnalysis.h:236
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
ISF_HitAnalysis::m_MuonEntryLayer_z
std::vector< float > * m_MuonEntryLayer_z
Definition: ISF_HitAnalysis.h:244
TrackRecord
Definition: TrackRecord.h:10
ISF_HitAnalysis::m_fSamplKey
SG::ReadCondHandleKey< ILArfSampl > m_fSamplKey
Definition: ISF_HitAnalysis.h:100
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
LArFCAL_ID.h
ISF_HitAnalysis::m_tree
TTree * m_tree
Definition: ISF_HitAnalysis.h:200
ISF_HitAnalysis::m_truth_energy
std::vector< float > * m_truth_energy
Definition: ISF_HitAnalysis.h:162
ISF_HitAnalysis::m_hit_cellidentifier
std::vector< Long64_t > * m_hit_cellidentifier
Definition: ISF_HitAnalysis.h:153
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
TFCSTruthState.h
y
#define y
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
FCS_matchedcellvector::GetLayer
std::vector< FCS_matchedcell > GetLayer(int layer)
Definition: FCS_Cell.h:77
ISF_HitAnalysis::m_MuonEntryLayer_px
std::vector< float > * m_MuonEntryLayer_px
Definition: ISF_HitAnalysis.h:239
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ISF_HitAnalysis::m_newTTC_mid_phi
std::vector< std::vector< float > > * m_newTTC_mid_phi
Definition: ISF_HitAnalysis.h:226
FCS_cell
Definition: FCS_Cell.h:23
LArEM_Base_ID::is_em_barrel
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArHitContainer.h
ISF_HitAnalysis::m_extrapolator
PublicToolHandle< Trk::ITimedExtrapolator > m_extrapolator
Definition: ISF_HitAnalysis.h:119
TFCSExtrapolationState.h
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
AtlasHitsVector::end
const_iterator end() const
Definition: AtlasHitsVector.h:134
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
ISF_HitAnalysis::m_newTTC_mid_OK
std::vector< std::vector< bool > > * m_newTTC_mid_OK
Definition: ISF_HitAnalysis.h:230
ISF_HitAnalysis::m_cluster_cellID
std::vector< std::vector< Long64_t > > * m_cluster_cellID
Definition: ISF_HitAnalysis.h:174
DEBUG
#define DEBUG
Definition: page_access.h:11
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
xAOD::CaloCluster_v1::cell_end
const_cell_iterator cell_end() const
Definition: CaloCluster_v1.h:813
ISF_HitAnalysis::m_hit_time
std::vector< float > * m_hit_time
Definition: ISF_HitAnalysis.h:151
TFCSTruthState::set_vertex
void set_vertex(const TLorentzVector &val)
Definition: TFCSTruthState.h:19
ISF_HitAnalysis::m_tileMgr
const TileDetDescrManager * m_tileMgr
Definition: ISF_HitAnalysis.h:144
FCS_cell::center_y
float center_y
Definition: FCS_Cell.h:36
ISF_HitAnalysis::caloHits
std::vector< Trk::HitInfo > * caloHits(const HepMC::GenParticle &part) const
Definition: ISF_HitAnalysis.cxx:1374
CaloClusterContainer.h
Trk::TimeLimit::time
float time
Definition: HelperStructs.h:60
DiscSurface.h
CxxUtils::CachedPointer::get
pointer_t get() const
Return the current value of the element.
ISF_HitAnalysis::m_newTTC_back_OK
std::vector< std::vector< bool > > * m_newTTC_back_OK
Definition: ISF_HitAnalysis.h:224
ISF_HitAnalysis::m_islarhec
std::vector< bool > * m_islarhec
Definition: ISF_HitAnalysis.h:156
FCS_matchedcellvector::m_vector
std::vector< FCS_matchedcell > m_vector
Definition: FCS_Cell.h:76
ISF_FCS_Parametrization::FCS_StepInfoCollection
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
Definition: FCS_StepInfoCollection.h:30
CaloIdManager.h
TrackingGeometry.h
Trk::HitInfo
Definition: HelperStructs.h:12
ISF_HitAnalysis::m_truth_pdg
std::vector< int > * m_truth_pdg
Definition: ISF_HitAnalysis.h:166
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ISF_HitAnalysis::m_newTTC_mid_detaBorder
std::vector< std::vector< float > > * m_newTTC_mid_detaBorder
Definition: ISF_HitAnalysis.h:229
ISF_HitAnalysis::m_newTTC_back_r
std::vector< std::vector< float > > * m_newTTC_back_r
Definition: ISF_HitAnalysis.h:221
I
#define I(x, y, z)
Definition: MD5.cxx:116
GetEnergy
int GetEnergy()
Definition: GetEnergy.cxx:81
ISF_HitAnalysis::m_larEmID
const LArEM_ID * m_larEmID
Definition: ISF_HitAnalysis.h:137
ISF_HitAnalysis::m_surfacelist
std::vector< CaloCell_ID_FCS::CaloSample > m_surfacelist
Definition: ISF_HitAnalysis.h:254
Tile_Base_ID::is_tile_barrel
bool is_tile_barrel(const Identifier &id) const
Test of an Identifier to see if it belongs to a particular part of the calorimeter.
Definition: Tile_Base_ID.cxx:205
ISF_HitAnalysis::m_g4hit_energy
std::vector< float > * m_g4hit_energy
Definition: ISF_HitAnalysis.h:181
Tile_Base_ID::cell_id
Identifier cell_id(const Identifier &any_id) const
Definition: Tile_Base_ID.cxx:581
ISF_HitAnalysis::m_g4hit_time
std::vector< float > * m_g4hit_time
Definition: ISF_HitAnalysis.h:182
ISF_HitAnalysis::updateMetaData
StatusCode updateMetaData(IOVSVC_CALLBACK_ARGS)
Definition: ISF_HitAnalysis.cxx:85
FCS_matchedcell::hit
std::vector< FCS_hit > hit
Definition: FCS_Cell.h:62
CaloCell_ID_FCS::FCAL0
@ FCAL0
Definition: FastCaloSim_CaloCell_ID.h:40
ISF_HitAnalysis::m_caloEntrance
CxxUtils::CachedPointer< const Trk::TrackingVolume > m_caloEntrance
The new Extrapolator setup.
Definition: ISF_HitAnalysis.h:248
ISF_HitAnalysis::m_truth_py
std::vector< float > * m_truth_py
Definition: ISF_HitAnalysis.h:164
TFCSTruthState
Definition: TFCSTruthState.h:13
AtlasDetectorID::is_lar_em
bool is_lar_em(Identifier id) const
Definition: AtlasDetectorID.h:818
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
ISF_HitAnalysis::m_truth_px
std::vector< float > * m_truth_px
Definition: ISF_HitAnalysis.h:163
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
ISF_HitAnalysis::m_larHecID
const LArHEC_ID * m_larHecID
Definition: ISF_HitAnalysis.h:139
LArEM_Base_ID::is_em_endcap
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ISF_HitAnalysis::m_newTTC_mid_eta
std::vector< std::vector< float > > * m_newTTC_mid_eta
Definition: ISF_HitAnalysis.h:225
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
ILArfSampl
Definition: ILArfSampl.h:14
TileCablingService::s2h_channel_id
HWIdentifier s2h_channel_id(const Identifier &id) const
Definition: TileCablingService.cxx:1076
ISF_HitAnalysis::m_g4hit_samplingfraction
std::vector< float > * m_g4hit_samplingfraction
Definition: ISF_HitAnalysis.h:185
ISF_HitAnalysis::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: ISF_HitAnalysis.h:96
ISF_HitAnalysis::m_MuonEntryLayer_py
std::vector< float > * m_MuonEntryLayer_py
Definition: ISF_HitAnalysis.h:240