LDMX Software
TriggerResult.h
Go to the documentation of this file.
1
8#ifndef RECON_EVENT_TRIGGERRESULT_H_
9#define RECON_EVENT_TRIGGERRESULT_H_
10
11// ROOT
12#include "TArrayD.h"
13#include "TObject.h" //ClassDef
14#include "TString.h"
15
16// STL
17#include <iostream>
18
19namespace ldmx {
20
26 public:
31
35 virtual ~TriggerResult();
36
40 void Print() const;
41
45 void Clear();
46
51 const TString& getName() const { return name_; }
52
57 bool passed() const { return pass_; }
58
64 double getAlgoVar(int element) const { return variables_[element]; }
65
71 double getAlgoVar0() const {
72 return (variables_.GetSize() < 1) ? (0) : (variables_[0]);
73 }
74
80 double getAlgoVar1() const {
81 return (variables_.GetSize() < 2) ? (0) : (variables_[1]);
82 }
83
89 double getAlgoVar2() const {
90 return (variables_.GetSize() < 3) ? (0) : (variables_[2]);
91 }
92
98 double getAlgoVar3() const {
99 return (variables_.GetSize() < 4) ? (0) : (variables_[3]);
100 }
101
107 double getAlgoVar4() const {
108 return (variables_.GetSize() < 5) ? (0) : (variables_[4]);
109 }
110
117 void set(const TString& name, bool pass, int nvar);
118
124 void setAlgoVar(int element, double value);
125
126 private:
128 TString name_{};
129
130 /* Represents the pass/fail trigger decision. */
131 bool pass_{false};
132
133 /* Algorithm variable results from the trigger decision. */
134 TArrayD variables_;
135
136 ClassDef(TriggerResult, 1);
137};
138} // namespace ldmx
139
140#endif
Represents the trigger decision (pass/fail) for reconstruction.
const TString & getName() const
Return the name of the trigger.
bool passed() const
Return pass/fail status of the trigger.
virtual ~TriggerResult()
Class destructor.
double getAlgoVar1() const
Return algorithm variable 1 (see algorithm code for details).
void set(const TString &name, bool pass, int nvar)
Set name and pass of trigger.
TString name_
Name of the trigger algorithm.
void Print() const
Print a description of this object.
double getAlgoVar2() const
Return algorithm variable 2 (see algorithm code for details).
double getAlgoVar4() const
Return algorithm variable 4 (see algorithm code for details).
double getAlgoVar0() const
Return algorithm variable 0 (see algorithm code for details).
TriggerResult()
Class constructor.
double getAlgoVar(int element) const
Return algorithm variable i (see algorithm code for details).
double getAlgoVar3() const
Return algorithm variable 3 (see algorithm code for details).
void setAlgoVar(int element, double value)
Set an algorithm variable.
void Clear()
Reset the TriggerResult object.