|
ATLAS Offline Software
|
Go to the documentation of this file.
23 m_isoSelTool(
"", this),
24 m_isoCorrTool(
"", this),
25 m_energyRescaler(
"", this)
85 return StatusCode::FAILURE;
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;
97 return StatusCode::SUCCESS;
107 ATH_MSG_ERROR(
"getFsrPhoton: You MUST provide photon AND electron containers" );
118 if (cands->size() > 0) {
119 candidate = cands->at(0);
124 <<
", deltaR = " << candidate.
deltaR
125 <<
", Et = " << candidate.
Et
126 <<
", Eta = " << candidate.
eta
127 <<
", Phi = " << candidate.
phi
128 <<
", type = " <<candidate.
type);
134 std::vector<FsrCandidate>*
144 ATH_MSG_ERROR(
"getFsrCandidateList: No Photon container provided" );
149 photons_cont = photons;
154 ATH_MSG_ERROR(
"getFsrCandidateList: No Electron container provided" );
167 m_fsr_type = FsrCandidate::FsrType::FsrUnknown;
193 std::vector< std::pair <const xAOD::IParticle*, double> > farFsrCandList;
194 farFsrCandList.clear();
195 farFsrCandList.reserve(photons_cont->
size());
201 ATH_MSG_DEBUG(
"In getFarFsrCandidateList function : photon size = " << photons_cont->
size());
203 for (
auto ph : *photons_cont) {
205 bool is_tight_photon = DFCommonPhotonsIsEMTight(*ph);
213 ATH_MSG_ERROR(
"applyIsoSelection: Unable to apply iso correction for photon " << ph->pt());
223 bool far_fsr_drcut_isOK =
false;
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()
232 <<
" isoIsOK = " << farPhIsoOK );
235 if(far_fsr_drcut_isOK) farFsrCandList.push_back(std::make_pair(ph,
dr));
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);
257 std::vector< std::pair <const xAOD::IParticle*, double> > nearFsrCandList;
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());
263 for (
auto photon : *photons_cont) {
271 && (m_etcut < photon->p4().Et())) ) {
278 nearFsrCandList.push_back(std::make_pair(
photon,
dr));
279 ATH_MSG_DEBUG(
"Near Fsr candidates ( photon ) kinematics ; author "
281 <<
" Et = " <<
photon->p4().Et()
282 <<
" f1 = " << photon_f1
288 unsigned int nofPhFsr = nearFsrCandList.size();
291 for (
auto electron : *electrons_cont)
294 if ( (nearFsrCandList.size() > 0) &&
isOverlap(
electron, nearFsrCandList, nofPhFsr) )
continue;
310 float clEt = eCorr*
electron->caloCluster()->et();
312 ATH_MSG_VERBOSE(
"Near Fsr candidate ( electron ) Et = " << clEt <<
" eCorr " << eCorr);
316 if( elmutrackmatch &&
318 (m_high_et_min < clEt && electron_f1 >
m_f1cut )) ) {
323 nearFsrCandList.push_back(std::make_pair(
electron,
dr));
324 ATH_MSG_DEBUG(
"Near Fsr candidates ( electron ) kinematics : author "
327 <<
" f1 = " << electron_f1
330 else ATH_MSG_VERBOSE(
"FAILED Near Fsr candidates ( electron ) kinematics : author "
333 <<
" f1 = " << electron_f1
340 ATH_MSG_DEBUG(
"FAILED Near Fsr candidates ( electron ) kinematics : author "
343 <<
" f1 = " << electron_f1
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()
364 for (
unsigned int i=0;
i < FsrCandList.size();
i++ ) {
371 c.container =
"electron" ;
376 photon.Egamma_v1::operator=(*electron);
378 ATH_MSG_ERROR(
"FsrPhotonTool::sortFsrCandidates: Unable to applyCorrection to photon ");
382 c.eta =
photon.caloCluster()->eta();
383 c.phi =
photon.caloCluster()->phi();
386 <<
electron->caloCluster()->eta() <<
"/" <<
electron->caloCluster()->phi() <<
" "
388 <<
photon.caloCluster()->eta() <<
"/" <<
photon.caloCluster()->phi());
400 float clEt = eCorr*
electron->caloCluster()->et();
409 c.container =
"photon";
416 ATH_MSG_WARNING(
"sortFsrCandidates: undefined particle - NOT electron nor photon. Should never get here!" );
423 c.deltaR = FsrCandList.at(
i).second;
424 if(
c.deltaR < 0.05)
c.Et -= 400./cosh(
particle->eta());
428 ATH_MSG_DEBUG(
"sortFsrCandidates: save fsr candidate f1 = " <<
c.f1
429 <<
", deltaR = " <<
c.deltaR
431 <<
", Eta = " <<
c.eta
432 <<
", Phi = " <<
c.phi
433 <<
", type = " <<
c.type);
447 for (
unsigned int indx=0; indx < nofPhFsr; indx++ ) {
452 ph_cl->
eta(), ph_cl->
phi());
454 << ph_cl->
et() <<
"/" << el_cl->
et());
462 double dphi= fabs(phi1 - phi2);
470 double deta = fabs(meta - peta);
472 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.
#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 .)