ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
jet::JetCaloCellCalculations Class Reference

collection of JetCaloCellCalculator More...

#include <JetCaloCellQualityUtils.h>

Inheritance diagram for jet::JetCaloCellCalculations:
Collaboration diagram for jet::JetCaloCellCalculations:

Public Member Functions

 JetCaloCellCalculations (bool ownCalc=true)
 
virtual std::vector< double > process (const xAOD::Jet *jet) const
 Perform all tasks correspondings to the associated JetCaloCalculators on Jet jet. More...
 
void addCellCalculator (JetCaloCellCalculator *c)
 
void addCalculator (JetCaloCalculator *c)
 
bool setupEvent ()
 
void clear ()
 
size_t numCalculators () const
 
const JetCaloCalculatorat (size_t i) const
 

Protected Attributes

std::vector< JetCaloCellCalculator * > m_cellcalculators
 
std::vector< JetCaloCalculator * > m_calculators
 
bool m_owncalculators
 

Detailed Description

collection of JetCaloCellCalculator

This class is similar and inherit JetCaloCalculations It's specialized for JetCaloCellCalculator .

Definition at line 80 of file JetCaloCellQualityUtils.h.

Constructor & Destructor Documentation

◆ JetCaloCellCalculations()

jet::JetCaloCellCalculations::JetCaloCellCalculations ( bool  ownCalc = true)
inline

Definition at line 83 of file JetCaloCellQualityUtils.h.

83 : JetCaloCalculations(ownCalc) {}

Member Function Documentation

◆ addCalculator()

void jet::JetCaloCalculations::addCalculator ( JetCaloCalculator c)
inherited

Definition at line 257 of file JetCaloCalculations.cxx.

257  {
258  m_calculators.push_back(c);
259  }

◆ addCellCalculator()

void jet::JetCaloCellCalculations::addCellCalculator ( JetCaloCellCalculator c)

Definition at line 33 of file JetCaloCellQualityUtils.cxx.

33  {
34  m_cellcalculators.push_back(c);
36  }

◆ at()

const JetCaloCalculator* jet::JetCaloCalculations::at ( size_t  i) const
inlineinherited

Definition at line 162 of file JetCaloCalculations.h.

162 {return m_calculators[i];}

◆ clear()

void jet::JetCaloCalculations::clear ( )
inherited

Definition at line 331 of file JetCaloCalculations.cxx.

331  {
332  if(m_owncalculators) for(size_t i=0;i < m_calculators.size();i++) delete m_calculators[i];
333  m_calculators.clear();
334  }

◆ numCalculators()

size_t jet::JetCaloCalculations::numCalculators ( ) const
inlineinherited

Definition at line 161 of file JetCaloCalculations.h.

161 {return m_calculators.size();}

◆ process()

std::vector< double > jet::JetCaloCellCalculations::process ( const xAOD::Jet jet) const
virtual

Perform all tasks correspondings to the associated JetCaloCalculators on Jet jet.

Reimplemented from jet::JetCaloCalculations.

Definition at line 38 of file JetCaloCellQualityUtils.cxx.

38  {
39 
40  size_t nConstit = jet->numConstituents();
41  std::vector<double> results;
42  results.reserve(m_calculators.size());
43 
44  if( nConstit == 0) {
45  results.resize(m_calculators.size(),0);
46  return results;
47  }
48 
49  // Clone calculators
50  std::vector<JetCaloCellCalculator*> clonedCalc;
51  clonedCalc.reserve(m_calculators.size());
52  for( const JetCaloCellCalculator *calc : m_cellcalculators) clonedCalc.push_back( calc->clone() );
53 
54 
55 
56  // navigate from cell
59  for( ; it != itE ; ++it) {
60  double w= it.weight();
61  const CaloCell* cell = *it;
62  for( JetCaloCellCalculator *calc : clonedCalc) {
63  calc->processCell(cell, w);
64  }
65  }
66 
67  // copy results & clear the cloned calc
68  for(JetCaloCalculator* calc: clonedCalc) {
69  results.push_back( calc->jetCalculation() );
70  delete calc;
71  }
72 
73  return results;
74  }

◆ setupEvent()

bool jet::JetCaloCalculations::setupEvent ( )
inherited

Definition at line 262 of file JetCaloCalculations.cxx.

262  {
263  for(size_t i=0;i < m_calculators.size();i++) m_calculators[i]->setupEvent();
264  return true;
265  }

Member Data Documentation

◆ m_calculators

std::vector<JetCaloCalculator*> jet::JetCaloCalculations::m_calculators
protectedinherited

Definition at line 167 of file JetCaloCalculations.h.

◆ m_cellcalculators

std::vector<JetCaloCellCalculator*> jet::JetCaloCellCalculations::m_cellcalculators
protected

Definition at line 91 of file JetCaloCellQualityUtils.h.

◆ m_owncalculators

bool jet::JetCaloCalculations::m_owncalculators
protectedinherited

Definition at line 168 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
verify_menu_config.results
results
Definition: verify_menu_config.py:67
jet::JetCellAccessor::const_iterator
Definition: JetCellAccessor.h:43
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
jet::JetCaloCalculations::JetCaloCalculations
JetCaloCalculations(bool ownCalc=true)
Definition: JetCaloCalculations.h:148
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TruthTest.itE
itE
Definition: TruthTest.py:25
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
jet::JetCaloCalculations::m_owncalculators
bool m_owncalculators
Definition: JetCaloCalculations.h:168
jet::JetCellAccessor::begin
static const_iterator begin(const xAOD::Jet *jet)
Definition: JetCellAccessor.cxx:76
jet::JetCaloCalculations::addCalculator
void addCalculator(JetCaloCalculator *c)
Definition: JetCaloCalculations.cxx:257
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
jet::JetCaloCalculations::m_calculators
std::vector< JetCaloCalculator * > m_calculators
Definition: JetCaloCalculations.h:167
jet::JetCaloCellCalculations::m_cellcalculators
std::vector< JetCaloCellCalculator * > m_cellcalculators
Definition: JetCaloCellQualityUtils.h:91
beamspotnt.calc
calc
Definition: bin/beamspotnt.py:1252
python.compressB64.c
def c
Definition: compressB64.py:93
jet::JetCaloCalculations::setupEvent
bool setupEvent()
Definition: JetCaloCalculations.cxx:262