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