ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronTAccept.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef RINGER_STANDALONE
6
7#ifndef RINGERSELECTORTOOLS_ELECTRONTACCEPT_H
8#define RINGERSELECTORTOOLS_ELECTRONTACCEPT_H
9
10// Athena includes:
12#include "PATCore/AcceptInfo.h"
13
14// Local includes:
16
17namespace Ringer {
18
20
26 public:
33#ifdef XAOD_ANALYSIS
34 typedef std::bitset<32> bitMskWord;
35#else
36 typedef std::bitset<asg::AcceptInfo::NBITS> bitMskWord;
37#endif
38
39 // Grant access to m_accept for BitdefElectron_v1
40 friend class BitdefElectron_v1;
41
44
47 static unsigned int getAppliedCutMsk(const Requirement cut,
48 bool withCutIDTrack = false);
52 static const asg::AcceptInfo& retrieveTAcceptTemplate(){ return m_accept;}
54
55
58
61 static void resetMsk(bitMskWord& word);
65 static void addLooseAppliedCuts(bitMskWord& word);
69 static void addMediumAppliedCuts(bitMskWord& word);
73 static void addTightAppliedCuts(bitMskWord& word);
79
80 private:
85
87 static asg::AcceptInfo m_accept ATLAS_THREAD_SAFE; // read-only except for declareBit below
88};
89
95/*
96 * NOTE:
97 *
98 * Should new implementation inherit from this? That is, new bits
99 * can only be defined for positions that weren't yet defined:
100 *
101 * Example:
102 *
103 * \code
104 * class BitdefElectron_v2 : public BitdefElectron_v2
105 * {
106 * static const int NewBit;
107 * }
108 *
109 * \endcode
110 */
111
112 public:
114 static const int NoErrorBit;
116 static const int ExecCutID;
118 static const int CutIDDec;
120 static const int RingerChainDec;
121
123 static unsigned NUsedBits() { return m_nUsedBits; }
124
125 private:
129 static int declareBit ATLAS_NOT_THREAD_SAFE (
130 const char* cutName,
131 const char* cutDescr)
132 {
133 int bit = ElectronTAccept_v1::m_accept.addCut(cutName,cutDescr);
134 ++m_nUsedBits;
135 return bit;
136 }
137
138 // only modified by above "unsafe" method
139 static unsigned m_nUsedBits ATLAS_THREAD_SAFE;
140
145};
146
147// Definition of the current Electron TAccept version:
149// And the Electron Bitdef as well:
151
152} // namespace Ringer
153
154#endif // RINGERSELECTORTOOLS_ELECTRONTACCEPT_H
155
156
157#endif // RINGER_STANDALONE
Define macros for attributes used to control the static checker.
Define electron bits (v1)
static const int ExecCutID
Whether CutID was run:
static unsigned NUsedBits()
Number of bits:
BitdefElectron_v1()
Standard ctor (ensure abstract class).
static unsigned m_nUsedBits ATLAS_THREAD_SAFE
static int declareBit ATLAS_NOT_THREAD_SAFE(const char *cutName, const char *cutDescr)
Declare bit to ElectronTAccept_v1 word.
static const int RingerChainDec
The decision position of the Ringer algorithm's discrimation chain:
static const int CutIDDec
The decision position of the CutID:
static const int NoErrorBit
The decision position set to true when no error occurs:
Get electron defined TAccept and its masks.
ElectronTAccept_v1()
Standard ctor (ensure abstract class).
static unsigned int getAppliedCutMsk(const Requirement cut, bool withCutIDTrack=false)
Main methods.
std::bitset< asg::AcceptInfo::NBITS > bitMskWord
Bit mask word used.
static void addLooseAppliedCuts(bitMskWord &word)
Add loose applied cuts to bitmask (IsEM mask):
static void addMediumAppliedCuts(bitMskWord &word)
Add medium applied cuts to bitmask (IsEM mask):
static void addTightAppliedCuts(bitMskWord &word)
Add tight applied cuts bitmask (IsEM mask):
static asg::AcceptInfo m_accept ATLAS_THREAD_SAFE
The AcceptInfo:
static void resetMsk(bitMskWord &word)
Auxiliar methods.
static void addCutIDTrackAppliedCuts(bitMskWord &word)
Add CutID Track applied cuts to bitmask (IsEM mask):
static const asg::AcceptInfo & retrieveTAcceptTemplate()
Retrieve copy of the ElectronTAccept_v1 template.
Namespace dedicated for Ringer utilities.
BitdefElectron_v1 BitdefElectron
Requirement
the cut requirement
ElectronTAccept_v1 ElectronTAccept