Berkeley Nuclear Data Software
STOFPostProcessing.h
Go to the documentation of this file.
1 #ifndef _STOF_POST_PROCESSING_H_
2 #define _STOF_POST_PROCESSING_H_
3 //project
4 #include "STOFConfig.h"
5 #include "STOFEvent.h"
7 //root
8 #include "TGraph.h"
17 {
18 public:
21 
23  STOFPostProcessing(std::string a_writeMode);
24 
27  void loadConfig(std::string a_jsonConfigName);
28 
32  void genTimeDiffMultiPMTTarg(std::string a_outFile);
33 
34 
39  void genAmpCalibHists(std::string a_outFile);
40 
44  void genPSDCalibHists(std::string a_outFile);
45 
48  void genCoinTimingCalibrationHists(std::string a_outFile,
49  bool a_targDTCut = false
50  );
51 
52 
55  void genIncTimingCalibrationHists(std::string a_outFile);
60  void reduceToSTOFEvents(std::string a_outfile = "stofEvents.root");
61 
72  int buildCoincidences(double a_coinWindow,
73  int a_minMult = 2
74  );
75 
76 
81  int addCoinsFromFile(std::string a_fileName,
82  double a_coinWindow,
83  int a_minMult = 2
84  );
86  void checkPSDCuts(int a_ch,
87  string a_cutFile
88  );
89 
99  TGraph* investigateCoincidenceWindow(int a_startWindow,
100  int a_stopWindow,
101  int a_step
102  );
105  void setRunStart(double a_runStart);
106 private:
109  STOFConfig m_config;
110 
115  bool characterizeCoin(compassCoin& a_coinEv,
116  std::map<int,DetType>& a_targMap,
117  std::map<int,DetType>& a_scatMap,
118  std::vector<int>& a_tarChannels,
119  std::vector<int>& a_scatChannels,
120  bool& a_hasRF,
121  double& a_incTime,
122  double& a_coinTime,
123  double& a_evWallTime
124  );
129  bool reduceCoinToSTOFEvent(compassCoin& a_coinEv,
130  STOFEvent* a_stofEv
131  );
132 
133  double getMPMTDT(compassCoin& a_ev,
134  int a_detID
135  );
136 
137  int m_maxRawPH;
138  double m_runStartTime;
139 
140 
141 };
142 
143 #endif
Definition: COMPASSFileManagement.h:80
Definition: STOFConfig.h:16
Definition: STOFEvent.h:9
Definition: STOFPostProcessing.h:17
int buildCoincidences(double a_coinWindow, int a_minMult=2)
Definition: STOFPostProcessing.cpp:1190
void genIncTimingCalibrationHists(std::string a_outFile)
Definition: STOFPostProcessing.cpp:835
void loadConfig(std::string a_jsonConfigName)
Definition: STOFPostProcessing.cpp:32
void genAmpCalibHists(std::string a_outFile)
Definition: STOFPostProcessing.cpp:204
TGraph * investigateCoincidenceWindow(int a_startWindow, int a_stopWindow, int a_step)
Definition: STOFPostProcessing.cpp:1569
void checkPSDCuts(int a_ch, string a_cutFile)
check PSD cuts and compare number of events of each type
Definition: STOFPostProcessing.cpp:1468
void genPSDCalibHists(std::string a_outFile)
Definition: STOFPostProcessing.cpp:392
void genCoinTimingCalibrationHists(std::string a_outFile, bool a_targDTCut=false)
Definition: STOFPostProcessing.cpp:605
int addCoinsFromFile(std::string a_fileName, double a_coinWindow, int a_minMult=2)
Definition: STOFPostProcessing.cpp:1454
void setRunStart(double a_runStart)
Definition: STOFPostProcessing.cpp:1641
void reduceToSTOFEvents(std::string a_outfile="stofEvents.root")
Definition: STOFPostProcessing.cpp:1117
void genTimeDiffMultiPMTTarg(std::string a_outFile)
Definition: STOFPostProcessing.cpp:39
STOFPostProcessing()
defualt constructor puts the class into an empty but working state
Definition: STOFPostProcessing.cpp:18
Definition: COMPASSFileManagement.h:61