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

Base class (inheriting JetCaloCalculator) for calculations accessing CaloCell directly. More...

#include <JetCaloCellQualityUtils.h>

Inheritance diagram for jet::JetCaloCellCalculator:
Collaboration diagram for jet::JetCaloCellCalculator:

Public Types

typedef double weight_t

Public Member Functions

virtual bool processCell (const CaloCell *, weight_t)=0
 perform calculation for a single cell
virtual double operator() (const xAOD::Jet *jet, xAOD::JetConstitScale s=xAOD::UncalibratedJetConstituent)
 convenience function to perform the full calculation on a given jet
virtual JetCaloCellCalculatorclone () const =0
 Clone. Base class should not be cloned.
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 std::string name () const
void setName (const std::string &n)
void setExtractor (const CaloConstitHelpers::CaloConstitExtractor *ex)

Protected Attributes

std::string m_name
xAOD::JetAttribute::AttributeID m_id {}
const CaloConstitHelpers::CaloConstitExtractorm_constitExtractor {}

Detailed Description

Base class (inheriting JetCaloCalculator) for calculations accessing CaloCell directly.

A base class which virtually inherit JetCaloCalculator and provide the interface to perform calo calculation from jets, using CaloCell acces directly.

This class is available only in Athena.

The virutal inheritance allow concrete implementations to also inherit the corresponding implementations of JetCaloCalculator. For example : JetCalcNegativeEnergy_fromCells inherits JetCalcNegativeEnergy JetCalcNegativeEnergy_fromCells only needs to implement processCell() and clone()

IMPORTANT : cell based calculation are not necessarily identical to their correspondant cluster based calculation. Several cell calculation actually differ or can depend on parameters different than those used for the cluster based quantity.

Definition at line 37 of file JetCaloCellQualityUtils.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 JetCaloCellCalculator * jet::JetCaloCellCalculator::clone ( ) const
pure virtual

Clone. Base class should not be cloned.

Implements jet::JetCaloCalculator.

◆ 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::JetCaloCellCalculator::operator() ( const xAOD::Jet * jet,
xAOD::JetConstitScale s = xAOD::UncalibratedJetConstituent )
virtual

convenience function to perform the full calculation on a given jet

Reimplemented from jet::JetCaloCalculator.

Definition at line 15 of file JetCaloCellQualityUtils.cxx.

15 {
16 if (! setupJet( jet ) ) return 0;
17 size_t nConstit = jet->numConstituents();
18 if( nConstit == 0) return true;
19
20 jet::JetCellAccessor::const_iterator it = jet::JetCellAccessor::begin(jet);
21 jet::JetCellAccessor::const_iterator itE = jet::JetCellAccessor::end(jet);
22
23 for( ; it != itE ; ++it) {
24 processCell(*it, it.weight());
25 }
26 return jetCalculation();
27 }
virtual double jetCalculation() const
return the result of the calculation
virtual bool setupJet(const xAOD::Jet *)=0
virtual bool processCell(const CaloCell *, weight_t)=0
perform calculation for a single cell
static const_iterator begin(const xAOD::Jet *jet)
static const_iterator end(const xAOD::Jet *jet)
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

◆ processCell()

virtual bool jet::JetCaloCellCalculator::processCell ( const CaloCell * ,
weight_t  )
pure virtual

perform calculation for a single cell

◆ 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;}
const CaloConstitHelpers::CaloConstitExtractor * m_constitExtractor

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


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