ATLAS Offline Software
TForwardElectronIsEMSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Dear emacs, this is -*-c++-*-
6 
7 #ifndef __TFORWARDELECTRONISEMSELECTOR__
8 #define __TFORWARDELECTRONISEMSELECTOR__
9 
20 // ROOT includes
21 // Include the return object and the base class
25 #include "PATCore/AcceptData.h"
26 #include "PATCore/AcceptInfo.h"
27 #include <string>
28 #include <vector>
29 
31 
32 namespace Root {
34 {
35 
36  friend class ::AsgForwardElectronIsEMSelector;
37 
38 public:
41  const char* name = "TForwardElectronIsEMSelector");
42 
45 
46  // Main methods
49 
52 
53  // used to calcIsEm.
54  // Note that it doesn't necessarily zero all the values that pass, so
55  // make sure that the input iflag bits that you are concerned with start out
56  // with 0.
57  unsigned int calocuts_electrons(
58  // eta
59  float eta,
60  // NPV
61  float nvtx,
62  // secondlambda
63  float secondLambda,
64  // lateral
65  float lateral,
66  // lateral
67  float longitudinal,
68  // fracMax
69  float fracMax,
70  // longitudinal
71  float centerLambda,
72  // secondR
73  float secondR,
74  // the starting isEM (should be 0 if new)
75  unsigned int iflag) const;
76 
77  // used internally by calcIsEm, but left public because it can be useful for
78  // users. Note that it doesn't necessarily zero all the values that pass, so
79  // make sure that the input iflag bits that you are concerned with start out
80  // with 0.
81 
83  // Public members (the cut values)
85 
87  unsigned int m_isEMMask;
88 
90  std::vector<float> m_cutBinEta_ForwardElectron;
92  std::vector<float> m_cutVxp_ForwardElectron;
96  std::vector<float> m_cutLATERAL_ForwardElectron;
102  std::vector<float> m_cutSECONDR_ForwardElectron;
105 
107  const asg::AcceptInfo& getAcceptInfo() const { return m_acceptInfo; }
108 
109 private:
110  // Private members
111 
112  // would ideally be protected: only to be used by ARASelector
113  asg::AcceptData fillAccept(unsigned int isEM) const;
114 
115  std::vector<int> findNvtxEtaBin(float nvtx, double eta) const;
116 
117  template<typename T>
118  bool checkVar(const std::vector<T>& vec, int choice) const;
119 
122 
123  // the cut positions
124 
127 
128  // int m_cutPositionVxp_ForwardElectron;
129 
136 
137  // the cut names
138 
140  const std::string m_cutNameVxp_ForwardElectron;
147 
148 }; // End: class definition
149 
150 } // End: namespace Root
151 
152 #endif
153 
Root::TForwardElectronIsEMSelector::m_cutCELLMAXFRAC_ForwardElectron
std::vector< float > m_cutCELLMAXFRAC_ForwardElectron
cut on maxFrac
Definition: TForwardElectronIsEMSelector.h:100
Root::TForwardElectronIsEMSelector::m_cutNameLONGITUDINAL_ForwardElectron
const std::string m_cutNameLONGITUDINAL_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:143
egammaPIDdefs.h
Root::TForwardElectronIsEMSelector::fillAccept
asg::AcceptData fillAccept(unsigned int isEM) const
Definition: TForwardElectronIsEMSelector.cxx:150
Root
Definition: GoodRunsListSelectorTool.h:30
Root::TForwardElectronIsEMSelector::m_cutSECONDR_ForwardElectron
std::vector< float > m_cutSECONDR_ForwardElectron
cut values for cut on secondR
Definition: TForwardElectronIsEMSelector.h:102
Root::TForwardElectronIsEMSelector::m_cutVxp_ForwardElectron
std::vector< float > m_cutVxp_ForwardElectron
range of NPV bins for e-ID
Definition: TForwardElectronIsEMSelector.h:92
Root::TForwardElectronIsEMSelector::m_acceptInfo
asg::AcceptInfo m_acceptInfo
Accept info.
Definition: TForwardElectronIsEMSelector.h:121
AsgForwardElectronIsEMSelector
Electron isEM selector.
Definition: AsgForwardElectronIsEMSelector.h:43
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Root::TForwardElectronIsEMSelector::m_cutPositionLATERAL_ForwardElectron
int m_cutPositionLATERAL_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:131
Root::TForwardElectronIsEMSelector::m_cutCENTERLAMBDA_ForwardElectron
std::vector< float > m_cutCENTERLAMBDA_ForwardElectron
cut on centerlambda
Definition: TForwardElectronIsEMSelector.h:104
Root::TForwardElectronIsEMSelector::m_cutPositionCELLMAXFRAC_ForwardElectron
int m_cutPositionCELLMAXFRAC_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:133
Root::TForwardElectronIsEMSelector::m_cutPositionLONGITUDINAL_ForwardElectron
int m_cutPositionLONGITUDINAL_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:132
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
Root::TForwardElectronIsEMSelector::calocuts_electrons
unsigned int calocuts_electrons(float eta, float nvtx, float secondLambda, float lateral, float longitudinal, float fracMax, float centerLambda, float secondR, unsigned int iflag) const
Definition: TForwardElectronIsEMSelector.cxx:163
Root::TForwardElectronIsEMSelector::getAcceptInfo
const asg::AcceptInfo & getAcceptInfo() const
accesss to the accept info object
Definition: TForwardElectronIsEMSelector.h:107
Root::TForwardElectronIsEMSelector::m_cutPositionSECONDR_ForwardElectron
int m_cutPositionSECONDR_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:134
AsgMessaging.h
Root::TForwardElectronIsEMSelector::TForwardElectronIsEMSelector
TForwardElectronIsEMSelector(const char *name="TForwardElectronIsEMSelector")
Standard constructor.
Definition: TForwardElectronIsEMSelector.cxx:15
asg::AcceptInfo
Definition: AcceptInfo.h:28
Root::TForwardElectronIsEMSelector::m_cutNameVxp_ForwardElectron
const std::string m_cutNameVxp_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:140
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Root::TForwardElectronIsEMSelector::accept
asg::AcceptData accept() const
Return dummy accept with only info.
Definition: TForwardElectronIsEMSelector.h:51
Root::TForwardElectronIsEMSelector
Definition: TForwardElectronIsEMSelector.h:34
Root::TForwardElectronIsEMSelector::m_cutSECONDLAMBDA_ForwardElectron
std::vector< float > m_cutSECONDLAMBDA_ForwardElectron
cut on secondlambda
Definition: TForwardElectronIsEMSelector.h:94
Root::TForwardElectronIsEMSelector::m_cutNameCELLMAXFRAC_ForwardElectron
const std::string m_cutNameCELLMAXFRAC_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:144
Root::TForwardElectronIsEMSelector::m_cutPositionCENTERLAMBDA_ForwardElectron
int m_cutPositionCENTERLAMBDA_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:135
Root::TForwardElectronIsEMSelector::m_cutBinEta_ForwardElectron
std::vector< float > m_cutBinEta_ForwardElectron
range of eta bins for e-ID
Definition: TForwardElectronIsEMSelector.h:90
AcceptData.h
Root::TForwardElectronIsEMSelector::m_cutNameCENTERLAMBDA_ForwardElectron
const std::string m_cutNameCENTERLAMBDA_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:146
StatusCode.h
Root::TForwardElectronIsEMSelector::initialize
StatusCode initialize()
Initialize this class.
Definition: TForwardElectronIsEMSelector.cxx:83
Root::TForwardElectronIsEMSelector::m_cutNameSECONDLAMBDA_ForwardElectron
const std::string m_cutNameSECONDLAMBDA_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:141
Root::TForwardElectronIsEMSelector::m_isEMMask
unsigned int m_isEMMask
which subset of cuts to apply
Definition: TForwardElectronIsEMSelector.h:87
Root::TForwardElectronIsEMSelector::m_cutLATERAL_ForwardElectron
std::vector< float > m_cutLATERAL_ForwardElectron
cut on lateral
Definition: TForwardElectronIsEMSelector.h:96
Root::TForwardElectronIsEMSelector::m_cutNameSECONDR_ForwardElectron
const std::string m_cutNameSECONDR_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:145
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
AcceptInfo.h
Root::TForwardElectronIsEMSelector::m_cutPositionBinEta_ForwardElectron
int m_cutPositionBinEta_ForwardElectron
cluster eta range
Definition: TForwardElectronIsEMSelector.h:126
python.AtlRunQueryAMI.choice
int choice
Definition: AtlRunQueryAMI.py:210
Root::TForwardElectronIsEMSelector::m_cutPositionSECONDLAMBDA_ForwardElectron
int m_cutPositionSECONDLAMBDA_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:130
Root::TForwardElectronIsEMSelector::findNvtxEtaBin
std::vector< int > findNvtxEtaBin(float nvtx, double eta) const
Definition: TForwardElectronIsEMSelector.cxx:260
Root::TForwardElectronIsEMSelector::m_cutNameLATERAL_ForwardElectron
const std::string m_cutNameLATERAL_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:142
Root::TForwardElectronIsEMSelector::checkVar
bool checkVar(const std::vector< T > &vec, int choice) const
Definition: TForwardElectronIsEMSelector.cxx:323
Root::TForwardElectronIsEMSelector::m_cutNameBinEta_ForwardElectron
const std::string m_cutNameBinEta_ForwardElectron
Definition: TForwardElectronIsEMSelector.h:139
Root::TForwardElectronIsEMSelector::~TForwardElectronIsEMSelector
~TForwardElectronIsEMSelector()
Standard destructor.
asg::AcceptData
Definition: AcceptData.h:30
Root::TForwardElectronIsEMSelector::m_cutLONGITUDINAL_ForwardElectron
std::vector< float > m_cutLONGITUDINAL_ForwardElectron
cut on longitudinal
Definition: TForwardElectronIsEMSelector.h:98