-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElectron.h
More file actions
85 lines (70 loc) · 2.39 KB
/
Electron.h
File metadata and controls
85 lines (70 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#pragma once
#include "Lepton.h"
namespace pec
{
/**
* \class Electron
* \brief Represents a reconstructed electron
*
* Extends class Lepton by adding sets of boolean and real-valued identification decisions. They are
* intended to be used to store results of cut-based and MVA algorithms, respectively. Up to eight
* boolean flags can be stored. The maximal number of MVA-based decisions is given by contIdSize,
* which can be changed at compile time only.
*/
class Electron: public Lepton
{
public:
/// Constructor with no parameters
Electron() noexcept;
public:
/// Resets the object to a state right after the default initialisation
virtual void Reset() override;
/**
* \brief Sets a decision of a cut-based ID
*
* The decision is encoded in a bit field. Decision for several working points can be written
* using several bits. Throws an exception if the index of out of the supported range.
*/
void SetBooleanID(unsigned bitIndex, bool value = true);
/**
* \brief Saves real-valued response of an MVA discriminator
*
* Throws an exception if the index is out of the supported range.
*/
void SetContinuousID(unsigned index, float mva);
/// Sets pseudorapidity of the associated supercluster
void SetEtaSC(float etaSC);
/**
* \brief Returns decision of selected version of the cut-based ID
*
* See documentation for the SetCutBasedId method.
*/
bool BooleanID(unsigned bitIndex) const;
/**
* \brief Returns the value of MVA-based ID
*
* See documentation for the SetMvaID method.
*/
float ContinuousID(unsigned index) const;
/// Returns pseudorapidity of the associated supercluster
float EtaSC() const;
private:
/// Pseudorapidity of the associated supercluster
Float_t etaSC;
/**
* \brief Encodes flags for boolean ID decisions
*
* Usually, decisions for various working points of a cut-based identification algorithm are
* incorporated into this variable.
*/
UChar_t cutBasedId;
/// Maximal number of continuous ID discriminators that can be stored
static unsigned const contIdSize = 1;
/**
* \brief Continuous ID decisions
*
* See documentation for the SetContinuousId method.
*/
Float_t mvaId[contIdSize];
};
} // end of namespace pec