ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonPRDTest
MuonPRDTest
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
8
#include "
GeneratorObjects/McEventCollection.h
"
9
#include "
MuonPRDTest/PrdTesterModule.h
"
10
namespace
MuonPRDTest
{
11
class
TruthVariables
:
public
PrdTesterModule
{
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
:
19
SG::ReadHandleKey<McEventCollection>
m_key
{};
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"
)};
26
PtEtaPhiEBranch
m_truthParticleP4
{
parent
(),
"TruthParticle"
};
27
VectorBranch<int>
&
m_Truth_particlePdg_id
{
parent
().
newVector
<
int
>(
"TruthParticle_Pdg"
)};
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
McEventCollection.h
PrdTesterModule.h
MuonPRDTest::PrdTesterModule::PrdTesterModule
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
Definition
PrdTesterModule.cxx:8
MuonPRDTest::TruthVariables::m_Truth_vertexId
VectorBranch< int > & m_Truth_vertexId
Definition
TruthVariables.h:23
MuonPRDTest::TruthVariables::m_Truth_particleStatus
VectorBranch< int > & m_Truth_particleStatus
Definition
TruthVariables.h:28
MuonPRDTest::TruthVariables::m_Truth_particleEnd_vertex_id
VectorBranch< int > & m_Truth_particleEnd_vertex_id
Definition
TruthVariables.h:31
MuonPRDTest::TruthVariables::m_Truth_nVertices
ScalarBranch< unsigned int > & m_Truth_nVertices
Definition
TruthVariables.h:20
MuonPRDTest::TruthVariables::m_Truth_particleProduction_vertex_id
VectorBranch< int > & m_Truth_particleProduction_vertex_id
Definition
TruthVariables.h:30
MuonPRDTest::TruthVariables::m_key
SG::ReadHandleKey< McEventCollection > m_key
Definition
TruthVariables.h:19
MuonPRDTest::TruthVariables::declare_keys
bool declare_keys() override final
Definition
TruthVariables.cxx:12
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::m_truthParticleP4
PtEtaPhiEBranch m_truthParticleP4
Definition
TruthVariables.h:26
MuonPRDTest::TruthVariables::m_Truth_vertex
CartesFourVecBranch m_Truth_vertex
Definition
TruthVariables.h:22
MuonPRDTest::TruthVariables::m_Truth_nParticles
ScalarBranch< unsigned int > & m_Truth_nParticles
Definition
TruthVariables.h:25
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_Truth_particlePdg_id
VectorBranch< int > & m_Truth_particlePdg_id
Definition
TruthVariables.h:27
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
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition
MuonTesterBranch.cxx:38
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition
MuonTesterBranch.cxx:53
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
MuonVal::MuonTesterTree::newScalar
ScalarBranch< T > & newScalar(const std::string &name)
MuonVal::PtEtaPhiEBranch
Helper class to store the four-momentum in a TTree using the Pt, Eta, Phi, E representation.
Definition
FourVectorBranch.h:15
MuonVal::ScalarBranch
Definition
ScalarBranch.h:12
MuonVal::VectorBranch
Definition
VectorBranch.h:14
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
MuonPRDTest
Definition
MuonHitTesterAlg.h:15
Generated on
for ATLAS Offline Software by
1.17.0