jet::JetCaloCalculator Class Reference

#include <JetCaloCalculations.h>

Inheritance diagram for jet::JetCaloCalculator:
jet::JetCalcAverageLArQualityF jet::JetCalcBadCellsFrac jet::JetCalcCentroid jet::JetCalcNegativeEnergy jet::JetCalcnLeadingCells jet::JetCalcOutOfTimeEnergyFraction jet::JetCalcQuality jet::JetCalcTimeCells jet::JetCaloCellCalculator

List of all members.

Public Types

typedef double weight_t

Public Member Functions

 JetCaloCalculator (xAOD::JetAttribute::AttributeID id)
virtual bool setupEvent ()
virtual bool setupJet (const xAOD::Jet *)=0
virtual bool processConstituent (xAOD::JetConstituentVector::iterator &)
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 (std::string n)
void setExtractor (CaloConstitHelpers::CaloConstitExtractor *ex)
virtual JetCaloCalculatorclone () const =0
 Clone. Base class should not be cloned.

Protected Attributes

std::string m_name
xAOD::JetAttribute::AttributeID m_id
CaloConstitHelpers::CaloConstitExtractorm_constitExtractor

Detailed Description

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);


Member Function Documentation

virtual bool jet::JetCaloCalculator::processConstituent ( xAOD::JetConstituentVector::iterator  )  [inline, virtual]

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1