ATLAS Offline Software
Classes | Namespaces
JetConstituentVector.h File Reference

This file defines helper classes to deal with jet constituents. More...

#include "AthLinks/ElementLink.h"
#include "xAODBase/IParticle.h"
#include "xAODBase/IParticleContainer.h"
#include "xAODJet/JetTypes.h"
Include dependency graph for JetConstituentVector.h:

Go to the source code of this file.

Classes

class  xAOD::JetConstituent
 4-vector of jet constituent at the scale used during jet finding. More...
 
class  xAOD::JetConstituentVector
 A vector of jet constituents at the scale used during jet finding. More...
 
class  xAOD::JetConstituentVector::iterator
 

Namespaces

 xAOD
 ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
 

Detailed Description

This file defines helper classes to deal with jet constituents.

Helper classes are necessary because the default 4-vectors of the constituents (ex: clusters) possibly differ from the 4-vector used in the jet finding procedure (ex: when finding jets using the non calibrated "EM" scale of clusters). These classes allow to retrieve the expected scale of the constituents automatically. 2 classes are defined for this. JetConstituentVector : an object behaving like a vector<const IParticle*>. It actually "contains" JetConstituents which are no more than a 4-vector object (JetFourMom_t) plus a few methods allowing it to act as an IParticle* and to return the underlying exact IParticle*

Usage is as simple as : xAOD::JetConstituentVector vec = j->getConstituents(); xAOD::JetConstituentVector::iterator it = vec.begin(); xAOD::JetConstituentVector::iterator itE = vec.end(); for( ; it != itE; it++){ float pt = (it)->pt(); ... etc ... } or JetConstituent firstC = vec[0]; float pt = firstC->pt(); // JetConstituent also behaves like a IParticle

Although it behaves like a vector<const IParticle*> it is not one. To retrieve the constituents as vector<const IParticle*> use JetConstituentVector::asIParticleVector() !!! WARNING !!! when doing so, the particles in the returned vector might be at a wrong scale w.r.t the jet.

To retrieve a std::vector<JetConstituent> with the same content as JetConstituentVector ,

Definition in file JetConstituentVector.h.