![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
25 m_isoCorrTool(
"", this),
26 m_isoCloseByCorrTool(
"", this),
27 m_energyRescaler(
"", this)
100 return StatusCode::FAILURE;
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;
112 return StatusCode::SUCCESS;
122 ATH_MSG_ERROR(
"getFsrPhoton: You MUST provide photon AND electron containers" );
133 if (cands->size() > 0) {
134 candidate = cands->at(0);
139 <<
", deltaR = " << candidate.
deltaR
140 <<
", Et = " << candidate.
Et
141 <<
", Eta = " << candidate.
eta
142 <<
", Phi = " << candidate.
phi
143 <<
", type = " <<candidate.
type);
149 std::vector<FsrCandidate>*
159 ATH_MSG_ERROR(
"getFsrCandidateList: No Photon container provided" );
164 photons_cont = photons;
169 ATH_MSG_ERROR(
"getFsrCandidateList: No Electron container provided" );
182 m_fsr_type = FsrCandidate::FsrType::FsrUnknown;
208 std::vector< std::pair <const xAOD::IParticle*, double> > farFsrCandList;
209 farFsrCandList.clear();
210 farFsrCandList.reserve(photons_cont->
size());
216 ATH_MSG_DEBUG(
"In getFarFsrCandidateList function : photon size = " << photons_cont->
size());
218 for (
auto ph : *photons_cont) {
220 bool is_tight_photon = DFCommonPhotonsIsEMTight(*ph);
228 ATH_MSG_ERROR(
"applyIsoSelection: Unable to apply iso correction for photon " << ph->pt());
237 bool far_fsr_drcut_isOK =
false;
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()
246 <<
" isoIsOK = " << farPhIsoOK );
249 if(far_fsr_drcut_isOK) farFsrCandList.push_back(std::make_pair(ph,
dr));
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);
271 std::vector< std::pair <const xAOD::IParticle*, double> > nearFsrCandList;
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());
277 for (
auto photon : *photons_cont) {
285 && (m_etcut < photon->p4().Et())) ) {
292 nearFsrCandList.push_back(std::make_pair(
photon,
dr));
293 ATH_MSG_DEBUG(
"Near Fsr candidates ( photon ) kinematics ; author "
295 <<
" Et = " <<
photon->p4().Et()
296 <<
" f1 = " << photon_f1
302 unsigned int nofPhFsr = nearFsrCandList.size();
305 for (
auto electron : *electrons_cont)
308 if ( (nearFsrCandList.size() > 0) &&
isOverlap(
electron, nearFsrCandList, nofPhFsr) )
continue;
324 float clEt = eCorr*
electron->caloCluster()->et();
326 ATH_MSG_VERBOSE(
"Near Fsr candidate ( electron ) Et = " << clEt <<
" eCorr " << eCorr);
330 if( elmutrackmatch &&
332 (m_high_et_min < clEt && electron_f1 >
m_f1cut )) ) {
337 nearFsrCandList.push_back(std::make_pair(
electron,
dr));
338 ATH_MSG_DEBUG(
"Near Fsr candidates ( electron ) kinematics : author "
341 <<
" f1 = " << electron_f1
344 else ATH_MSG_VERBOSE(
"FAILED Near Fsr candidates ( electron ) kinematics : author "
347 <<
" f1 = " << electron_f1
354 ATH_MSG_DEBUG(
"FAILED Near Fsr candidates ( electron ) kinematics : author "
357 <<
" f1 = " << electron_f1
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()
378 for (
unsigned int i=0;
i < FsrCandList.size();
i++ ) {
385 c.container =
"electron" ;
390 photon.Egamma_v1::operator=(*electron);
392 ATH_MSG_ERROR(
"FsrPhotonTool::sortFsrCandidates: Unable to applyCorrection to photon ");
396 c.eta =
photon.caloCluster()->eta();
397 c.phi =
photon.caloCluster()->phi();
400 <<
electron->caloCluster()->eta() <<
"/" <<
electron->caloCluster()->phi() <<
" "
402 <<
photon.caloCluster()->eta() <<
"/" <<
photon.caloCluster()->phi());
414 float clEt = eCorr*
electron->caloCluster()->et();
423 c.container =
"photon";
430 ATH_MSG_WARNING(
"sortFsrCandidates: undefined particle - NOT electron nor photon. Should never get here!" );
437 c.deltaR = FsrCandList.at(
i).second;
438 if(
c.deltaR < 0.05)
c.Et -= 400./cosh(
particle->eta());
442 ATH_MSG_DEBUG(
"sortFsrCandidates: save fsr candidate f1 = " <<
c.f1
443 <<
", deltaR = " <<
c.deltaR
445 <<
", Eta = " <<
c.eta
446 <<
", Phi = " <<
c.phi
447 <<
", type = " <<
c.type);
461 for (
unsigned int indx=0; indx < nofPhFsr; indx++ ) {
466 ph_cl->
eta(), ph_cl->
phi());
468 << ph_cl->
et() <<
"/" << el_cl->
et());
476 double dphi= fabs(phi1 - phi2);
484 double deta = fabs(meta - peta);
486 double dR = sqrt((dphi*dphi)+(deta*deta));
virtual double phi() const
The azimuthal angle ( ) of the particle.
#define RETURN_CHECK(CONTEXT, EXP)
Helper macro for checking return codes in a compact form in the code.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
@ topoetcone20
Topo-cluster ET-sum.
Helper class to provide type-safe access to aux data.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
#define ATH_MSG_VERBOSE(x)
Class providing the definition of the 4-vector interface.
@ Error
Some error happened during the object correction.
Description of a calorimeter cluster.
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
@ Ok
The correction was done successfully.
Simple interface for searching the FSR candidate.
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
StatusCode setProperty(const std::string &name, const T &value)
set the given property
Return value from object correction CP tools.
Class describing a TrackParticle.
setBGCode setTAP setLVL2ErrorBits bool
float theta() const
Returns the parameter, which has range 0 to .
size_type size() const noexcept
Returns the number of elements in the collection.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
StatusCode createPrivateTool(const std::string &name, const std::string &toolType)
create a private tool of the given name and type