Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 const std::string& altName):
14 m_linkerFunc{std::move(linker)} {}
29 linkColl->push_back(related);
40 const std::string& altPrimName,
41 const std::string& altSecName) {
42 return primColl->addVariable(std::make_unique<LinkerBranch>(*primColl, secondColl, fromPrimToSec, altPrimName)) &&
43 secondColl->addVariable(std::unique_ptr<IParticleDecorationBranch>{
new BilateralLinkerBranch(*secondColl, primColl, fromPrimToSec, altSecName)});
49 const std::string& altName):
54 m_linkerFunc{std::move(linker)} {
75 const std::vector<const xAOD::IParticle*>& linkeMe = linkColl->getCached();
76 for (std::size_t primToSec = 0 ; primToSec < linkeMe.size(); ++primToSec) {
78 if (linkIdx <
size()) {
79 get(linkIdx) = primToSec;
const IParticleFourMomBranch & m_parent
LinkerBranch::Linker_t Linker_t
void push_back(const xAOD::IParticle *p) override
Interface methods to handle the particle.
#define ATH_MSG_VERBOSE(x)
std::function< const xAOD::IParticle *(const xAOD::IParticle *)> Linker_t
Typedef of the linker function.
LinkerBranch(IParticleFourMomBranch &parent, ParticleBranch_ptr linkColl, Linker_t linker, const std::string &altName="")
Standard constructor fo the LinkerBranch.
Class providing the definition of the 4-vector interface.
LinkerBranch::ParticleBranch_ptr ParticleBranch_ptr
std::weak_ptr< IParticleFourMomBranch > m_linkColl
bool fill(const EventContext &ctx) override
The fill method checks if enough information is provided such that the branch is cleared from the inf...
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...
size_t size() const
How many particles have been pushed back already.
static bool connectCollections(ParticleBranch_ptr primColl, ParticleBranch_ptr secondColl, Linker_t fromPrimToSec, const std::string &altPrimName="", const std::string &altSecName="")
void push_back(const T &value)
Adds a new element at the end of the vector.
void operator+=(const xAOD::IParticle *p) override
void operator+=(const xAOD::IParticle *p) override
Class to store array like branches into the n-tuples.
std::string name() const
Name of the tree.
std::weak_ptr< IParticleFourMomBranch > m_linkColl
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
virtual std::string name() const =0
Returns the name of the branch.
std::string name() const override
Name of the four momentum branch.
BilateralLinkerBranch(IParticleFourMomBranch &bilatColl, ParticleBranch_ptr primColl, Linker_t linker, const std::string &altName)
unsigned short & get(size_t idx)
size_t size() const
Returns the number of actual saved elements.
Helper class to easily to add xAOD::IParticles and associated decorator variables to the MuonTesterTr...
TTree * tree()
TTree object.
std::shared_ptr< IParticleFourMomBranch > ParticleBranch_ptr
Abreviation of the pointer to the particle branch.
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 ...
void push_back(const xAOD::IParticle *p) override
Interface methods to handle the particle.