CalibrationTreeBuilder.h
Go to the documentation of this file.
1 /*
2  * \file: CalibrationTreeBuilder.h
3  * \author: Jason Stock (jason.stock@mines.sdsmt.edu
4  * \brief: This is a small Tree made for use in calibration analysis.
5  *
6  */
7 
8 #ifndef CALIBRATIONTREEBUILDER_H
9 #define CALIBRATIONTREEBUILDER_H
10 
11 //Includes
14 
15 //LArSoft Includes
23 namespace detinfo {
24  class DetectorClocksData;
25 }
26 
27 //FrameworkIncludes
31 #include "art_root_io/TFileService.h"
32 #include "art_root_io/TFileDirectory.h"
34 #include "canvas/Persistency/Common/FindManyP.h"
39 
40 //ROOT includes
41 #include "TTree.h"
42 #include "TFile.h"
43 
44 //CPP includes
45 #include <vector>
46 #include <map>
47 
48 
49 namespace{}//
50 
52 
53  struct flatfiller{ //ordered for descending size.
54  Double_t eve_x ;
55  Double_t eve_y ;
56  Double_t eve_z ;
57  Double_t eve_t ;
58  Double_t part_x ;
59  Double_t part_y ;
60  Double_t part_z ;
61  Double_t part_t ;
62  Double_t hit_charge;
63  Double_t hit_energy;
64  Double_t hit_time ;
65  Double_t hit_width ;
66  Double_t hit_split ;
67  Double_t ophit_pes ;
68  Double_t ophit_energy;
69  Double_t ophit_time ;
70  Double_t ophit_width ;
71  Double_t ophit_split ;
72  int64_t hit_index ;
73  int64_t ophit_index ;
74  UInt_t run ;
75  UInt_t subrun ;
76  UInt_t event_n ;
77  UInt_t hit_wire ;
78  UInt_t ophit_opchan ;
79  UInt_t eve_index;
80  UInt_t part_index;
81  Int_t eve_trackid;
82  Int_t eve_pdgid ;
83  Int_t part_trackid ;
84  Int_t part_pdgid;
85  bool part_iseve ;
86  };
87 
88 
90  {
91  public:
92 
93  //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
95 
96  virtual void beginJob() override;
97  virtual void analyze(const art::Event& evt) override;
98  virtual void endJob() override;
99 
100 
101  private:
102  // fhicl::Atom<art::InputTag> WavLabel{fhicl::Name("WavLabel"), fhicl::Comment("The default label for the module to use when DivRecs "), "opdigi"};
103 
104  bool AddHit(detinfo::DetectorClocksData const& clockData, const art::Ptr<recob::Hit> hit, unsigned int& counter);
105  bool AddHit(const art::Ptr<recob::OpHit> hit, unsigned int& counter);
106  void PrepDivRec(const art::Event& evt);
109 
114 
118 
120 
125 
126  const art::Ptr< sim::OpDetDivRec > FindDivRec(int const& opDetNum) const;
127  const std::vector< sim::SDP > OpHitToChannelWeightedSimSDPs(art::Ptr<recob::OpHit> const& opHit_P) const;
128 
132 
133  mutable std::vector<art::Ptr<sim::OpDetDivRec>> priv_DivRecs;
134  //std::map<UInt_t, sim::OpDetDivRec> priv_od_to_chanDiv;
135 
136 
137  //Also need buffers
138 
139  };// end class CalibrationTreeBuilder
140 
141 }
142 
143 #endif//endif CALIBRATIONTREEBUILDER_H
def analyze(root, level, gtrees, gbranches, doprint)
Definition: rootstat.py:69
intermediate_table::iterator iterator
void beginJob()
Definition: Breakpoints.cc:14
CalibTreeRecord::CalibTreeRecord private_eventBuffer
art::ServiceHandle< art::TFileService > private_service_tfs
art::ServiceHandle< cheat::BackTrackerService > BTS
General LArSoft Utilities.
art::ServiceHandle< cheat::ParticleInventoryService > PIS
Detector simulation of raw signals on wires.
std::vector< art::Ptr< sim::OpDetDivRec > > priv_DivRecs
Declaration of signal hit object.
CalibTreeRecord::CalibTreeRecord private_eventPrep
Contains all timing reference information for the detector.
Provides recob::Track data product.
art::ServiceHandle< cheat::PhotonBackTrackerService > PBS
TCEvent evt
Definition: DataStructs.cxx:7