ATLAS Offline Software
FsrPhotonTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef FSRUTILS_FsrPhotonTool_H
6 #define FSRUTILS_FsrPhotonTool_H
7 
8 // Framework include(s):
9 #include "AsgTools/AsgTool.h"
10 #include "AsgTools/ToolHandle.h"
11 
12 // Local include(s):
14 
15 namespace CP
16 {
17  class IIsolationSelectionTool;
18  class IIsolationCorrectionTool;
19  class IIsolationCloseByCorrectionTool;
20  class IEgammaCalibrationAndSmearingTool;
21 }
22 
23 namespace FSR {
24 
29  class FsrPhotonTool : public virtual IFsrPhotonTool,
30  public asg::AsgTool {
31 
34 
35  public:
37  FsrPhotonTool( const std::string& name );
38 
41 
44 
46  virtual StatusCode initialize();
47 
49 
52 
55  xAOD::PhotonContainer* photons,
57 
60  virtual std::vector<FsrCandidate>* getFsrCandidateList(const xAOD::IParticle* part,
61  xAOD::PhotonContainer* photons,
63 
65  virtual std::vector<FsrCandidate>* getFarFsrCandidateList(const xAOD::IParticle* part,
66  xAOD::PhotonContainer* photons_cont);
67 
69  virtual std::vector<FsrCandidate>* getNearFsrCandidateList(const xAOD::Muon* part,
70  const xAOD::PhotonContainer* photons_cont,
71  const xAOD::ElectronContainer* electrons_cont);
72 
74  private:
76  std::vector<FsrCandidate>* sortFsrCandidates( const std::vector< std::pair <const xAOD::IParticle*, double> >& FsrCandList,
77  const std::string& option="ET");
78  bool isOverlap(const xAOD::Electron_v1* electron, const std::vector< std::pair <const xAOD::IParticle*, double> >& phfsr,
79  unsigned int nofPhFsr);
80  double deltaR(float muonEta, float muonPhi, float phEta, float phPhi) const;
81  double deltaPhi(float phi1, float phi2) const;
82  static bool compareEt(const FsrCandidate& c1, const FsrCandidate& c2) { return (c1.Et > c2.Et); }
83 
84 
85  double m_high_et_min;
88 
92 
93  double m_drcut;
94  double m_etcut;
95  double m_f1cut;
96  double m_topo_drcut;
97  double m_topo_f1cut;
98 
99  bool m_is_mc;
101 
102  std::vector<FsrCandidate> m_fsrPhotons;
104 
105  ToolHandle<CP::IIsolationCorrectionTool> m_isoCorrTool;
106  ToolHandle<CP::IIsolationCloseByCorrectionTool> m_isoCloseByCorrTool;
107  std::string m_energyRescalerName;
108  ToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_energyRescaler;
109 
110  }; // class FsrPhotonTool
111 
112 } // namespace FSR
113 
114 #endif // FSRUTILS_FsrPhotonTool_H
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
FSR
Definition: FsrPhotonTool.h:23
FSR::FsrPhotonTool::m_far_fsr_isoWorkingPoint
std::string m_far_fsr_isoWorkingPoint
Definition: FsrPhotonTool.h:91
FSR::FsrCandidate::FsrType
FsrType
Definition: IFsrPhotonTool.h:29
FSR::FsrPhotonTool::m_topo_f1cut
double m_topo_f1cut
Definition: FsrPhotonTool.h:97
extractSporadic.c1
c1
Definition: extractSporadic.py:134
FSR::FsrPhotonTool::compareEt
static bool compareEt(const FsrCandidate &c1, const FsrCandidate &c2)
Definition: FsrPhotonTool.h:82
FSR::FsrPhotonTool
Implementation for the "FSR" provider tool.
Definition: FsrPhotonTool.h:30
FSR::IFsrPhotonTool
Definition: IFsrPhotonTool.h:47
FSR::FsrPhotonTool::m_high_et_min
double m_high_et_min
Definition: FsrPhotonTool.h:85
FSR::FsrPhotonTool::m_overlap_el_ph
double m_overlap_el_ph
Definition: FsrPhotonTool.h:86
FSR::FsrPhotonTool::m_fsrPhotons
std::vector< FsrCandidate > m_fsrPhotons
Definition: FsrPhotonTool.h:102
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
IFsrPhotonTool.h
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
FSR::FsrPhotonTool::getFsrPhoton
virtual CP::CorrectionCode getFsrPhoton(const xAOD::IParticle *part, FsrCandidate &candidate, xAOD::PhotonContainer *photons, const xAOD::ElectronContainer *electrons)
Get the "FSR candidate" as a return value for a muon (collinar and far FSR)
Definition: FsrPhotonTool.cxx:116
FSR::FsrPhotonTool::m_drcut
double m_drcut
Definition: FsrPhotonTool.h:93
FSR::FsrPhotonTool::m_far_fsr_drcut
double m_far_fsr_drcut
Definition: FsrPhotonTool.h:89
FSR::FsrPhotonTool::m_isoCloseByCorrTool
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_isoCloseByCorrTool
Definition: FsrPhotonTool.h:106
FSR::FsrPhotonTool::m_f1cut
double m_f1cut
Definition: FsrPhotonTool.h:95
FSR::FsrPhotonTool::m_far_fsr_etcut
double m_far_fsr_etcut
Definition: FsrPhotonTool.h:90
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FSR::FsrPhotonTool::m_energyRescalerName
std::string m_energyRescalerName
Definition: FsrPhotonTool.h:107
FSR::FsrPhotonTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: FsrPhotonTool.cxx:50
FSR::FsrPhotonTool::m_etcut
double m_etcut
Definition: FsrPhotonTool.h:94
FSR::FsrPhotonTool::~FsrPhotonTool
~FsrPhotonTool()
Create a destructor.
Definition: FsrPhotonTool.cxx:46
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
FSR::FsrPhotonTool::deltaR
double deltaR(float muonEta, float muonPhi, float phEta, float phPhi) const
Definition: FsrPhotonTool.cxx:482
FSR::FsrPhotonTool::m_isoCorrTool
ToolHandle< CP::IIsolationCorrectionTool > m_isoCorrTool
Definition: FsrPhotonTool.h:105
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
compileRPVLLRates.c2
c2
Definition: compileRPVLLRates.py:361
xAOD::Electron_v1
Definition: Electron_v1.h:34
FSR::FsrPhotonTool::isOverlap
bool isOverlap(const xAOD::Electron_v1 *electron, const std::vector< std::pair< const xAOD::IParticle *, double > > &phfsr, unsigned int nofPhFsr)
Definition: FsrPhotonTool.cxx:459
FSR::FsrPhotonTool::m_is_mc
bool m_is_mc
Definition: FsrPhotonTool.h:99
FSR::FsrPhotonTool::getFarFsrCandidateList
virtual std::vector< FsrCandidate > * getFarFsrCandidateList(const xAOD::IParticle *part, xAOD::PhotonContainer *photons_cont)
Find and Return ALL FAR FSR candidates.
Definition: FsrPhotonTool.cxx:199
FSR::FsrCandidate
Simple interface for searching the FSR candidate.
Definition: IFsrPhotonTool.h:27
FSR::FsrPhotonTool::m_topo_drcut
double m_topo_drcut
Definition: FsrPhotonTool.h:96
FSR::FsrPhotonTool::FsrPhotonTool
FsrPhotonTool(const std::string &name)
Create a proper constructor for Athena.
Definition: FsrPhotonTool.cxx:22
FSR::FsrPhotonTool::m_overlap_el_mu
double m_overlap_el_mu
Definition: FsrPhotonTool.h:87
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
FSR::FsrPhotonTool::m_energyRescaler
ToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_energyRescaler
Definition: FsrPhotonTool.h:108
FSR::FsrPhotonTool::sortFsrCandidates
std::vector< FsrCandidate > * sortFsrCandidates(const std::vector< std::pair< const xAOD::IParticle *, double > > &FsrCandList, const std::string &option="ET")
Need for the FSR search.
Definition: FsrPhotonTool.cxx:372
FSR::FsrPhotonTool::getFsrCandidateList
virtual std::vector< FsrCandidate > * getFsrCandidateList(const xAOD::IParticle *part, xAOD::PhotonContainer *photons, const xAOD::ElectronContainer *electrons)
Find ALL FSR candidates for a given particle (electron or muon) providing newly calibrated photon and...
Definition: FsrPhotonTool.cxx:150
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
FSR::FsrPhotonTool::m_AFII_corr
bool m_AFII_corr
Definition: FsrPhotonTool.h:100
FSR::FsrPhotonTool::m_fsr_type
FsrCandidate::FsrType m_fsr_type
Definition: FsrPhotonTool.h:103
ToolHandle.h
AsgTool.h
FSR::FsrPhotonTool::deltaPhi
double deltaPhi(float phi1, float phi2) const
Definition: FsrPhotonTool.cxx:474
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
FSR::FsrPhotonTool::getNearFsrCandidateList
virtual std::vector< FsrCandidate > * getNearFsrCandidateList(const xAOD::Muon *part, const xAOD::PhotonContainer *photons_cont, const xAOD::ElectronContainer *electrons_cont)
Find and Return ALL NEAR FSR candidates.
Definition: FsrPhotonTool.cxx:265