Diana Software
MCoincidenceVeto.cc
Go to the documentation of this file.
1 #include "MCoincidenceVeto.hh"
2 #include "QEvent.hh"
3 
4 
6 
8 {
9  // called once in a sequence
10 }
11 
13 {
14  // called once in a sequence
15 }
16 
17 
19 {
20  fTimeWindow = GetDouble("TimeWindow", .1);
21  fSameCrystal = GetBool("SameCrystal", false);
22 }
23 
25 {
26  bool result = true;
27  double t1, t2;
28  if(fSameCrystal)
29  {
30  t1 = ev->AuxData().GetDouble("TimeSinceSingleCrystal");
31  t2 = ev->AuxData().GetDouble("TimeUntilSingleCrystal");
32  }
33  else
34  {
35  t1 = ev->AuxData().GetDouble("TimeSinceFullTower");
36  t2 = ev->AuxData().GetDouble("TimeUntilFullTower");
37  }
38 
39  result = (t1>fTimeWindow) && (t2>fTimeWindow);
40 
41  return result;
42 }
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
Filters coincident events.
~MCoincidenceVeto()
destructor
void GetCuts()
Get cuts from config file.
double fTimeWindow
Window of time for events to be considered coincident.
bool fSameCrystal
Require both events in same crystal?
double GetDouble(const std::string &parname, double defVal, bool warnCfg=true) const
Get a double parameter from config file.
Definition: QBaseModule.cc:184
bool GetBool(const std::string &parname, bool defVal, bool warnCfg=true) const
Get a bool parameter from config file ( see GetDouble() )
Definition: QBaseModule.cc:256
diana event
Definition: QEvent.hh:46
Base class for diana filters.
Definition: QFilter.hh:57
Diana Reconstruction program.
Definition: QSequence.hh:40