Holds truth-level fiduciality flags on the signal recoil electron.
More...
#include <FiducialFlag.h>
|
|
| FiducialFlag ()=default |
| | Class constructor.
|
| |
|
virtual | ~FiducialFlag ()=default |
| | Class destructor.
|
| |
| void | clear () |
| | Reset the FiducialFlag object.
|
| |
| bool | isFiducial () const |
| | Return true/false if event is fiducial.
|
| |
| int | getFiducialFlag () const |
| | Return fiducial flag bit mask.
|
| |
| bool | hasEcalHit () const |
| | Return true/false if event has ecal hit.
|
| |
| bool | hasHcalHit () const |
| | Return true/false if event has hcal hit.
|
| |
| bool | hasMinTrackerHits () const |
| | Return true/false if event has min.
|
| |
| bool | hasMinEnergy () const |
| | Return true/false if event has min.
|
| |
| double | getAlgoVar (int element) const |
| | Return algorithm variable i (see algorithm code for details).
|
| |
| double | getAlgoVar0 () const |
| | Return algorithm variable 0 (see algorithm code for details).
|
| |
| double | getAlgoVar1 () const |
| | Return algorithm variable 1 (see algorithm code for details).
|
| |
| double | getAlgoVar2 () const |
| | Return algorithm variable 2 (see algorithm code for details).
|
| |
| double | getAlgoVar3 () const |
| | Return algorithm variable 3 (see algorithm code for details).
|
| |
| double | getAlgoVar4 () const |
| | Return algorithm variable 4 (see algorithm code for details).
|
| |
| void | setFiducialFlag (int fiducial_flag, int nvar) |
| | Set fiduciality bit mask.
|
| |
| void | setIsFiducial (bool is_fiducial) |
| | Set fiduciality flag.
|
| |
| void | setHasEcalHit (bool has_ecal_hit) |
| | Set ecal hit flag.
|
| |
| void | setHasHcalHit (bool has_hcal_hit) |
| | Set hcal hit flag.
|
| |
| void | setHasMinTrackerHits (bool has_min_tracker_hits) |
| | Set tracker hit flag.
|
| |
| void | setHasMinEnergy (bool has_min_energy) |
| | Set recoil min.
|
| |
| void | setAlgoVar (int element, double value) |
| | Set an algorithm variable.
|
| |
Holds truth-level fiduciality flags on the signal recoil electron.
Definition at line 25 of file FiducialFlag.h.
◆ clear()
| void ldmx::FiducialFlag::clear |
( |
| ) |
|
Reset the FiducialFlag object.
Definition at line 20 of file FiducialFlag.cxx.
20 {
21 fiducial_flag_ = 0;
22 is_fiducial_ = false;
23 has_ecal_hit_ = false;
24 has_hcal_hit_ = false;
25 has_min_tracker_hits_ = false;
26 has_min_energy_ = false;
27
28 for (int i = 0; i < variables_.GetSize(); ++i) {
29 variables_[i] = 0;
30 }
31}
◆ getAlgoVar()
| double ldmx::FiducialFlag::getAlgoVar |
( |
int | element | ) |
const |
|
inline |
Return algorithm variable i (see algorithm code for details).
- Parameters
-
| element | The index of the variable. |
- Returns
- Algorithm variable at the index_.
Definition at line 88 of file FiducialFlag.h.
88{ return variables_[element]; }
◆ getAlgoVar0()
| double ldmx::FiducialFlag::getAlgoVar0 |
( |
| ) |
const |
|
inline |
Return algorithm variable 0 (see algorithm code for details).
- Note
- Provided for interactive ROOT use.
- Returns
- Algorithm variable 0.
Definition at line 95 of file FiducialFlag.h.
95 {
96 return (variables_.GetSize() < 1) ? (0) : (variables_[0]);
97 }
◆ getAlgoVar1()
| double ldmx::FiducialFlag::getAlgoVar1 |
( |
| ) |
const |
|
inline |
Return algorithm variable 1 (see algorithm code for details).
- Note
- Provided for interactive ROOT use.
- Returns
- Algorithm variable 1.
Definition at line 104 of file FiducialFlag.h.
104 {
105 return (variables_.GetSize() < 2) ? (0) : (variables_[1]);
106 }
◆ getAlgoVar2()
| double ldmx::FiducialFlag::getAlgoVar2 |
( |
| ) |
const |
|
inline |
Return algorithm variable 2 (see algorithm code for details).
- Note
- Provided for interactive ROOT use.
- Returns
- Algorithm variable 2.
Definition at line 113 of file FiducialFlag.h.
113 {
114 return (variables_.GetSize() < 3) ? (0) : (variables_[2]);
115 }
◆ getAlgoVar3()
| double ldmx::FiducialFlag::getAlgoVar3 |
( |
| ) |
const |
|
inline |
Return algorithm variable 3 (see algorithm code for details).
- Note
- Provided for interactive ROOT use.
- Returns
- Algorithm variable 3.
Definition at line 122 of file FiducialFlag.h.
122 {
123 return (variables_.GetSize() < 4) ? (0) : (variables_[3]);
124 }
◆ getAlgoVar4()
| double ldmx::FiducialFlag::getAlgoVar4 |
( |
| ) |
const |
|
inline |
Return algorithm variable 4 (see algorithm code for details).
- Note
- Provided for interactive ROOT use.
- Returns
- Algorithm variable 4.
Definition at line 131 of file FiducialFlag.h.
131 {
132 return (variables_.GetSize() < 5) ? (0) : (variables_[4]);
133 }
◆ getFiducialFlag()
| int ldmx::FiducialFlag::getFiducialFlag |
( |
| ) |
const |
|
inline |
Return fiducial flag bit mask.
- Returns
- Fiducial flag bit mask.
Definition at line 57 of file FiducialFlag.h.
57{ return fiducial_flag_; }
◆ hasEcalHit()
| bool ldmx::FiducialFlag::hasEcalHit |
( |
| ) |
const |
|
inline |
Return true/false if event has ecal hit.
- Returns
- True if ecal hit.
Definition at line 63 of file FiducialFlag.h.
63{ return has_ecal_hit_; }
◆ hasHcalHit()
| bool ldmx::FiducialFlag::hasHcalHit |
( |
| ) |
const |
|
inline |
Return true/false if event has hcal hit.
- Returns
- True if hcal hit.
Definition at line 69 of file FiducialFlag.h.
69{ return has_hcal_hit_; }
◆ hasMinEnergy()
| bool ldmx::FiducialFlag::hasMinEnergy |
( |
| ) |
const |
|
inline |
Return true/false if event has min.
recoil energy at production.
- Returns
- True if >= min energy.
Definition at line 81 of file FiducialFlag.h.
81{ return has_min_energy_; }
◆ hasMinTrackerHits()
| bool ldmx::FiducialFlag::hasMinTrackerHits |
( |
| ) |
const |
|
inline |
Return true/false if event has min.
number of tracker hits_.
- Returns
- True if >= min tracker hits_.
Definition at line 75 of file FiducialFlag.h.
75{ return has_min_tracker_hits_; }
◆ isFiducial()
| bool ldmx::FiducialFlag::isFiducial |
( |
| ) |
const |
|
inline |
Return true/false if event is fiducial.
- Returns
- True if fiducial.
Definition at line 51 of file FiducialFlag.h.
51{ return is_fiducial_; }
◆ setAlgoVar()
| void ldmx::FiducialFlag::setAlgoVar |
( |
int | element, |
|
|
double | value ) |
Set an algorithm variable.
- Parameters
-
| element | The index of the variable. |
| value | The variable's new value. |
Definition at line 41 of file FiducialFlag.cxx.
41 {
42 if (element >= 0 && element < variables_.GetSize()) {
43 variables_[element] = value;
44 }
45}
Referenced by recon::RecoilFiducialityProcessor::produce().
◆ setFiducialFlag()
| void ldmx::FiducialFlag::setFiducialFlag |
( |
int | fiducial_flag, |
|
|
int | nvar ) |
Set fiduciality bit mask.
- Parameters
-
| fiducial_flag | Bit-mask holding fiduciality conditions. |
| nvar | The number of algorithm variables. |
Definition at line 33 of file FiducialFlag.cxx.
33 {
34 fiducial_flag_ = fiducial_flag;
35
36 if (nvar > variables_.GetSize()) {
37 variables_.Set(nvar);
38 }
39}
Referenced by recon::RecoilFiducialityProcessor::produce().
◆ setHasEcalHit()
| void ldmx::FiducialFlag::setHasEcalHit |
( |
bool | has_ecal_hit | ) |
|
|
inline |
◆ setHasHcalHit()
| void ldmx::FiducialFlag::setHasHcalHit |
( |
bool | has_hcal_hit | ) |
|
|
inline |
◆ setHasMinEnergy()
| void ldmx::FiducialFlag::setHasMinEnergy |
( |
bool | has_min_energy | ) |
|
|
inline |
◆ setHasMinTrackerHits()
| void ldmx::FiducialFlag::setHasMinTrackerHits |
( |
bool | has_min_tracker_hits | ) |
|
|
inline |
◆ setIsFiducial()
| void ldmx::FiducialFlag::setIsFiducial |
( |
bool | is_fiducial | ) |
|
|
inline |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | o, |
|
|
const FiducialFlag & | d ) |
|
friend |
Print a description of this object.
Definition at line 7 of file FiducialFlag.cxx.
7 {
8 return o << "FiducialFlag { " << "fiducialFlag: " << c.fiducial_flag_ << ", "
9 << "isFiducial: " << c.is_fiducial_ << ", "
10 << "hasEcalHit: " << c.has_ecal_hit_ << ", "
11 << "hasHcalHit: " << c.has_hcal_hit_ << ", "
12 << "hasMinTrackerHits: " << c.has_min_tracker_hits_ << ", "
13 << "hasMinEnergy: " << c.has_min_energy_ << " }";
14
15 for (int i = 0; i < c.variables_.GetSize(); ++i) {
16 std::cout << "Element " << i << " : " << c.variables_[i] << std::endl;
17 }
18}
◆ fiducial_flag_
| int ldmx::FiducialFlag::fiducial_flag_ {0} |
|
private |
◆ has_ecal_hit_
| bool ldmx::FiducialFlag::has_ecal_hit_ {false} |
|
private |
◆ has_hcal_hit_
| bool ldmx::FiducialFlag::has_hcal_hit_ {false} |
|
private |
◆ has_min_energy_
| bool ldmx::FiducialFlag::has_min_energy_ {false} |
|
private |
◆ has_min_tracker_hits_
| bool ldmx::FiducialFlag::has_min_tracker_hits_ {false} |
|
private |
◆ is_fiducial_
| bool ldmx::FiducialFlag::is_fiducial_ {false} |
|
private |
◆ variables_
| TArrayD ldmx::FiducialFlag::variables_ |
|
private |
The documentation for this class was generated from the following files: