ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
28namespace 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 const xAOD::CaloCluster *getCluster(const xAOD::Egamma* eg, bool cook = true);
55
57 std::vector< ElementLink< xAOD::CaloClusterContainer > > getAssociatedTopoClustersLinks(const xAOD::CaloCluster *cluster);
58
60 std::vector<const xAOD::CaloCluster*> getAssociatedTopoClusters(const xAOD::CaloCluster *cluster);
61
63 std::vector< ElementLink< xAOD::FlowElementContainer > > getAssociatedFlowElementsLinks(const xAOD::Egamma *eg,
64 bool neutral = true);
65
67 std::vector<const xAOD::FlowElement*> getAssociatedFlowElements(const xAOD::Egamma *eg,
68 bool neutral = true, bool charged = false);
69
73 //isolation interface,
75 std::set<const xAOD::TrackParticle*> getTrackParticles(const xAOD::Egamma *eg,
76 bool useBremAssoc = true, bool allParticles = true);
77
82 std::vector<const xAOD::TrackParticle*> getTrackParticlesVec(const xAOD::Egamma *eg,
83 bool useBremAssoc = true, bool allParticles = true);
84
87 int summaryValueInt(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, int deflt = -999);
88
90 float summaryValueFloat(const xAOD::TrackParticle& tp, const xAOD::SummaryType& info, float deflt = -999.);
91
95 unsigned short energyInMissingCells(const xAOD::Egamma& eg,
96 double& e2, double& e3);
97
98 }// EgammaHelpers
99
100} // namespace xAOD
101
102#endif // XAOD_EGAMMAXAODHELPERS_H
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.
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
bool isFwdElectron(const xAOD::Egamma *eg)
is the object a Fwd electron
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.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
bool isFCAL(const xAOD::CaloCluster *cluster)
return true if the cluster (or the majority of its energy) is in the FCAL0
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 ...
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
const xAOD::CaloCluster * getCluster(const xAOD::Egamma *eg, bool cook=true)
return the associated egamma cluster, that might be cookie-cut cluster (fwd electron)
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...
float summaryValueFloat(const xAOD::TrackParticle &tp, const xAOD::SummaryType &info, float deflt=-999.)
return the summary value for a TrackParticle or default value (-999)
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...
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
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.
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)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
SummaryType
Enumerates the different types of information stored in Summary.