All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRTTrueHitRecoAlg.h
Go to the documentation of this file.
1 #ifndef ICARUS_CRTTRUEHITRECOALG_H
2 #define ICARUS_CRTTRUEHITRECOALG_H
3 
4 // LArSoft includes
6 
7 // Utility libraries
8 #include "messagefacility/MessageLogger/MessageLogger.h"
9 #include "fhiclcpp/ParameterSet.h"
10 #include "fhiclcpp/types/Table.h"
11 #include "fhiclcpp/types/Atom.h"
12 
13 // icaruscode includes
16 
17 // C++ includes
18 #include <vector>
19 #include <utility>
20 #include <map>
21 #include <set>
22 
23 // ROOT includes
24 //#include "Math/GenVector/XYZTVector.h"
25 //#include "Math/GenVector/LorentzVector.h"
26 #include "TLorentzVector.h"
27 
28 using std::vector;
29 using std::pair;
30 using std::map;
31 using std::set;
32 //using ROOT::Math::XYZTVector;
33 
34 namespace icarus {
35  namespace crt {
36  class CRTTrueHitRecoAlg;
37  }
38 }
39 
40 struct tagger {
41  char type;
42  string region;
43  std::set<int> layerID;
44  map<int,int> stripLayer;
45  map<int,sim::AuxDetIDE> stripIDE;
46 };
47 
49 
50  public:
51 
53 
54  struct Config {
55  using Name = fhicl::Name;
56  using Comment = fhicl::Comment;
57 
58  fhicl::Atom<bool> UseReadoutWindow {
59  Name("UseReadoutWindow"),
60  Comment("Only reconstruct hits within readout window")
61  };
62  fhicl::Atom<double> EDepMin {
63  Name("EDepMin"),
64  Comment("Lowest consierd deposited energy in a scintillator strip used in hit [MeV]")
65  };
66  fhicl::Atom<bool> RollupUnusedIds {
67  Name("RollupUnusedIds"),
68  Comment("merge G4-untracked trackIDs into partent track")
69  };
70  fhicl::Atom<double> GlobalT0Offset {
71  Name("GlobalT0Offset"),
72  Comment("global timing offset [ns] (needed to make all G4 times > 0")
73  };
74  };
75 
76  CRTTrueHitRecoAlg(const Config& config);
77 
78  CRTTrueHitRecoAlg(const fhicl::ParameterSet& pset) :
79  CRTTrueHitRecoAlg(fhicl::Table<Config>(pset, {})()) {}
80 
83 
84  void reconfigure(const Config& config);
85 
86  vector<pair<CRTHit,vector<sim::AuxDetIDE>>> CreateCRTHits(vector<art::Ptr<sim::AuxDetSimChannel>> adscList);
87 
88  // Function to make filling a CRTHit a bit faster
89  CRTHit FillCrtHit(vector<uint8_t> tfeb_id, map<uint8_t,vector<pair<int,float>>> tpesmap,
90  float peshit, double time0, double time1, int plane,
91  double x, double ex, double y, double ey, double z, double ez, std::string tagger);
92 
93  private:
94 
97 
98  //config params
100  double fEDepMin;
103 
104 };
105 
106 #endif
process_name opflash particleana ie ie ie z
map< int, int > stripLayer
process_name opflash particleana ie x
void reconfigure(const Config &config)
vector< pair< CRTHit, vector< sim::AuxDetIDE > > > CreateCRTHits(vector< art::Ptr< sim::AuxDetSimChannel >> adscList)
string region
CRTTrueHitRecoAlg(const fhicl::ParameterSet &pset)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
CRTHit FillCrtHit(vector< uint8_t > tfeb_id, map< uint8_t, vector< pair< int, float >>> tpesmap, float peshit, double time0, double time1, int plane, double x, double ex, double y, double ey, double z, double ez, std::string tagger)
geo::GeometryCore const * fGeometryService
object containing MC truth information necessary for making RawDigits and doing back tracking ...
process_name opflash particleana ie ie y
map< int, sim::AuxDetIDE > stripIDE
std::set< int > layerID
BEGIN_PROLOG vertical distance to the surface Name
Description of geometry of one entire detector.
process_name crt
CRTTrueHitRecoAlg(const Config &config)