ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronSelector.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef IDPERFMON_ELECTRONSELECTOR_H
6#define IDPERFMON_ELECTRONSELECTOR_H
7
8//==============================================================================
9// Include files...
10//==============================================================================
12
13#include <map>
14#include "TH1.h"
15
16#include "xAODMuon/Muon.h"
17#include "xAODTracking/Vertex.h"
19
20#include "GaudiKernel/ServiceHandle.h"
21#include "AsgTools/ToolHandle.h"
22#include "xAODEgamma/Electron.h"
25
26#include <atomic>
27//==============================================================================
28// Forward class declarations...
29//==============================================================================
31{
32 public:
35
38
39 void setDebug (bool debug) {m_doDebug = debug;}
40
44 // Override functions from EventAnalysis
45 void Init();
46 void PrepareElectronList (const xAOD::ElectronContainer* pxElecContainer);
47 bool RecordElectron (const xAOD::Electron *);
48 inline void SetPtCut (float newpt) {m_ptCut = newpt;}
49
50 protected:
51 // virtual void BookHistograms();
52
53 private:
55
56 static std::atomic<unsigned int> s_uNumInstances;
57
58 // functions
59 void Clear();
60 bool OrderElectronList ();
61 bool RetrieveVertices ();
62
63 // message stream
64 MsgStream * m_msgStream;
65
66 // Class variables
68 std::vector<const xAOD::TrackParticle*> m_pxElTrackList;
69 std::vector<const xAOD::TrackParticle*> m_goodElecNegTrackParticleList;
70 std::vector<const xAOD::TrackParticle*> m_goodElecPosTrackParticleList;
71
72 //
74 //
75 float m_ptCut;
76 float m_etaCut;
77
78 // Electron likelihood tool:
80
81 //
82 int m_elecneg1 = 0;
83 int m_elecneg2 = 0;
84 int m_elecpos1 = 0;
85 int m_elecpos2 = 0;
86
87 // MeV to GeV conversion
88 const float m_CGeV = 1.0e-3; // Conversion factor to remove evil MeV nonsense.
89
90};
91
92#endif
93
const bool debug
Electron selector tool to select objects in Athena using an underlying pure ROOT tool.
AsgElectronLikelihoodTool * m_LHTool2015
const xAOD::TrackParticle * GetElecPosTrackParticle(size_t i)
MsgStream * m_msgStream
EventAnalysis PARENT
std::vector< const xAOD::TrackParticle * > m_pxElTrackList
void SetPtCut(float newpt)
unsigned int GetElectronCollectionSize()
const xAOD::Muon * m_pxElectron
ElectronSelector(const ElectronSelector &)=delete
static std::atomic< unsigned int > s_uNumInstances
bool RecordElectron(const xAOD::Electron *)
const xAOD::TrackParticle * GetElecNegTrackParticle(size_t i)
std::vector< const xAOD::TrackParticle * > m_goodElecPosTrackParticleList
std::vector< const xAOD::TrackParticle * > m_goodElecNegTrackParticleList
void setDebug(bool debug)
void PrepareElectronList(const xAOD::ElectronContainer *pxElecContainer)
ElectronSelector & operator=(const ElectronSelector &)=delete
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".