ATLAS Offline Software
Loading...
Searching...
No Matches
FsrPhotonTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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"
12
13
14// Local include(s):
16
17namespace CP
18{
21}
23
24
25namespace FSR {
26
32 class FsrPhotonTool : public virtual IFsrPhotonTool,
33 public asg::AsgTool {
34
37
38 public:
40 FsrPhotonTool( const std::string& name );
41
44
47
49 virtual StatusCode initialize();
50
52
55
57 virtual CP::CorrectionCode getFsrPhoton(const xAOD::IParticle* part, FsrCandidate& candidate,
58 xAOD::PhotonContainer* photons,
59 const xAOD::ElectronContainer* electrons);
60
63 virtual std::vector<FsrCandidate>* getFsrCandidateList(const xAOD::IParticle* part,
64 xAOD::PhotonContainer* photons,
65 const xAOD::ElectronContainer* electrons);
66
68 virtual std::vector<FsrCandidate>* getFarFsrCandidateList(const xAOD::IParticle* part,
69 xAOD::PhotonContainer* photons_cont);
70
72 virtual std::vector<FsrCandidate>* getNearFsrCandidateList(const xAOD::Muon* part,
73 const xAOD::PhotonContainer* photons_cont,
74 const xAOD::ElectronContainer* electrons_cont);
75
77 private:
79 std::vector<FsrCandidate>* sortFsrCandidates( const std::vector< std::pair <const xAOD::IParticle*, double> >& FsrCandList,
80 const std::string& option="ET");
81 bool isOverlap(const xAOD::Electron_v1* electron, const std::vector< std::pair <const xAOD::IParticle*, double> >& phfsr,
82 unsigned int nofPhFsr);
83 double deltaR(float muonEta, float muonPhi, float phEta, float phPhi) const;
84 double deltaPhi(float phi1, float phi2) const;
85 static bool compareEt(const FsrCandidate& c1, const FsrCandidate& c2) { return (c1.Et > c2.Et); }
86
87 // Note: selecion originally had separate cuts for sliding window clusters and topo clusters
88 // where the min Et threshold for SW clusters was higher than for topoclusters
89 // TODO: remove this distinction since there are only topo clusters in the reconstruction since 2017
90 Gaudi::Property<double> m_high_et_min {this, "high_et_min", 3500. , "Minimum Et cut for higg Et photons" };
91 Gaudi::Property<double> m_overlap_el_ph{this, "overlap_el_ph", 0.01 , "Overlap dR for electrons and photons" };
92 Gaudi::Property<double> m_overlap_el_mu{this, "overlap_el_mu", 0.001 , "Overlap dR for electrons and muons" };
93 Gaudi::Property<double> m_far_fsr_drcut{this, "far_fsr_drcut", 0.15 , "Minimum dR cut for far fsr" };
94 Gaudi::Property<double> m_far_fsr_etcut{this, "far_fsr_etcut", 10000.0 , "Minimum et cut for far fsr" };
95 Gaudi::Property<double> m_drcut {this, "drcut", 0.15 , "Maximun dR cut to be near fsr" };
96 Gaudi::Property<double> m_etcut {this, "etcut", 1000.0 , "Minimum Et cut for near fsr" };
97 Gaudi::Property<double> m_f1cut {this, "f1cut", 0.1 , "f1 cut for high Et clusters" };
98 Gaudi::Property<double> m_topo_drcut{this, "topo_drcut", 0.08 , "Maximum dR cut for low Et clusters" };
99 Gaudi::Property<double> m_topo_f1cut{this, "topo_f1cut", 0.2 , "Minimum f1 cut for low Et clusters" };
100 Gaudi::Property<std::string> m_far_fsr_isoWorkingPoint{this, "far_fsr_isoWorkingPoint", "FixedCutLoose", "Far fsr isolation working point" };
101 Gaudi::Property<std::string> m_energyRescalerName{this, "egCalibToolName", "" , "EnergyRescale tool to calibrate photons as electrons" };
102 Gaudi::Property<bool> m_suppresEnergyRescaling{this, "SuppressEnergyRescaling", false , "flag to suppress energy rescaling - should only be used for testing purposes, e.g. test w/o calib for PhysLite " };
103 Gaudi::Property<bool> m_AFII_corr{this, "AFII_corr", false , "Is AFII for isolation correction" };
104 Gaudi::Property<bool> m_is_mc{this, "IsMC", true , "Is MC" };
105 //Flag to use isolation variables with 'CloseByCorr' suffix which have been corrected for close-by leptons and photons. If false, the uncorrected variables are used
106 Gaudi::Property<bool> m_doCloseByIso{this, "DoCloseByCorrection", true , "flag to use isolation variables with 'CloseByCorr' suffix " };
107
108 std::vector<FsrCandidate> m_fsrPhotons;
110
111 ToolHandle<CP::IIsolationSelectionTool> m_isoSelTool;
112 ToolHandle<CP::IEgammaCalibrationAndSmearingTool> m_energyRescaler;
113 ToolHandle<IAsgSelectionTool> m_elIsGoodOQSelectionTool;
114 ToolHandle<IAsgSelectionTool> m_phIsGoodOQSelectionTool;
115
116
117 }; // class FsrPhotonTool
118
119} // namespace FSR
120
121#endif // FSRUTILS_FsrPhotonTool_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Return value from object correction CP tools.
Simple interface for searching the FSR candidate.
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)
Gaudi::Property< bool > m_doCloseByIso
Gaudi::Property< double > m_drcut
Gaudi::Property< std::string > m_energyRescalerName
Gaudi::Property< double > m_far_fsr_etcut
ToolHandle< IAsgSelectionTool > m_phIsGoodOQSelectionTool
Gaudi::Property< double > m_overlap_el_ph
static bool compareEt(const FsrCandidate &c1, const FsrCandidate &c2)
Gaudi::Property< double > m_topo_drcut
Gaudi::Property< double > m_far_fsr_drcut
Gaudi::Property< std::string > m_far_fsr_isoWorkingPoint
FsrCandidate::FsrType m_fsr_type
Gaudi::Property< double > m_etcut
FsrPhotonTool(const std::string &name)
Create a proper constructor for Athena.
std::vector< FsrCandidate > * sortFsrCandidates(const std::vector< std::pair< const xAOD::IParticle *, double > > &FsrCandList, const std::string &option="ET")
Need for the FSR search.
Gaudi::Property< double > m_f1cut
double deltaR(float muonEta, float muonPhi, float phEta, float phPhi) const
virtual StatusCode initialize()
Function initialising the tool.
Gaudi::Property< bool > m_is_mc
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.
bool isOverlap(const xAOD::Electron_v1 *electron, const std::vector< std::pair< const xAOD::IParticle *, double > > &phfsr, unsigned int nofPhFsr)
double deltaPhi(float phi1, float phi2) const
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...
Gaudi::Property< bool > m_AFII_corr
std::vector< FsrCandidate > m_fsrPhotons
ToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_energyRescaler
ToolHandle< IAsgSelectionTool > m_elIsGoodOQSelectionTool
virtual std::vector< FsrCandidate > * getFarFsrCandidateList(const xAOD::IParticle *part, xAOD::PhotonContainer *photons_cont)
Find and Return ALL FAR FSR candidates.
Gaudi::Property< double > m_topo_f1cut
Gaudi::Property< bool > m_suppresEnergyRescaling
Gaudi::Property< double > m_overlap_el_mu
Gaudi::Property< double > m_high_et_min
ToolHandle< CP::IIsolationSelectionTool > m_isoSelTool
~FsrPhotonTool()
Create a destructor.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Muon_v1 Muon
Reference the current persistent version: