ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonTesterTree
MuonTesterTree
IMuonTesterBranch.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTESTER_IMUONTESTERBRANCH_H
5
#define MUONTESTER_IMUONTESTERBRANCH_H
6
7
#include <
StoreGate/ReadHandleKey.h
>
8
#include <
xAODBase/IParticle.h
>
9
10
#include <algorithm>
11
#include <iostream>
12
#include <memory>
13
#include <string>
14
#include <vector>
15
16
class
TTree;
17
18
namespace
MuonVal
{
20
class
IMuonTesterBranch
{
21
public
:
22
virtual
~IMuonTesterBranch
() =
default
;
29
virtual
bool
fill
(
const
EventContext& ctx) = 0;
35
virtual
bool
init
() = 0;
37
virtual
std::string
name
()
const
= 0;
38
39
using
DataDependency
=
SG::VarHandleKey
*;
41
virtual
std::vector<DataDependency>
data_dependencies
() = 0;
42
44
virtual
TTree*
tree
() = 0;
45
virtual
const
TTree*
tree
()
const
= 0;
46
47
};
48
49
// Extension of the interface in case someone wants to store information directly associated
50
// with the particles
51
// Particles are usually saved in vectors
52
class
IAuxElementDecorationBranch
:
virtual
public
IMuonTesterBranch
{
53
public
:
57
virtual
void
push_back
(
const
SG::AuxElement
* ele) = 0;
58
virtual
void
push_back
(
const
SG::AuxElement
& ele) = 0;
59
60
virtual
void
operator+=
(
const
SG::AuxElement
& ele) = 0;
61
virtual
void
operator+=
(
const
SG::AuxElement
* ele) = 0;
62
virtual
~IAuxElementDecorationBranch
() =
default
;
63
};
64
65
class
IParticleDecorationBranch
:
virtual
public
IMuonTesterBranch
{
66
public
:
69
virtual
void
push_back
(
const
xAOD::IParticle
* p) = 0;
70
virtual
void
push_back
(
const
xAOD::IParticle
& p) = 0;
71
virtual
void
operator+=
(
const
xAOD::IParticle
* p) = 0;
72
virtual
void
operator+=
(
const
xAOD::IParticle
& p) = 0;
73
virtual
~IParticleDecorationBranch
() =
default
;
74
};
75
}
76
#endif
IParticle.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
MuonVal::IAuxElementDecorationBranch
Definition
IMuonTesterBranch.h:52
MuonVal::IAuxElementDecorationBranch::~IAuxElementDecorationBranch
virtual ~IAuxElementDecorationBranch()=default
MuonVal::IAuxElementDecorationBranch::push_back
virtual void push_back(const SG::AuxElement *ele)=0
Reads out a generic auxillary element and add its information to the output vector.
MuonVal::IAuxElementDecorationBranch::operator+=
virtual void operator+=(const SG::AuxElement &ele)=0
MuonVal::IAuxElementDecorationBranch::push_back
virtual void push_back(const SG::AuxElement &ele)=0
MuonVal::IAuxElementDecorationBranch::operator+=
virtual void operator+=(const SG::AuxElement *ele)=0
MuonVal::IMuonTesterBranch
Most basic interface class used by the MuonTester tree.
Definition
IMuonTesterBranch.h:20
MuonVal::IMuonTesterBranch::name
virtual std::string name() const =0
Returns the name of the branch.
MuonVal::IMuonTesterBranch::tree
virtual TTree * tree()=0
Returns the pointer to the underlying TTree object.
MuonVal::IMuonTesterBranch::init
virtual bool init()=0
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
MuonVal::IMuonTesterBranch::fill
virtual bool fill(const EventContext &ctx)=0
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonVal::IMuonTesterBranch::DataDependency
SG::VarHandleKey * DataDependency
Definition
IMuonTesterBranch.h:39
MuonVal::IMuonTesterBranch::~IMuonTesterBranch
virtual ~IMuonTesterBranch()=default
MuonVal::IMuonTesterBranch::tree
virtual const TTree * tree() const =0
MuonVal::IMuonTesterBranch::data_dependencies
virtual std::vector< DataDependency > data_dependencies()=0
Returns a vector of all Event data dependencies needed by the Branch to work.
MuonVal::IParticleDecorationBranch
Definition
IMuonTesterBranch.h:65
MuonVal::IParticleDecorationBranch::push_back
virtual void push_back(const xAOD::IParticle &p)=0
MuonVal::IParticleDecorationBranch::push_back
virtual void push_back(const xAOD::IParticle *p)=0
Similar to the IAuxElementDecoration branch but only accepting IParticles.
MuonVal::IParticleDecorationBranch::operator+=
virtual void operator+=(const xAOD::IParticle *p)=0
MuonVal::IParticleDecorationBranch::operator+=
virtual void operator+=(const xAOD::IParticle &p)=0
MuonVal::IParticleDecorationBranch::~IParticleDecorationBranch
virtual ~IParticleDecorationBranch()=default
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition
StoreGate/StoreGate/VarHandleKey.h:59
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition
Event/xAOD/xAODBase/xAODBase/IParticle.h:41
MuonVal
Class to store array like branches into the n-tuples.
Definition
HitValAlg.cxx:19
SG::AuxElement
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.
Generated on
for ATLAS Offline Software by
1.17.0