ATLAS Offline Software
Loading...
Searching...
No Matches
IDPerfMonEoverP.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IDPerfMonEoverP_H
6#define IDPerfMonEoverP_H
15
16/********************************************************************
17
18NAME: egammaTrackRefitter.h
19PACKAGE:
20
21CREATED: July 2011
22
23********************************************************************/
24
25// INCLUDE HEADER FILES:
26
30
31#include "xAODEgamma/Electron.h"
33#include "xAODEgamma/Photon.h"
37
38#include "xAODTracking/Vertex.h"
40
41#include "xAODJet/Jet.h"
43
46
47#include "GaudiKernel/ToolHandle.h"
48#include "GaudiKernel/ServiceHandle.h"
49
52
54
55#include <map>
56#include <vector>
57
58
59
60class TTree;
61class TH1F;
62class TH2F;
63
65
66namespace Trig{
67 class TrigDecisionTool;
68}
69
70namespace Trk{
71 class VxTrackAtVertex;
72 class Track;
73}
74
75#define NOS_ELECTRONS 100
76#define NO_PV 50
77
78typedef std::pair<const xAOD::Vertex* , int> VxPos;
79
80
82{
83 public:
84
86 IDPerfMonEoverP(const std::string& name, ISvcLocator* pSvcLocator);
87
90
92 StatusCode initialize();
93 StatusCode finalize();
94 StatusCode execute();
95
96 private:
98 void addToValidationNtuple(const Trk::Perigee*, const xAOD::CaloCluster*, int isOrginal);
99
101
102 void validationAction();
103 void deleteAction() const;
104
105 void fillIsEM(const xAOD::Electron *eg);
106
107 void fillGeneral(const xAOD::Electron *eg);
108
109 bool passMETCleaningCuts() const;
110
111 bool fillVertexInformation(std::map<const xAOD::TrackParticle*, VxPos >& trackParticleVertexMap,
112 xAOD::Vertex const* & primaryVertexFirstCandidate);
113
114 bool storeMETinformation();
115
116 // const Rec::TrackParticle* getTrackParticle(Trk::VxTrackAtVertex *trkAtVx) const;
117 // const xAOD::TrackParticle* getTrackParticle(const Trk::VxTrackAtVertex *trkAtVx) const;
118 VxPos findAssociatedVertex(std::map<const xAOD::TrackParticle*, VxPos >& trackParticleVertexMap,
119 const xAOD::Vertex* primaryVertexFirstCandidate,
120 const xAOD::Electron* ) const;
121
123 double* eta, double* phi, double* deltaEta, double* delatPhi );
124
125 void fillElectronInfo (const xAOD::Electron* p);
127
128 bool fillLastMeasurement(const Trk::Track* track,const int fitter);
129
130 double correctIP_PV(int electron_i, bool do_d0);
131
132 private:
133
136
137 std::string m_metRefFinalName;
138
145
149
153
155 SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
156
158 ToolHandle<IegammaTrkRefitterTool> m_TrackRefitter;
159
161 ToolHandle<IegammaTrkRefitterTool> m_TrackRefitter_no2;
162
164 ToolHandle<Trig::TrigDecisionTool> m_trigDec;
165
167 ToolHandle< IJetSelector > m_jetCleaningTool
168 {this,"JetCleaningTool","JetCleaningTool/JetCleaningTool",""};
169
170 /* Flag for refitting*/
172
173 /* Flag for data*/
175
176 //Validation Ntuple Stuff
179
182
183
192
193
194 unsigned int m_runNumber;
195 unsigned int m_evtNumber;
196 unsigned int m_lumi_block;
197
198
201
208
210
216
217
227
228
230
234
240
241
242
243 //Vertex Resolution Information
246
247 //Vertex information
251 float m_pvsumpt[NO_PV]{};
252 float m_pvx[NO_PV]{};
253 float m_pvy[NO_PV]{};
254 float m_pvz[NO_PV]{};
255 float m_errpvx[NO_PV]{};
256 float m_errpvy[NO_PV]{};
257 float m_errpvz[NO_PV]{};
261
262 //MET
264 float m_sumet;
268
269
274 // std::vector< std::pair <xAOD::EgammaParameters::ShowerShapeType, std::string > > m_PIDNames;
275 std::vector< std::pair <xAOD::EgammaParameters::ShowerShapeType, std::string > > m_PID_ShowerType_Names;
276 std::vector< std::pair <xAOD::Iso::IsolationType, std::string > > m_PID_IsolationType_Names;
277 std::vector< std::pair <xAOD::EgammaParameters::TrackCaloMatchType, std::string > > m_PID_TrackCaloMatchType_Names;
278 std::vector< std::pair <xAOD::SummaryType, std::string > > m_PID_SummaryType_Names;
279
280
281
282 bool m_trigger[50]{};
283 std::vector<std::string> m_triggerNames;
284
285
291
300
301
310
311
320 double m_smalld0;
321 double m_smallz0;
322
323 std::vector<int> FillSimpleTree();
324 bool passWenuSelection(std::vector<int>& electrons);
325 bool passZeeSelection(std::vector<int>& electrons);
326 double getMassCluster(int el1, int el2);
327
328 //Likelihood tool:
329 std::string m_lhTune;
333};
334
335#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define NO_PV
std::pair< const xAOD::Vertex *, int > VxPos
#define NOS_ELECTRONS
Handle class for reading from StoreGate.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
Electron selector tool to select objects in Athena using an underlying pure ROOT tool.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
float m_pvy[NO_PV]
float m_electronErrd0[3][NOS_ELECTRONS]
SG::ReadHandleKey< xAOD::EventInfo > m_evt
ReadHandle to the Event Info.
void fillGeneral(const xAOD::Electron *eg)
std::string m_missingEtObjectName
MET input name.
std::vector< std::pair< xAOD::EgammaParameters::ShowerShapeType, std::string > > m_PID_ShowerType_Names
TH1F * m_ZeeMediumMassOS_Cluster
double correctIP_PV(int electron_i, bool do_d0)
int m_nTRT[NOS_ELECTRONS]
std::string m_OutputTrackCollectionName_no2
int m_nTRTout[NOS_ELECTRONS]
TH2F * m_WenuTightElectron_PTEtaNeg
validation tree name - to be acessed by this from root
AsgElectronLikelihoodTool * m_LHToolLoose2015
int m_nBLayer[NOS_ELECTRONS]
float m_ePID_ShowerType[50][NOS_ELECTRONS]
float m_ClusterPhi[NOS_ELECTRONS]
double getMassCluster(int el1, int el2)
TTree * m_smallValidationTree
std::string m_smallValidationTreeName
validation tree description - second argument in TTree
float m_ePID_SummaryType[50][NOS_ELECTRONS]
std::vector< std::pair< xAOD::SummaryType, std::string > > m_PID_SummaryType_Names
float m_covpvxpvy[NO_PV]
void addToValidationNtuple(const Trk::Perigee *, const xAOD::CaloCluster *, int isOrginal)
addToValidationNutple
TH1F * m_ZeeMediumMassSS_Cluster
void fillIsEM(const xAOD::Electron *eg)
ToolHandle< IegammaTrkRefitterTool > m_TrackRefitter
The track refitter.
std::string m_validationTreeName
validation tree description - second argument in TTree
float m_electronEta[3][NOS_ELECTRONS]
Track Eta at perigee.
bool passMETCleaningCuts() const
float m_electrond0[3][NOS_ELECTRONS]
Track Phi on electron.
VxPos findAssociatedVertex(std::map< const xAOD::TrackParticle *, VxPos > &trackParticleVertexMap, const xAOD::Vertex *primaryVertexFirstCandidate, const xAOD::Electron *) const
ToolHandle< IJetSelector > m_jetCleaningTool
jet selector tool
TH2F * m_WenuTightElectron_PTEtaPos
TH1F * m_ZeeLooseMassSS_Cluster
float m_ePID_TrackCaloMatchType[50][NOS_ELECTRONS]
StatusCode initialize()
Gaudi algorithm hooks.
TrackCollection * m_refittedTracks_no2
float m_electronz0[3][NOS_ELECTRONS]
Track q over p on electron.
float m_covpvzpvx[NO_PV]
int m_nSCT[NOS_ELECTRONS]
~IDPerfMonEoverP()
Destructor.
std::string m_primaryVertexCollection
Primary vertex input name.
unsigned int m_evtNumber
std::string m_smallValidationTreeDescription
stream/folder to for the TTree to be written out
int m_nPIX[NOS_ELECTRONS]
float m_ePID_IsolationType[50][NOS_ELECTRONS]
unsigned int m_lumi_block
bool m_IsEMMedium[NOS_ELECTRONS]
TrackCollection * m_refittedTracks_no1
Refitted track collection.
std::string m_InputElectronContainerName
Electron collection input name.
float m_electronErrz0[3][NOS_ELECTRONS]
float m_electronPhi[3][NOS_ELECTRONS]
Track Phi on electron.
float m_pvsumpt[NO_PV]
VxPos m_vxpos[NOS_ELECTRONS]
std::string m_validationTreeFolder
Root Validation Tree.
float m_errpvy[NO_PV]
std::vector< std::pair< xAOD::Iso::IsolationType, std::string > > m_PID_IsolationType_Names
bool m_validationMode
< boolean to switch to validation mode
int m_author[NOS_ELECTRONS]
int m_associatedToVtx[NOS_ELECTRONS]
int m_nTRTHT[NOS_ELECTRONS]
bool m_IsEMTight[NOS_ELECTRONS]
float m_electronErrPhi[3][NOS_ELECTRONS]
Track phi error on electron.
bool m_isGoodOQ[NOS_ELECTRONS]
bool m_IsEMTightTRT[NOS_ELECTRONS]
StatusCode finalize()
float m_ClusterEnergy[NOS_ELECTRONS]
float m_electronErrTheta[3][NOS_ELECTRONS]
Track theta error on electron.
std::string m_OutputTrackCollectionName_no1
Name of output of Refitted Inner Detector Tracks.
void extrapolateToTheCalo(const Trk::TrackParameters *trkPar, const xAOD::CaloCluster *cluster, double *eta, double *phi, double *deltaEta, double *delatPhi)
int m_electronCounter
counter for electrons
TH2F * m_ZeeMediumOS_ClusterPtEta
float m_pvx[NO_PV]
std::string m_metRefFinalName
void fillElectronInfo(const xAOD::Electron *p)
int m_nSCTout[NOS_ELECTRONS]
std::string m_lhTune
float m_electronLMQoverP[3][NOS_ELECTRONS]
Track q over p on electron.
bool fillLastMeasurement(const Trk::Track *track, const int fitter)
AsgElectronLikelihoodTool * m_LHToolTight2015
IDPerfMonEoverP(const std::string &name, ISvcLocator *pSvcLocator)
Default constructor.
unsigned int m_runNumber
float m_pvz[NO_PV]
std::vector< int > FillSimpleTree()
float m_covpvypvz[NO_PV]
TH1F * m_ZeeLooseMassOS_Cluster
ToolHandle< Trig::TrigDecisionTool > m_trigDec
The trigger decision tool.
float m_ClusterEta[NOS_ELECTRONS]
int m_nTRTHTout[NOS_ELECTRONS]
int m_nPIXout[NOS_ELECTRONS]
bool fillVertexInformation(std::map< const xAOD::TrackParticle *, VxPos > &trackParticleVertexMap, xAOD::Vertex const *&primaryVertexFirstCandidate)
float m_electronQoverP[3][NOS_ELECTRONS]
Track q over p on electron.
bool passWenuSelection(std::vector< int > &electrons)
float m_errpvz[NO_PV]
bool passZeeSelection(std::vector< int > &electrons)
bool m_fillDetailedTree
validation tree name - to be acessed by this from root
AsgElectronLikelihoodTool * m_LHToolMedium2015
float m_electronTheta[3][NOS_ELECTRONS]
Track theta at perigee.
float m_electronErrQoverP[3][NOS_ELECTRONS]
std::string m_jetContainerName
JEt collection input name.
float m_errpvx[NO_PV]
bool m_IsEMLoose[NOS_ELECTRONS]
std::vector< std::string > m_triggerNames
std::string m_validationTreeDescription
stream/folder to for the TTree to be written out
std::string m_smallValidationTreeFolder
Root Validation Tree.
std::vector< std::pair< xAOD::EgammaParameters::TrackCaloMatchType, std::string > > m_PID_TrackCaloMatchType_Names
void deleteAction() const
ToolHandle< IegammaTrkRefitterTool > m_TrackRefitter_no2
The track refitter.
Property holding a SG store/key/clid from which a ReadHandle is made.
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
The common trigger namespace for trigger analysis tools.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersBase< TrackParametersDim, Charged > TrackParameters
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Vertex_v1 Vertex
Define the latest version of the vertex class.
Electron_v1 Electron
Definition of the current "egamma version".