/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/fit/include/RAT/ClassifyTimesProc.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/fit/include/RAT/ClassifyTimesProc.hh Source File
Ratpac-two
ClassifyTimesProc.hh
1 
17 #ifndef __RAT_ClassifyTimesProc__
18 #define __RAT_ClassifyTimesProc__
19 
20 #include <RAT/FitterInputHandler.hh>
21 #include <RAT/Processor.hh>
22 #include <string>
23 
24 namespace RAT {
25 
26 namespace DS {
27 class Root;
28 class EV;
29 } // namespace DS
30 
31 class ClassifyTimesProc : public Processor {
32  public:
33  ClassifyTimesProc() : Processor("classifytimes"), inputHandler(){};
34  virtual ~ClassifyTimesProc() {}
35 
36  void BeginOfRun(DS::Run *run);
37 
38  virtual void SetI(std::string param, int value);
39 
40  virtual void SetD(std::string param, double value);
41 
42  virtual void SetS(std::string param, std::string value);
43 
44  virtual Processor::Result Event(DS::Root *ds, DS::EV *ev);
45 
46  protected:
47  std::vector<std::string> fParamNames = {"ratio", "mean", "stddev", "skewness", "kurtosis"};
48 
49  std::vector<int> fPMTtype; // Types of PMT to use in classifier. If empty, uses all PMT types.
50  std::string fClassifierName = "classifytimes"; // Default classifier name. User can specify.
51  std::string fPosFitter; // Position fitter from which to get reconstructed position.
52  bool fSetSpeed = false;
53  double fLightSpeed = 0.0; // mm / ns. Speed of light in material. Defaults to value in CLASSIFIER.ratdb
54  double fFixedTime = 0.0; // ns. User-specified event time.
55  TVector3 fFixedPosition; // mm. User-specified event position.
56  std::string fPosMethod;
57  DS::PMTInfo *fPMTInfo;
58  FitterInputHandler inputHandler;
59 
60  // Parameters for the ratio of counts
61  double fNumerTimeResLow =
62  0.0; // Numerator - Lower cut on time residuals in ns. Defaults to value in CLASSIFIER.ratdb
63  double fNumerTimeResUp =
64  0.0; // Numerator - Upper cut on time residuals in ns. Defaults to value in CLASSIFIER.ratdb
65  double fDenomTimeResLow = 0.0; // Denominator - Lower cut on time residuals in ns
66  double fDenomTimeResUp = 0.0; // Denominator - Upper cut on time residuals in ns
67 
68  // Parameters for the four central moments in specified window
69  int fVerbose =
70  0; // Save FOMs in ClassifierResult. 1 saves num_PMT's. 2 also saves time_resid_low and time_resid_up.
71  std::string fCutMethod; // "time" selects time residuals in [fTimeResLow,fTimeResUp] ns.
72  // "fraction" selects time residuals in [fTimeResFracLow,fTimeResFracUp].
73  double fTimeResLow = 0.0; // Lower cut on time residuals in ns
74  double fTimeResUp = 0.0; // Upper cut on time residuals in ns
75  double fTimeResFracLow = 0.0; // Lower cut on time residuals as a fraction in [0.0, 1.0)
76  double fTimeResFracUp = 1.0; // Upper cut on time residuals as a fraction in (0.0, 1.0]
77 };
78 
79 } // namespace RAT
80 
81 #endif // __RAT_ClassifyTimesProc__
Definition: ClassifyTimesProc.hh:31
virtual Processor::Result Event(DS::Root *ds, DS::EV *ev)
Definition: ClassifyTimesProc.cc:111
virtual void SetS(std::string param, std::string value)
Definition: ClassifyTimesProc.cc:34
virtual void SetD(std::string param, double value)
Definition: ClassifyTimesProc.cc:54
virtual void SetI(std::string param, int value)
Definition: ClassifyTimesProc.cc:45
Definition: EV.hh:33
Definition: PMTInfo.hh:19
Definition: Root.hh:39
Definition: Run.hh:22
Definition: FitterInputHandler.hh:26
Definition: Processor.hh:36
Processor(std::string _name)
Definition: Processor.hh:51
Result
Definition: Processor.hh:59
Definition: CCCrossSecMessenger.hh:29