Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MuonVal::IParticleFourMomBranch Class Reference

Helper class to easily to add xAOD::IParticles and associated decorator variables to the MuonTesterTree. More...

#include <IParticleFourMomBranch.h>

Inheritance diagram for MuonVal::IParticleFourMomBranch:
Collaboration diagram for MuonVal::IParticleFourMomBranch:

Public Types

using DataDependency = SG::VarHandleKey *
 

Public Member Functions

 IParticleFourMomBranch (MuonTesterTree &tree, const std::string &particle)
 Construct an IParticleFourMomBranch. More...
 
bool fill (const EventContext &ctx) override
 Fill the branch. More...
 
bool init () override
 Initialize the branches and all children. More...
 
std::string name () const override
 Name of the four momentum branch. More...
 
const TTree * tree () const override
 Return the underyling TTree pointer. More...
 
TTree * tree () override
 Returns the pointer to the underlying TTree object. More...
 
MuonTesterTreegetTree ()
 Access to the MuonTrestTree parent. More...
 
bool initialized () const
 Has the init method been called. More...
 
std::vector< DataDependencydata_dependencies () override
 Returns a list of all Read(Coond)HandleKeys needed by the branch. More...
 
size_t size () const
 How many particles have been pushed back already. More...
 
void push_back (const xAOD::IParticle *p) override
 Similar to the IAuxElementDecoration branch but only accepting IParticles. More...
 
void push_back (const xAOD::IParticle &p) override
 
void operator+= (const xAOD::IParticle *p) override
 
void operator+= (const xAOD::IParticle &p) override
 
size_t find (const xAOD::IParticle &p) const
 Returns the position at which the particle has already be inserted in the chain – If the particle is not present then the size is returned – In cases of nullptr -1 is returned. More...
 
size_t find (const xAOD::IParticle *p) const
 
size_t find (std::function< bool(const xAOD::IParticle *)> func) const
 Find the first particle satisfying the selection criteria given by the client. More...
 
const std::vector< const xAOD::IParticle * > & getCached () const
 Returns the list of currently cached particles. More...
 
template<typename T >
bool addVariable (const std::string &variable, const std::string &accName="")
 Writes a variable of type <T> which can be directly accessed via an SG::AuxElement e.g. More...
 
template<typename T >
bool addVariable (T defaultValue, const std::string &variable, const std::string &accName="")
 Write a variable of type <T> to the TTree. More...
 
template<typename T >
bool addVariableGeV (const std::string &variable, const std::string &accName="")
 Write a variable of type <T> to the TTree, but divide it by 1k before dumping. More...
 
template<typename T >
bool addVariableGeV (T defaultValue, const std::string &variable, const std::string &accName="")
 Write a variable of type <T> to the TTree, but divide it by 1k before dumping. More...
 
template<typename T >
std::shared_ptr< ParticleVariableBranch< T > > getBranch (const std::string &var) const
 Returns the point to the underlying ParticleVariableBranch translating the IParticle Accessors into TTree branches. More...
 
bool addVariable (std::shared_ptr< IParticleDecorationBranch > branch)
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

MuonTesterTreem_parent
 
std::string m_name {}
 
bool m_init {false}
 
bool m_updated {false}
 
VectorBranch< float > m_pt {m_parent.tree(), m_name +"_pt"}
 
VectorBranch< float > m_eta {m_parent.tree(), m_name + "_eta"}
 
VectorBranch< float > m_phi {m_parent.tree(), m_name + "_phi"}
 
VectorBranch< float > m_e {m_parent.tree(), m_name + "_e"}
 
VectorBranch< int > m_q {m_parent.tree(), m_name+"_q"}
 
std::vector< std::shared_ptr< IParticleDecorationBranch > > m_variables {}
 
std::vector< const xAOD::IParticle * > m_cached_particles {}
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Detailed Description

Helper class to easily to add xAOD::IParticles and associated decorator variables to the MuonTesterTree.

