17 size_t nConstit =
jet->numConstituents();
18 if( nConstit == 0)
return true;
23 for( ; it != itE ; ++it) {
40 size_t nConstit =
jet->numConstituents();
41 std::vector<double> results;
50 std::vector<JetCaloCellCalculator*> clonedCalc;
59 for( ; it != itE ; ++it) {
60 double w= it.weight();
63 calc->processCell(cell, w);
69 results.push_back( calc->jetCalculation() );
86 bool timeIsDefined(
false);
96 ) timeIsDefined =
true;
103 bool JetCalcnLeadingCells_fromCells::processCell(
const CaloCell *thisCell, weight_t )
106 m_cell_energies.push_back(thisCell->
e());
107 m_sumE_cells+=thisCell->
e();
112 bool JetCalcOutOfTimeEnergyFraction_fromCells::processCell(
const CaloCell *thisCell, weight_t ) {
113 m_sumE+=thisCell->
e();
117 if ( timeIsDefined ) {
119 if(fabs(time)>timecut)m_sumE_OOT+=thisCell->
e();
125 bool JetCalcTimeCells_fromCells::processCell(
const CaloCell *theCell, weight_t weight)
132 double thisNorm =
weight * fabs(weight) * theCell->
e() * theCell->
e();
133 double thisTime = thisNorm * theCell->
time();
143 bool JetCalcAverageLArQualityF_fromCells::processCell(
const CaloCell *theCell, weight_t weight)
148 if ( timeIsDefined && ( theCell->
caloDDE()->
is_tile() == m_useTile ) )
150 double thisNorm =
weight * fabs(weight) * theCell->
e() * theCell->
e();
151 double thisQf = thisNorm * theCell->
quality();
161 bool JetCalcQuality_fromCells::processCell(
const CaloCell *theCell, weight_t)
170 const TileCell* theTileCell =
dynamic_cast<const TileCell*
>(theCell);
175 m_totE += theCell->
e();
176 int tileQuality = std::max(theTileCell->
qual1(), theTileCell->
qual2());
177 if(tileQuality > TileQualityCut)
178 m_badE += theCell->
e();
189 m_totE += theCell->
e();
190 if(theCell->
quality() > LArQualityCut)
191 m_badE += theCell->
e();
199 bool JetCalcQualityHEC_fromCells::processCell(
const CaloCell *theCell, weight_t)
206 m_totE += theCell->
e();
207 if(theCell->
quality() > LArQualityCut)
208 m_badE += theCell->
e();
216 bool JetCalcNegativeEnergy_fromCells::processCell(
const CaloCell *theCell, weight_t)
218 if(theCell->
e()<-2500)
219 m_totE += theCell->
e();
224 bool JetCalcCentroid_fromCells::processCell(
const CaloCell *, weight_t)
Data object for each calorimeter readout cell.
float time() const
get time (data member)
virtual double e() const override final
get energy (data member) (synonym to method energy()
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
uint16_t provenance() const
get provenance (data member)
uint16_t quality() const
get quality (data member)
bool is_tile() const
cell belongs to Tile
bool is_lar_hec() const
cell belongs to HEC
uint8_t qual1(void) const
get quality of first PMT (data member)
uint8_t qual2(void) const
get quality of second PMT (data member)
std::vector< JetCaloCalculator * > m_calculators
void addCalculator(JetCaloCalculator *c)
Base class to support cpu-efficient calculation on calorimeter jets either at CaloCell or constituent...
virtual double jetCalculation() const
return the result of the calculation
virtual bool setupJet(const xAOD::Jet *)=0
void addCellCalculator(JetCaloCellCalculator *c)
std::vector< JetCaloCellCalculator * > m_cellcalculators
virtual std::vector< double > process(const xAOD::Jet *jet) const
Perform all tasks correspondings to the associated JetCaloCalculators on Jet jet.
Base class (inheriting JetCaloCalculator) for calculations accessing CaloCell directly.
virtual double operator()(const xAOD::Jet *jet, xAOD::JetConstitScale s=xAOD::UncalibratedJetConstituent)
convenience function to perform the full calculation on a given jet
virtual bool processCell(const CaloCell *, weight_t)=0
perform calculation for a single cell
static const_iterator begin(const xAOD::Jet *jet)
static const_iterator end(const xAOD::Jet *jet)
time(flags, cells_name, *args, **kw)
bool timeAndQualityDefined(const CaloCell *theCell)
Jet_v1 Jet
Definition of the current "jet version".