ATLAS Offline Software
xAODTruthReader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef XAODCREATORALGS_XAODTRUTHREADER_H
6 #define XAODCREATORALGS_XAODTRUTHREADER_H
7 
9 
10 #include "xAODTruth/TruthEvent.h"
12 
13 namespace xAODReader {
14 
15 
20  public:
21 
23  xAODTruthReader(const std::string& name, ISvcLocator* svcLoc);
24 
26  virtual StatusCode initialize();
27 
29  virtual StatusCode execute(const EventContext& ctx) const;
30 
31 
32  private:
33 
36  this, "xAODTruthEventContainerKey", "TruthEvents", "The input TruthEventContainer"};
37  // SG::ReadHandleKey<xAOD::TruthPileupEventContainer> m_xaodTruthPUEventContainerKey{
38  // this, "xAODTruthPileupEventContainerKey", "TruthPileupEvents", "The input TruthEventContainer for pileup"};
39  Gaudi::Property<bool> m_doPUEventPrintout{this, "DoPUEventPrintout", false};
40 
42  Gaudi::Property<bool> m_do4momPtEtaPhi{this, "Do4momPtEtaPhi", false};
43 
44 
45  static void printEvent(const xAOD::TruthEventBase* evt, bool do4momPtEtaPhi);
46  static void printVertex(const xAOD::TruthVertex* vtx, bool do4momPtEtaPhi);
47  static void printParticle(const xAOD::TruthParticle* part, bool do4momPtEtaPhi);
48 
49  }; // class xAODTruthReader
50 
51 
52 } // namespace xAODReader
53 
54 #endif // XAODCREATORALGS_XAODTRUTHREADER_H
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAODReader::xAODTruthReader::printVertex
static void printVertex(const xAOD::TruthVertex *vtx, bool do4momPtEtaPhi)
Definition: xAODTruthReader.cxx:119
xAODReader::xAODTruthReader::execute
virtual StatusCode execute(const EventContext &ctx) const
Function executing the algorithm.
Definition: xAODTruthReader.cxx:46
TruthPileupEvent.h
xAODReader::xAODTruthReader::m_xaodTruthEventContainerKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_xaodTruthEventContainerKey
The keys for the input xAOD truth containers.
Definition: xAODTruthReader.h:35
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
xAODReader::xAODTruthReader::m_doPUEventPrintout
Gaudi::Property< bool > m_doPUEventPrintout
Definition: xAODTruthReader.h:39
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
xAODReader::xAODTruthReader::xAODTruthReader
xAODTruthReader(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
Definition: xAODTruthReader.cxx:30
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAODReader::xAODTruthReader
Algorithm demonstrating reading of xAOD truth, and printing to screen.
Definition: xAODTruthReader.h:19
xAODReader::xAODTruthReader::initialize
virtual StatusCode initialize()
Function initialising the algorithm.
Definition: xAODTruthReader.cxx:35
xAODReader::xAODTruthReader::printParticle
static void printParticle(const xAOD::TruthParticle *part, bool do4momPtEtaPhi)
Definition: xAODTruthReader.cxx:218
AthReentrantAlgorithm.h
xAOD::TruthEventBase_v1
Base class describing a pile-up or signal truth event in the MC record.
Definition: TruthEventBase_v1.h:36
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAODReader::xAODTruthReader::printEvent
static void printEvent(const xAOD::TruthEventBase *evt, bool do4momPtEtaPhi)
Definition: xAODTruthReader.cxx:103
xAODReader::xAODTruthReader::m_do4momPtEtaPhi
Gaudi::Property< bool > m_do4momPtEtaPhi
Flag to printout in pt,eta,phi instead of px,py,pz.
Definition: xAODTruthReader.h:42
TruthEvent.h
xAODReader
Definition: BTaggingReader.cxx:21