ATLAS Offline Software
Loading...
Searching...
No Matches
JetCaloCellQualityUtils.h
Go to the documentation of this file.
1// This file is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef JETUTILS_JETCALOCELLQUALHELPER_H
8#define JETUTILS_JETCALOCELLQUALHELPER_H
9
11
12
13
14class CaloCell;
15
16namespace jet {
17
38 public:
40 virtual bool processCell(const CaloCell* /*cell*/, weight_t /*w*/) =0;
42
43 virtual JetCaloCellCalculator* clone()const = 0;
44
45 };
46
47
53#define DECLARECELLCALC( baseclass, derivedclass, inits ) \
54 class derivedclass : public baseclass , public JetCaloCellCalculator { \
55 public: \
56 derivedclass() : baseclass() {inits;} \
57 virtual bool processCell(const CaloCell* , weight_t ) ; \
58 JetCaloCellCalculator* clone()const {return new derivedclass(*this);} \
59 }
60
61
62 // below we declare cell based calo calculators inheriting the cluster based calculators.
63 DECLARECELLCALC(JetCalcnLeadingCells, JetCalcnLeadingCells_fromCells, m_id = JetAttribute::N90Cells; );
64 DECLARECELLCALC(JetCalcOutOfTimeEnergyFraction, JetCalcOutOfTimeEnergyFraction_fromCells, );
65 DECLARECELLCALC(JetCalcTimeCells, JetCalcTimeCells_fromCells, );
66 DECLARECELLCALC(JetCalcAverageLArQualityF, JetCalcAverageLArQualityF_fromCells, );
67 DECLARECELLCALC(JetCalcQualityHEC, JetCalcQualityHEC_fromCells, );
68 DECLARECELLCALC(JetCalcQuality, JetCalcQuality_fromCells, );
69 DECLARECELLCALC(JetCalcNegativeEnergy, JetCalcNegativeEnergy_fromCells, );
70 DECLARECELLCALC(JetCalcCentroid, JetCalcCentroid_fromCells, );
71 // DECLARECELLCALC(JetCalcBadCellsFrac, JetCalcBadCellsFrac_fromCells, );
72
73
81 public:
82
83 JetCaloCellCalculations(bool ownCalc=true) : JetCaloCalculations(ownCalc) {}
84
86 virtual std::vector<double> process(const xAOD::Jet* jet) const ;
87
89
90 protected:
91 std::vector<JetCaloCellCalculator*> m_cellcalculators;
92
93 };
94
95
96
97}
98
99#endif
#define DECLARECELLCALC(baseclass, derivedclass, inits)
DECLARECELLCALC : a macro to ease the declaration of concrete implementations of JetCaloCellCalculato...
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
JetCaloCalculations(bool ownCalc=true)
void addCellCalculator(JetCaloCellCalculator *c)
std::vector< JetCaloCellCalculator * > m_cellcalculators
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
virtual JetCaloCellCalculator * clone() const =0
Clone. Base class should not be cloned.
const std::string process
Jet_v1 Jet
Definition of the current "jet version".
JetConstitScale
Definition JetTypes.h:20
@ UncalibratedJetConstituent
Definition JetTypes.h:21