The branch saves, the particle 4-momentum (E,Pt, Eta, Phi). Energy and Pt are saved in units of GeV. Extra information decorated to the particle can also easily appended to the tree output.

Potential setup:
auto part_br = std::make_shared<IParticleFourMomBranch>(m_testerTree, "TheCakeIsALie"); /// Adds a branch ptcone30 and fetches the infromation from ptcone30 part_br->addVariable<float>("ptcone30"); /// Adds a branch caloIso and fetches the information from etcone20 part_br->addVariable<float>("caloIso", "etcone20");

m_testerTree.addBranch(part_br); Then fill the branches: for (const xAOD::IParticle* part : *container) { part_br->push_back(part); }

Definition at line 31 of file IParticleFourMomBranch.h.

Member Typedef Documentation

◆ DataDependency

Definition at line 39 of file IMuonTesterBranch.h.

Constructor & Destructor Documentation

◆ IParticleFourMomBranch()

MuonVal::IParticleFourMomBranch::IParticleFourMomBranch ( MuonTesterTree tree,
const std::string &  particle 
)

Construct an IParticleFourMomBranch.

Parameters
treeInstance of the parental MuonTesterTree to which the IParticleFourMom branch is added
particleName of the IParticleFourMomBranch inside the TTree

Definition at line 16 of file IParticleFourMomBranch.cxx.

17  :
18  AthMessaging{"IParticle "+particle},
19  m_parent{tree},
20  m_name{particle}{}

Member Function Documentation

◆ addVariable() [1/3]

template<typename T >
bool MuonVal::IParticleFourMomBranch::addVariable ( const std::string &  variable,
const std::string &  accName = "" 
)

Writes a variable of type <T> which can be directly accessed via an SG::AuxElement e.g.

SG::AuxElement::Accessor<float> acc_ptCone30{"pt_cone30"}; const float ptCone30 = acc_ptCone30(*partPtr); to the TTree. If the variable is not available the filling of the TTree fails

Parameters
variableName of the branch in the output tree
accNameName of the accessor to obtain the information. If left empty, it's assumed that the accesor is the same as the variable name

◆ addVariable() [2/3]

bool MuonVal::IParticleFourMomBranch::addVariable ( std::shared_ptr< IParticleDecorationBranch branch)

Definition at line 136 of file IParticleFourMomBranch.cxx.

136  {
137  if (initialized()) {
138  ATH_MSG_ERROR("The branch is already initialized. Cannot add more branches");
139  return false;
140  } else if (!branch) {
141  ATH_MSG_ERROR("Nullptr is given.");
142  return false;
143  }
144 
145  auto itr = std::find_if(m_variables.begin(), m_variables.end(),
146  [&branch](const std::shared_ptr<IParticleDecorationBranch>& known) {
147  return known == branch || known->name() == branch->name();
148  });
149  if (itr != m_variables.end()) {
150  if (typeid((*itr).get()) != typeid(branch.get())) {
151  ATH_MSG_ERROR("Different branches have been added here under "<<branch->name()<<".");
152  return false;
153  }
154  return true;
155  }
156  m_variables.push_back(branch);
158  }

◆ addVariable() [3/3]

template<typename T >
bool MuonVal::IParticleFourMomBranch::addVariable ( defaultValue,
const std::string &  variable,
const std::string &  accName = "" 
)

Write a variable of type <T> to the TTree.

If the information is not decorated to the particle a default value is used

Parameters
defValueDefault value to use as a backup option
variableName of the branch in the output tree
accNameName of the accessor to obtain the information. If left empty, it's assumed that the accesor is the same as the variable name

◆ addVariableGeV() [1/2]

template<typename T >
bool MuonVal::IParticleFourMomBranch::addVariableGeV ( const std::string &  variable,
const std::string &  accName = "" 
)

Write a variable of type <T> to the TTree, but divide it by 1k before dumping.

