All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
icaruscode/icaruscode/PMT/OpReco/FlashFinder/SimpleFlashAlgo.h
Go to the documentation of this file.
1 #ifndef SIMPLEFLASHALGO_H
2 #define SIMPLEFLASHALGO_H
3 
4 #include "FlashAlgoBase.h"
5 #include "FlashAlgoFactory.h"
6 #include <map>
7 namespace pmtana
8 {
9 
10  class SimpleFlashAlgo : public FlashAlgoBase {
11 
12  public:
13 
14  SimpleFlashAlgo(const std::string name);
15 
16  void Configure(const Config_t &p);
17 
18  virtual ~SimpleFlashAlgo();
19 
21 
22  bool Veto(double t) const;
23 
24  const std::vector<double>& PESumArray() const { return _pesum_v; }
25 
26  const double TimeRes() const { return _time_res; }
27 
28  private:
29 
30  double TotalCharge(const std::vector<double>& PEs);
31 
32  // minimum PE to account for a hit
33  double _min_pe_hit;
34 
35  // minimum PE to make a flash
36  double _min_pe_flash;
37 
38  // minimum PE to make a flash candidate
39  double _min_pe_coinc;
40 
41  // minimum PE to use an OpHit
43 
44  // integral period
46 
47  // veto time
48  double _veto_time;
49 
50  // time resolution of pe sum
51  double _time_res;
52 
53  // time pre-sample
54  double _pre_sample;
55 
56  // pw aum array
57  std::vector<double> _pesum_v;
58 
59  // calibration: PEs to be subtracted from each opdet
60  std::vector<double> _pe_baseline_v;
61 
62  // veto window start
63  std::map<double,double> _flash_veto_range_m;
64 
65  // debug mode flag
66  bool _debug;
67 
68  // list of opchannel to use
69  std::vector<int> _opch_to_index_v;
70  std::vector<int> _index_to_opch_v;
71 
72  };
73 
74  /**
75  \class pmtana::SimpleFlashAlgoFactory
76  \brief A concrete factory class for pmtana::SimpleFlashAlgo
77  */
79  public:
80  /// ctor
81  SimpleFlashAlgoFactory() { FlashAlgoFactory::get().add_factory("SimpleFlashAlgo",this); }
82  /// dtor
84  /// creation method
85  FlashAlgoBase* create(const std::string instance_name) { return new SimpleFlashAlgo(instance_name); }
86  };
87 
88 }
89 #endif
90 
91 /** @} */ // end of doxygen group
std::vector< pmtana::LiteOpHit_t > LiteOpHitArray_t
A concrete factory class for pmtana::SimpleFlashAlgo.
void add_factory(const std::string name, pmtana::FlashAlgoFactoryBase *factory)
Factory registration method (should be called by global factory instance in algorithm header) ...
pdgs p
Definition: selectors.fcl:22
LiteOpFlashArray_t RecoFlash(const LiteOpHitArray_t ophits)
double TotalCharge(const std::vector< double > &PEs)
FlashAlgoBase * create(const std::string instance_name)
creation method
std::vector< pmtana::LiteOpFlash_t > LiteOpFlashArray_t
static FlashAlgoFactory & get()
Static sharable instance getter.
then echo fcl name