GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TAnalysisOptions.h
Go to the documentation of this file.
1#ifndef TANALYSISOPTIONS_H
2#define TANALYSISOPTIONS_H
3
4/** \addtogroup Sorting
5 * @{
6 */
7
8#include "TObject.h"
9#include "TFile.h"
10
11/////////////////////////////////////////////////////////////////
12///
13/// \class TAnalysisOptions
14///
15/// This class stores those command line arguments passed to GRSISort, that
16/// are pertinent to the analysis. This includes such settings as the addback
17/// window width, whether to correct cross talk, etc.
18///
19/////////////////////////////////////////////////////////////////
20
21class TAnalysisOptions : public TObject {
22 friend class TGRSIOptions;
23
24public:
25 TAnalysisOptions() = default;
26
27 void Clear(Option_t* opt = "") override;
28 void Print(Option_t* opt = "") const override;
29
30 bool WriteToFile(const std::string& file);
31 bool WriteToFile(TFile* file = nullptr);
32 void ReadFromFile(const std::string& file);
33 void ReadFromFile(TFile* file = nullptr);
34
35 // sorting options
36 void SetBuildWindow(const int64_t& t_bw) { fBuildWindow = t_bw; }
38 void SetAddbackWindow(const double& t_abw) { fAddbackWindow = t_abw; }
39 void SetSuppressionWindow(const double& t_sup) { fSuppressionWindow = t_sup; }
40 void SetSuppressionEnergy(const double& e_sup) { fSuppressionEnergy = e_sup; }
41
42 void SetWaveformFitting(const bool& flag) { fWaveformFitting = flag; }
43 bool IsWaveformFitting() const { return fWaveformFitting; }
44
45 void SetCorrectCrossTalk(const bool& flag, Option_t* opt = "");
47
48 int64_t BuildWindow() const { return fBuildWindow; }
50 double AddbackWindow() const
51 {
52 if(fAddbackWindow < 1) {
53 return 15.0;
54 }
55 return fAddbackWindow;
56 }
57
58 double SuppressionWindow() const { return fSuppressionWindow; }
59 double SuppressionEnergy() const { return fSuppressionEnergy; }
60
61 bool StaticWindow() const { return fStaticWindow; }
62
63 Long64_t Merge(TCollection* list) { return Merge(list, ""); }
64 Long64_t Merge(TCollection* list, Option_t*);
65
66private:
67 using TObject::Compare;
68 bool Compare(const TAnalysisOptions* options) const;
69
70 // sorting options
71 int64_t fBuildWindow{2000}; ///< if building with a window(GRIFFIN) this is the size of the window. (default = 2us (2000))
72 bool fBuildEventsByTimeStamp{false}; ///< use time stamps instead of time (including CFD) to build events
73 double fAddbackWindow{300.}; ///< Time used to build Addback-Ge-Events for TIGRESS/GRIFFIN. (default = 300 ns (300))
74 double fSuppressionWindow{300.}; ///< Time used to suppress Ge-Events. (default = 300 ns (300))
75 double fSuppressionEnergy{0.}; ///< Minimum energy used to suppress Ge-Events. (default = 0 keV)
76 bool fIsCorrectingCrossTalk{false}; ///< True if we are correcting for cross-talk in GRIFFIN at analysis-level
77 bool fWaveformFitting{false}; ///< If true, waveform fitting with SFU algorithm will be performed
78 bool fStaticWindow{true}; ///< Flag to use static window (default moving)
79
80 /// \cond CLASSIMP
81 ClassDefOverride(TAnalysisOptions, 5) // NOLINT(readability-else-after-return)
82 /// \endcond
83};
84/*! @} */
85#endif /* TANALYSISOPTIONS_H */
int64_t BuildWindow() const
bool fIsCorrectingCrossTalk
True if we are correcting for cross-talk in GRIFFIN at analysis-level.
void SetAddbackWindow(const double &t_abw)
void SetBuildWindow(const int64_t &t_bw)
void SetSuppressionWindow(const double &t_sup)
double SuppressionWindow() const
void SetCorrectCrossTalk(const bool &flag, Option_t *opt="")
void SetBuildEventsByTimeStamp(bool &val)
bool WriteToFile(const std::string &file)
double fSuppressionEnergy
Minimum energy used to suppress Ge-Events. (default = 0 keV)
bool IsCorrectingCrossTalk() const
double AddbackWindow() const
int64_t fBuildWindow
if building with a window(GRIFFIN) this is the size of the window. (default = 2us (2000))
void Print(Option_t *opt="") const override
double SuppressionEnergy() const
double fSuppressionWindow
Time used to suppress Ge-Events. (default = 300 ns (300))
bool BuildEventsByTimeStamp() const
void SetSuppressionEnergy(const double &e_sup)
void Clear(Option_t *opt="") override
Long64_t Merge(TCollection *list)
bool fBuildEventsByTimeStamp
use time stamps instead of time (including CFD) to build events
double fAddbackWindow
Time used to build Addback-Ge-Events for TIGRESS/GRIFFIN. (default = 300 ns (300))
bool fWaveformFitting
If true, waveform fitting with SFU algorithm will be performed.
bool Compare(const TAnalysisOptions *options) const
TAnalysisOptions()=default
void SetWaveformFitting(const bool &flag)
bool IsWaveformFitting() const
void ReadFromFile(const std::string &file)
bool StaticWindow() const
bool fStaticWindow
Flag to use static window (default moving)