io
Contents of reconstruction/io
Warning
doxygenfile: Found multiple matches for file “LinkDef.h
-
class RootStreamAODMaker : public Gaugi::Algorithm
- #include <RootStreamAODMaker.h>
Serializes reconstruction objects to a ROOT file (AOD format).
Algorithm to stream AOD content to a ROOT file.
This algorithm gathers various EDM objects (EventInfo, TruthParticles, CaloClusters, CaloRings, Electrons, etc.) from StoreGate and writes them into a TTree. It uses “Converter” helper classes to translate transient xAOD objects into persistent struct-based representations.
Properties:
Input*Key: Keys for objects in StoreGate.
Output*Key: Branch names in the output TTree.
NtupleName: Name of the TTree.
DumpCells: If true, also dumps detailed cell information (heavy).
Serializes high-level reconstructed objects (Clusters, Electrons, Rings) into a ROOT TTree for permanent storage.
Public Functions
-
RootStreamAODMaker(std::string)
Constructor
-
virtual ~RootStreamAODMaker()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode serialize(SG::EventContext &ctx) const
=====================================================================
Performs the serialization.
Retrieves objects (EventInfo, Truth, Seeds, Clusters, Rings, Electrons) from StoreGate.
Converts them to their persistent structs using
xAOD::*Converter.Pushes the structs into the vectors linked to the TTree branches.
Fills the TTree.
Private Members
-
std::string m_ntupleName
-
std::string m_inputCellsKey
-
std::string m_inputEventKey
-
std::string m_inputSeedsKey
-
std::string m_inputClusterKey
-
std::string m_inputRingerKey
-
std::string m_inputTruthKey
-
std::string m_inputElectronKey
-
std::string m_outputCellsKey
-
std::string m_outputEventKey
-
std::string m_outputSeedsKey
-
std::string m_outputClusterKey
-
std::string m_outputRingerKey
-
std::string m_outputTruthKey
-
std::string m_outputElectronKey
-
bool m_dumpCells
-
int m_outputLevel
-
class RootStreamAODReader : public Gaugi::Algorithm
- #include <RootStreamAODReader.h>
Reads AOD data from a ROOT file and reconstructs xAOD objects.
Algorithm to read AOD (Analysis Object Data) from a ROOT file.
This algorithm is the inverse of
RootStreamAODMaker. It opens a ROOT file, reads the persistent structs from the TTree, and converts them back into transientxAODobjects (EventInfo, CaloClusters, Electrons, etc.), which are then recorded into StoreGate for downstream algorithms.Properties:
InputFile: Path to the ROOT file.
Output*Key: Keys to record objects in StoreGate.
Restores reconstructed objects (Clusters, Rings, Electrons, etc) from disk to the memory (Event Store).
Public Functions
-
RootStreamAODReader(std::string)
Constructor
-
virtual ~RootStreamAODReader()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int evt) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode deserialize(int evt, SG::EventContext &ctx) const
=====================================================================
Performs the deserialization.
-
class RootStreamESDMaker : public Gaugi::Algorithm
- #include <RootStreamESDMaker.h>
Serializes reconstruction objects to a ROOT file (ESD format).
Algorithm to stream ESD Data to a ROOT file.
Similar to
RootStreamAODMaker, but focuses on Event Summary Data (ESD), which typically includes calorimeter cells. It supports filtering cells within a Region of Interest (RoI) around truth particles to reduce file size.Properties:
Eta/PhiWindow: Size of the RoI to save cells around truth particles.
ESD contains detailed information including all Calorimeter Cells, which makes it larger than AOD but necessary for full reconstruction study. This algo serializes the Event Context into a TTree.
Public Functions
-
RootStreamESDMaker(std::string)
Constructor
-
virtual ~RootStreamESDMaker()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode serialize(SG::EventContext &ctx) const
Serializes the ESD content.
Saves EventInfo, Seeds, TruthParticles, and CaloCells. CaloCells are filtered: only cells within
EtaWindowxPhiWindowof any TruthParticle are saved. It also saves theCaloDetDescriptorfor each saved cell to allow full reconstruction geometry restoration.
Private Members
-
std::string m_ntupleName
-
std::string m_inputCellsKey
-
std::string m_inputEventKey
-
std::string m_inputTruthKey
-
std::string m_inputSeedsKey
-
std::string m_outputCellsKey
-
std::string m_outputEventKey
-
std::string m_outputTruthKey
-
std::string m_outputSeedsKey
-
float m_etaWindow
-
float m_phiWindow
-
int m_outputLevel
-
class RootStreamESDReader : public Gaugi::Algorithm
- #include <RootStreamESDReader.h>
Reads ESD data from a ROOT file.
Algorithm to read ESD (Event Summary Data) from a ROOT file.
Reconstructs
xAOD::CaloCellobjects (and their descriptors) from the persistent data. It handles the restoration of cell-descriptor links.Reads detailed cell-level data and reconstructed objects from disk. Typically used to replay events for re-reconstruction or detailed debugging.
Public Functions
-
RootStreamESDReader(std::string)
Constructor
-
virtual ~RootStreamESDReader()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int evt) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode deserialize(int evt, SG::EventContext &ctx) const
=====================================================================
Deserializes ESD content.
Reads Descriptors (Aux container) and builds a map.
Reads Cells and links them to the corresponding Descriptors.
Restores EventInfo, Truth, and Seeds.
-
RootStreamESDReader(std::string)
-
class RootStreamHITMaker : public Gaugi::Algorithm
- #include <RootStreamHITMaker.h>
Serializes simulation Hits to a ROOT file.
Algorithm to stream Geant4 Hits to a ROOT file.
Saves
xAOD::CaloHitobjects. Useful for persisting the output of the Geant4 simulation step before full digitization.Properties:
OnlyRoI: If true, only saves hits near TruthParticles.
KeepCells: List of specific cell hashes that must always be saved (e.g. for debugging defects).
Validates and writes energy deposits (Hits), truth particles, and seeds to a persistent file. This output serves as input for the Digitization step.
Public Functions
-
RootStreamHITMaker(std::string)
Constructor
-
virtual ~RootStreamHITMaker()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode serialize(SG::EventContext &ctx) const
=====================================================================
Serializes Hits.
Iterates through the CaloHit container. If
OnlyRoIis enabled, checks if each hit is withinEtaWindowxPhiWindowof a TruthParticle OR if its hash is in theKeepCellslist. Matched hits are converted and saved.
Private Members
-
std::string m_ntupleName
-
std::string m_inputHitsKey
-
std::string m_inputEventKey
-
std::string m_inputTruthKey
-
std::string m_inputSeedsKey
-
std::string m_outputHitsKey
-
std::string m_outputEventKey
-
std::string m_outputTruthKey
-
std::string m_outputSeedsKey
-
float m_etaWindow
-
float m_phiWindow
-
bool m_onlyRoI
-
std::vector<int> m_cellHashes
-
int m_outputLevel
-
class RootStreamHITReader : public Gaugi::Algorithm
- #include <RootStreamHITReader.h>
Reads Hit data from a ROOT file.
Algorithm to read Hit-level data from a ROOT file.
Reconstructs
xAOD::CaloHit,xAOD::EventInfo,xAOD::TruthParticle, andxAOD::Seedobjects from the persistent data and records them in StoreGate.deserializes Hits, TruthParticles, and Seeds from a persistent ROOT format back into the transient Event Store (StoreGate) for further processing (e.g., Digitization).
Public Functions
-
RootStreamHITReader(std::string)
Constructor
-
virtual ~RootStreamHITReader()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int evt) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode finalize() override
=====================================================================
Private Functions
-
StatusCode deserialize(int evt, SG::EventContext &ctx) const
=====================================================================
Deserializes Hits and other objects.
Restores the full EventInfo, Seed, TruthParticle, and CaloHit containers from the TTree entry.
-
RootStreamHITReader(std::string)
-
class RootStreamNtupleMaker : public Gaugi::Algorithm
- #include <RootStreamNtupleMaker.h>
This class is responsible for creating an ntuple from ROOT files.
Algorithm to dump analysis-level variables into a flat Ntuple (TTree).
Dumps flat Ntuples for analysis (ML training, performance studies).
The RootStreamNtupleMaker class reads data from ROOT files and creates an ntuple with the specified branches. It initializes the necessary variables, books the histograms, and fills the ntuple with the data from the ROOT file. It also provides functions for initializing, finalizing, and executing the ntuple creation process.
Unlike the AOD/ESD makers which serialize EDM objects, this algorithm flatterns the data into simple floating-point branches (e.g.
cl_et,cl_eta,cl_rings, etc.). This is the standard format used for training neural networks (e.g. Ringer) or plotting variables in ROOT.Properties:
Input*Key: Keys to retrieve objects to dump.
OutputNtupleName: Name of the output TTree.
Reads reconstructed objects (Clusters, Rings, Electrons) and truth info and writes them into a simple TTree structure suitable for physics analysis (e.g., in Python/Pandas or ROOT).
Public Functions
-
RootStreamNtupleMaker(std::string)
Constructor
-
virtual ~RootStreamNtupleMaker()
=====================================================================
-
virtual StatusCode initialize() override
=====================================================================
-
virtual StatusCode bookHistograms(SG::EventContext &ctx) const override
=====================================================================
Books the analysis TTree.
Defines all branches: event info, cluster variables, shower shapes, rings, electron MC truth, etc.
-
virtual StatusCode pre_execute(SG::EventContext &ctx) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, const G4Step *step) const override
=====================================================================
-
virtual StatusCode execute(SG::EventContext &ctx, int evt) const override
=====================================================================
-
virtual StatusCode post_execute(SG::EventContext &ctx) const override
=================================== ==================================
-
virtual StatusCode fillHistograms(SG::EventContext &ctx) const override
=====================================================================
Fills the TTree.
For each electron in the container, it retrieves the associated cluster, rings, and truth particle. It flattens their properties into the linked variables and calls
tree->Fill(). Thus, one entry in the tree corresponds to one Electron candidate.
-
virtual StatusCode finalize() override
=====================================================================
Private Functions