10 #include "art/Framework/Core/EDAnalyzer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Principal/Run.h"
15 #include "art/Framework/Principal/SubRun.h"
16 #include "canvas/Utilities/InputTag.h"
17 #include "fhiclcpp/ParameterSet.h"
18 #include "messagefacility/MessageLogger/MessageLogger.h"
45 void analyze(art::Event
const&
e)
override;
54 std::vector<float>
_wf;
65 : EDAnalyzer{p}, _wftree{
nullptr}
75 _f = TFile::Open(
"opdetwf.root",
"RECREATE");
77 _wftree =
new TTree(
"anatree",
"anatree");
83 _hittree =
new TTree(
"hittree",
"hittree");
104 auto const* ts = lar::providerFrom<detinfo::DetectorClocksService>();
106 art::Handle< std::vector< raw::OpDetWaveform > > hwf;
107 e.getByLabel(
"opdaq",hwf);
110 std::cout <<
"Invalid producer..." << std::endl;
113 std::cout <<
"Number of photon channel: " <<hwf->size() << std::endl;
115 auto geop = lar::providerFrom<geo::Geometry>();
117 std::cout << geop->Ncryostats() <<
" cryostats" << std::endl;
119 for(
auto const& opwf : (*hwf)) {
120 std::cout << opwf.ChannelNumber() <<
" ... " << opwf.size() << std::endl;
121 _wf.resize(opwf.size());
123 for(
size_t i=0; i<
_wf.size(); ++i) {
_wf.at(i) = opwf.at(i); }
124 _ch=opwf.ChannelNumber();
129 std::cout << (*hwf)[0].TimeStamp() <<
" ... " << ts->TriggerTime() <<
" ... " << ts->BeamGateTime() <<
" ... " << ts->G4ToElecTime(0.) << std::endl;
131 art::Handle< std::vector< recob::OpHit> > hhit;
132 e.getByLabel(
"opreco",hhit);
137 for(
auto const& oph : (*hhit)) {
140 _amp = oph.Amplitude();
OpDetWFDump(fhicl::ParameterSet const &p)
Simulation objects for optical detectors.
OpDetWFDump & operator=(OpDetWFDump const &)=delete
object containing MC truth information necessary for making RawDigits and doing back tracking ...
Tools and modules for checking out the basics of the Monte Carlo.
art framework interface to geometry description
BEGIN_PROLOG could also be cout
void analyze(art::Event const &e) override