ATLAS Offline Software
EgammaxAODHelpers.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: EgammaxAODHelpers.h 788453 2016-12-07 15:40:30Z christos $
8 #ifndef XAOD_EGAMMAXAODHELPERS_H
9 #define XAOD_EGAMMAXAODHELPERS_H
10 
11 #include "xAODEgamma/EgammaFwd.h"
12 #include "xAODPFlow/FlowElement.h"
17 // Include all other helpers: The user only needs to include this file
21 
22 //other includes
23 #include <cstddef>
24 #include <set>
25 #include <vector>
26 
27 
28 namespace xAOD {
29 
30  namespace EgammaHelpers{
31 
33  bool isElectron(const xAOD::Egamma *eg);
34 
36  bool isFwdElectron(const xAOD::Egamma *eg);
37 
39  bool isPhoton(const xAOD::Egamma *eg);
40 
42  bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT = false);
43 
45  bool isBarrel(const xAOD::Egamma *eg);
46 
48  bool isBarrel(const xAOD::CaloCluster *cluster);
49 
51  bool isFCAL(const xAOD::CaloCluster *cluster);
52 
54  std::vector< ElementLink< xAOD::CaloClusterContainer > > getAssociatedTopoClustersLinks(const xAOD::CaloCluster *cluster);
55 
57  std::vector<const xAOD::CaloCluster*> getAssociatedTopoClusters(const xAOD::CaloCluster *cluster);
58 
60  std::vector< ElementLink< xAOD::FlowElementContainer > > getAssociatedFlowElementsLinks(const xAOD::Egamma *eg,
61  bool neutral = true);
62 
64  std::vector<const xAOD::FlowElement*> getAssociatedFlowElements(const xAOD::Egamma *eg,
65  bool neutral = true, bool charged = false);
66 
70  //isolation interface,
72  std::set<const xAOD::TrackParticle*> getTrackParticles(const xAOD::Egamma *eg,
73  bool useBremAssoc = true, bool allParticles = true);
74 
79  std::vector<const xAOD::TrackParticle*> getTrackParticlesVec(const xAOD::Egamma *eg,
80  bool useBremAssoc = true, bool allParticles = true);
81 
84  int summaryValueInt(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, int deflt = -999);
85 
87  float summaryValueFloat(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, float deflt = -999.);
88 
92  unsigned short energyInMissingCells(const xAOD::Egamma& eg,
93  double& e2, double& e3);
94 
95  }// EgammaHelpers
96 
97 } // namespace xAOD
98 
99 #endif // XAOD_EGAMMAXAODHELPERS_H
grepfile.info
info
Definition: grepfile.py:38
EgammaFwd.h
xAOD::EgammaHelpers::energyInMissingCells
unsigned short energyInMissingCells(const xAOD::Egamma &eg, double &e2, double &e3)
Get the energies in sampling 2 and 3 that are in cells rejected by the topo-cluster timing cut but th...
Definition: EgammaxAODHelpers.cxx:176
xAOD::EgammaHelpers::summaryValueFloat
float summaryValueFloat(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, float deflt=-999.)
return the summary value for a TrackParticle or default value (-999)
Definition: EgammaxAODHelpers.cxx:168
FlowElementContainer.h
xAOD::EgammaHelpers::getAssociatedTopoClusters
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
Definition: EgammaxAODHelpers.cxx:65
ParticleTest.eg
eg
Definition: ParticleTest.py:29
xAOD::EgammaHelpers::getAssociatedFlowElements
std::vector< const xAOD::FlowElement * > getAssociatedFlowElements(const xAOD::Egamma *eg, bool neutral=true, bool charged=false)
Return a vector of the flow elements associated with the egamma cluster (only neutral for default)
Definition: EgammaxAODHelpers.cxx:92
ElectronxAODHelpers.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::EgammaHelpers::getTrackParticles
std::set< const xAOD::TrackParticle * > getTrackParticles(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
Definition: EgammaxAODHelpers.cxx:120
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
xAOD::EgammaHelpers::getTrackParticlesVec
std::vector< const xAOD::TrackParticle * > getTrackParticlesVec(const xAOD::Egamma *eg, bool useBremAssoc=true, bool allParticles=true)
Return a list of all or only the best TrackParticle associated to the object.
Definition: EgammaxAODHelpers.cxx:141
xAOD::EgammaHelpers::isBarrel
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
Definition: EgammaxAODHelpers.cxx:33
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
xAOD::SummaryType
SummaryType
Enumerates the different types of information stored in Summary.
Definition: TrackingPrimitives.h:228
xAOD::EgammaHelpers::isConvertedPhoton
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
Definition: EgammaxAODHelpers.cxx:25
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
CaloClusterFwd.h
FlowElement.h
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
PhotonxAODHelpers.h
xAOD::EgammaHelpers::getAssociatedTopoClustersLinks
std::vector< ElementLink< xAOD::CaloClusterContainer > > getAssociatedTopoClustersLinks(const xAOD::CaloCluster *cluster)
Return a vector of all the elementlinks to the topo clusters associated with the egamma cluster.
Definition: EgammaxAODHelpers.cxx:55
xAOD::EgammaHelpers::isFwdElectron
bool isFwdElectron(const xAOD::Egamma *eg)
is the object a Fwd electron
Definition: EgammaxAODHelpers.cxx:17
xAOD::EgammaHelpers::summaryValueInt
int summaryValueInt(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, int deflt=-999)
return the summary value for a TrackParticle or default value (-999) (to be used mostly in python whe...
Definition: EgammaxAODHelpers.cxx:161
CP::neutral
@ neutral
Definition: Reconstruction/PFlow/PFlowUtils/PFlowUtils/PFODefs.h:11
xAOD::EgammaHelpers::isFCAL
bool isFCAL(const xAOD::CaloCluster *cluster)
return true if the cluster (or the majority of its energy) is in the FCAL0
Definition: EgammaxAODHelpers.cxx:46
TrackParticle.h
xAOD::EgammaHelpers::getAssociatedFlowElementsLinks
std::vector< ElementLink< xAOD::FlowElementContainer > > getAssociatedFlowElementsLinks(const xAOD::Egamma *eg, bool neutral=true)
Return a vector of the elementlinks to the flow elements associated with the egamma cluster (neutral ...
Definition: EgammaxAODHelpers.cxx:79
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
CaloClusterContainer.h
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
EgammaTruthxAODHelpers.h
CP::charged
@ charged
Definition: Reconstruction/PFlow/PFlowUtils/PFlowUtils/PFODefs.h:11