36 static_cast<const xAOD::CaloCluster*
>(it->rawConstituent())->retrieveMoment(momentType,m) ;
46 return cl->eSample( CaloSampling::HEC0) + cl->eSample( CaloSampling::HEC1) +
47 cl->eSample( CaloSampling::HEC2) + cl->eSample( CaloSampling::HEC3);
60 if (pfo!=
nullptr)
return (!pfo->
isCharged());
95 if (fe !=
nullptr)
return (!fe->
isCharged());
113 timing = accTiming(*fe);
132 timing = cluster->
time();
152 sum_HEC = accHEC0(*fe) + accHEC1(*fe) + accHEC2(*fe) + accHEC3(*fe);
155 for (
size_t n = 0; n < fe->
otherObjects().size(); ++n) {
173 sum_HEC += cluster->
eSample( CaloSampling::HEC0 ) + cluster->
eSample( CaloSampling::HEC1 ) + cluster->
eSample( CaloSampling::HEC2 ) + cluster->
eSample( CaloSampling::HEC3 );
191 if(
jet->numConstituents() == 0 )
return &nullEx;
195 switch(
jet->rawConstituent(0)->type() ) {
225 size_t nConstit =
jet->numConstituents();
226 if( nConstit == 0)
return true;
242 for(; it != itE; ++it)
270 size_t nConstit =
jet->numConstituents();
271 std::vector<double> results;
281 std::vector<JetCaloCalculator*> clonedCalc;
301 for(; it != itE; ++it)
305 if( ! extractor->
valid(it) )
continue;
308 calc->processConstituent(it);
314 results.push_back( calc->jetCalculation() );
Defines enum to access jet attribute and associated particles/objects.
SG::ConstAccessor< T, ALLOC > ConstAccessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
std::vector< JetCaloCalculator * > m_calculators
virtual std::vector< double > process(const xAOD::Jet *jet) const
Perform all tasks correspondings to the associated JetCaloCalculators on Jet jet.
void addCalculator(JetCaloCalculator *c)
Base class to support cpu-efficient calculation on calorimeter jets either at CaloCell or constituent...
virtual double jetCalculation() const
return the result of the calculation
virtual bool setupJet(const xAOD::Jet *)=0
virtual bool processConstituent(xAOD::JetConstituentVector::iterator &)
Perform 1 calculation step using 1 constituent.
virtual std::string name() const
virtual double operator()(const xAOD::Jet *jet, xAOD::JetConstitScale s=xAOD::UncalibratedJetConstituent)
convenience function to perform the full calculation on a given jet
const CaloConstitHelpers::CaloConstitExtractor * m_constitExtractor
xAOD::JetAttribute::AttributeID m_id
flt_t time() const
Access cluster time.
float eSample(const CaloSample sampling) const
MomentType
Enums to identify different moments.
std::vector< const xAOD::IParticle * > otherObjects() const
const xAOD::IParticle * otherObject(std::size_t i) const
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
A vector of jet constituents at the scale used during jet finding.
iterator begin() const
iterator on the first constituent
iterator end() const
iterator after the last constituent
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
bool getClusterMoment(float &theMoment, xAOD::CaloCluster::MomentType momentType) const
Accessor for cluster moments.
bool isCharged() const
is a charged PFO
const CaloConstitExtractor * extractorForJet(const xAOD::Jet *jet)
returns a pointer to a CaloConstitExtractor for a given jet.
xAOD::JetConstituentVector::iterator JetConstitIterator
bool getClusterMoment(const xAOD::FlowElement &fe, xAOD::CaloCluster::MomentType momentType, float &value)
@ ParticleFlow
The object is a particle-flow object.
@ FlowElement
The object is a track-calo-cluster.
@ CaloCluster
The object is a calorimeter cluster.
@ eflowRec_LAYERENERGY_HEC
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
PFO_v1 PFO
Definition of the current "pfo version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
@ UncalibratedJetConstituent