10 #include "art/Framework/Core/EDProducer.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"
28 class CRTHitConverter;
45 void produce(art::Event&
e)
override;
106 fCRTHitLabel(
p.get<std::string>(
"CRTHitLabel",
"crthit")),
107 fExperiment(
p.get<std::string>(
"Experiment"))
109 if (fExperiment !=
"SBND" && fExperiment !=
"ICARUS") {
110 std::cerr <<
"ERROR: Bad experiment configuration (" << fExperiment <<
"). Experiment must be one of 'SBND' or 'ICARUS'";
113 produces< std::vector<sbn::crt::CRTHit> >();
119 std::unique_ptr<std::vector<sbn::crt::CRTHit>> crthits(
new std::vector<sbn::crt::CRTHit>);
121 if (fExperiment ==
"SBND") {
122 art::Handle<std::vector<sbnd::crt::CRTHit>> crthit_handle;
123 e.getByLabel(fCRTHitLabel, crthit_handle);
124 if (crthit_handle.isValid()) {
130 else if (fExperiment ==
"ICARUS") {
131 art::Handle<std::vector<icarus::crt::CRTHit>> crthit_handle;
132 e.getByLabel(fCRTHitLabel, crthit_handle);
133 if (crthit_handle.isValid()) {
140 e.put(std::move(crthits));
float z_err
position uncertainty in z-direction (cm).
CRTHitConverter(fhicl::ParameterSet const &p)
art::InputTag fCRTHitLabel
float x_err
position uncertainty in x-direction (cm).
std::map< uint8_t, std::vector< std::pair< int, float > > > pesmap
Saves signal hit information (FEB, local-channel and PE) .
std::vector< uint8_t > feb_id
FEB address.
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
BEGIN_PROLOG could also be cerr
int plane
Name of the CRT wall (in the form of numbers).
float peshit
Total photo-electron (PE) in a crt hit.
float y_err
position uncertainty in y-direction (cm).
double ts0_ns_corr
[Honestly, not sure at this point, it was there since long time (BB)]
sbn::crt::CRTHit ICARUSCRTHit(const icarus::crt::CRTHit &inp)
double ts0_s_corr
[Honestly, not sure at this point, it was there since long time (BB)]
uint64_t ts0_s
Second-only part of timestamp T0.
float z_pos
position in z-direction (cm).
double ts0_ns
Timestamp T0 (from White Rabbit), in UTC absolute time scale in nanoseconds from the Epoch...
std::map< uint8_t, std::vector< std::pair< int, float > > > pesmap
CRTHitConverter & operator=(CRTHitConverter const &)=delete
void produce(art::Event &e) override
float y_pos
position in y-direction (cm).
float x_pos
position in x-direction (cm).
sbn::crt::CRTHit SBNDCRTHit(const sbnd::crt::CRTHit &inp)
std::string tagger
Name of the CRT wall (in the form of strings).
std::vector< uint8_t > feb_id