Useful for the conversion from MeV to GeV

Parameters
variableName of the branch in the output tree | *
accNameName of the accessor to obtain the information. If left empty, it's assumed that the accesor is the same as the variable name

◆ addVariableGeV() [2/2]

template<typename T >
bool MuonVal::IParticleFourMomBranch::addVariableGeV ( defaultValue,
const std::string &  variable,
const std::string &  accName = "" 
)

Write a variable of type <T> to the TTree, but divide it by 1k before dumping.

Useful for the conversion from MeV to GeV

Parameters
defValueDefault value to use as a backup option
variableName of the branch in the output tree
accNameName of the accessor to obtain the information. If left empty, it's assumed that the accesor is the same as the variable name

◆ data_dependencies()

std::vector< IParticleFourMomBranch::DataDependency > MuonVal::IParticleFourMomBranch::data_dependencies ( )
overridevirtual

Returns a list of all Read(Coond)HandleKeys needed by the branch.

Implements MuonVal::IMuonTesterBranch.

Definition at line 159 of file IParticleFourMomBranch.cxx.

159  {
160  std::vector<DataDependency> to_ret{};
161  for (const std::shared_ptr<IParticleDecorationBranch>& br : m_variables) {
162  std::vector<DataDependency> childDep{br->data_dependencies()};
163  to_ret.insert(to_ret.end(),childDep.begin(), childDep.end());
164  }
165  return to_ret;
166  }

◆ fill()

bool MuonVal::IParticleFourMomBranch::fill ( const EventContext &  ctx)
overridevirtual

Fill the branch.

Implements MuonVal::IMuonTesterBranch.

Definition at line 92 of file IParticleFourMomBranch.cxx.

92  {
93  if (!m_updated) {
94  m_cached_particles.clear();
95  }
96  if (!m_pt.fill(ctx) || !m_eta.fill(ctx) || !m_phi.fill(ctx) || !m_e.fill(ctx) || !m_q.fill(ctx)){
97  return false;
98  }
99  for (const auto& var : m_variables) {
100  if (!var->fill(ctx)) {
101  return false;
102  }
103  }
104  m_init = true;
105  m_updated = false;
106  return true;
107  }

◆ find() [1/3]

size_t MuonVal::IParticleFourMomBranch::find ( const xAOD::IParticle p) const

Returns the position at which the particle has already be inserted in the chain – If the particle is not present then the size is returned – In cases of nullptr -1 is returned.

Definition at line 68 of file IParticleFourMomBranch.cxx.

68  {
69  return find(&p);
70  }

◆ find() [2/3]

size_t MuonVal::IParticleFourMomBranch::find ( const xAOD::IParticle p) const

Definition at line 71 of file IParticleFourMomBranch.cxx.

71  {
72  if (!p) {
73  return dummyIdx;
74  }
75  return find([p](const xAOD::IParticle* cached) {
76  return p == cached;
77  });
78  }

◆ find() [3/3]

size_t MuonVal::IParticleFourMomBranch::find ( std::function< bool(const xAOD::IParticle *)>  func) const

Find the first particle satisfying the selection criteria given by the client.

If none of the particle is actually matching the current size of the branch is returned

Definition at line 79 of file IParticleFourMomBranch.cxx.

79  {
80  if (!m_updated) {
81  return dummyIdx;
82  }
83  size_t j{0};
84  for (const xAOD::IParticle* p : m_cached_particles) {
85  if (func(p)) {
86  return j;
87  }
88  ++j;
89  }
90  return dummyIdx;
91  }

◆ getBranch()

template<typename T >
std::shared_ptr<ParticleVariableBranch<T> > MuonVal::IParticleFourMomBranch::getBranch ( const std::string &  var) const

Returns the point to the underlying ParticleVariableBranch translating the IParticle Accessors into TTree branches.

Parameters
variableName of the branch as parsed in addVariable(GeV)

