27 #include "art_root_io/TFileService.h" 133 auto const clock_data =
135 fTimeBegin = clock_data.OpticalClock().Time();
136 fTimeEnd = clock_data.OpticalClock().FramePeriod();
137 fSampleFreq = clock_data.OpticalClock().Frequency();
159 if (fMakeFlashBreakdownTree) {
177 if (fMakePerOpHitTree) {
178 fPerOpHitTree = tfs->make<TTree>(
"PerOpHitTree",
"PerOpHitTree");
192 if (fMakePerFlashTree) {
193 fPerFlashTree = tfs->make<TTree>(
"PerFlashTree",
"PerFlashTree");
208 if (fMakePerEventFlashTree) {
229 if (fMakeFlashHitMatchTree) {
268 std::vector<TH1D*> FlashHist;
272 sprintf(HistName,
"Event %d Flash Times", evt.
id().
event());
273 TH1D* FlashTimes =
nullptr;
275 FlashTimes = tfs->make<TH1D>(HistName,
282 TH2D* FlashPositions =
nullptr;
284 sprintf(HistName,
"Event %d All Flashes YZ", evt.
id().
event());
299 for (
unsigned int i = 0; i < FlashHandle->size(); ++i) {
308 TH2D* ThisFlashPosition =
nullptr;
312 tfs->make<TH1D>(HistName,
";OpChannel;PE", NOpChannels, 0, NOpChannels));
343 for (
unsigned int j = 0; j != NOpChannels; ++j) {
358 ThisFlashPosition->Fill(ThisY,
363 FlashPositions->Fill(ThisY,
376 std::vector<art::Ptr<recob::OpHit>> matchedHits = Assns.at(i);
377 for (
auto ophit : matchedHits) {
397 for (
size_t i = 0; i != OpHitHandle->size(); ++i) {
400 fPeakTime = OpHitHandle->at(i).PeakTime();
401 fFrame = OpHitHandle->at(i).Frame();
402 fWidth = OpHitHandle->at(i).Width();
403 fArea = OpHitHandle->at(i).Area();
405 fPE = OpHitHandle->at(i).PE();
std::vector< int > fOnBeamTimeVector
std::string fOpHitModuleLabel
OpFlashAna(const fhicl::ParameterSet &)
std::vector< float > fZCenterVector
TNtupleSim Fill(f1, f2, f3, f4)
std::vector< int > fFlashIDVector
double PE(unsigned int i) const
EDAnalyzer(fhicl::ParameterSet const &pset)
unsigned int NOpChannels() const
Number of electronics channels for all the optical detectors.
std::vector< bool > fInBeamFrameVector
TTree * fFlashHitMatchTree
std::vector< double > fFlashTimeVector
void analyze(const art::Event &)
#define DEFINE_ART_MODULE(klass)
unsigned int Frame() const
T get(std::string const &key) const
std::vector< int > fFlashFrameVector
bool fMakePerEventFlashTree
bool fMakeFlashHitMatchTree
std::vector< float > fTotalPEVector
bool fMakeFlashBreakdownTree
std::vector< double > fAbsTimeVector
std::vector< float > fPEsPerFlashPerChannelVector
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::vector< float > fYWidthVector
std::vector< float > fZWidthVector
EventNumber_t event() const
TTree * fFlashBreakdownTree
std::vector< float > fYCenterVector
art framework interface to geometry description
TTree * fPerEventFlashTree
std::string fOpFlashModuleLabel