12 #include "TLorentzVector.h" 139 #endif // OpFlashAna_H 158 auto const* timeService = lar::providerFrom<detinfo::DetectorClocksService>();
159 fTimeBegin = timeService->OpticalClock().Time();
160 fTimeEnd = timeService->OpticalClock().FramePeriod();
161 fSampleFreq = timeService->OpticalClock().Frequency();
184 if(fMakeFlashBreakdownTree)
203 if(fMakePerOpHitTree)
219 if(fMakePerFlashTree)
236 if(fMakePerEventFlashTree)
258 if(fMakeFlashHitMatchTree)
307 std::vector<TH1D*> FlashHist;
311 sprintf(HistName,
"Event %d Flash Times", evt.
id().
event());
312 TH1D * FlashTimes =
nullptr;
315 FlashTimes = tfs->
make<TH1D>(HistName,
";t (ns);",
321 TH2D * FlashPositions =
nullptr;
324 sprintf(HistName,
"Event %d All Flashes YZ", evt.
id().
event());
326 FlashPositions = tfs->
make<TH2D>(HistName,
";y ;z ",
341 for(
unsigned int i = 0; i < FlashHandle->size(); ++i)
351 TH2D * ThisFlashPosition =
nullptr;
355 FlashHist.push_back(tfs->
make<TH1D>(HistName,
";OpChannel;PE",
356 NOpChannels, 0, NOpChannels));
360 ThisFlashPosition = tfs->
make<TH2D>(HistName,
";y ;z ",
389 for(
unsigned int j=0; j!=NOpChannels; ++j)
418 std::vector< art::Ptr<recob::OpHit> > matchedHits = Assns.at(i);
419 for (
auto ophit : matchedHits)
426 fArea = ophit->Area();
441 for(
size_t i=0; i!=OpHitHandle->size(); ++i)
445 fPeakTime = OpHitHandle->at(i).PeakTime();
446 fFrame = OpHitHandle->at(i).Frame();
447 fWidth = OpHitHandle->at(i).Width();
448 fArea = OpHitHandle->at(i).Area();
450 fPE = OpHitHandle->at(i).PE();
std::vector< int > fOnBeamTimeVector
std::vector< float > fTotalPEVector
std::vector< int > fFlashIDVector
std::string fOpHitModuleLabel
OpFlashAna(const fhicl::ParameterSet &)
TNtupleSim Fill(f1, f2, f3, f4)
double PE(unsigned int i) const
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
std::vector< float > fYCenterVector
TTree * fFlashHitMatchTree
std::vector< float > fYWidthVector
void analyze(const art::Event &)
#define DEFINE_ART_MODULE(klass)
std::vector< float > fZCenterVector
unsigned int Frame() const
std::vector< int > fFlashFrameVector
T get(std::string const &key) const
bool fMakePerEventFlashTree
std::vector< float > fFlashTimeVector
bool fMakeFlashHitMatchTree
EDAnalyzer(Table< Config > const &config)
bool fMakeFlashBreakdownTree
T * make(ARGS...args) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
std::vector< float > fZWidthVector
std::vector< float > fAbsTimeVector
EventNumber_t event() const
std::vector< float > fPEsPerFlashPerChannelVector
std::vector< bool > fInBeamFrameVector
TTree * fFlashBreakdownTree
art framework interface to geometry description
TTree * fPerEventFlashTree
std::string fOpFlashModuleLabel