  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
   24           m_isoSelTool(
"", this),
 
   25           m_energyRescaler(
"", this),
 
   26           m_elIsGoodOQSelectionTool(
"", this),
 
   27           m_phIsGoodOQSelectionTool(
"", this)
 
   73                 return StatusCode::FAILURE;
 
   79             ATH_MSG_ERROR(
"initialize - CANNOT retrieve IEgammaCalibrationAndSmearingTool. Please set the property 'egCalibToolName' to be able to recalibrate fsr photon found as an electron ");
 
   80             return StatusCode::FAILURE;
 
   86         asg::AsgToolConfig config1 (
"CP::EgammaIsGoodOQSelectionTool/electronIsGoodOQSelectionTool");
 
   93         asg::AsgToolConfig config2 (
"CP::EgammaIsGoodOQSelectionTool/photonIsGoodOQSelectionTool");
 
  100         return StatusCode::SUCCESS;
 
  109             ATH_MSG_ERROR( 
"getFsrPhoton: You MUST provide photon AND electron containers" );
 
  120         if (cands->size() > 0) {
 
  121             candidate = cands->at(0);
 
  126                        << 
", deltaR = " << candidate.
deltaR 
  127                        << 
", Et = " << candidate.
Et 
  128                        << 
", Eta = " << candidate.
eta 
  129                        << 
", Phi = " << candidate.
phi 
  130                        << 
", type = " <<candidate.
type);
 
  136     std::vector<FsrCandidate>* 
 
  145             ATH_MSG_ERROR( 
"getFsrCandidateList: No Photon container provided" );
 
  150             photons_cont   = photons;
 
  155             ATH_MSG_ERROR( 
"getFsrCandidateList: No Electron container provided" );
 
  168         m_fsr_type = FsrCandidate::FsrType::FsrUnknown;
 
  194         std::vector< std::pair <const xAOD::IParticle*, double> > farFsrCandList;
 
  195         farFsrCandList.clear();
 
  196         farFsrCandList.reserve(photons_cont->
size());
 
  202         ATH_MSG_DEBUG( 
"In getFarFsrCandidateList function : photon size = " << photons_cont->
size());
 
  204         for (
auto ph : *photons_cont) {
 
  208             bool is_tight_photon = DFCommonPhotonsIsEMTight(*ph);
 
  219                 bool far_fsr_drcut_isOK = 
false;
 
  224                     if (far_fsr_drcut_isOK && 
dr < 0.2) {
 
  225                         ATH_MSG_VERBOSE( 
"Far Fsr candidate kinematics : author  " << ph->author()
 
  226                                     << 
" Et = " << ph->p4().Et()
 
  228                                     << 
" isoIsOK = " << farPhIsoOK );
 
  231                     if(far_fsr_drcut_isOK) farFsrCandList.push_back(std::make_pair(ph, 
dr));
 
  234                 ATH_MSG_DEBUG( 
"Far Fsr candidate kinematics : author  " << ph->author()
 
  235                             << 
" Et = " << ph->p4().Et()
 
  236                             << 
" tight = " << is_tight_photon
 
  237                             << 
" farPhIsoOK = " << farPhIsoOK
 
  238                             << 
" far_fsr_drcut_isOK = " << far_fsr_drcut_isOK);
 
  254         std::vector< std::pair <const xAOD::IParticle*, double> >  nearFsrCandList;
 
  256         nearFsrCandList.reserve(photons_cont->
size()+electrons_cont->
size());
 
  257         ATH_MSG_DEBUG( 
"In getNearFsrCandidateList function : photon size = " << photons_cont->
size()
 
  258                         << 
", electron size = " << electrons_cont->
size());
 
  260         for (
auto photon : *photons_cont) {
 
  270                  ( oqIsOK && !high_et_photon && (photon_f1 > 
m_topo_f1cut)
 
  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) {
 
  293             if ( (nearFsrCandList.size() > 0) && 
isOverlap(
electron, nearFsrCandList, nofPhFsr) ) 
continue;
 
  313             float clEt  = eCorr*
electron->caloCluster()->et();
 
  315             ATH_MSG_VERBOSE( 
"Near Fsr candidate ( electron ) Et = " << clEt << 
" eCorr " << eCorr << 
" OQ is ok: " << (
int) oqIsOK  << 
", pt,eta,phi " << 
electron->pt()/1000 << 
", " << 
electron->eta() << 
", " << 
electron->phi());
 
  319             if( elmutrackmatch && oqIsOK &&
 
  321                     (m_high_et_min < clEt                   && electron_f1 > 
m_f1cut )) ) {
 
  326                     nearFsrCandList.push_back(std::make_pair(
electron, 
dr));
 
  327                     ATH_MSG_DEBUG( 
"Near Fsr candidates ( electron ) kinematics : author  " 
  330                                     << 
" f1 = " << electron_f1
 
  333                 else ATH_MSG_VERBOSE( 
"FAILED Near Fsr candidates ( electron ) kinematics : author  " 
  336                                         << 
" f1 = " << electron_f1
 
  343                 ATH_MSG_DEBUG( 
"FAILED Near Fsr candidates ( electron ) kinematics : author  " 
  346                                 << 
" f1 = " << electron_f1
 
  348                                 << 
" theta/phi el/mu " << electron_track->
theta() << 
"/" << 
muon->p4().Theta()
 
  349                                 << 
"/" << electron_track->
phi() << 
"/" << 
muon->phi()
 
  350                                 << 
" theta/phi mu trk " << muon_track->
theta() << 
"/" << muon_track->
phi()
 
  362         const std::vector< std::pair <const xAOD::IParticle*, double> >& FsrCandList, 
 
  363         const std::string& option) {
 
  368         for (
unsigned int i=0; 
i < FsrCandList.size(); 
i++ ) {
 
  375             c.container =   
"electron" ;
 
  380                      photon.Egamma_v1::operator=(*electron);
 
  382                         ATH_MSG_ERROR(
"FsrPhotonTool::sortFsrCandidates: Unable to applyCorrection to photon ");
 
  386                     c.eta = 
photon.caloCluster()->eta();
 
  387                     c.phi = 
photon.caloCluster()->phi();
 
  390                                   << 
electron->caloCluster()->eta() << 
"/" << 
electron->caloCluster()->phi() << 
" " 
  392                                   << 
photon.caloCluster()->eta() << 
"/" << 
photon.caloCluster()->phi());
 
  404                     float clEt  = eCorr*
electron->caloCluster()->et();
 
  413                 c.container =   
"photon";
 
  420                 ATH_MSG_WARNING( 
"sortFsrCandidates: undefined particle - NOT electron nor photon. Should never get here!" );
 
  427             c.deltaR       = FsrCandList.at(
i).second;
 
  428             if(
c.deltaR < 0.05) 
c.Et -= 400./cosh(
particle->eta());
 
  432             ATH_MSG_DEBUG( 
"sortFsrCandidates: save fsr candidate  f1 = " << 
c.f1
 
  433                            << 
", deltaR = " << 
c.deltaR
 
  435                            << 
", Eta = " << 
c.eta
 
  436                            << 
", Phi = " << 
c.phi
 
  437                            << 
", type = " <<
c.type);
 
  450                                   const std::vector< std::pair <const xAOD::IParticle*, double> >& phfsr, 
 
  451                                   unsigned int nofPhFsr) {
 
  452         for (
unsigned int indx=0; indx < nofPhFsr; indx++ ) {
 
  457                                 ph_cl->
eta(), ph_cl->
phi());
 
  459                                 << ph_cl->
et() << 
"/" << el_cl->
et());
 
  466         double dphi= fabs(phi1 - phi2);
 
  474         double deta = fabs(meta - peta);
 
  476         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.
 
const uint32_t BADCLUSELECTRON
 
#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.
 
const uint32_t BADCLUSPHOTON
 
@ 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 .)