ATLAS Offline Software
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 
10 namespace 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:
20  ScalarBranch<unsigned int>& m_Truth_nVertices{parent().newScalar<unsigned int>("TruthVertex_n")};
21 
22  CartesFourVecBranch m_Truth_vertex{parent(), "TruthVertex", CartesFourVecBranch::Type::Pos};
23  VectorBranch<int>& m_Truth_vertexId{parent().newVector<int>("TruthVertex_Id")};
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")};
29  VectorBranch<int>& m_Truth_particleBarcode{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
MuonPRDTest::TruthVariables::m_Truth_particleBarcode
VectorBranch< int > & m_Truth_particleBarcode
Definition: TruthVariables.h:29
MuonPRDTest::TruthVariables::TruthVariables
TruthVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
Definition: TruthVariables.cxx:10
MuonPRDTest::TruthVariables::fill
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...
Definition: TruthVariables.cxx:14
MuonPRDTest::TruthVariables::m_truthParticleP4
PtEtaPhiEBranch m_truthParticleP4
Definition: TruthVariables.h:26
MuonVal::VectorBranch< int >
SG::ReadHandleKey< McEventCollection >
MuonPRDTest::TruthVariables::m_Truth_vertexId
VectorBranch< int > & m_Truth_vertexId
Definition: TruthVariables.h:23
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
McEventCollection.h
MuonPRDTest::TruthVariables
Definition: TruthVariables.h:11
MuonPRDTest::PrdTesterModule
Definition: PrdTesterModule.h:15
MuonPRDTest::TruthVariables::declare_keys
bool declare_keys() override final
Definition: TruthVariables.cxx:12
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
MuonPRDTest::TruthVariables::m_Truth_particleEnd_vertex_id
VectorBranch< int > & m_Truth_particleEnd_vertex_id
Definition: TruthVariables.h:31
MuonPRDTest::TruthVariables::m_Truth_nParticles
ScalarBranch< unsigned int > & m_Truth_nParticles
Definition: TruthVariables.h:25
PrdTesterModule.h
MuonVal::ScalarBranch< unsigned int >
MuonPRDTest::TruthVariables::m_Truth_particleProduction_vertex_id
VectorBranch< int > & m_Truth_particleProduction_vertex_id
Definition: TruthVariables.h:30
MuonVal::MuonTesterTree::newScalar
ScalarBranch< T > & newScalar(const std::string &name)
MuonPRDTest::TruthVariables::m_Truth_nVertices
ScalarBranch< unsigned int > & m_Truth_nVertices
Definition: TruthVariables.h:20
MuonPRDTest::TruthVariables::m_key
SG::ReadHandleKey< McEventCollection > m_key
Definition: TruthVariables.h:19
MuonPRDTest::TruthVariables::m_Truth_particleStatus
VectorBranch< int > & m_Truth_particleStatus
Definition: TruthVariables.h:28
MuonPRDTest::TruthVariables::m_Truth_vertex
CartesFourVecBranch m_Truth_vertex
Definition: TruthVariables.h:22
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition: MuonTesterBranch.cxx:38
MuonVal::PtEtaPhiEBranch
Helper class to store the four-momentum in a TTree using the Pt, Eta, Phi, E representation.
Definition: FourVectorBranch.h:15
MuonVal::CartesFourVecBranch
Helper class to store the four-momentum in a TTree using the X,Y,Z,T or Px,Py,Pz,E representation.
Definition: FourVectorBranch.h:45
MuonPRDTest
Definition: CSCDigitVariables.h:10
MuonPRDTest::TruthVariables::m_Truth_particlePdg_id
VectorBranch< int > & m_Truth_particlePdg_id
Definition: TruthVariables.h:27