ATLAS Offline Software
Loading...
Searching...
No Matches
MuidCaloEnergyTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
20
21#ifndef MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
22#define MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
23
24//<<<<<< INCLUDES >>>>>>
25
26#include <atomic>
27
29#include "GaudiKernel/ToolHandle.h"
33
34//<<<<<< CLASS DECLARATIONS >>>>>>
35
36namespace Rec {
37
38 class CaloMeas;
39 class IMuidCaloEnergyMeas;
40 class IMuidCaloEnergyParam;
41 class IMuidTrackIsolation;
42
43 class MuidCaloEnergyTool : public AthAlgTool, virtual public IMuidCaloEnergy {
44 public:
45 MuidCaloEnergyTool(const std::string& type, const std::string& name, const IInterface* parent);
46 ~MuidCaloEnergyTool(void); // destructor
47
48 StatusCode initialize() override;
49 StatusCode finalize() override;
50
53 std::unique_ptr<CaloEnergy> energyLoss(const EventContext& ctx, double trackMomentum, double eta, double phi) const override;
54
57 std::unique_ptr<Trk::TrackStateOnSurface> trackStateOnSurface(const EventContext& ctx, const Trk::TrackParameters& middleParameters,
58 const Trk::TrackParameters* innerParameters,
59 const Trk::TrackParameters* outerParameters) const override;
60
61 private:
62 // private methods
63 std::unique_ptr<CaloEnergy> measurement(const EventContext& ctx, double trackMomentum, double eta, double phi,
64 const CaloMeas& caloMeas) const;
65 static double muSpecResolParam(double trackMomentum, double eta) ;
66 static double paramCorrection(double trackMomentum, double eta, double MopLoss, double MopSigma) ;
67 static double landau(double x, double mpv, double sigma, bool norm) ;
68
69 // helpers, managers, tools
70 ToolHandle<IMuidCaloEnergyMeas> m_caloMeasTool{
71 this,
72 "CaloMeasTool",
73 "Rec::MuidCaloEnergyMeas/MuidCaloEnergyMeas",
74 };
75 ToolHandle<IMuidCaloEnergyParam> m_caloParamTool{
76 this,
77 "CaloParamTool",
78 "Rec::MuidCaloEnergyParam/MuidCaloEnergyParam",
79 };
80 ToolHandle<IMuidTrackIsolation> m_trackIsolationTool{
81 this,
82 "TrackIsolationTool",
83 "Rec::MuidTrackIsolation/MuidTrackIsolation",
84 };
85
86 // configurable options
93
94 // thresholds for use of energy measurement
95 double m_emEtCut; // minimum Et in em for FSR treatment
96 double m_emF1Cut; // minimum F1 in em for FSR treatment
97 double m_emMinEnergy; // mininum energy in the EM
98 double m_hecMinEnergy; // minimum energy in the HEC
99 int m_maxNTracksIso; // max #tracks in the isolation cone
100 double m_minFinalEnergy; // minimum measured final energy
101 double m_minMuonPt; // minimum pt of the muon
102
103 // counters (for finalize)
104 mutable std::atomic_int m_countMean{0}; // number of tracks using mean
105 mutable std::atomic_int m_countMeasurement{0}; // number of tracks using measurement
106 mutable std::atomic_int m_countMop{0}; // number of tracks using mop
107 };
108
109} // namespace Rec
110
111#endif // MUIDCALOENERGYTOOLS_MUIDCALOENERGYTOOL_H
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define x
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Base class for MuidCaloEnergy AlgTool.
std::unique_ptr< CaloEnergy > measurement(const EventContext &ctx, double trackMomentum, double eta, double phi, const CaloMeas &caloMeas) const
ToolHandle< IMuidCaloEnergyParam > m_caloParamTool
std::unique_ptr< CaloEnergy > energyLoss(const EventContext &ctx, double trackMomentum, double eta, double phi) const override
IMuidCaloEnergy interface: to get the total energyLoss in the calorimeters.
StatusCode finalize() override
MuidCaloEnergyTool(const std::string &type, const std::string &name, const IInterface *parent)
static double muSpecResolParam(double trackMomentum, double eta)
static double landau(double x, double mpv, double sigma, bool norm)
static double paramCorrection(double trackMomentum, double eta, double MopLoss, double MopSigma)
StatusCode initialize() override
std::atomic_int m_countMeasurement
ToolHandle< IMuidCaloEnergyMeas > m_caloMeasTool
std::unique_ptr< Trk::TrackStateOnSurface > trackStateOnSurface(const EventContext &ctx, const Trk::TrackParameters &middleParameters, const Trk::TrackParameters *innerParameters, const Trk::TrackParameters *outerParameters) const override
IMuidCaloEnergy interface: TrackStateOnSurface for parameters and energyLoss at the calorimeter mid-s...
ToolHandle< IMuidTrackIsolation > m_trackIsolationTool
Gaudi Tools.
ParametersBase< TrackParametersDim, Charged > TrackParameters