◆ getCached()

const std::vector< const xAOD::IParticle * > & MuonVal::IParticleFourMomBranch::getCached ( ) const

Returns the list of currently cached particles.

Definition at line 25 of file IParticleFourMomBranch.cxx.

25  {
26  return m_cached_particles;
27  }

◆ getTree()

MuonTesterTree & MuonVal::IParticleFourMomBranch::getTree ( )

Access to the MuonTrestTree parent.

Definition at line 22 of file IParticleFourMomBranch.cxx.

22  {
23  return m_parent;
24  }

◆ init()

bool MuonVal::IParticleFourMomBranch::init ( )
overridevirtual

Initialize the branches and all children.

Implements MuonVal::IMuonTesterBranch.

Definition at line 111 of file IParticleFourMomBranch.cxx.

111  {
112  if (initialized()) {
113  return true;
114  }
115 
116  if (!m_pt.init() || !m_eta.init() || !m_phi.init() || !m_e.init() || !m_q.init()) {
117  return false;
118  }
119  std::vector<IMuonTesterBranch*> branchesToInit{};
120  for (auto& v : m_variables) {
121  branchesToInit.push_back(v.get());
122  }
123  std::sort(branchesToInit.begin(), branchesToInit.end(),
124  [](IMuonTesterBranch* a, IMuonTesterBranch* b) {
125  return a->name() < b->name();
126  });
127  for (auto& br : branchesToInit) {
128  if (!br->init()) {
129  ATH_MSG_ERROR("Failed to initialize "<<br->name());
130  return false;
131  }
132  }
133  return true;
134  }

◆ initialized()

bool MuonVal::IParticleFourMomBranch::initialized ( ) const

Has the init method been called.

Definition at line 108 of file IParticleFourMomBranch.cxx.

108  {
109  return m_init;
110  }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ name()

std::string MuonVal::IParticleFourMomBranch::name ( ) const
overridevirtual

Name of the four momentum branch.

Implements MuonVal::IMuonTesterBranch.

Definition at line 30 of file IParticleFourMomBranch.cxx.

30 { return m_name; }

◆ operator+=() [1/2]

void MuonVal::IParticleFourMomBranch::operator+= ( const xAOD::IParticle p)
overridevirtual

Implements MuonVal::IParticleDecorationBranch.

Definition at line 34 of file IParticleFourMomBranch.cxx.

34 {push_back(p); }

◆ operator+=() [2/2]

void MuonVal::IParticleFourMomBranch::operator+= ( const xAOD::IParticle p)
overridevirtual

Implements MuonVal::IParticleDecorationBranch.

Definition at line 33 of file IParticleFourMomBranch.cxx.

33 {push_back(p); }

◆ push_back() [1/2]

void MuonVal::IParticleFourMomBranch::push_back ( const xAOD::IParticle p)
overridevirtual

Implements MuonVal::IParticleDecorationBranch.

Definition at line 35 of file IParticleFourMomBranch.cxx.

35 { push_back(&p); }

◆ push_back() [2/2]

void MuonVal::IParticleFourMomBranch::push_back ( const xAOD::IParticle p)
overridevirtual

Similar to the IAuxElementDecoration branch but only accepting IParticles.

Avoid that the particle is added twice to the tree

Implements MuonVal::IParticleDecorationBranch.

Definition at line 36 of file IParticleFourMomBranch.cxx.

