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

#include <JetCaloQualityUtils.h>

Inheritance diagram for jet::JetCalcQualityHEC:
Collaboration diagram for jet::JetCalcQualityHEC:

Public Types

typedef double weight_t
 

Public Member Functions

bool processConstituent (xAOD::JetConstituentVector::iterator &iter)
 Perform 1 calculation step using 1 constituent. More...
 
JetCaloCalculatorclone () const
 Clone. Base class should not be cloned. More...
 
 JetCalcQualityHEC ()
 
 JETCALCFUNCDECL (JetCalcQuality, JetAttribute::LArQuality, includeTile=false;includeLAr=true;LArQualityCut=4000 ;TileQualityCut=254;m_totE=0;m_badE=0;)
 
virtual bool setupEvent ()
 
virtual bool setupJet (const xAOD::Jet *)=0
 
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)
 

Public Attributes

int LArQualityCut
 
int TileQualityCut
 
bool includeTile
 
bool includeLAr
 

Protected Attributes

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

Detailed Description

Definition at line 139 of file JetCaloQualityUtils.h.

Member Typedef Documentation

◆ weight_t

typedef double jet::JetCaloCalculator::weight_t
inherited

Definition at line 79 of file JetCaloCalculations.h.

Constructor & Destructor Documentation

◆ JetCalcQualityHEC()

jet::JetCalcQualityHEC::JetCalcQualityHEC ( )
inline

Definition at line 148 of file JetCaloQualityUtils.h.

Member Function Documentation

◆ clone()

JetCaloCalculator* jet::JetCalcQualityHEC::clone ( ) const
inlinevirtual

Clone. Base class should not be cloned.

Implements jet::JetCaloCalculator.

Definition at line 145 of file JetCaloQualityUtils.h.

145 {return new JetCalcQualityHEC(*this); }

◆ JETCALCFUNCDECL()

jet::JetCalcQuality::JETCALCFUNCDECL ( JetCalcQuality  ,
JetAttribute::LArQuality  ,
includeTile  = false;includeLAr=true;LArQualityCut=4000 ;TileQualityCut=254;m_totE=0;m_badE=0; 
)
inherited

◆ 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()

bool jet::JetCalcQualityHEC::processConstituent ( xAOD::JetConstituentVector::iterator )
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 from jet::JetCaloCalculator.

Definition at line 316 of file JetCaloQualityUtils.cxx.

316  {
317  double clustHEC = m_constitExtractor->energyHEC(iter);
318  m_totE += clustHEC ;
319 
321 
322  m_badE += f *clustHEC;
323  return true;
324  }

◆ 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

◆ includeLAr

bool jet::JetCalcQuality::includeLAr
inherited

Definition at line 132 of file JetCaloQualityUtils.h.

◆ includeTile

bool jet::JetCalcQuality::includeTile
inherited

Definition at line 132 of file JetCaloQualityUtils.h.

◆ LArQualityCut

int jet::JetCalcQuality::LArQualityCut
inherited

Definition at line 130 of file JetCaloQualityUtils.h.

◆ m_badE

double jet::JetCalcQuality::m_badE {}
protectedinherited

Definition at line 127 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_totE

double jet::JetCalcQuality::m_totE {}
protectedinherited

Definition at line 127 of file JetCaloQualityUtils.h.

◆ TileQualityCut

int jet::JetCalcQuality::TileQualityCut
inherited

Definition at line 131 of file JetCaloQualityUtils.h.


The documentation for this class was generated from the following files:
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
CaloConstitHelpers::CaloConstitExtractor::energyHEC
virtual double energyHEC(xAOD::JetConstituentVector::iterator &) const
Definition: JetCaloCalculations.h:36
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CaloConstitHelpers::CaloConstitExtractor::moment
virtual double moment(xAOD::JetConstituentVector::iterator &, xAOD::CaloCluster::MomentType) const
Definition: JetCaloCalculations.h:34
jet::JetCaloCalculator::setupJet
virtual bool setupJet(const xAOD::Jet *)=0
TruthTest.itE
itE
Definition: TruthTest.py:25
jet::JetCalcQualityHEC::JetCalcQualityHEC
JetCalcQualityHEC()
Definition: JetCaloQualityUtils.h:148
jet::JetCaloCalculator::JetCaloCalculator
JetCaloCalculator()
Definition: JetCaloCalculations.h:81
xAOD::JetConstituentVector::begin
iterator begin() const
iterator on the first constituent
Definition: JetConstituentVector.cxx:103
xAOD::JetAttribute::HECQuality
@ HECQuality
Definition: JetAttributes.h:80
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
beamspotman.n
n
Definition: beamspotman.py:731
jet::JetCalcQuality::m_totE
double m_totE
Definition: JetCaloQualityUtils.h:127
hist_file_dump.f
f
Definition: hist_file_dump.py:135
jet::JetCalcQuality::m_badE
double m_badE
Definition: JetCaloQualityUtils.h:127
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
xAOD::CaloCluster_v1::BADLARQ_FRAC
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.
Definition: CaloCluster_v1.h:155