LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
MCBTAlg.h
Go to the documentation of this file.
1 
14 #ifndef RECOTOOL_MCBTALG_H
15 #define RECOTOOL_MCBTALG_H
16 
17 #include <iostream>
18 #include <vector>
19 #include <map>
20 #include <set>
21 //#include "DataFormat/simch.h"
22 //#include "LArUtil/TimeService.h"
23 //#include "LArUtil/Geometry.h"
27 #include "MCBTAlgConstants.h"
28 #include "MCBTException.h"
34 namespace btutil {
35 
36  struct WireRange_t {
37  unsigned int ch;
38  double start, end;
41  start = end = std::numeric_limits<double>::max();
42  }
43  WireRange_t(unsigned int c,double s, double e)
44  { ch = c; start = s; end = e; }
45  };
46 
47  typedef std::vector<double> edep_info_t; // vector of energy deposition
48 
49  typedef std::map<unsigned int, ::btutil::edep_info_t > ch_info_t; // vector of time (index) for each edep (value)
50 
51  class MCBTAlg {
52 
53  public:
54 
55  MCBTAlg(){}
56 
57  MCBTAlg(const std::vector<unsigned int>& g4_trackid_v,
58  const std::vector<sim::SimChannel>& simch_v);
59 
60  void Reset(const std::vector<unsigned int>& g4_trackid_v,
61  const std::vector<sim::SimChannel>& simch_v);
62 
63  void Reset(const std::vector<std::vector<unsigned int> >& g4_trackid_v,
64  const std::vector<sim::SimChannel>& simch_v);
65 
69  const std::vector<double>& MCQSum(const size_t plane_id) const;
70 
78  std::vector<double> MCQ(const WireRange_t& hit) const;
79 
87  std::vector<double> MCQFrac(const WireRange_t& hit) const;
88 
96  std::vector<double> MCQ(const std::vector<btutil::WireRange_t>& hit_v) const;
97 
105  std::vector<double> MCQFrac(const std::vector<btutil::WireRange_t>& hit_v) const;
106 
107  size_t Index(const unsigned int g4_track_id) const;
108 
109  size_t NumParts() const { return _num_parts-1; }
110 
111  protected:
112 
113  void Register(const unsigned int& g4_track_id);
114 
115  void Register(const std::vector<unsigned int>& g4_track_id);
116 
117  void ProcessSimChannel(const std::vector<sim::SimChannel>& simch_v);
118 
119  std::vector< ::btutil::ch_info_t> _event_info;
120  std::vector<size_t> _trkid_to_index;
121  std::vector<std::vector<double> > _sum_mcq;
122  size_t _num_parts;
123  };
124 }
125 #endif
126  // end of doxygen group
127 
Float_t s
Definition: plot.C:23
unsigned int ch
Definition: MCBTAlg.h:37
std::vector< std::vector< double > > _sum_mcq
Definition: MCBTAlg.h:121
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Int_t max
Definition: plot.C:27
WireRange_t(unsigned int c, double s, double e)
Definition: MCBTAlg.h:43
ntupleExperimental Reset()
std::vector< double > edep_info_t
Definition: MCBTAlg.h:47
std::vector< size_t > _trkid_to_index
Definition: MCBTAlg.h:120
size_t NumParts() const
Definition: MCBTAlg.h:109
Detector simulation of raw signals on wires.
std::map< unsigned int,::btutil::edep_info_t > ch_info_t
Definition: MCBTAlg.h:49
object containing MC truth information necessary for making RawDigits and doing back tracking ...
size_t _num_parts
Definition: MCBTAlg.h:122
Float_t e
Definition: plot.C:34
art framework interface to geometry description
Class def header for exception classes in MCComp package.
std::vector< ::btutil::ch_info_t > _event_info
Definition: MCBTAlg.h:119