ATLAS Offline Software
Loading...
Searching...
No Matches
jet::JetCalcCentroid Class Referenceabstract

#include <JetCaloQualityUtils.h>

Inheritance diagram for jet::JetCalcCentroid:
Collaboration diagram for jet::JetCalcCentroid:

Public Types

typedef double weight_t

Public Member Functions

virtual bool setupEvent ()
virtual bool setupJet (const xAOD::Jet *)=0
virtual bool processConstituent (xAOD::JetConstituentVector::iterator &)
 Perform 1 calculation step using 1 constituent.
virtual double jetCalculation () const
 return the result of the calculation
virtual double operator() (const xAOD::Jet *jet, xAOD::JetConstitScale s=xAOD::UncalibratedJetConstituent)
 convenience function to perform the full calculation on a given jet
virtual std::string name () const
void setName (const std::string &n)
void setExtractor (const CaloConstitHelpers::CaloConstitExtractor *ex)
virtual JetCaloCalculatorclone () const =0
 Clone. Base class should not be cloned.

Protected Member Functions

 JETCALCFUNCDECL (JetCalcCentroid, JetAttribute::CentroidR, m_totE=0;)

Protected Attributes

double m_totE {}
double m_centroid_x {}
double m_centroid_y {}
double m_centroid_z {}
std::string m_name
xAOD::JetAttribute::AttributeID m_id {}
const CaloConstitHelpers::CaloConstitExtractorm_constitExtractor {}

Detailed Description

Definition at line 162 of file JetCaloQualityUtils.h.

Member Typedef Documentation

◆ weight_t

typedef double jet::JetCaloCalculator::weight_t
inherited

Definition at line 79 of file JetCaloCalculations.h.

Member Function Documentation

◆ clone()

virtual JetCaloCalculator * jet::JetCaloCalculator::clone ( ) const
pure virtualinherited

Clone. Base class should not be cloned.

Implemented in jet::JetCalcQualityHEC, and jet::JetCaloCellCalculator.

◆ JETCALCFUNCDECL()

jet::JetCalcCentroid::JETCALCFUNCDECL ( JetCalcCentroid ,
JetAttribute::CentroidR ,
m_totE = 0; )
protected

◆ jetCalculation()

virtual double jet::JetCaloCalculator::jetCalculation ( ) const
inlinevirtualinherited

return the result of the calculation

Definition at line 97 of file JetCaloCalculations.h.

97{return 0;};

◆ name()

virtual std::string jet::JetCaloCalculator::name ( ) const
inlinevirtualinherited

Definition at line 102 of file JetCaloCalculations.h.

102{return m_name;}

◆ operator()()

double jet::JetCaloCalculator::operator() ( const xAOD::Jet * jet,
xAOD::JetConstitScale s = xAOD::UncalibratedJetConstituent )
virtualinherited

convenience function to perform the full calculation on a given jet

Reimplemented in jet::JetCaloCellCalculator.

Definition at line 222 of file JetCaloCalculations.cxx.

222 {
223
224 if (! setupJet( jet ) ) return 0;
225 size_t nConstit = jet->numConstituents();
226 if( nConstit == 0) return true;
227
228 // retrieve the cluster moment extractor for this jet.
230
231
232 xAOD::JetConstituentVector constits = jet->getConstituents();
233 // Use the constituent iterator
234 // IMPORTANT : use UncalibratedJetConstituent.
235 // By default the calculators will just use the kinematic from the iterator they are
236 // given. This allows to choose what scale we give them.
237 // Here we use UncalibratedJetConstituent as default, because most (or all) calo quantity to be calculated
238 // are based on EM scale cluster moments.
239 xAOD::JetConstituentVector::iterator it = constits.begin(constitscale );
240 xAOD::JetConstituentVector::iterator itE = constits.end(constitscale);
241
242 for(; it != itE; ++it)
243 {
244 if( m_constitExtractor->valid(it) )
245 processConstituent(it); // (no support for weight now)
246 }
247
248 return jetCalculation();
249
250 }
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.
const CaloConstitHelpers::CaloConstitExtractor * m_constitExtractor
iterator begin() const
iterator on the first constituent
iterator end() const
iterator after the last constituent
size_t numConstituents() const
Number of constituents in this jets (this is valid even when reading a file where the constituents ha...
Definition Jet_v1.cxx:153
JetConstituentVector getConstituents() const
Return a vector of consituents. The object behaves like vector<const IParticle*>. See JetConstituentV...
Definition Jet_v1.cxx:147
const CaloConstitExtractor * extractorForJet(const xAOD::Jet *jet)
returns a pointer to a CaloConstitExtractor for a given jet.

◆ processConstituent()

virtual bool jet::JetCaloCalculator::processConstituent ( xAOD::JetConstituentVector::iterator & )
inlinevirtualinherited

Perform 1 calculation step using 1 constituent.

Implementation of these functions should use the kinematics from the iterator NOT from the underlying cluster
It is expected that the input is valid, i.e. : CaloConstitExtractor::valid(it) == true.

Reimplemented in jet::JetCalcQualityHEC.

Definition at line 93 of file JetCaloCalculations.h.

93{return true;};

◆ setExtractor()

void jet::JetCaloCalculator::setExtractor ( const CaloConstitHelpers::CaloConstitExtractor * ex)
inlineinherited

Definition at line 107 of file JetCaloCalculations.h.

107{m_constitExtractor = ex;}

◆ setName()

void jet::JetCaloCalculator::setName ( const std::string & n)
inlineinherited

Definition at line 104 of file JetCaloCalculations.h.

◆ setupEvent()

virtual bool jet::JetCaloCalculator::setupEvent ( )
inlinevirtualinherited

Definition at line 86 of file JetCaloCalculations.h.

86{return true; };

◆ setupJet()

virtual bool jet::JetCaloCalculator::setupJet ( const xAOD::Jet * )
pure virtualinherited

Member Data Documentation

◆ m_centroid_x

double jet::JetCalcCentroid::m_centroid_x {}
protected

◆ m_centroid_y

double jet::JetCalcCentroid::m_centroid_y {}
protected

Definition at line 164 of file JetCaloQualityUtils.h.

◆ m_centroid_z

double jet::JetCalcCentroid::m_centroid_z {}
protected

Definition at line 164 of file JetCaloQualityUtils.h.

◆ m_constitExtractor

const CaloConstitHelpers::CaloConstitExtractor* jet::JetCaloCalculator::m_constitExtractor {}
protectedinherited

Definition at line 115 of file JetCaloCalculations.h.

115{}; // used to retrieve the cluster moment from the constituent (which can be a PFO object or a cluster)

◆ m_id

xAOD::JetAttribute::AttributeID jet::JetCaloCalculator::m_id {}
protectedinherited

Definition at line 114 of file JetCaloCalculations.h.

114{}; // unused for now.

◆ m_name

std::string jet::JetCaloCalculator::m_name
protectedinherited

Definition at line 113 of file JetCaloCalculations.h.

◆ m_totE

double jet::JetCalcCentroid::m_totE {}
protected

Definition at line 164 of file JetCaloQualityUtils.h.


The documentation for this class was generated from the following file: