Process one event.
70 auto const &crt_hits_handle = ev.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCRTHitTag);;
71 const std::vector<sbn::crt::CRTHit> &crt_hits = *crt_hits_handle;
72 const std::vector<sim::AuxDetSimChannel> &crt_sim_channels = *ev.getValidHandle<std::vector<sim::AuxDetSimChannel>>(
"largeant");
73 art::FindManyP<icarus::crt::CRTData, void> hits_to_data(crt_hits_handle, ev,
fCRTHitTag);
77 int channel = sim_channel.AuxDetID();
78 std::cout <<
"Channel: " << channel << std::endl;
81 std::cout <<
"entry T: " << ide.entryT <<
" exit T: " << ide.exitT << std::endl;
82 std::cout <<
"entry X: " << ide.entryX <<
" entry Y: " << ide.entryY <<
" entry Z: " << ide.entryZ << std::endl;
83 std::cout <<
"exit X: " << ide.exitX <<
" exit Y: " << ide.exitY <<
" exit Z: " << ide.exitZ << std::endl;
84 std::cout <<
"Track ID: " << ide.trackID << std::endl;
90 TH2D *time_v_pe =
new TH2D(histo_name.c_str(),
"in_time_hits", 200, -1000., 1000., 10, 0., 500000.);
91 for (
unsigned i = 0; i < crt_hits.size(); i++) {
93 std::cout <<
"Hit index: " << i << std::endl;
101 time_v_pe->Fill(((
int)crt_hit.
ts0_ns) / 1000. + 1.1e3, crt_hit.
peshit);
103 const std::vector<art::Ptr<icarus::crt::CRTData>> &crt_datas = hits_to_data.at(i);
105 for (
auto const &crt_data: crt_datas) {
106 std::vector<icarus::crt::CRTChannelData> crt_channel_datas = crt_data->ChanData();
107 for (
auto const &crt_chan: crt_channel_datas) {
108 for (
int id: crt_chan.TrackID()) {
119 auto const &crt_hits_handle = ev.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCRTHitTag);;
120 const std::vector<sbn::crt::CRTHit> &crt_hits = *crt_hits_handle;
121 const std::vector<sim::AuxDetSimChannel> &crt_sim_channels = *ev.getValidHandle<std::vector<sim::AuxDetSimChannel>>(
"largeant");
125 int channel = sim_channel.AuxDetID();
126 std::cout <<
"Channel: " << channel << std::endl;
129 std::cout <<
"entry T: " << ide.entryT <<
" exit T: " << ide.exitT << std::endl;
130 std::cout <<
"entry X: " << ide.entryX <<
" entry Y: " << ide.entryY <<
" entry Z: " << ide.entryZ << std::endl;
131 std::cout <<
"exit X: " << ide.exitX <<
" exit Y: " << ide.exitY <<
" exit Z: " << ide.exitZ << std::endl;
135 for (
unsigned i = 0; i < crt_hits.size(); i++) {
137 std::cout <<
"Hit index: " << i << std::endl;
float z_err
position uncertainty in z-direction (cm).
float x_err
position uncertainty in x-direction (cm).
double ts1_ns
Timestamp T1 ([signal time w.r.t. Trigger time]), in UTC absolute time scale in nanoseconds from the ...
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).
TFile * fOutputFile
The output ROOT file.
Collection of particles crossing one auxiliary detector cell.
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...
float y_pos
position in y-direction (cm).
float x_pos
position in x-direction (cm).
std::string to_string(WindowPattern const &pattern)
MC truth information to make RawDigits and do back tracking.
std::string tagger
Name of the CRT wall (in the form of strings).
BEGIN_PROLOG could also be cout