ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | List of all members
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 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 JetCaloCellCalculatorclone () const =0
 Clone. Base class should not be cloned. More...
 
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 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 
22 
23  for( ; it != itE ; ++it) {
24  processCell(*it, it.weight());
25  }
26  return jetCalculation();
27  }

◆ 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;}

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


The documentation for this class was generated from the following files:
jet::JetCellAccessor::end
static const_iterator end(const xAOD::Jet *jet)
Definition: JetCellAccessor.cxx:81
jet::JetCaloCellCalculator::processCell
virtual bool processCell(const CaloCell *, weight_t)=0
perform calculation for a single cell
jet::JetCellAccessor::const_iterator
Definition: JetCellAccessor.h:43
skel.it
it
Definition: skel.GENtoEVGEN.py:396
jet::JetCaloCalculator::setupJet
virtual bool setupJet(const xAOD::Jet *)=0
TruthTest.itE
itE
Definition: TruthTest.py:25
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
jet::JetCellAccessor::begin
static const_iterator begin(const xAOD::Jet *jet)
Definition: JetCellAccessor.cxx:76
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