21 #include "art/Framework/Core/EDAnalyzer.h"
22 #include "art/Framework/Principal/Event.h"
23 #include "art/Framework/Principal/Handle.h"
24 #include "art/Framework/Services/Registry/ServiceHandle.h"
25 #include "art_root_io/TFileService.h"
26 #include "art/Framework/Core/ModuleMacros.h"
27 #include "canvas/Persistency/Common/FindManyP.h"
28 #include "canvas/Utilities/Exception.h"
31 #include "messagefacility/MessageLogger/MessageLogger.h"
32 #include "fhiclcpp/ParameterSet.h"
33 #include "fhiclcpp/types/Table.h"
34 #include "fhiclcpp/types/Atom.h"
35 #include "cetlib/pow.h"
41 #include "TLorentzVector.h"
43 #include "TGeoManager.h"
84 Comment(
"tag of the input data product with calibrated CRT data")
97 virtual void beginRun(
const art::Run& run)
override;
98 virtual void analyze (
const art::Event& event)
override;
103 art::ServiceHandle<art::TFileService>
tfs;
121 , fCRTDAQProducerLabel(config().CRTDAQLabel())
128 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
131 for(
int i=1; i<232; i++){
135 for(
int ch=0; ch<32; ch++){
139 macToHistos[i]->push_back(
tfs->make<TH1F>(hname.c_str(),htitle.c_str(),4100,0,4100));
156 MF_LOG_DEBUG(
"CRTCalibrationAnalysis") <<
"beginning analyis" <<
'\n';
159 art::Handle<vector<icarus::crt::CRTData>> crtDAQHandle;
163 MF_LOG_DEBUG(
"CRTCalibrationAnalysis") <<
"about to loop over CRTDAQ entries" <<
'\n';
165 for (
auto const& febdat : (*crtDAQHandle) ) {
167 for(
int ch=0; ch<32; ch++) {
168 macToHistos[febdat.fMac5]->at(ch)->Fill( febdat.fAdc[ch] );
176 mf::LogError(
"CRTCalibrationAnalysis") <<
"CRTDAQ products not found!" << std::endl;
art::ServiceHandle< art::TFileService > tfs
Utilities related to art service access.
Declaration of signal hit object.
art::InputTag fCRTDAQProducerLabel
CRTCalibrationAnalysis(Parameters const &config)
Constructor: configures the module (see the Config structure above)
fhicl::Atom< art::InputTag > CRTDAQLabel
Access the description of auxiliary detector geometry.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Access the description of detector geometry.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
virtual void analyze(const art::Event &event) override
int fTriggerOffset
(units of ticks) time of expected neutrino event
BEGIN_PROLOG vertical distance to the surface Name
Description of geometry of one entire detector.
Declaration of cluster object.
Definition of data types for geometry description.
map< uint8_t, vector< TH1F * > * > macToHistos
geo::GeometryCore const * fGeometryService
pointer to Geometry provider
CRTCommonUtils * fCrtutils
std::string to_string(WindowPattern const &pattern)
int trigger_offset(DetectorClocksData const &data)
art framework interface to geometry description
virtual void beginRun(const art::Run &run) override
art::EDAnalyzer::Table< Config > Parameters
virtual void beginJob() override