ATLAS Offline Software
FsrPhotonTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <utility>
6 
7 // Local include(s):
12 #include "xAODEgamma/Photon.h"
14 #include "AsgTools/AsgToolConfig.h"
16 
17 
18 namespace FSR {
19 
20  FsrPhotonTool::FsrPhotonTool( const std::string& name )
21  : asg::AsgTool( name ),
22  m_fsr_type(FsrCandidate::FsrUnknown),
23  m_isoSelTool("", this),
24  m_isoCorrTool("", this),
25  m_energyRescaler("", this)
26  {}
27 
29  {}
30 
31 
33 
34  // Greet the user:
35  ATH_MSG_INFO( "Initialising..." );
36 
37  ATH_MSG_INFO( "initialize: high_et_min " << m_high_et_min);
38  ATH_MSG_INFO( "initialize: overlap_el_ph " << m_overlap_el_ph);
39  ATH_MSG_INFO( "initialize: overlap_el_mu " << m_overlap_el_mu);
40  ATH_MSG_INFO( "initialize: far_fsr_drcut " << m_far_fsr_drcut);
41  ATH_MSG_INFO( "initialize: far_fsr_etcut " << m_far_fsr_etcut);
42  ATH_MSG_INFO( "initialize: far_fsr_isoWorkingPoint " << m_far_fsr_isoWorkingPoint);
43  ATH_MSG_INFO( "initialize: drcut " << m_drcut);
44  ATH_MSG_INFO( "initialize: etcut " << m_etcut);
45  ATH_MSG_INFO( "initialize: f1cut " << m_f1cut);
46  ATH_MSG_INFO( "initialize: topo_drcut " << m_topo_drcut);
47  ATH_MSG_INFO( "initialize: topo_f1cut " << m_topo_f1cut);
48  ATH_MSG_INFO( "initialize: egCalibToolName " << m_energyRescalerName);
49 
50  // Initialize the isolation tool for leakage correction
51 
52  asg::AsgToolConfig config1 ("CP::IsolationCorrectionTool/isoCorrTool");
53  RETURN_CHECK("initialize", config1.setProperty ("AFII_corr", m_AFII_corr));
54  RETURN_CHECK("initialize", config1.setProperty ("IsMC", m_is_mc));
55  ATH_MSG_DEBUG("initialize - set IsMC/AFII_corr: " << int(m_is_mc) << "/" << int(m_AFII_corr) << " for IsolationCorrectionTool ");
56  if (msg().level() <= MSG::DEBUG) {
57  RETURN_CHECK( "initialize", config1.setProperty( "OutputLevel", MSG::DEBUG) );
58  }
59  RETURN_CHECK("initialize", config1.makePrivateTool (m_isoCorrTool));
60  ATH_MSG_INFO("initialize - IsolationCorrectionTool initialized " << m_isoCorrTool->name());
61 
62 
63  // Create IsolationSelectionTool for far fsr selection.
64  // Will use the closeBy corrected isolation variables if DoCloseByCorrection is set to true, which is default.
65  asg::AsgToolConfig config2 ("CP::IsolationSelectionTool/isolationSelectionTool");
66  RETURN_CHECK("initialize", config2.setProperty( "PhotonWP", m_far_fsr_isoWorkingPoint));
67 
68  if (m_doCloseByIso) {
69  RETURN_CHECK("initialize", config2.setProperty("IsoDecSuffix", "CloseByCorr"));
70  if (msg().level() <= MSG::DEBUG) {
71  RETURN_CHECK( "initialize", config2.setProperty( "OutputLevel", MSG::DEBUG) );
72  }
73  }
74  RETURN_CHECK("initialize", config2.makePrivateTool (m_isoSelTool));
75  ATH_MSG_INFO("initialize - photon IsolationSelectionTool initialized " << m_isoSelTool->name());
76 
77  RETURN_CHECK("initialize", m_isoSelTool.retrieve());
78  RETURN_CHECK("initialize", m_isoCorrTool.retrieve());
79 
80  // get egamma calibration tool - needed to recalibrate electron as a photon
81  if (m_energyRescalerName.size()) {
82  m_energyRescaler = ToolHandle<CP::IEgammaCalibrationAndSmearingTool>(m_energyRescalerName);
83  if (m_energyRescaler.empty()) {
84  ATH_MSG_ERROR("initialize - unable to get IEgammaCalibrationAndSmearingTool with name: " << m_energyRescalerName);
85  return StatusCode::FAILURE;
86  }
87 
88  ATH_MSG_INFO("initialize - found IEgammaCalibrationAndSmearingTool with name: " << m_energyRescalerName);
89  }
90  else {
91  ATH_MSG_ERROR("initialize - CANNOT retrive IEgammaCalibrationAndSmearingTool. Please set the property 'egCalibToolName' to be able to recalibrate fsr photon found as an electron ");
92  return StatusCode::FAILURE;
93  }
94 
95 
96  // Return gracefully:
97  return StatusCode::SUCCESS;
98  }
99 
100 
102  xAOD::PhotonContainer* photons,
104  {
105 
106  if (photons == 0 ||electrons == 0) {
107  ATH_MSG_ERROR( "getFsrPhoton: You MUST provide photon AND electron containers" );
108  candidate = FsrCandidate();
110  }
111 
112 
113  std::vector<FsrCandidate>* cands = getFsrCandidateList(part, photons, electrons);
114 
115  ATH_MSG_DEBUG( "Fsr candidate size = " << cands->size() );
116 
117  // Return gracefully:
118  if (cands->size() > 0) {
119  candidate = cands->at(0);
120  return CP::CorrectionCode::Ok;
121  }
122  candidate = FsrCandidate();
123  ATH_MSG_DEBUG( "Fsr candidate f1 = " << candidate.f1
124  << ", deltaR = " << candidate.deltaR
125  << ", Et = " << candidate.Et
126  << ", Eta = " << candidate.eta
127  << ", Phi = " << candidate.phi
128  << ", type = " <<candidate.type);
130 
131  }
132 
133 
134  std::vector<FsrCandidate>*
136  xAOD::PhotonContainer* photons,
138  {
139  xAOD::PhotonContainer* photons_cont = NULL;
140  const xAOD::ElectronContainer* electrons_cont = NULL;
141 
142  // check for photon container
143  if (0 == photons) {
144  ATH_MSG_ERROR( "getFsrCandidateList: No Photon container provided" );
145  return NULL;
146  }
147  else {
148  // set the containers
149  photons_cont = photons;
150  }
151 
152  // check for electron container
153  if (0 == electrons) {
154  ATH_MSG_ERROR( "getFsrCandidateList: No Electron container provided" );
155  return NULL;
156  }
157  else {
158  // set the containers
159  electrons_cont = electrons;
160  }
161 
165 
167  m_fsr_type = FsrCandidate::FsrType::FsrUnknown;
168 
169  const xAOD::Electron* electron = dynamic_cast<const xAOD::Electron*>(part);
170  if (electron) {
171  return getFarFsrCandidateList(part, photons_cont);
172  }
173 
174  const xAOD::Muon* muon = dynamic_cast<const xAOD::Muon*>(part);
175  if (muon) {
176  std::vector<FsrCandidate>* nearlist = getNearFsrCandidateList(muon, photons_cont, electrons_cont);
177  return (nearlist->size() > 0) ? nearlist : getFarFsrCandidateList(part, photons_cont);
178  }
179 
180  ATH_MSG_WARNING( "The FSR search not done !" );
181  return NULL;
182  }
183 
184  std::vector<FsrCandidate>* FsrPhotonTool::getFarFsrCandidateList(const xAOD::IParticle* part,
185  xAOD::PhotonContainer* photons_cont) {
186 
187 
188  static const SG::AuxElement::Accessor<char> DFCommonPhotonsIsEMTight ("DFCommonPhotonsIsEMTight");
189  static const SG::AuxElement::Accessor<float> topoetcone20 ("topoetcone20");
190 
192  m_fsr_type = FsrCandidate::FsrType::FsrFar;
193  std::vector< std::pair <const xAOD::IParticle*, double> > farFsrCandList;
194  farFsrCandList.clear();
195  farFsrCandList.reserve(photons_cont->size());
196 
197  // Save muon or electron of overlap removal for isolation
199  parts.push_back(part);
200 
201  ATH_MSG_DEBUG( "In getFarFsrCandidateList function : photon size = " << photons_cont->size());
202 
203  for (auto ph : *photons_cont) {
204 
205  bool is_tight_photon = DFCommonPhotonsIsEMTight(*ph);
206  if ( (ph->p4().Et() > m_far_fsr_etcut) && is_tight_photon) {
207  // correct isolation leakage
208 
209  ATH_MSG_VERBOSE( "Far Fsr ph bef : pt " << ph->pt() << " topoetcone20 = " << topoetcone20(*ph));
210 
211  CP::CorrectionCode rc = m_isoCorrTool->applyCorrection(*ph);
212  if (CP::CorrectionCode::Ok != rc) {
213  ATH_MSG_ERROR("applyIsoSelection: Unable to apply iso correction for photon " << ph->pt());
214  }
215 
216  ATH_MSG_VERBOSE( "Far Fsr ph aft : pt " << ph->pt() << " topoetcone20 = " << topoetcone20(*ph));
217 
218  // apply isolation selection
219  bool farPhIsoOK = (bool) m_isoSelTool->accept(*ph);
220 
221  ATH_MSG_VERBOSE( "Far Fsr ph aft1: pt " << ph->pt() << " topoetcone20 = " << topoetcone20(*ph));
222 
223  bool far_fsr_drcut_isOK = false;
224  if (farPhIsoOK) {
225  double dr = deltaR(part->eta(), part->phi(), ph->eta(), ph->phi());
226  far_fsr_drcut_isOK = (dr > m_far_fsr_drcut);
227 
228  if (far_fsr_drcut_isOK && dr < 0.2) {
229  ATH_MSG_VERBOSE( "Far Fsr candidate kinematics : author " << ph->author()
230  << " Et = " << ph->p4().Et()
231  << " dr = " << dr
232  << " isoIsOK = " << farPhIsoOK );
233  }
234 
235  if(far_fsr_drcut_isOK) farFsrCandList.push_back(std::make_pair(ph, dr));
236  }
237 
238  ATH_MSG_DEBUG( "Far Fsr candidate kinematics : author " << ph->author()
239  << " Et = " << ph->p4().Et()
240  << " tight = " << is_tight_photon
241  << " farPhIsoOK = " << farPhIsoOK
242  << " far_fsr_drcut_isOK = " << far_fsr_drcut_isOK);
243  }
244  }
245 
247  return sortFsrCandidates(farFsrCandList);
248  }
249 
250 
251  std::vector<FsrCandidate>* FsrPhotonTool::getNearFsrCandidateList(const xAOD::Muon* muon, const xAOD::PhotonContainer* photons_cont, const xAOD::ElectronContainer* electrons_cont)
252  {
254  m_fsr_type = FsrCandidate::FsrType::FsrNear;
257  std::vector< std::pair <const xAOD::IParticle*, double> > nearFsrCandList;
258 
259  nearFsrCandList.reserve(photons_cont->size()+electrons_cont->size());
260  ATH_MSG_DEBUG( "In getNearFsrCandidateList function : photon size = " << photons_cont->size()
261  << ", electron size = " << electrons_cont->size());
262 
263  for (auto photon : *photons_cont) {
264  float photon_f1;
265  photon->showerShapeValue(photon_f1, xAOD::EgammaParameters::f1);
266 
267  // Selection is tighter for photons below high_et_min
268  bool high_et_photon = (photon->p4().Et() > m_high_et_min);
269  if( ( high_et_photon && (photon->p4().Et() > m_etcut) && (photon_f1 > m_f1cut) )
270  ||( !high_et_photon && (photon_f1 > m_topo_f1cut)
271  && (m_etcut < photon->p4().Et())) ) {
272 
273  double dr = deltaR(muon->eta(), muon->phi(), photon->eta(), photon->phi());
274 
275  // ph_cl_eta/phi should be used in duplicate
276  if ( (!high_et_photon && dr < m_topo_drcut)
277  || (high_et_photon && dr < m_drcut) ) {
278  nearFsrCandList.push_back(std::make_pair(photon, dr));
279  ATH_MSG_DEBUG( "Near Fsr candidates ( photon ) kinematics ; author "
280  << photon->author()
281  << " Et = " << photon->p4().Et()
282  << " f1 = " << photon_f1
283  << " dr = " << dr );
284  }
285  }
286  }
287 
288  unsigned int nofPhFsr = nearFsrCandList.size();
289 
290  // look for fsr photons in electron container
291  for (auto electron : *electrons_cont)
292  {
293  // remove overlap with fsr already found
294  if ( (nearFsrCandList.size() > 0) && isOverlap(electron, nearFsrCandList, nofPhFsr) ) continue;
295 
296  const xAOD::TrackParticle* electron_track = electron->trackParticle();
297  const xAOD::TrackParticle* muon_track = muon->primaryTrackParticle();
298 
299  bool elmutrackmatch = ( (fabs(electron_track->theta()- muon_track->theta()) < m_overlap_el_mu) &&
300  (deltaPhi(electron_track->phi(), muon_track->phi()) < m_overlap_el_mu) );
301  float electron_f1;
302  electron->showerShapeValue(electron_f1, xAOD::EgammaParameters::f1);
303 
304  // Get the corrected cluster energy:
305  // if the electron energy has been calibrated, we apply the change applied to the
306  // electron four vector assuming that the uncorrected energy is
307  // Eclus/cosh(track_eta). This will not work if an e-p combination has also been
308  // applied, and so the following will have to change. RDS 04/2015.
309  float eCorr = electron->p4().Et()/(electron->caloCluster()->e()/cosh(electron->trackParticle()->eta()));
310  float clEt = eCorr*electron->caloCluster()->et();
311 
312  ATH_MSG_VERBOSE( "Near Fsr candidate ( electron ) Et = " << clEt << " eCorr " << eCorr);
313 
314  // Allow topo-clusters to come in as electrons - apply f1 sliding window cut for Et
315  // > 3.5 GeV and f1 topo cut for Et 1-3.5 GeV
316  if( elmutrackmatch &&
317  ((clEt < m_high_et_min && m_etcut < clEt && electron_f1 > m_topo_f1cut ) ||
318  (m_high_et_min < clEt && electron_f1 > m_f1cut )) ) {
319 
320  double dr = deltaR(muon->eta(), muon->phi(), electron->caloCluster()->eta(), electron->caloCluster()->phi());
321 
322  if ( dr < m_drcut ) {
323  nearFsrCandList.push_back(std::make_pair(electron, dr));
324  ATH_MSG_DEBUG( "Near Fsr candidates ( electron ) kinematics : author "
325  << electron->author()
326  << " Et = " << clEt
327  << " f1 = " << electron_f1
328  << " dr = " << dr );
329  }
330  else ATH_MSG_VERBOSE( "FAILED Near Fsr candidates ( electron ) kinematics : author "
331  << electron->author()
332  << " Et = " << clEt
333  << " f1 = " << electron_f1
334  << " dr = " << dr );
335  }
336  else {
337  double dr = deltaR(muon->eta(), muon->phi(), electron->caloCluster()->eta(), electron->caloCluster()->phi());
338 
339  if (elmutrackmatch && dr < m_drcut ) {
340  ATH_MSG_DEBUG( "FAILED Near Fsr candidates ( electron ) kinematics : author "
341  << electron->author()
342  << " Et = " << clEt
343  << " f1 = " << electron_f1
344  << " dr = " << deltaR(muon->eta(), muon->phi(), electron->caloCluster()->eta(), electron->caloCluster()->phi())
345  << " theta/phi el/mu " << electron_track->theta() << "/" << muon->p4().Theta()
346  << "/" << electron_track->phi() << "/" << muon->phi()
347  << " theta/phi mu trk " << muon_track->theta() << "/" << muon_track->phi()
348  );
349  }
350  }
351  }
352 
353  return sortFsrCandidates(nearFsrCandList);
354 
355  } // end of getFsrPhotons
356 
357 
358  std::vector<FsrCandidate>* FsrPhotonTool::sortFsrCandidates(const std::vector< std::pair <const xAOD::IParticle*, double> >& FsrCandList, const std::string& option)
359  {
360 
361  m_fsrPhotons.clear();
362  m_fsrPhotons.reserve(FsrCandList.size());
363 
364  for (unsigned int i=0; i < FsrCandList.size(); i++ ) {
365  FsrCandidate c;
366  const xAOD::IParticle* particle = FsrCandList.at(i).first;
367  const xAOD::Electron* electron = dynamic_cast<const xAOD::Electron*>(particle);
368  const xAOD::Photon* photon = dynamic_cast<const xAOD::Photon*>(particle);
369  float part_f1(-999);
370  if ( electron ){
371  c.container = "electron" ;
372 
373  // If we have an energy rescaler, calibrate correctly the electron as a photon
374  if (!m_energyRescaler.empty()) {
376  photon.Egamma_v1::operator=(*electron);
377  if (m_energyRescaler->applyCorrection(photon) != CP::CorrectionCode::Ok) {
378  ATH_MSG_ERROR("FsrPhotonTool::sortFsrCandidates: Unable to applyCorrection to photon ");
379  }
380  if ( photon.showerShapeValue(part_f1, xAOD::EgammaParameters::f1) ) c.f1 = part_f1;
381  c.Et = photon.pt();
382  c.eta = photon.caloCluster()->eta();
383  c.phi = photon.caloCluster()->phi();
384 
385  ATH_MSG_DEBUG("FsrPhotonTool::sortFsrCandidates: el/ph et " << electron->pt() << "/"
386  << electron->caloCluster()->eta() << "/" << electron->caloCluster()->phi() << " "
387  << photon.pt() << "/"
388  << photon.caloCluster()->eta() << "/" << photon.caloCluster()->phi());
389  }
390  else {
391  // Use the cluster pt/eta/phi when considering the electron to be an FSR photon
392  // setup accessor for electron cluster corrected energy
393 
394  // Get the corrected cluster energy:
395  // if the electron energy has been calibrated, we apply the change applied to the
396  // electron four vector assuming that the uncorrected energy is
397  // Eclus/cosh(track_eta). This will not work if an e-p combination has also been
398  // applied, and so the following will have to change. RDS 04/2015.
399  float eCorr = electron->p4().Et()/(electron->caloCluster()->e()/cosh(electron->trackParticle()->eta()));
400  float clEt = eCorr*electron->caloCluster()->et();
401  if ( electron->showerShapeValue(part_f1, xAOD::EgammaParameters::f1) ) c.f1 = part_f1;
402  c.Et = clEt;
403  c.eta = electron->caloCluster()->eta();
404  c.phi = electron->caloCluster()->phi();
405  }
406 
407  }
408  else if ( photon ) {
409  c.container = "photon";
410  if ( photon->showerShapeValue(part_f1, xAOD::EgammaParameters::f1) ) c.f1 = part_f1;
411  c.Et = photon->p4().Et();
412  c.eta = photon->eta();
413  c.phi = photon->phi();
414  }
415  else {
416  ATH_MSG_WARNING( "sortFsrCandidates: undefined particle - NOT electron nor photon. Should never get here!" );
417  c.container = "";
418  c.Et = 0;
419  c.eta = 0;
420  c.phi = 0;
421  }
422  c.particle = particle;
423  c.deltaR = FsrCandList.at(i).second;
424  if(c.deltaR < 0.05) c.Et -= 400./cosh(particle->eta());
426  m_fsrPhotons.push_back(c);
427 
428  ATH_MSG_DEBUG( "sortFsrCandidates: save fsr candidate f1 = " << c.f1
429  << ", deltaR = " << c.deltaR
430  << ", Et = " << c.Et
431  << ", Eta = " << c.eta
432  << ", Phi = " << c.phi
433  << ", type = " <<c.type);
434 
435  }
436 
437  ATH_MSG_DEBUG( "sortFsrCandidates: found " << m_fsrPhotons.size() << " FSR photons" );
438 
439  // sort FSR candidates w.r.t min dR or ET
440  if (option=="ET") std::sort(m_fsrPhotons.begin(), m_fsrPhotons.end(), compareEt);
441  else std::sort(m_fsrPhotons.begin(), m_fsrPhotons.end());
442  return &m_fsrPhotons;
443  }
444 
445  bool FsrPhotonTool::isOverlap(const xAOD::Electron_v1* electron, const std::vector< std::pair <const xAOD::IParticle*, double> >& phfsr, unsigned int nofPhFsr)
446  {
447  for (unsigned int indx=0; indx < nofPhFsr; indx++ ) {
448  const xAOD::Photon* ph = dynamic_cast<const xAOD::Photon*>(phfsr.at(indx).first);
449  const xAOD::CaloCluster* ph_cl = ph->caloCluster();
450  const xAOD::CaloCluster* el_cl = electron->caloCluster();
451  double dr = deltaR(el_cl->eta(), el_cl->phi(),
452  ph_cl->eta(), ph_cl->phi());
453  ATH_MSG_VERBOSE( "isOverlap dr, ets " << (dr < m_overlap_el_ph) << "/" << dr << "/"
454  << ph_cl->et() << "/" << el_cl->et());
455  if ( dr < m_overlap_el_ph ) return true;
456  }
457  return false;
458  }
459 
460  double FsrPhotonTool::deltaPhi(float phi1, float phi2) const
461  {
462  double dphi= fabs(phi1 - phi2);
463  if (dphi > M_PI) dphi=2*M_PI-dphi;
464  return dphi;
465  }
466 
467 
468  double FsrPhotonTool::deltaR(float meta, float mphi, float peta, float pphi) const {
469 
470  double deta = fabs(meta - peta);
471  double dphi = deltaPhi(mphi, pphi);
472  double dR = sqrt((dphi*dphi)+(deta*deta));
473 
474  return dR;
475  }
476 
477 } // namespace FSR
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
FsrPhotonTool.h
RETURN_CHECK
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
Definition: ReturnCheck.h:26
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAOD::Iso::topoetcone20
@ topoetcone20
Topo-cluster ET-sum.
Definition: IsolationType.h:48
FSR::FsrCandidate::Et
double Et
Definition: IFsrPhotonTool.h:36
FSR
Definition: FsrPhotonTool.h:24
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FSR::FsrPhotonTool::m_f1cut
Gaudi::Property< double > m_f1cut
Definition: FsrPhotonTool.h:95
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
FSR::FsrCandidate::deltaR
double deltaR
Definition: IFsrPhotonTool.h:35
FSR::FsrPhotonTool::m_overlap_el_ph
Gaudi::Property< double > m_overlap_el_ph
Definition: FsrPhotonTool.h:89
FSR::FsrPhotonTool::compareEt
static bool compareEt(const FsrCandidate &c1, const FsrCandidate &c2)
Definition: FsrPhotonTool.h:83
asg
Definition: DataHandleTestTool.h:28
M_PI
#define M_PI
Definition: ActiveFraction.h:11
IsolationCorrectionTool.h
xAOD::CaloCluster_v1::et
double et() const
Definition: CaloCluster_v1.h:856
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
FSR::FsrPhotonTool::m_fsrPhotons
std::vector< FsrCandidate > m_fsrPhotons
Definition: FsrPhotonTool.h:105
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
ReturnCheck.h
asg::AsgToolConfig::makePrivateTool
::StatusCode makePrivateTool(ToolHandle< T > &toolHandle) const
make a private tool with the given configuration
FSR::FsrPhotonTool::m_is_mc
Gaudi::Property< bool > m_is_mc
Definition: FsrPhotonTool.h:101
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
FSR::FsrPhotonTool::m_far_fsr_isoWorkingPoint
Gaudi::Property< std::string > m_far_fsr_isoWorkingPoint
Definition: FsrPhotonTool.h:98
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:101
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
FSR::FsrCandidate::f1
double f1
Definition: IFsrPhotonTool.h:37
IEgammaCalibrationAndSmearingTool.h
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
FSR::FsrPhotonTool::m_energyRescalerName
Gaudi::Property< std::string > m_energyRescalerName
Definition: FsrPhotonTool.h:99
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
asg::AsgToolConfig
an object that can create a AsgTool
Definition: AsgToolConfig.h:22
IsolationSelectionTool.h
xAOD::EgammaParameters::f1
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition: EgammaEnums.h:52
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
FSR::FsrPhotonTool::m_etcut
Gaudi::Property< double > m_etcut
Definition: FsrPhotonTool.h:94
Photon.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AsgToolConfig.h
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
FSR::FsrPhotonTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: FsrPhotonTool.cxx:32
FSR::FsrPhotonTool::~FsrPhotonTool
~FsrPhotonTool()
Create a destructor.
Definition: FsrPhotonTool.cxx:28
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:468
FSR::FsrPhotonTool::m_doCloseByIso
Gaudi::Property< bool > m_doCloseByIso
Definition: FsrPhotonTool.h:103
FSR::FsrPhotonTool::m_isoCorrTool
ToolHandle< CP::IIsolationCorrectionTool > m_isoCorrTool
Definition: FsrPhotonTool.h:109
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FSR::FsrCandidate::FsrFar
@ FsrFar
Definition: IFsrPhotonTool.h:29
FSR::FsrPhotonTool::m_AFII_corr
Gaudi::Property< bool > m_AFII_corr
Definition: FsrPhotonTool.h:100
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:445
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:184
FSR::FsrPhotonTool::m_overlap_el_mu
Gaudi::Property< double > m_overlap_el_mu
Definition: FsrPhotonTool.h:90
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
FSR::FsrCandidate::type
FsrType type
Definition: IFsrPhotonTool.h:41
FSR::FsrPhotonTool::m_high_et_min
Gaudi::Property< double > m_high_et_min
Definition: FsrPhotonTool.h:88
FSR::FsrCandidate
Simple interface for searching the FSR candidate.
Definition: IFsrPhotonTool.h:27
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
FSR::FsrPhotonTool::m_topo_f1cut
Gaudi::Property< double > m_topo_f1cut
Definition: FsrPhotonTool.h:97
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
FSR::FsrPhotonTool::FsrPhotonTool
FsrPhotonTool(const std::string &name)
Create a proper constructor for Athena.
Definition: FsrPhotonTool.cxx:20
FSR::FsrPhotonTool::m_energyRescaler
ToolHandle< CP::IEgammaCalibrationAndSmearingTool > m_energyRescaler
Definition: FsrPhotonTool.h:110
DEBUG
#define DEBUG
Definition: page_access.h:11
asg::AsgComponentConfig::setProperty
StatusCode setProperty(const std::string &name, const T &value)
set the given property
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:358
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:135
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
CP::CorrectionCode
Return value from object correction CP tools.
Definition: CorrectionCode.h:31
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
FSR::FsrPhotonTool::m_drcut
Gaudi::Property< double > m_drcut
Definition: FsrPhotonTool.h:93
FSR::FsrCandidate::phi
double phi
Definition: IFsrPhotonTool.h:39
FSR::FsrPhotonTool::m_fsr_type
FsrCandidate::FsrType m_fsr_type
Definition: FsrPhotonTool.h:106
FSR::FsrCandidate::eta
double eta
Definition: IFsrPhotonTool.h:38
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
FSR::FsrPhotonTool::m_far_fsr_etcut
Gaudi::Property< double > m_far_fsr_etcut
Definition: FsrPhotonTool.h:92
FSR::FsrPhotonTool::m_topo_drcut
Gaudi::Property< double > m_topo_drcut
Definition: FsrPhotonTool.h:96
FSR::FsrPhotonTool::m_far_fsr_drcut
Gaudi::Property< double > m_far_fsr_drcut
Definition: FsrPhotonTool.h:91
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
xAOD::TrackParticle_v1::theta
float theta() const
Returns the parameter, which has range 0 to .
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
FSR::FsrPhotonTool::deltaPhi
double deltaPhi(float phi1, float phi2) const
Definition: FsrPhotonTool.cxx:460
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
FSR::FsrCandidate::FsrNear
@ FsrNear
Definition: IFsrPhotonTool.h:29
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:251
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
FSR::FsrPhotonTool::m_isoSelTool
ToolHandle< CP::IIsolationSelectionTool > m_isoSelTool
Definition: FsrPhotonTool.h:108