ATLAS Offline Software
eFEXNtupleWriter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #include <vector>
12 #include "TTree.h"
13 #include "GaudiKernel/ITHistSvc.h"
14 #include "GaudiKernel/ServiceHandle.h"
15 #include <memory>
16 
19 #include "xAODTruth/TruthVertex.h"
21 #include "xAODJet/JetContainer.h"
22 
25 
26 
27 LVL1::eFEXNtupleWriter::eFEXNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator) { }
28 
30 
31 }
32 
34  ServiceHandle<ITHistSvc> histSvc("THistSvc",name());
35  CHECK( histSvc.retrieve() );
36  m_myTree = new TTree("data","data");
37  CHECK( histSvc->regTree("/ANALYSIS/data",m_myTree) );
38 
39  ATH_CHECK( m_eFEXOutputCollectionSGKey.initialize() );
40 
41  m_load_truth_jet = false;
42 
43  m_myTree->Branch ("truth_tauvisible_eta", &m_truth_tauvisible_eta);
44  m_myTree->Branch ("truth_tauvisible_phi", &m_truth_tauvisible_phi);
45  m_myTree->Branch ("truth_tauvisible_ET", &m_truth_tauvisible_ET);
46 
47  m_myTree->Branch ("truth_e_eta", &m_truth_e_eta);
48  m_myTree->Branch ("truth_e_phi", &m_truth_e_phi);
49  m_myTree->Branch ("truth_e_ET", &m_truth_e_ET);
50  if (m_load_truth_jet){
51  m_myTree->Branch ("truth_jet_eta", &m_truth_jet_eta);
52  m_myTree->Branch ("truth_jet_phi", &m_truth_jet_phi);
53  m_myTree->Branch ("truth_jet_ET", &m_truth_jet_ET);
54  }
55 
56  m_myTree->Branch ("em", &m_em);
57  m_myTree->Branch ("had", &m_had);
58 
59  m_myTree->Branch ("eg_eta", &m_eg_eta);
60  m_myTree->Branch ("eg_phi", &m_eg_phi);
61  m_myTree->Branch ("eg_ET", &m_eg_ET);
62  m_myTree->Branch ("eg_wstotnum", &m_eg_WstotNum);
63  m_myTree->Branch ("eg_wstotden", &m_eg_WstotDen);
64  m_myTree->Branch ("eg_retanum", &m_eg_RetaNum);
65  m_myTree->Branch ("eg_retaden", &m_eg_RetaDen);
66  m_myTree->Branch ("eg_rhadnum", &m_eg_RhadNum);
67  m_myTree->Branch ("eg_rhadden", &m_eg_RhadDen);
68  m_myTree->Branch ("eg_haveSeed", &m_eg_haveseed);
69  m_myTree->Branch ("tau_RealRCore", &m_tau_realRCore);
70  m_myTree->Branch ("tau_RCoreCore", &m_tau_rCoreCore);
71  m_myTree->Branch ("tau_RCoreEnv", &m_tau_rCoreEnv);
72  m_myTree->Branch ("tau_RCoreWP", &m_tau_rCoreWP);
73  m_myTree->Branch ("tau_RealRHad", &m_tau_realRHad);
74  m_myTree->Branch ("tau_RHadCore", &m_tau_rHadCore);
75  m_myTree->Branch ("tau_RHadEnv", &m_tau_rHadEnv);
76  m_myTree->Branch ("tau_RHadWP", &m_tau_rHadWP);
77  m_myTree->Branch ("tau_Seed", &m_tau_seed);
78  m_myTree->Branch ("tau_UnD", &m_tau_und);
79  m_myTree->Branch ("tau_Et", &m_tau_Et);
80  m_myTree->Branch ("tau_Eta", &m_tau_Eta);
81  m_myTree->Branch ("tau_Phi", &m_tau_Phi);
82  m_myTree->Branch ("tau_floatEta", &m_tau_floatEta);
83  m_myTree->Branch ("tau_floatPhi", &m_tau_floatPhi);
84  m_myTree->Branch ("tau_isCentralTowerSeed", &m_tau_isCentralTowerSeed);
85  m_myTree->Branch ("tau_CenterTowerEt", &m_tau_CenterTowerEt);
86  m_myTree->Branch ("tau_OneOffEtaTowerEt", &m_tau_OneOffEtaTowerEt);
87  m_myTree->Branch ("tau_OneBelowEtaTowerEt", &m_tau_OneBelowEtaTowerEt);
88  m_myTree->Branch ("tau_eFEXID", &m_tau_eFEXID);
89  m_myTree->Branch ("tau_FPGAID", &m_tau_FPGAID);
90  m_myTree->Branch ("eFEXnumber", &m_eFex_number);
91  m_myTree->Branch ("eg_nTOBs", &m_eg_nTOBs);
92 
93  m_myTree->Branch ("eg_TOB_FP", &m_eg_TOB_FP);
94  m_myTree->Branch ("eg_TOB_Eta", &m_eg_TOB_Eta);
95  m_myTree->Branch ("eg_TOB_Phi", &m_eg_TOB_Phi);
96  m_myTree->Branch ("eg_TOB_ha", &m_eg_TOB_ha);
97  m_myTree->Branch ("eg_TOB_f3", &m_eg_TOB_f3);
98  m_myTree->Branch ("eg_TOB_Re", &m_eg_TOB_Re);
99  m_myTree->Branch ("eg_TOB_Sd", &m_eg_TOB_Sd);
100  m_myTree->Branch ("eg_TOB_UnD", &m_eg_TOB_UnD);
101  m_myTree->Branch ("eg_TOB_Max", &m_eg_TOB_Max);
102  m_myTree->Branch ("eg_TOB_zeros", &m_eg_TOB_zeros);
103  m_myTree->Branch ("eg_TOB_energy", &m_eg_TOB_energy);
104  return StatusCode::SUCCESS;
105 }
106 
108  SG::ReadHandle<LVL1::eFEXOutputCollection> eFEXOutputCollectionobj = SG::ReadHandle<LVL1::eFEXOutputCollection>(m_eFEXOutputCollectionSGKey/*,ctx*/);
109  if(!eFEXOutputCollectionobj.isValid()){
110  ATH_MSG_FATAL("Could not retrieve eFEXOutputCollection " << m_eFEXOutputCollectionSGKey.key());
111  return StatusCode::FAILURE;
112  }
113  if (!eFEXOutputCollectionobj->getdooutput()) {
114  return StatusCode::SUCCESS;
115  }
116 
117  CHECK(loadegAlgoVariables(eFEXOutputCollectionobj));
118  CHECK(loadegAlgoTOBs(eFEXOutputCollectionobj));
119  CHECK(loadtauAlgoVariables(eFEXOutputCollectionobj));
120  CHECK(loadTruthElectron());
121  CHECK(loadTruthTau());
122  if (m_load_truth_jet){
123  CHECK(loadTruthJets());
124  }
125 
126  m_myTree->Fill();
127 
128  return StatusCode::SUCCESS;
129 }
130 
132  ATH_MSG_DEBUG("Finalizing " << name() << "...");
133  return StatusCode::SUCCESS;
134 }
135 
137  m_tau_realRCore.clear();
138  m_tau_rCoreCore.clear();
139  m_tau_rCoreEnv.clear();
140  m_tau_rCoreWP.clear();
141  m_tau_realRHad.clear();
142  m_tau_rHadCore.clear();
143  m_tau_rHadEnv.clear();
144  m_tau_rHadWP.clear();
145  m_tau_seed.clear();
146  m_tau_und.clear();
147  m_tau_Et.clear();
148  m_tau_Eta.clear();
149  m_tau_Phi.clear();
150  m_tau_floatEta.clear();
151  m_tau_floatPhi.clear();
152  m_tau_isCentralTowerSeed.clear();
153  m_tau_CenterTowerEt.clear();
154  m_tau_OneOffEtaTowerEt.clear();
155  m_tau_OneBelowEtaTowerEt.clear();
156  m_tau_eFEXID.clear();
157  m_tau_FPGAID.clear();
158  for (int i = 0; i < eFEXOutputCollectionobj->tau_size(); i++)
159  {
160  m_tau_isCentralTowerSeed.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["isCentralTowerSeed"]);
161  m_tau_Et.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["Et"]);
162  m_tau_Eta.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["Eta"]);
163  m_tau_Phi.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["Phi"]);
164  m_tau_floatEta.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["FloatEta"]);
165  m_tau_floatPhi.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["FloatPhi"]);
166  m_tau_realRCore.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RealRCore"]);
167  m_tau_rCoreCore.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RCoreCore"]);
168  m_tau_rCoreEnv.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RCoreEnv"]);
169  m_tau_rCoreWP.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RCoreWP"]);
170  m_tau_realRHad.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RealRHad"]);
171  m_tau_rHadCore.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RHadCore"]);
172  m_tau_rHadEnv.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RHadEnv"]);
173  m_tau_rHadWP.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["RHadWP"]);
174  m_tau_seed.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["Seed"]);
175  m_tau_und.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["UnD"]);
176  m_tau_CenterTowerEt.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["CenterTowerEt"]);
177  m_tau_OneOffEtaTowerEt.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["OneOffEtaTowerEt"]);
178  m_tau_OneBelowEtaTowerEt.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["OneBelowEtaTowerEt"]);
179  m_tau_eFEXID.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["eFEXID"]);
180  m_tau_FPGAID.push_back((*(eFEXOutputCollectionobj->get_tau(i)))["FPGAID"]);
181  }
182  return StatusCode::SUCCESS;
183 }
184 
186  m_eg_ET.clear();
187  m_eg_WstotNum.clear();
188  m_eg_WstotDen.clear();
189  m_eg_eta.clear();
190  m_eg_phi.clear();
191  m_eg_haveseed.clear();
192  m_eg_RetaNum.clear();
193  m_eg_RetaDen.clear();
194  m_eg_RhadNum.clear();
195  m_eg_RhadDen.clear();
196  m_eFex_number.clear();
197  m_em.clear();
198  m_had.clear();
199 
200  m_eg_nTOBs = eFEXOutputCollectionobj->size();
201  for (int i = 0; i < eFEXOutputCollectionobj->size(); i++)
202  {
203  std::map<std::string, float> eFEXegvalue_tem = (*(eFEXOutputCollectionobj->get_eg(i)));
204  m_eg_WstotNum.push_back(eFEXegvalue_tem["WstotNum"]);
205  m_eg_WstotDen.push_back(eFEXegvalue_tem["WstotDen"]);
206  m_eg_RetaNum.push_back(eFEXegvalue_tem["RetaNum"]);
207  m_eg_RetaDen.push_back(eFEXegvalue_tem["RetaDen"]);
208  m_eg_RhadNum.push_back(eFEXegvalue_tem["RhadNum"]);
209  m_eg_RhadDen.push_back(eFEXegvalue_tem["RhadDen"]);
210  m_eg_haveseed.push_back(eFEXegvalue_tem["haveSeed"]);
211  m_eg_ET.push_back(eFEXegvalue_tem["ET"]);
212  m_eg_eta.push_back(eFEXegvalue_tem["eta"]);
213  m_eg_phi.push_back(eFEXegvalue_tem["phi"]);
214  m_em.push_back(eFEXegvalue_tem["em"]);
215  m_had.push_back(eFEXegvalue_tem["had"]);
216  }
217  return StatusCode::SUCCESS;
218 }
219 
221  m_eg_TOB_FP.clear();
222  m_eg_TOB_Eta.clear();
223  m_eg_TOB_Phi.clear();
224  m_eg_TOB_ha.clear();
225  m_eg_TOB_f3.clear();
226  m_eg_TOB_Re.clear();
227  m_eg_TOB_Sd.clear();
228  m_eg_TOB_UnD.clear();
229  m_eg_TOB_Max.clear();
230  m_eg_TOB_zeros.clear();
231  m_eg_TOB_energy.clear();
232  for (int i = 0; i < eFEXOutputCollectionobj->size(); i++)
233  {
234  uint32_t TOB = eFEXOutputCollectionobj->getEMtob()[i];
235  uint32_t FP = getbits(TOB, 1, 2);
236  uint32_t Eta = getbits(TOB, 3, 5);
237  uint32_t Phi = getbits(TOB, 6, 8);
238  uint32_t ha = getbits(TOB, 9, 10);
239  uint32_t f3 = getbits(TOB, 11, 12);
240  uint32_t Re = getbits(TOB, 13, 14);
241  uint32_t Sd = getbits(TOB, 15, 16);
242  uint32_t UnD = getbits(TOB, 17, 17);
243  uint32_t Max = getbits(TOB, 18, 18);
244  uint32_t zeros = getbits(TOB, 19, 20);
245  uint32_t energy = getbits(TOB, 21, 32);
246 
247  m_eg_TOB_FP.push_back(FP);
248  m_eg_TOB_Eta.push_back(Eta);
249  m_eg_TOB_Phi.push_back(Phi);
250  m_eg_TOB_ha.push_back(ha);
251  m_eg_TOB_f3.push_back(f3);
252  m_eg_TOB_Re.push_back(Re);
253  m_eg_TOB_Sd.push_back(Sd);
254  m_eg_TOB_UnD.push_back(UnD);
255  m_eg_TOB_Max.push_back(Max);
256  m_eg_TOB_zeros.push_back(zeros);
257  m_eg_TOB_energy.push_back(energy * 100);
258  }
259  m_eFex_number = eFEXOutputCollectionobj->geteFexNumber();
260  return StatusCode::SUCCESS;
261 }
262 
264  m_truth_e_eta.clear();
265  m_truth_e_phi.clear();
266  m_truth_e_ET.clear();
267  const xAOD::TruthEventContainer* truthEvents;
268  CHECK(evtStore()->retrieve( truthEvents, "TruthEvents"));
269  for(auto ite : *truthEvents) {
270  int nParticle = ite->nTruthParticles();
271  for(int i = 0; i < nParticle; i++){
272  const xAOD::TruthParticle* each_particle = ite->truthParticle(i);
273 
274  // ignore geant4
275  if(HepMC::is_simulation_particle(each_particle)) continue;
276  // select particles that is not decayed further by the generator
277  if(!MC::isStable(each_particle)) continue;
278  // select electrons
279  if(std::abs(each_particle->pdgId()) != 11) continue;
280  // select particles from Z
281  if(!getMother(each_particle, 23)) continue;
282 
283  m_truth_e_ET.push_back(each_particle->p4().Pt());
284  m_truth_e_eta.push_back(each_particle->p4().Eta());
285  m_truth_e_phi.push_back(each_particle->p4().Phi());
286  }
287  }
288  return StatusCode::SUCCESS;
289 }
290 
292  m_truth_jet_eta.clear();
293  m_truth_jet_phi.clear();
294  m_truth_jet_ET.clear();
295  const xAOD::JetContainer* truth_jets;
296  StatusCode sc = evtStore()->retrieve( truth_jets, m_jet_container_name);
297  if (sc == StatusCode::FAILURE){
298  m_jet_container_name = "InTimeAntiKt4TruthJets";
299  StatusCode sc2 = evtStore()->retrieve( truth_jets, m_jet_container_name);
300  if (sc2 == StatusCode::FAILURE){
301  ATH_MSG_DEBUG("eFEXNtupleWriter::loadTruthJets() Unable to determine truth jet container");
302  m_load_truth_jet = false;
303  return StatusCode::SUCCESS;
304  }
305  }
306  for (unsigned i=0; i!=truth_jets->size(); i++) {
307  const xAOD::Jet* each_jet = (*truth_jets)[i];
308  if(each_jet->pt()<10000) continue;
309  m_truth_jet_eta.push_back(each_jet->p4().Eta());
310  m_truth_jet_phi.push_back(each_jet->p4().Phi());
311  m_truth_jet_ET.push_back(each_jet->p4().Et());
312  }
313  return StatusCode::SUCCESS;
314 }
315 
317  m_truth_tauvisible_eta.clear();
318  m_truth_tauvisible_phi.clear();
319  m_truth_tauvisible_ET.clear();
320  const xAOD::TruthEventContainer* truthEvents;
321  CHECK( evtStore()->retrieve( truthEvents, "TruthEvents"));
322  for (auto ite : *truthEvents) {
323  int nParticle = ite->nTruthParticles();
324  for(int i = 0; i < nParticle; i++) {
325  const xAOD::TruthParticle* each_particle = ite->truthParticle(i);
326  // ignore geant4
327  if(HepMC::is_simulation_particle(each_particle)) continue;
328  // select final state particles and decaying hadrons, muons or taus
329  if (!MC::isPhysical(each_particle)) continue;
330  // select tau
331  if (std::abs(each_particle->pdgId()) != 15) continue;
332  std::unique_ptr<TLorentzVector> p4_visible = visibleTauP4(each_particle);
333 
334  if (!p4_visible) break;
335  m_truth_tauvisible_eta.push_back(p4_visible->Eta());
336  m_truth_tauvisible_phi.push_back(p4_visible->Phi());
337  m_truth_tauvisible_ET.push_back(p4_visible->Et());
338  }
339  }
340  return StatusCode::SUCCESS;
341 }
342 
343 std::unique_ptr<TLorentzVector> LVL1::eFEXNtupleWriter::visibleTauP4(const xAOD::TruthParticle* particle) {
344  std::unique_ptr<TLorentzVector> psum(new TLorentzVector(0,0,0,0));
345  // ignore documentation particles. Attempt to find the nOutgoingParticles() of a documentation particle
346  // causes crash.
347  // It still gives the correct result, but I don't know why I have to do this.
348  if (!MC::isPhysical(particle)) {
349  return psum;
350  }
351  const xAOD::TruthVertex* decay_vertex = particle->decayVtx();
352  decay_vertex->nOutgoingParticles();
353  for(uint i=0; i < decay_vertex->nOutgoingParticles(); i++) {
354  const xAOD::TruthParticle* each_particle = decay_vertex->outgoingParticle(i);
355  int pid = std::abs(each_particle->pdgId());
356  // particle that is not decayed further by the generator
357  if (MC::isStable(each_particle)) {
358  // ignore neutrinos
359  if (pid == 12 || pid == 14 || pid == 16) continue;
360  // ignore leptonic decay events
361  if (pid == 11 || pid == 13) return std::unique_ptr<TLorentzVector>(nullptr);
362  (*psum) += each_particle->p4();
363  }
364  else{
365  std::unique_ptr<TLorentzVector> p4_tem = visibleTauP4(each_particle);
366  if (!p4_tem) return std::unique_ptr<TLorentzVector>(nullptr);
367  (*psum) += (*p4_tem);
368  }
369  }
370  return psum;
371 }
372 
373 std::unique_ptr<TLorentzVector> LVL1::eFEXNtupleWriter::invisibleTauP4(const xAOD::TruthParticle* particle) {
374  std::unique_ptr<TLorentzVector> psum(new TLorentzVector(0,0,0,0));
375  // ignore documentation particles. Attempt to find the nOutgoingParticles() of a documentation particle
376  // causes crash.
377  // It still gives the correct result, but I don't know why I have to do this.
378  if (!MC::isPhysical(particle)) {
379  return psum;
380  }
381  const xAOD::TruthVertex* decay_vertex = particle->decayVtx();
382  for (uint i=0; i < decay_vertex->nOutgoingParticles(); i++) {
383  const xAOD::TruthParticle* each_particle = decay_vertex->outgoingParticle(i);
384  int pid = std::abs(each_particle->pdgId());
385  // particle that is not decayed further by the generator
386  if (MC::isStable(each_particle)) {
387  // ignore leptonic decay events
388  if (pid == 11 || pid == 13) return std::unique_ptr<TLorentzVector>(nullptr);
389  // select neutrinos
390  if (pid == 12 || pid == 14 || pid == 16) (*psum) += each_particle->p4();
391  }
392  else {
393  std::unique_ptr<TLorentzVector> p4_tem = invisibleTauP4(each_particle);
394  if (!p4_tem) return std::unique_ptr<TLorentzVector>(nullptr);
395  (*psum) += (*p4_tem);
396  }
397  }
398  return psum;
399 }
400 
402  const xAOD::TruthVertex* productionVector = particle->prodVtx();
403  if (!productionVector) return NULL;
404  for (long unsigned int i = 0; i < productionVector->nIncomingParticles(); i++) {
405  const xAOD::TruthParticle* mother = productionVector->incomingParticle(i);
406  if (mother->pdgId()==motherPid) return mother;
407  const xAOD::TruthParticle* grandmother = getMother(mother, motherPid);
408  if (grandmother) return grandmother;
409  }
410  return NULL;
411 }
412 
414  in <<= start - 1;
415  in >>= 32 - end + start - 1;
416  return in;
417 }
WritePulseShapeToCool.zeros
zeros
Definition: WritePulseShapeToCool.py:66
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LVL1::eFEXNtupleWriter::loadegAlgoVariables
StatusCode loadegAlgoVariables(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables related to the e-gamma algorithm
Definition: eFEXNtupleWriter.cxx:185
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
eFEXNtupleWriter.h
create ntuples output
LVL1::eFEXNtupleWriter::loadegAlgoTOBs
StatusCode loadegAlgoTOBs(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables in the e-gamma TOB word
Definition: eFEXNtupleWriter.cxx:220
LVL1::eFEXNtupleWriter::getbits
uint32_t getbits(uint32_t in, int start, int end)
extract bits from a 32-bit TOB words
Definition: eFEXNtupleWriter.cxx:413
eFEXOutputCollection.h
create ntuples output
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
LVL1::eFEXNtupleWriter::loadTruthJets
StatusCode loadTruthJets()
save variables related to truth jets
Definition: eFEXNtupleWriter.cxx:291
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TruthParticleContainer.h
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
eFEXtauTOB.h
LVL1::eFEXOutputCollection::geteFexNumber
const std::vector< int > & geteFexNumber() const
get the eFEX numbers of all TOBs
Definition: eFEXOutputCollection.cxx:82
LVL1::eFEXNtupleWriter::loadTruthTau
StatusCode loadTruthTau()
save variables related to truth taus
Definition: eFEXNtupleWriter.cxx:316
LVL1::eFEXNtupleWriter::loadTruthElectron
StatusCode loadTruthElectron()
save variables related to truth electrons
Definition: eFEXNtupleWriter.cxx:263
Phi
@ Phi
Definition: RPCdef.h:8
LVL1::eFEXOutputCollection::getEMtob
const std::vector< uint32_t > & getEMtob() const
get all e-gamma TOB words of an event
Definition: eFEXOutputCollection.cxx:92
LVL1::eFEXNtupleWriter::loadtauAlgoVariables
StatusCode loadtauAlgoVariables(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables related to the tau algorithm
Definition: eFEXNtupleWriter.cxx:136
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
LVL1::eFEXNtupleWriter::~eFEXNtupleWriter
~eFEXNtupleWriter()
Destructor.
Definition: eFEXNtupleWriter.cxx:29
xAOD::EgammaParameters::f3
@ f3
fraction of energy reconstructed in 3rd sampling
Definition: EgammaEnums.h:54
MC::isPhysical
bool isPhysical(const T &p)
Identify if the particle is physical, i.e. is stable or decayed.
Definition: HepMCHelpers.h:51
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
LVL1::eFEXNtupleWriter::visibleTauP4
std::unique_ptr< TLorentzVector > visibleTauP4(const xAOD::TruthParticle *)
calculate the 4-vector of all the visible decay products of the tau
Definition: eFEXNtupleWriter.cxx:343
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:355
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
LVL1::eFEXNtupleWriter::execute
StatusCode execute()
execute the Algorithm
Definition: eFEXNtupleWriter.cxx:107
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::eFEXNtupleWriter::getMother
const xAOD::TruthParticle * getMother(const xAOD::TruthParticle *, int)
find the nearest mother particle in the decay chain with the specified particle id.
Definition: eFEXNtupleWriter.cxx:401
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
LVL1::eFEXOutputCollection::get_eg
std::map< std::string, float > * get_eg(int) const
get all e-gamma related values the ith TOB
Definition: eFEXOutputCollection.cxx:67
LVL1::eFEXNtupleWriter::finalize
StatusCode finalize()
finalize the Algorithm
Definition: eFEXNtupleWriter.cxx:131
xAOD::TruthVertex_v1::incomingParticle
const TruthParticle_v1 * incomingParticle(size_t index) const
Get one of the incoming particles.
Definition: TruthVertex_v1.cxx:69
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
LVL1::eFEXOutputCollection::getdooutput
bool getdooutput() const
return to true if ntuple output is needed
Definition: eFEXOutputCollection.cxx:102
eFEXegTOB.h
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrigConf::name
Definition: HLTChainList.h:35
TruthVertex.h
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
LVL1::eFEXOutputCollection::size
int size() const
get total number of eg TOBs saved
Definition: eFEXOutputCollection.cxx:62
LVL1::eFEXNtupleWriter::invisibleTauP4
std::unique_ptr< TLorentzVector > invisibleTauP4(const xAOD::TruthParticle *)
calculate the 4-vector of all the invisible decay products of the tau
Definition: eFEXNtupleWriter.cxx:373
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MagicNumbers.h
LVL1::eFEXNtupleWriter::eFEXNtupleWriter
eFEXNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
this is a standard algorithm constructor
Definition: eFEXNtupleWriter.cxx:27
LVL1::eFEXNtupleWriter::initialize
StatusCode initialize()
initialize the Algorithm
Definition: eFEXNtupleWriter.cxx:33
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
xAOD::Jet_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Jet_v1.cxx:71
JetContainer.h
BindingsTest.ha
ha
Definition: BindingsTest.py:22
LVL1::eFEXOutputCollection::tau_size
int tau_size() const
get total number of tau TOBs saved
Definition: eFEXOutputCollection.cxx:57
xAOD::TruthVertex_v1::nIncomingParticles
size_t nIncomingParticles() const
Get the number of incoming particles.
Definition: TruthVertex_v1.cxx:47
xAOD::TruthParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TruthParticle_v1.cxx:196
TruthParticle.h
TruthEventContainer.h
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
getbits
CMAword getbits(CMAword x, int msb, int lsb)
Definition: SectorLogic.cxx:27
xAOD::Jet_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: Jet_v1.cxx:44
StoreGateSvc.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:119
Eta
@ Eta
Definition: RPCdef.h:8
HepMCHelpers.h
eFEXtauAlgo.h
LVL1::eFEXOutputCollection::get_tau
std::map< std::string, float > * get_tau(int) const
get all tau related values the ith TOB
Definition: eFEXOutputCollection.cxx:72
ServiceHandle< ITHistSvc >