ATLAS Offline Software
Loading...
Searching...
No Matches
TruthVariables.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONPRDTEST_TRUTHVARIABLES_H
6#define MUONPRDTEST_TRUTHVARIABLES_H
7
10namespace MuonPRDTest {
12 public:
13 TruthVariables(MuonTesterTree& tree, const std::string& container_name, MSG::Level msglvl);
14
15 bool fill(const EventContext& ctx) override final;
16 bool declare_keys() override final;
17
18 private:
21
22 CartesFourVecBranch m_Truth_vertex{parent(), "TruthVertex", CartesFourVecBranch::Type::Pos};
24
25 ScalarBranch<unsigned int>& m_Truth_nParticles{parent().newScalar<unsigned int>("TruthParticle_n")};
28 VectorBranch<int>& m_Truth_particleStatus{parent().newVector<int>("TruthParticle_Status")};
30 VectorBranch<int>& m_Truth_particleProduction_vertex_id{parent().newVector<int>("TruthParticle_Production_vertex_id")};
31 VectorBranch<int>& m_Truth_particleEnd_vertex_id{parent().newVector<int>("TruthParticle_End_vertex_id")};
32 };
33} // namespace MuonPRDTest
34#endif // TRUTHVARIABLES_H
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
VectorBranch< int > & m_Truth_vertexId
VectorBranch< int > & m_Truth_particleStatus
VectorBranch< int > & m_Truth_particleEnd_vertex_id
ScalarBranch< unsigned int > & m_Truth_nVertices
VectorBranch< int > & m_Truth_particleProduction_vertex_id
SG::ReadHandleKey< McEventCollection > m_key
bool declare_keys() override final
VectorBranch< int > & m_Truth_particleBarcode
TruthVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
PtEtaPhiEBranch m_truthParticleP4
CartesFourVecBranch m_Truth_vertex
ScalarBranch< unsigned int > & m_Truth_nParticles
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
VectorBranch< int > & m_Truth_particlePdg_id
Helper class to store the four-momentum in a TTree using the X,Y,Z,T or Px,Py,Pz,E representation.
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
TTree * tree() override final
Returns the underlying TTree object.
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
ScalarBranch< T > & newScalar(const std::string &name)
Helper class to store the four-momentum in a TTree using the Pt, Eta, Phi, E representation.
Property holding a SG store/key/clid from which a ReadHandle is made.