ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
jet::JetCalcnLeadingCells Class Referenceabstract

#include <JetCaloQualityUtils.h>

Inheritance diagram for jet::JetCalcnLeadingCells:
Collaboration diagram for jet::JetCalcnLeadingCells:

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. More...
 
virtual double jetCalculation () const
 return the result of the calculation More...
 
virtual double operator() (const xAOD::Jet *jet, xAOD::JetConstitScale s=xAOD::UncalibratedJetConstituent)
 convenience function to perform the full calculation on a given jet More...
 
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. More...
 

Protected Member Functions

 JETCALCFUNCDECL (JetCalcnLeadingCells, JetAttribute::N90Constituents, m_threshold=0.9;)
 

Protected Attributes

std::vector< double > m_cell_energies
 
double m_sumE_cells {}
 
double m_threshold {}
 
std::string m_name
 
xAOD::JetAttribute::AttributeID m_id {}
 
const CaloConstitHelpers::CaloConstitExtractorm_constitExtractor {}
 

Detailed Description

Definition at line 84 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::JetCaloCellCalculator, and jet::JetCalcQualityHEC.

◆ JETCALCFUNCDECL()

jet::JetCalcnLeadingCells::JETCALCFUNCDECL ( JetCalcnLeadingCells  ,
JetAttribute::N90Constituents  ,
m_threshold  = 0.9; 
)
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  }

◆ 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.

104 {m_name = n;}

◆ 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_cell_energies

std::vector<double> jet::JetCalcnLeadingCells::m_cell_energies
protected

Definition at line 86 of file JetCaloQualityUtils.h.

◆ m_constitExtractor

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

Definition at line 115 of file JetCaloCalculations.h.

◆ m_id

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

Definition at line 114 of file JetCaloCalculations.h.

◆ m_name

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

Definition at line 113 of file JetCaloCalculations.h.

◆ m_sumE_cells

double jet::JetCalcnLeadingCells::m_sumE_cells {}
protected

Definition at line 87 of file JetCaloQualityUtils.h.

◆ m_threshold

double jet::JetCalcnLeadingCells::m_threshold {}
protected

Definition at line 88 of file JetCaloQualityUtils.h.


The documentation for this class was generated from the following file:
jet::JetCaloCalculator::processConstituent
virtual bool processConstituent(xAOD::JetConstituentVector::iterator &)
Perform 1 calculation step using 1 constituent.
Definition: JetCaloCalculations.h:93
xAOD::JetConstituentVector::end
iterator end() const
iterator after the last constituent
Definition: JetConstituentVector.cxx:104
skel.it
it
Definition: skel.GENtoEVGEN.py:423
jet::JetCaloCalculator::setupJet
virtual bool setupJet(const xAOD::Jet *)=0
TruthTest.itE
itE
Definition: TruthTest.py:25
xAOD::JetConstituentVector::begin
iterator begin() const
iterator on the first constituent
Definition: JetConstituentVector.cxx:103
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
beamspotman.n
n
Definition: beamspotman.py:731
jet::JetCaloCalculator::m_constitExtractor
const CaloConstitHelpers::CaloConstitExtractor * m_constitExtractor
Definition: JetCaloCalculations.h:115
CaloConstitHelpers::extractorForJet
const CaloConstitExtractor * extractorForJet(const xAOD::Jet *jet)
returns a pointer to a CaloConstitExtractor for a given jet.
Definition: JetCaloCalculations.cxx:185
jet::JetCaloCalculator::m_name
std::string m_name
Definition: JetCaloCalculations.h:113
jet::JetCaloCalculator::jetCalculation
virtual double jetCalculation() const
return the result of the calculation
Definition: JetCaloCalculations.h:97
CaloConstitHelpers::CaloConstitExtractor::valid
virtual bool valid(xAOD::JetConstituentVector::iterator &) const
Definition: JetCaloCalculations.h:33
xAOD::JetConstituentVector
A vector of jet constituents at the scale used during jet finding.
Definition: JetConstituentVector.h:117
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121