27 #include "art_root_io/TFileService.h" 28 #include "canvas/Persistency/Common/FindManyP.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) {
269 std::vector<TH1D*> FlashHist;
273 sprintf(HistName,
"Event %d Flash Times", evt.
id().
event());
274 TH1D* FlashTimes =
nullptr;
276 FlashTimes = tfs->make<TH1D>(HistName,
283 TH2D* FlashPositions =
nullptr;
285 sprintf(HistName,
"Event %d All Flashes YZ", evt.
id().
event());
300 for (
unsigned int i = 0; i < FlashHandle->size(); ++i) {
309 TH2D* ThisFlashPosition =
nullptr;
313 tfs->make<TH1D>(HistName,
";OpChannel;PE", NOpChannels, 0, NOpChannels));
359 ThisFlashPosition->Fill(ThisY,
364 FlashPositions->Fill(ThisY,
377 std::vector<art::Ptr<recob::OpHit>> matchedHits = Assns.at(i);
378 for (
auto ophit : matchedHits) {
384 fArea = ophit->Area();
398 for (
size_t i = 0; i != OpHitHandle->size(); ++i) {
401 fPeakTime = OpHitHandle->at(i).PeakTime();
402 fFrame = OpHitHandle->at(i).Frame();
403 fWidth = OpHitHandle->at(i).Width();
404 fArea = OpHitHandle->at(i).Area();
406 fPE = OpHitHandle->at(i).PE();
std::vector< int > fOnBeamTimeVector
std::string fOpHitModuleLabel
OpFlashAna(const fhicl::ParameterSet &)
std::vector< float > fZCenterVector
std::vector< int > fFlashIDVector
double PE(unsigned int i) const
EDAnalyzer(fhicl::ParameterSet const &pset)
std::vector< bool > fInBeamFrameVector
art framework interface to geometry description
TTree * fFlashHitMatchTree
std::vector< double > fFlashTimeVector
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
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
std::vector< float > fYWidthVector
std::vector< float > fZWidthVector
EventNumber_t event() const
TTree * fFlashBreakdownTree
std::vector< float > fYCenterVector
TTree * fPerEventFlashTree
std::string fOpFlashModuleLabel