 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef EGAMMA_CALIB_TOOL_H_
6 #define EGAMMA_CALIB_TOOL_H_
51 bool do_throw =
false) {
55 phi_calo = cluster.
phi();
59 phi_calo = phiCaloAcc(cluster);
62 msg.msg(MSG::ERROR) <<
"phiCalo not available as auxilliary variable"
65 throw std::runtime_error(
"phiCalo not available as auxilliary variable");
67 msg.msg(MSG::WARNING) <<
"using phi as phiCalo" <<
endmsg;
68 phi_calo = cluster.
phi();
74 bool do_throw =
false) {
78 eta_calo = cluster.
eta();
82 eta_calo = etaCaloAcc(cluster);
85 msg.msg(MSG::ERROR) <<
"etaCalo not available as auxilliary variable"
88 throw std::runtime_error(
"etaCalo not available as auxilliary variable");
90 msg.msg(MSG::WARNING) <<
"using eta as etaCalo" <<
endmsg;
100 namespace ClusterHelpers {
102 template<ContainerIdConcept CI = ContainerId::cluster,
typename CM=ColumnarModeDefault>
112 :
m_phiCaloAcc (columnarTool,
"phiCalo", {.isOptional =
true}),
131 msg.msg(MSG::ERROR) <<
"phiCalo not available as auxilliary variable" <<
endmsg;
132 if (do_throw) {
throw std::runtime_error(
"phiCalo not available as auxilliary variable"); }
133 msg.msg(MSG::WARNING) <<
"using phi as phiCalo" <<
endmsg;
140 template<ContainerIdConcept CI = ContainerId::cluster,
typename CM=ColumnarModeDefault>
150 :
m_etaCaloAcc (columnarTool,
"etaCalo", {.isOptional =
true}),
169 msg.msg(MSG::ERROR) <<
"etaCalo not available as auxilliary variable" <<
endmsg;
170 if (do_throw) {
throw std::runtime_error(
"etaCalo not available as auxilliary variable"); }
171 msg.msg(MSG::WARNING) <<
"using eta as etaCalo" <<
endmsg;
191 enum class ScaleDecorrelation {
242 double energy,
double cl_eta,
double cl_etaCalo,
244 bool withCT =
false)
const override;
292 this,
"FixForMissingCells",
true,
293 "AOD fix for cell recovery in core egamma cluster"};
303 const double eta =
acc.etaCaloAcc(
acc.caloClusterAcc(
p)[0].value(),
acc.authorAcc (
p));
323 std::abs(
acc.etaCaloAcc(
acc.caloClusterAcc(
p)[0].value(),
acc.authorAcc (
p)));
332 double eta_max)
const {
340 std::pair<double, double> edges)
const {
345 const std::vector<std::pair<double, double>>& edges)
const {
346 std::vector<EgammaPredicate>
result;
347 result.reserve(edges.size());
348 for (
const auto&
it : edges) {
355 const std::vector<double>& edges)
const {
356 std::vector<EgammaPredicate>
result;
357 result.reserve(edges.size() - 1);
358 auto it2 = edges.begin();
360 for (; it2 != edges.end(); ++
it, ++it2) {
368 double eta2_min,
double eta2_max)
377 std::abs(
acc.etaCaloAcc(
acc.caloClusterAcc(
p)[0].value(),
acc.authorAcc (
p)));
387 double eta1_min,
double eta1_max,
double eta2_min,
388 double eta2_max)
const {
399 bool withCT =
true)
const override;
405 "calibration service"};
413 std::unique_ptr<AtlasRoot::egammaEnergyCorrectionTool>
m_rootTool;
422 std::map<CP::SystematicVariation, egEnergyCorr::Resolution::Variation>
442 Gaudi::Property<bool>
m_onlyElectrons {
this,
"onlyElectrons",
false,
"the tool will only be applied to electrons"};
443 Gaudi::Property<bool>
m_onlyPhotons {
this,
"onlyPhotons",
false,
"the tool will only be applied to photons"};
virtual double phi() const
The azimuthal angle ( ) of the particle.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
ColumnAccessor< CI, float, CM > m_phicaloframeAcc
ColumnAccessor< CI, float, CM > m_etaAcc
Scalar phi() const
phi method
ColumnAccessor< CI, float, CM > m_phiCaloAcc
Scalar eta() const
pseudorapidity method
ColumnAccessor< CI, float, CM > m_etaCaloAcc
ColumnAccessor< CI, float, CM > m_phiAcc
Class to wrap a set of SystematicVariations.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
a class representing a continuous sequence of objects (a.k.a. a container)
Select isolated Photons, Electrons and Muons.
float operator()(ClusterId cluster, int author, bool do_throw=false) const
Description of a calorimeter cluster.
ColumnAccessor< CI, float, CM > m_etacaloframeAcc
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
parameterization of correction for ADC non linearity
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
a class representing a single object (electron, muons, etc.)
Class mimicking the AthMessaging class from the offline software.
EtaCaloAccessor(ColumnarTool< CM > &columnarTool)
float get_phi_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
@ PHICALOFRAME
Phi in the calo frame (for egamma)
Class describing the basic event information.
float operator()(ClusterId cluster, int author, bool do_throw=false) const
Return value from object correction CP tools.
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
the raw column accessor template class
Helper class to provide constant type-safe access to aux data.
@ ETACALOFRAME
Eta in the calo frame (for egamma)
setBGCode setTAP setLVL2ErrorBits bool
PhiCaloAccessor(ColumnarTool< CM > &columnarTool)