36  {
37  if (!m_updated) {
38  m_cached_particles.clear();
39  m_updated = true;
40  }
42  if (!p || find(p) < size()){
43  if (p) ATH_MSG_VERBOSE("Rejected particle ("<<p<<") "<<p->pt()<<", "<<p->eta()<<", "<<p->phi()<<". Size: "<<size());
44  return;
45  }
46 
47  m_cached_particles.push_back(p);
48  m_pt.push_back(p->pt() * MeVtoGeV);
49  m_eta.push_back(p->eta());
50  m_phi.push_back(p->phi());
51  m_e.push_back(p->e() * MeVtoGeV);
52  int q{0};
53  if (acc_charge.isAvailable(*p)) {
54  q = acc_charge(*p);
55  } else if (p->type() == xAOD::Type::ObjectType::TrackParticle){
56  q = static_cast<const xAOD::TrackParticle*>(p)->charge();
57  } else if (p->type() == xAOD::Type::ObjectType::TruthParticle) {
58  q = static_cast<const xAOD::TruthParticle*>(p)->charge();
59  }
60  ATH_MSG_VERBOSE("New particle ("<<p<<") "<<p->pt()<<", "<<p->eta()<<", "<<p->phi()<<", q: "<<q<<". Size: "<<size());
61 
62  m_q.push_back(q);
63  for (const auto& var : m_variables) {
64  var->push_back(p);
65  }
66  }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ size()

size_t MuonVal::IParticleFourMomBranch::size ( ) const

How many particles have been pushed back already.

Definition at line 29 of file IParticleFourMomBranch.cxx.

29 { return m_updated ? m_cached_particles.size() : 0; }

◆ tree() [1/2]

const TTree * MuonVal::IParticleFourMomBranch::tree ( ) const
overridevirtual

Return the underyling TTree pointer.

Implements MuonVal::IMuonTesterBranch.

Definition at line 31 of file IParticleFourMomBranch.cxx.

31 { return m_pt.tree(); }

◆ tree() [2/2]

TTree * MuonVal::IParticleFourMomBranch::tree ( )
overridevirtual

Returns the pointer to the underlying TTree object.

Implements MuonVal::IMuonTesterBranch.

Definition at line 32 of file IParticleFourMomBranch.cxx.

32 { return m_pt.tree(); }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_cached_particles

std::vector<const xAOD::IParticle*> MuonVal::IParticleFourMomBranch::m_cached_particles {}
private

Definition at line 137 of file IParticleFourMomBranch.h.

◆ m_e

VectorBranch<float> MuonVal::IParticleFourMomBranch::m_e {m_parent.tree(), m_name + "_e"}
private

Definition at line 133 of file IParticleFourMomBranch.h.

◆ m_eta

VectorBranch<float> MuonVal::IParticleFourMomBranch::m_eta {m_parent.tree(), m_name + "_eta"}
private

Definition at line 131 of file IParticleFourMomBranch.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_init

bool MuonVal::IParticleFourMomBranch::m_init {false}
private

Definition at line 128 of file IParticleFourMomBranch.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_name

std::string MuonVal::IParticleFourMomBranch::m_name {}
private

Definition at line 127 of file IParticleFourMomBranch.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_parent

MuonTesterTree& MuonVal::IParticleFourMomBranch::m_parent
private

Definition at line 126 of file IParticleFourMomBranch.h.

◆ m_phi

VectorBranch<float> MuonVal::IParticleFourMomBranch::m_phi {m_parent.tree(), m_name + "_phi"}
private

Definition at line 132 of file IParticleFourMomBranch.h.

◆ m_pt

VectorBranch<float> MuonVal::IParticleFourMomBranch::m_pt {m_parent.tree(), m_name +"_pt"}
private

Definition at line 130 of file IParticleFourMomBranch.h.

◆ m_q

VectorBranch<int> MuonVal::IParticleFourMomBranch::m_q {m_parent.tree(), m_name+"_q"}
private

Definition at line 134 of file IParticleFourMomBranch.h.

◆ m_updated

bool MuonVal::IParticleFourMomBranch::m_updated {false}
private

Definition at line 129 of file IParticleFourMomBranch.h.

◆ m_variables

std::vector<std::shared_ptr<IParticleDecorationBranch> > MuonVal::IParticleFourMomBranch::m_variables {}
private

Definition at line 136 of file IParticleFourMomBranch.h.


