12 #ifndef TimeDist_Module 13 #define TimeDist_Module 26 #include "art_root_io/TFileService.h" 69 : EDAnalyzer(parameterSet)
79 fTimeHist = tfs->make<TH1D>(
"timehist",
";Histogram of Hit Times;",4500, -1000, 17000);
80 fFlashHist = tfs->make<TH1D>(
"flashhist",
";Histogram of Flash Times;",180, -1000, 17000);
81 fTmFshHist = tfs->make<TH1D>(
"hit-flash_Times" ,
";Histogram of Hit-Flash Times;",7000, -3000, 4000);
82 fTmFshHistU = tfs->make<TH1D>(
"hit-flash_Times_U",
";Histogram of Hit-Flash Times;",7000, -3000, 4000);
83 fTmFshHistV = tfs->make<TH1D>(
"hit-flash_Times_V",
";Histogram of Hit-Flash Times;",7000, -3000, 4000);
84 fTmFshHistW = tfs->make<TH1D>(
"hit-flash_Times_W",
";Histogram of Hit-Flash Times;",7000, -3000, 4000);
91 fFlashProducerLabel = parameterSet.
get<
std::string >(
"FlashLabel");
99 auto hitHandle =
event.getHandle< std::vector<recob::Hit> >(fHitProducerLabel);
102 for (
auto const&
hit : (*hitHandle) )
104 frequency = clockData.TPCClock().Frequency();
105 hittime =
hit.PeakTime()/frequency;
107 fTimeHist->Fill(hittime);
111 auto flashHandle =
event.getHandle< std::vector<recob::OpFlash> >(fFlashProducerLabel);
114 for (
auto const& opflash : (*flashHandle) )
117 fFlashHist->Fill(opflash.Time());
120 for (
auto const&
hit : (*hitHandle) )
122 double frequency = clockData.TPCClock().Frequency();
123 double hittime =
hit.PeakTime()/frequency;
124 for (
auto const& opflash : (*flashHandle) )
126 fTmFshHist->Fill(hittime-opflash.Time());
130 for (
auto const& opflash : (*flashHandle) )
132 fTmFshHistU->Fill(hittime-opflash.Time());
137 for (
auto const& opflash : (*flashHandle) )
139 fTmFshHistV->Fill(hittime-opflash.Time());
144 for (
auto const& opflash : (*flashHandle) )
146 fTmFshHistW->Fill(hittime-opflash.Time());
156 #endif // TimeDist_Module def analyze(root, level, gtrees, gbranches, doprint)
TH1D * fTimeHist
Hit time of all particles.
TH1D * fFlashHist
Flash time of all particles.
TH1D * fTmFshHist
Hit times minus Flash times.
TH1D * fTmFshHistW
Hit times minus Flash times.
TH1D * fTmFshHistU
Hit times minus Flash times.
#define DEFINE_ART_MODULE(klass)
std::string fFlashProducerLabel
The name of the producer that created flashes.
virtual void reconfigure(fhicl::ParameterSet const &pset)
TH1D * fTmFshHistV
Hit times minus Flash times.
T get(std::string const &key) const
Detector simulation of raw signals on wires.
Declaration of signal hit object.
std::string fHitProducerLabel
The name of the producer that created hits.
Event finding and building.