![]() |
ATLAS Offline Software
|
#include <JetCaloCalculations.h>
Public Types | |
typedef double | weight_t |
Public Member Functions | |
JetCaloCalculator () | |
JetCaloCalculator (xAOD::JetAttribute::AttributeID id) | |
virtual | ~JetCaloCalculator () |
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 JetCaloCalculator * | clone () const =0 |
Clone. Base class should not be cloned. More... | |
Protected Attributes | |
std::string | m_name |
xAOD::JetAttribute::AttributeID | m_id {} |
const CaloConstitHelpers::CaloConstitExtractor * | m_constitExtractor {} |
Base class to support cpu-efficient calculation on calorimeter jets either at CaloCell or constituent level (CaloCluster & PFO objects supported).
JetCaloCalculator instances use the CaloCluster moments in their calculation. Similar quantities build from CaloCell directly are calculated by JetCaloCellCalculator instances. These ones are defined separately in JetCaloCellQualityUtils.h, so they are not compiled in RootCore or AthAnalysis releases.
The reason for using classes rather than simple functions to perform cell based calculations is doing
for each cell { for each calculation {calculate on cell} } (1)
is more efficient than doing the loop the other way around :
for each calculation { for each cell {calculate on cell} } (2)
Implementing (1) in a modular way requires to use objects which can accumulate information when processing a cell. The calculation steps for 1 cell/constituent is to be implemented in processCell(cell)/processConstituent(constit) functions (whithin these functions the calculator object is expected to accumulate
relevant information from cell/constit in private members).
The function setupJet() is meant to prepare the calculation for a given jet (for ex: reset accumulation variables).
JetCalculators are expected to be used within a JetCalculation instance. They also act as functor and define operator() so one can use them as : JetCalcNegativeEnergy calculateNegE; double negEinJet = calculateNegE(jet);
Definition at line 76 of file JetCaloCalculations.h.
typedef double jet::JetCaloCalculator::weight_t |
Definition at line 79 of file JetCaloCalculations.h.
|
inline |
Definition at line 81 of file JetCaloCalculations.h.
jet::JetCaloCalculator::JetCaloCalculator | ( | xAOD::JetAttribute::AttributeID | id | ) |
Definition at line 215 of file JetCaloCalculations.cxx.
|
inlinevirtual |
Definition at line 84 of file JetCaloCalculations.h.
|
pure virtual |
Clone. Base class should not be cloned.
Implemented in jet::JetCaloCellCalculator, and jet::JetCalcQualityHEC.
|
inlinevirtual |
return the result of the calculation
Definition at line 97 of file JetCaloCalculations.h.
|
inlinevirtual |
Definition at line 102 of file JetCaloCalculations.h.
|
virtual |
convenience function to perform the full calculation on a given jet
Reimplemented in jet::JetCaloCellCalculator.
Definition at line 222 of file JetCaloCalculations.cxx.
|
inlinevirtual |
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.
|
inline |
Definition at line 107 of file JetCaloCalculations.h.
|
inline |
Definition at line 104 of file JetCaloCalculations.h.
|
inlinevirtual |
Definition at line 86 of file JetCaloCalculations.h.
|
protected |
Definition at line 115 of file JetCaloCalculations.h.
|
protected |
Definition at line 114 of file JetCaloCalculations.h.
|
protected |
Definition at line 113 of file JetCaloCalculations.h.