|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   17 #include "GaudiKernel/IToolSvc.h" 
   48 EgammaPhysValMonitoringTool::EgammaPhysValMonitoringTool( 
const std::string& 
type, 
 
   49                               const std::string& 
name, 
 
   50                               const IInterface* 
parent ):
 
   52   m_oElectronValidationPlots(nullptr, 
"Electron/"),
 
   53   m_oPhotonValidationPlots(nullptr, 
"Photon/"),
 
   54   m_oLRTElectronValidationPlots(nullptr, 
"LRTElectron/"),
 
   55   m_acc_electronLLH_VeryLooseNoPix(
"DFCommonElectronsLHVeryLooseNoPix"),
 
   56   m_acc_electronLLH_LooseNoPix(
"DFCommonElectronsLHLooseNoPix"),
 
   57   m_acc_electronLLH_MediumNoPix(
"DFCommonElectronsLHMediumNoPix"),
 
   58   m_acc_electronLLH_TightNoPix(
"DFCommonElectronsLHTightNoPix")
 
   82   return StatusCode::SUCCESS;
 
  110   return StatusCode::SUCCESS;      
 
  118   const EventContext& ctx = Gaudi::Hive::currentContext();
 
  134     for (
const auto* 
const truthParticle : *truthParticles) {
 
  137       if (std::abs(truthParticle->pdgId()) == 11 &&
 
  144       if (std::abs(truthParticle->pdgId()) == 22 &&
 
  151         bool isTrueConv = 
false;
 
  154         if (
tmp && 
tmp->hasDecayVtx()) {
 
  155           float x = 
tmp->decayVtx()->x();
 
  156           float y = 
tmp->decayVtx()->y();
 
  157           trueR = std::sqrt(
x * 
x + 
y * 
y);
 
  160         if (
tmp != 
nullptr) {
 
  190           bool val_loose = 
false;
 
  197                 *truthParticle, *eventInfo);
 
  200                 *truthParticle, *eventInfo);
 
  203           bool val_tight = 
false;
 
  210                 *truthParticle, *eventInfo);
 
  213                 *truthParticle, *eventInfo);
 
  224       return StatusCode::FAILURE;
 
  231         return StatusCode::FAILURE;
 
  239       return StatusCode::FAILURE;
 
  244       return StatusCode::FAILURE;
 
  251         return StatusCode::FAILURE;
 
  257         return StatusCode::FAILURE;
 
  262         return StatusCode::FAILURE;
 
  269   return StatusCode::SUCCESS;
 
  276   const EventContext& ctx = Gaudi::Hive::currentContext();
 
  284     for(
const auto *
const electron : *Electrons){
 
  285         bool isElecPrompt=
false;
 
  297                 if(
type==MCTruthPartClassifier::IsoElectron) {
 
  302                         float EtLin = (
electron->pt()-thePart->
pt())/thePart->
pt();
 
  305                         if (thePart->
pt()/
GeV>20.) {
 
  313                         ATH_MSG_INFO (
"Truth particle associated not in egamma truth collection");
 
  325   return StatusCode::SUCCESS;
 
  332   const EventContext& ctx = Gaudi::Hive::currentContext();
 
  340   for(
const auto *
const electron : *LRTElectrons){
 
  341     bool isElecPrompt=
false;
 
  346     bool pass_LHVeryLooseNoPix = 
false;
 
  350     bool pass_LHLooseNoPix = 
false;
 
  354     bool pass_LHMediumNoPix = 
false;
 
  358     bool pass_LHTightNoPix = 
false;
 
  365       if(
type==MCTruthPartClassifier::IsoElectron) {
 
  370           float EtLin = (
electron->pt()-thePart->
pt())/thePart->
pt();
 
  373           if (thePart->
pt()/
GeV>20.) {
 
  381             ATH_MSG_INFO (
"Truth particle associated not in egamma truth collection");
 
  396   return StatusCode::SUCCESS;
 
  403   const EventContext& ctx = Gaudi::Hive::currentContext();
 
  410   for(
const auto *
const frwdelectron : *ElectronsFrwd){
 
  412     bool isElecPrompt=
false;
 
  414       if((
Match(frwdelectron,11, truthParticles)!=
nullptr )) isElecPrompt=
true;
 
  424   return StatusCode::SUCCESS;
 
  431   const EventContext& ctx = Gaudi::Hive::currentContext();
 
  441     for(
const auto *
photon : *Photons){
 
  442         bool isPhotPrompt=
false;
 
  449         if(
photon->author())           numofPhot++;
 
  462                     if(thePart&&thePart->
pt()/
GeV>20.) {
 
  463                         float EtLin = (
photon->pt()-thePart->
pt())/thePart->
pt();
 
  466                         if (std::abs(EtLin)<0.2){
 
  471                 ATH_MSG_INFO(
"Truth particle associated not in egamma truth collection");
 
  475             } 
else if(
m_isMC){
if(
Match(
photon,22, truthParticles)!=
nullptr ) isPhotPrompt=
true;}    
 
  481   numPhotAll = numofPhot+numofAmb;
 
  493   return StatusCode::SUCCESS;
 
  501     return StatusCode::SUCCESS;
 
  507   float currentdr = 0.05;
 
  510     for (
const auto *truthParticle: *truthParticles){
 
  511       if (std::abs(truthParticle->pdgId()) != pdg || !
MC::isStable(truthParticle)) 
continue;
 
  512       float dr = 
particle->p4().DeltaR(truthParticle->p4());
 
  515         matchedTruthParticle = truthParticle;
 
  519   return matchedTruthParticle;
 
  
TH1 * nParticles_weighted
TH2 * convTruthMatchedRvsEta
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Egamma::KinematicsPlots m_oTruthRecoPlots
Egamma::KinematicsPlots m_oTruthRecoLooseConvPlots
TProfile * res_et_cut_pt_20
TH1 * nParticles_weighted
TH1 * nParticles_weighted
const uint32_t BADCLUSELECTRON
bool empty() const
Test if the key is blank.
TH1 * m_nParticles_weighted
Egamma::LRTElectronPlots m_oCentralElecPlots
TProfile * res_et_cut_pt_20
Egamma::KinematicsPlots m_oTruthRecoLoosePlots
bool passOQquality(const xAOD::Photon &ph)
Helper to ease the implemmantation of the pass Quality requirements.
Egamma::PhotonPlots m_oAllPlots
std::vector< HistData > retrieveBookedHistograms()
Retrieve all booked histograms.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
TProfile * res_eta_cut_pt_20
Egamma::KinematicsPlots m_oTruthRecoLooseUncPlots
Egamma::KinematicsPlots m_oTruthRecoTightConvPlots
Egamma::KinematicsPlots m_oTruthRecoUncPlots
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
::StatusCode StatusCode
StatusCode definition for legacy code.
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt)
Egamma::KinematicsPlots m_oTruthRecoTightPlots
Class describing a truth particle in the MC record.
Egamma::PhotonAmbPlots m_oAmbPhotPlots
TH1 * m_nParticles_weighted
TH1 * m_nParticles_weighted
Egamma::KinematicsPlots m_oTruthRecoTightUncPlots
Egamma::KinematicsPlots m_oTruthRecoConvPlots
void fill(const xAOD::IParticle &part, const xAOD::EventInfo &eventInfo)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
Egamma::KinematicsPlots m_oTruthIsoPlots
Egamma::KinematicsPlots m_oTruthIsoConvPlots
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Class describing the basic event information.
Egamma::KinematicsPlots m_oTruthIsoUncPlots
const_pointer_type ptr()
Dereference the pointer.
const uint32_t BADCLUSPHOTON
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Egamma::ElectronFrwdPlots m_oFrwdElecPlots
TProfile * res_eta_cut_pt_20
Egamma::PhotonCnvPlots m_oConvPhotPlots
Egamma::ElectronPlots m_oCentralElecPlots
virtual double pt() const override final
The transverse momentum ( ) of the particle.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Egamma::KinematicsPlots m_oTruthIsoPlots
Helper class to provide constant type-safe access to aux data.
Handle class for reading from StoreGate.
void fill(const xAOD::Electron &electron, const xAOD::EventInfo &eventInfo, bool isPrompt, bool pass_LHVeryLooseNoPix, bool pass_LHLooseNoPix, bool pass_LHMediumNoPix, bool pass_LHTightNoPix)
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
Egamma::PhotonPlots m_oPhotPlots
float beamSpotWeight() const
Weight for beam spot size reweighting.
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
void fill(const xAOD::Photon &photon, const xAOD::EventInfo &eventInfo, bool isPrompt)