ATLAS Offline Software
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 
6 
19 
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 
36 namespace 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
87  bool m_cosmics;
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
str::trackMomentum
const std::string trackMomentum
Definition: BTagTrackIpAccessor.cxx:15
Rec::MuidCaloEnergyTool::m_forceIsolationFailure
bool m_forceIsolationFailure
Definition: MuidCaloEnergyTool.h:89
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
Rec::MuidCaloEnergyTool::paramCorrection
static double paramCorrection(double trackMomentum, double eta, double MopLoss, double MopSigma)
Definition: MuidCaloEnergyTool.cxx:502
Rec::MuidCaloEnergyTool::trackStateOnSurface
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...
Definition: MuidCaloEnergyTool.cxx:158
Rec::MuidCaloEnergyTool::m_minFinalEnergy
double m_minFinalEnergy
Definition: MuidCaloEnergyTool.h:100
Rec::MuidCaloEnergyTool::m_countMean
std::atomic_int m_countMean
Definition: MuidCaloEnergyTool.h:104
Rec::MuidCaloEnergyTool::m_caloMeasTool
ToolHandle< IMuidCaloEnergyMeas > m_caloMeasTool
Definition: MuidCaloEnergyTool.h:70
Rec::MuidCaloEnergyTool::m_emEtCut
double m_emEtCut
Definition: MuidCaloEnergyTool.h:95
Rec::MuidCaloEnergyTool::m_energyLossMeasurement
bool m_energyLossMeasurement
Definition: MuidCaloEnergyTool.h:88
Rec::MuidCaloEnergyTool::m_MOPparametrization
bool m_MOPparametrization
Definition: MuidCaloEnergyTool.h:91
Rec::MuidCaloEnergyTool::muSpecResolParam
static double muSpecResolParam(double trackMomentum, double eta)
Definition: MuidCaloEnergyTool.cxx:485
x
#define x
Rec::MuidCaloEnergyTool::m_emF1Cut
double m_emF1Cut
Definition: MuidCaloEnergyTool.h:96
Rec::MuidCaloEnergyTool::initialize
StatusCode initialize() override
Definition: MuidCaloEnergyTool.cxx:76
IMuidTrackIsolation.h
Rec::MuidCaloEnergyTool::finalize
StatusCode finalize() override
Definition: MuidCaloEnergyTool.cxx:106
Rec::MuidCaloEnergyTool::m_cosmics
bool m_cosmics
Definition: MuidCaloEnergyTool.h:87
Rec::MuidCaloEnergyTool::m_maxNTracksIso
int m_maxNTracksIso
Definition: MuidCaloEnergyTool.h:99
Rec::CaloMeas
Definition: CaloMeas.h:19
Rec::MuidCaloEnergyTool::landau
static double landau(double x, double mpv, double sigma, bool norm)
Definition: MuidCaloEnergyTool.cxx:524
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Rec::MuidCaloEnergyTool::m_caloParamTool
ToolHandle< IMuidCaloEnergyParam > m_caloParamTool
Definition: MuidCaloEnergyTool.h:75
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Rec::MuidCaloEnergyTool::m_FSRtreatment
bool m_FSRtreatment
Definition: MuidCaloEnergyTool.h:90
Rec::MuidCaloEnergyTool::measurement
std::unique_ptr< CaloEnergy > measurement(const EventContext &ctx, double trackMomentum, double eta, double phi, const CaloMeas &caloMeas) const
Definition: MuidCaloEnergyTool.cxx:238
Trk::ParametersBase
Definition: ParametersBase.h:55
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
IMuidCaloEnergyParam.h
Rec::MuidCaloEnergyTool::m_countMeasurement
std::atomic_int m_countMeasurement
Definition: MuidCaloEnergyTool.h:105
Rec::IMuidCaloEnergy
Definition: IMuidCaloEnergy.h:31
Rec::MuidCaloEnergyTool::m_trackIsolationTool
ToolHandle< IMuidTrackIsolation > m_trackIsolationTool
Definition: MuidCaloEnergyTool.h:80
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Rec::MuidCaloEnergyTool::MuidCaloEnergyTool
MuidCaloEnergyTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MuidCaloEnergyTool.cxx:41
IMuidCaloEnergy.h
Rec::MuidCaloEnergyTool
Definition: MuidCaloEnergyTool.h:43
Rec::MuidCaloEnergyTool::m_countMop
std::atomic_int m_countMop
Definition: MuidCaloEnergyTool.h:106
AthAlgTool
Definition: AthAlgTool.h:26
Rec::MuidCaloEnergyTool::~MuidCaloEnergyTool
~MuidCaloEnergyTool(void)
Rec::MuidCaloEnergyTool::m_minMuonPt
double m_minMuonPt
Definition: MuidCaloEnergyTool.h:101
Rec::MuidCaloEnergyTool::m_trackIsolation
bool m_trackIsolation
Definition: MuidCaloEnergyTool.h:92
Rec::MuidCaloEnergyTool::m_hecMinEnergy
double m_hecMinEnergy
Definition: MuidCaloEnergyTool.h:98
Rec::MuidCaloEnergyTool::m_emMinEnergy
double m_emMinEnergy
Definition: MuidCaloEnergyTool.h:97
Rec::MuidCaloEnergyTool::energyLoss
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.
Definition: MuidCaloEnergyTool.cxx:113