11 #include "canvas/Utilities/InputTag.h" 
   17 #include "canvas/Persistency/Common/FindManyP.h" 
   20 #include "icaruscode/CRT/CRTProducts/CRTChannelData.h" 
   24 #include "fhiclcpp/ParameterSet.h" 
   47     fCRTHitTag = config ? config->get<std::string>(
"CRTHitTag", 
"crtsimhit") : 
"crtsimhit";
 
   48     fIsICARUS = config ? config->get<
bool>(
"IsICARUS", 
true) : 
true;
 
   51     time_v_pe_all = 
new TH2D(
"in_time_hits_all", 
"in_time_hits_all", 200, -1000., 1000., 10, 0., 500000.);
 
   67   bool ProcessEvent(
const gallery::Event& ev, 
const std::vector<event::Interaction> &truth, std::vector<event::RecoInteraction>& 
reco) {
 
   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. 
process_name opflashCryoW ana
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...
void Initialize(fhicl::ParameterSet *config=NULL)
object containing MC truth information necessary for making RawDigits and doing back tracking ...
process_name standard_reco_uboone reco
Electron neutrino event selection. 
#define DECLARE_SBN_PROCESSOR(classname)
Base class for event selections. 
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). 
bool ProcessEvent(const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)
BEGIN_PROLOG could also be cout