The documentation for this class was generated from the following files:
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
MuonVal::IParticleFourMomBranch::tree
const TTree * tree() const override
Return the underyling TTree pointer.
Definition: IParticleFourMomBranch.cxx:31
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
CP::MeVtoGeV
constexpr float MeVtoGeV
Definition: IsolationCloseByCorrectionTool.cxx:38
MuonVal::MuonTesterTree::registerBranch
bool registerBranch(std::shared_ptr< IMuonTesterBranch > branch)
This method adds the branch to the tree and hands over the ownership to the MuonAnalysisTree instance...
Definition: MuonTesterTree.cxx:28
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
MuonVal::IParticleFourMomBranch::m_e
VectorBranch< float > m_e
Definition: IParticleFourMomBranch.h:133
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
MuonVal::IParticleFourMomBranch::m_updated
bool m_updated
Definition: IParticleFourMomBranch.h:129
MuonVal::IParticleFourMomBranch::m_cached_particles
std::vector< const xAOD::IParticle * > m_cached_particles
Definition: IParticleFourMomBranch.h:137
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonVal::IParticleFourMomBranch::m_init
bool m_init
Definition: IParticleFourMomBranch.h:128
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
MuonVal::IParticleFourMomBranch::initialized
bool initialized() const
Has the init method been called.
Definition: IParticleFourMomBranch.cxx:108
MuonVal::VectorBranch::fill
bool fill(const EventContext &ctx) override
Clears vector in cases that it has not been updated in this event Retursn falls if the vector has not...
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
MuonVal::IParticleFourMomBranch::m_phi
VectorBranch< float > m_phi
Definition: IParticleFourMomBranch.h:132
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MuonVal::IParticleFourMomBranch::size
size_t size() const
How many particles have been pushed back already.
Definition: IParticleFourMomBranch.cxx:29
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
MuonVal::VectorBranch::push_back
void push_back(const T &value)
Adds a new element at the end of the vector.
MuonVal::IParticleFourMomBranch::push_back
void push_back(const xAOD::IParticle *p) override
Similar to the IAuxElementDecoration branch but only accepting IParticles.
Definition: IParticleFourMomBranch.cxx:36
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
charge
double charge(const T &p)
Definition: AtlasPID.h:931
python.decorators.cached.cached
def cached(func)
Decorator to cache function return value.
Definition: cached.py:6
MuonVal::IParticleFourMomBranch::m_eta
VectorBranch< float > m_eta
Definition: IParticleFourMomBranch.h:131
python.PyAthena.v
v
Definition: PyAthena.py:154
RTTAlgmain.branch
branch
Definition: RTTAlgmain.py:61
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonVal::IParticleFourMomBranch::m_pt
VectorBranch< float > m_pt
Definition: IParticleFourMomBranch.h:130
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
known
Definition: TrigBStoxAODTool.cxx:107
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
MuonVal::VectorBranch::init
bool init() override
Initialized the Branch.
MuonVal::IParticleFourMomBranch::m_variables
std::vector< std::shared_ptr< IParticleDecorationBranch > > m_variables
Definition: IParticleFourMomBranch.h:136
extractSporadic.q
list q
Definition: extractSporadic.py:98
MuonVal::IParticleFourMomBranch::m_q
VectorBranch< int > m_q
Definition: IParticleFourMomBranch.h:134
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
MuonVal::IParticleFourMomBranch::m_parent
MuonTesterTree & m_parent
Definition: IParticleFourMomBranch.h:126
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
MuonVal::IParticleFourMomBranch::m_name
std::string m_name
Definition: IParticleFourMomBranch.h:127
MuonVal::IParticleFourMomBranch::find
size_t find(const xAOD::IParticle &p) const
Returns the position at which the particle has already be inserted in the chain – If the particle is ...
Definition: IParticleFourMomBranch.cxx:68
PlotCalibFromCool.br
br
Definition: PlotCalibFromCool.py:355