465 art::Handle<std::vector<recob::Hit>> hitListHandle;
466 std::vector<art::Ptr<recob::Hit>> hitlist;
468 art::fill_ptr_vector(hitlist, hitListHandle);
474 for (
auto h : hitlist) {
475 if (
h->WireID().Plane == 2) {
482 std::cout <<
"Failed to get recob::Hit data product." << std::endl;
488 <<
", which is above the maximum number allowed to store." << std::endl;
496 for (
size_t i = 0; i < hitlist.size(); ++i) {
519 art::Handle<std::vector<sbnd::crt::CRTData> > crtStripListHandle;
520 std::vector<art::Ptr<sbnd::crt::CRTData> > striplist;
524 art::fill_ptr_vector(striplist, crtStripListHandle);
525 _nstr = striplist.size();
527 std::cout <<
"Failed to get sbnd::crt::CRTData data product." << std::endl;
536 for (
int i = 0; i < _nstr; i += 2){
537 uint32_t chan = striplist[i]->Channel();
543 bool keep_tagger =
false;
553 uint32_t ttime = striplist[i]->T0();
554 float ctime = (int)ttime * 0.001;
557 if (ctime < 1600. && ctime > -1400.) {
558 uint32_t adc1 = striplist[i]->ADC();
559 uint32_t adc2 = striplist[i+1]->ADC();
560 if (adc1 > 4095) adc1 = 4095;
561 if (adc2 > 4095) adc2 = 4095;
564 int strip = (chan >> 1) & 15;
574 _crt_adc.push_back(adc1 + adc2 - 127.2);
593 int iflag[1000] = {0};
594 for (
int i = 0; i < (ns - 1); ++i) {
597 float plane1x = 0, plane2x = 0;
598 float plane1y = 0, plane2y = 0;
599 float plane1tx = 0, plane2tx = 0;
600 float plane1ty = 0, plane2ty = 0;
601 float plane1xm = -1, plane2xm = -1;
602 float plane1ym = -1, plane2ym = -1;
603 int nh1x = 0, nh2x = 0;
604 int nh1y = 0, nh2y = 0;
605 float adc1x = 0, adc2x = 0;
606 float adc1y = 0, adc2y = 0;
655 for (
int j=i+1;j<ns;++j) {
709 if (nh1x>0 && nh1y>0 && nh2x>0 && nh2y>0 && adc1x<9000 && adc1y<9000 && adc2x<9000 && adc2y<9000) {
714 _ctrk_t1.push_back(0.5*(plane1tx+plane1ty));
720 _ctrk_t2.push_back(0.5*(plane2tx+plane2ty));
739 art::Handle<std::vector<sbn::crt::CRTHit> > crtHitListHandle;
740 std::vector<art::Ptr<sbn::crt::CRTHit> > chitlist;
744 art::fill_ptr_vector(chitlist, crtHitListHandle);
748 std::cout <<
"Failed to get sbn::crt::CRTHit data product." << std::endl;
754 <<
", which is above the maximum number allowed to store." << std::endl;
761 for (
int i = 0; i <
_nchits; ++i){
766 if (chitlist[i]->ts1_ns >
MAX_INT) {
770 _chit_x[i] = chitlist[i]->x_pos;
771 _chit_y[i] = chitlist[i]->y_pos;
772 _chit_z[i] = chitlist[i]->z_pos;
782 art::Handle<std::vector<sbn::crt::CRTTrack> > crtTrackListHandle;
783 std::vector<art::Ptr<sbn::crt::CRTTrack> > ctrklist;
785 art::fill_ptr_vector(ctrklist, crtTrackListHandle);
786 _ncts = ctrklist.size();
791 for (
int i = 0; i <
_ncts; ++i){
792 _ct_pes[i] = ctrklist[i]->peshit;
793 _ct_time[i] = ctrklist[i]->ts1_ns*0.001;
794 if (ctrklist[i]->ts1_ns >
MAX_INT) {
797 _ct_x1[i] = ctrklist[i]->x1_pos;
798 _ct_y1[i] = ctrklist[i]->y1_pos;
799 _ct_z1[i] = ctrklist[i]->z1_pos;
800 _ct_x2[i] = ctrklist[i]->x2_pos;
801 _ct_y2[i] = ctrklist[i]->y2_pos;
802 _ct_z2[i] = ctrklist[i]->z2_pos;
805 std::cout <<
"Failed to get sbn::crt::CRTTrack data product." << std::endl;
815 size_t previous_nophits = 0;
820 art::Handle<std::vector<recob::OpHit>> ophitListHandle;
821 std::vector<art::Ptr<recob::OpHit>> ophitlist;
822 if (
evt.getByLabel(ophit_label, ophitListHandle)) {
823 art::fill_ptr_vector(ophitlist, ophitListHandle);
827 std::cout <<
"Failed to get recob::OpHit data product." << std::endl;
831 std::cout <<
"Available optical hits are " <<
_nophits <<
", which is above the maximum number allowed to store." << std::endl;
838 for (
size_t i = 0; i < ophitlist.size(); ++i) {
839 size_t index = previous_nophits + i;
846 _ophit_pe[index] = ophitlist.at(i)->PE();
867 art::Handle<std::vector<sbnd::comm::pmtTrigger> > pmtTriggerListHandle;
868 std::vector<art::Ptr<sbnd::comm::pmtTrigger> > pmttriggerlist;
871 art::fill_ptr_vector(pmttriggerlist, pmtTriggerListHandle);
874 for (
int i=0; i < (int)pmttriggerlist[0]->numPassed.size(); i++){
881 std::cout <<
"Failed to get sbnd::comm::pmtTrigger data product" << std::endl;
889 art::Handle<sbnd::trigger::pmtSoftwareTrigger> pmtSoftTriggerHandle;
901 std::cout <<
"Failed to get sbnd::trigger::pmtSoftwareTrigger data product" << std::endl;
909 art::Handle<sbndaq::CRTmetric> crtSoftTriggerHandle;
913 for (
int i=0; i<7; i++){
918 std::cout <<
"Failed to get sbndaq::crtMetric data product" << std::endl;
928 art::Handle<std::vector<sbnd::comm::MuonTrack> > muonTrackListHandle;
929 std::vector<art::Ptr<sbnd::comm::MuonTrack> > muontrklist;
932 art::fill_ptr_vector(muontrklist, muonTrackListHandle);
954 std::vector< const recob::Hit*> muonhitsVec = muontrkassn.at(i);
955 _nmhits += (muonhitsVec.size());
956 for (
size_t j=0; j<muonhitsVec.size(); j++){
957 auto muonhit = muonhitsVec.at(j);
970 std::cout <<
"Failed to get sbnd::comm::MuonTrack data product" << std::endl;
982 art::Handle<std::vector<raw::RawDigit>> digitVecHandle;
986 mf::LogInfo(
"HitDumper") <<
"I got fDigitModuleLabel: " <<
fDigitModuleLabel << std::endl;
988 mf::LogWarning(
"HitDumper") <<
"Could not get fDigitModuleLabel: " <<
fDigitModuleLabel << std::endl;
991 int waveform_number_tracker = 0;
996 for(
size_t rdIter = 0; rdIter < digitVecHandle->size(); ++rdIter) {
999 art::Ptr<raw::RawDigit> digitVec(digitVecHandle, rdIter);
1000 int channel = digitVec->Channel();
1001 auto fDataSize = digitVec->Samples();
1002 std::vector<short> rawadc;
1003 rawadc.resize(fDataSize);
1006 for (
int ihit = 0; ihit <
_nhits; ++ihit) {
1009 int pedestal = (int)digitVec->GetPedestal();
1012 raw::Uncompress(digitVec->ADCs(), rawadc, pedestal, digitVec->Compression());
1019 unsigned int low_edge,high_edge;
1030 if (high_edge > (fDataSize-1)) {
1031 high_edge = fDataSize - 1;
1033 double integral = 0.0;
1034 waveform_number_tracker++;
1035 int counter_for_adc_in_waveform = 0;
1036 for (
size_t ibin = low_edge; ibin <= high_edge; ++ibin) {
1038 counter_for_adc_in_waveform++;
1047 std::cout <<
"DUMP SUM: " <<
_hit_tpc[ihit] <<
" " << _hit_plane[ihit] <<
" " <<
_hit_wire[ihit] <<
" " << integral <<
" " << waveform_number_tracker << std::endl;
1057 int nGeniePrimaries = 0, nMCNeutrinos = 0;
1058 art::Handle< std::vector<simb::MCTruth> > mctruthListHandle;
1059 std::vector<art::Ptr<simb::MCTruth> > mclist;
1061 art::fill_ptr_vector(mclist, mctruthListHandle);
1063 std::cout <<
"Failed to get Genie data product." << std::endl;
1066 art::Ptr<simb::MCTruth> mctruth;
1068 if (!mclist.empty()) {
1070 mctruth = mclist[0];
1072 if (mctruth->NeutrinoSet()) nGeniePrimaries = mctruth->NParticles();
1075 MF_LOG_DEBUG(
"HitDumper") <<
"Expected " << nGeniePrimaries <<
" GENIE particles";
1078 nMCNeutrinos = mclist.size();
1098 for (
unsigned int i_mctruth = 0; i_mctruth < mclist.size(); i_mctruth++){
1100 art::Ptr<simb::MCTruth> curr_mctruth = mclist[i_mctruth];
1102 if (!curr_mctruth->NeutrinoSet())
continue;
1105 if (fmgt.size()>i_mctruth) {
1106 std::vector< art::Ptr<simb::GTruth> > mcgtAssn = fmgt.at(i_mctruth);
1113 nuPDG_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().PdgCode();
1114 ccnc_truth[i_mctruth] = curr_mctruth->GetNeutrino().CCNC();
1115 mode_truth[i_mctruth] = curr_mctruth->GetNeutrino().Mode();
1116 Q2_truth[i_mctruth] = curr_mctruth->GetNeutrino().QSqr();
1117 W_truth[i_mctruth] = curr_mctruth->GetNeutrino().W();
1118 hitnuc_truth[i_mctruth] = curr_mctruth->GetNeutrino().HitNuc();
1119 enu_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().E();
1120 nuvtxx_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Vx();
1121 nuvtxy_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Vy();
1122 nuvtxz_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Vz();
1123 if (curr_mctruth->GetNeutrino().Nu().P()){
1124 nu_dcosx_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Px()/curr_mctruth->GetNeutrino().Nu().P();
1125 nu_dcosy_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Py()/curr_mctruth->GetNeutrino().Nu().P();
1126 nu_dcosz_truth[i_mctruth] = curr_mctruth->GetNeutrino().Nu().Pz()/curr_mctruth->GetNeutrino().Nu().P();
1128 lep_mom_truth[i_mctruth] = curr_mctruth->GetNeutrino().Lepton().P();
1129 if (curr_mctruth->GetNeutrino().Lepton().P()){
1130 lep_dcosx_truth[i_mctruth] = curr_mctruth->GetNeutrino().Lepton().Px()/curr_mctruth->GetNeutrino().Lepton().P();
1131 lep_dcosy_truth[i_mctruth] = curr_mctruth->GetNeutrino().Lepton().Py()/curr_mctruth->GetNeutrino().Lepton().P();
1132 lep_dcosz_truth[i_mctruth] = curr_mctruth->GetNeutrino().Lepton().Pz()/curr_mctruth->GetNeutrino().Lepton().P();
1140 if (fmFluxNeutrino.isValid()){
1141 if (fmFluxNeutrino.at(0).size()>i_mctruth){
1142 art::Ptr<simb::MCFlux> curr_mcflux = fmFluxNeutrino.at(0).at(i_mctruth);
1143 tpx_flux[i_mctruth] = curr_mcflux->ftpx;
1144 tpy_flux[i_mctruth] = curr_mcflux->ftpy;
1145 tpz_flux[i_mctruth] = curr_mcflux->ftpz;
1154 if (mctruth->NeutrinoSet()){
1162 mf::LogError(
"HitDumper") <<
"event has "
1164 << StoreParticles <<
" stored in tree";
1166 for(
size_t iPart = 0; iPart < StoreParticles; ++iPart){
1167 const simb::MCParticle& part(mctruth->GetParticle(iPart));
1177 genie_ND[iPart]=part.NumberDaughters();
int _pmtTrigger_maxpassed
maximum number of pmt pairs above threshold during trigger window (usually beam spill) ...
bool fSkipInd
If true, induction planes are not saved (to be set via fcl)
void ResetOpHitsVars(int n)
Resets optical hits tree variables.
std::vector< Int_t > genie_status_code
std::vector< double > _ophit_opdet_y
OpDet Y coordinate of the optical hit.
std::vector< int > _time_for_waveform
Time for waveform to plot.
std::vector< int > _hit_cryostat
Cryostat where the hit belongs to.
void ResetCRTStripsVars(int n)
Resets crt strips tree variables.
std::vector< int > _pmtTrigger_npmtshigh
number of pmt pairs above threshold, index = time during trigger window (usually beam spill) ...
std::vector< Int_t > mode_truth
0=QE/El, 1=RES, 2=DIS, 3=Coherent production
void ResizeGenie(int nPrimaries)
Resize the data structure for Genie primaries.
int _nctrks
Number of created CRT tracks.
std::vector< double > _ctrk_z2
CRT track z2.
bool fUncompressWithPed
Uncompresses the waveforms if true (to be set via fcl)
std::vector< double > _ophit_peakT
Peak time of the optical hit.
std::vector< float > _muontrk_x1
x coordinate closer to anode
std::vector< int > _hit_wire
Wire where the hit belongs to.
std::vector< Float_t > lep_dcosy_truth
lepton dcos y
std::vector< Float_t > tpx_flux
Px of parent particle leaving BNB target.
void ResetWireHitsVars(int n)
Resets wire hits tree variables.
int _nmuontrks
number of muon tracks
std::vector< int > fKeepTaggerTypes
Taggers to keep (to be set via fcl)
std::vector< float > _muontrk_z1
z coordinate closer to anode
int _max_chits
maximum number of CRT hits (to be set via fcl)
std::vector< int > _mhit_trk
Track number that the hit belongs to.
std::vector< int > _mhit_wire
Wire where the hit belongs to.
std::vector< int > _hit_channel
Channel where the hit belongs to.
std::vector< float > _muontrk_x2
x coordinate closer to cathode
int _crtSoftTrigger_hitsperplane[7]
number of individual PMTs above ADC threshold (fcl) during the beam spill
int _nhits
Number of reco hits in the event.
opdet::sbndPDMapAlg _pd_map
std::vector< std::string > fOpHitsModuleLabels
Labels for OpHit dataproducts (to be set via fcl)
int _event
The event number.
std::vector< double > _chit_time
CRT hit time.
Int_t mcevts_truth
! The number of MCNeutrinos there is currently room for
std::vector< int > _adc_count_in_waveform
Used to view all waveforms on a hitplane together.
std::vector< double > _crt_pos_y
CRT position Y.
void ResizeMCNeutrino(int nNeutrinos)
Resize the data structure for MCNeutrino particles.
std::vector< int > _muontrk_tpc
tpc that muon is located in
std::vector< double > _crt_time
CRT time.
std::string fCRTStripModuleLabel
Label for CRTStrip dataproduct (to be set via fcl)
std::string fGenieGenModuleLabel
Label for Genie dataproduct (to be set via fcl)
std::vector< double > _ophit_pe
PEs of the optical hit.
std::vector< double > _mhit_peakT
Hit peak time.
std::string fHitsModuleLabel
Label for Hit dataproduct (to be set via fcl)
std::vector< int > _hit_tpc
TPC where the hit belongs to.
std::vector< int > _waveform_number
Number for each waveform, to allow for searching.
std::vector< Float_t > nuvtxy_truth
neutrino vertex y
std::vector< double > _ct_z2
CRT track z2.
std::vector< Float_t > nu_dcosx_truth
neutrino dcos x
std::vector< Float_t > Q2_truth
Momentum transfer squared.
CryostatID_t Cryostat
Index of cryostat.
std::vector< Float_t > nu_dcosy_truth
neutrino dcos y
std::vector< double > _ophit_opdet_z
OpDet Z coordinate of the optical hit.
bool fkeepCRThits
Keep the CRT hits (to be set via fcl)
std::vector< Float_t > genie_P
WireID_t Wire
Index of the wire within its plane.
std::vector< double > _crt_pos_z
CRT position Z.
void ResetCRTCustomTracksVars(int n)
Resets custom crt tracks tree variables.
std::vector< Float_t > nuvtxz_truth
neutrino vertex z
bool freadCRTtracks
Keep the CRT tracks (to be set via fcl)
std::vector< int > _crt_module
CRT module.
int _nchits
Number of CRT hits.
std::string fpmtSoftTriggerModuleLabel
Label for pmt software trigger data product (to be set via fcl)
std::vector< Float_t > nu_dcosz_truth
neutrino dcos z
std::vector< Float_t > tpy_flux
Py of parent particle leaving BNB target.
std::vector< int > _mhit_tpc
TPC where the hit belongs to.
int _max_samples
maximum number of samples (to be set via fcl)
unsigned int OpDetFromOpChannel(int opChannel) const
Convert unique channel to detector number.
std::vector< Int_t > tptype_flux
Type of parent particle leaving BNB target.
void ResetCRTHitsVars(int n)
Resets crt hits tree variables.
constexpr details::BinObj< T > bin(T value)
Returns a wrapper to print the specified data in binary format.
std::vector< double > _hit_width
Hit width.
int _nmhits
Number of muon collection hits per track.
std::vector< int > _ophit_opdet_type
OpDet tyoe of the optical hit.
std::vector< Float_t > genie_Eng
int _max_ophits
maximum number of hits (to be set via fcl)
std::vector< double > _crt_adc
CRT adc.
std::vector< Int_t > nuID_truth
Unique ID of each true neutrino.
std::vector< int > _crt_strip
CRT strip.
std::vector< int > _ctrk_mod2x
CRT track mod2x.
sbnd::CRTHitRecoAlg hitAlg
std::vector< Float_t > genie_Py
std::vector< double > _ctrk_x1
CRT track x1.
std::vector< double > _ct_y1
CRT track y1.
std::vector< Int_t > nuScatterCode_truth
Scattering code given by Genie for each neutrino.
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
std::vector< Float_t > genie_Pz
std::vector< Int_t > hitnuc_truth
hit nucleon
std::vector< Float_t > lep_dcosx_truth
lepton dcos x
std::vector< double > _ct_y2
CRT track y2.
bool freadMuonTracks
Add MuonTracks to output (to be set via fcl)
std::vector< double > _hit_full_integral
Hit charge integral.
std::vector< double > _ctrk_y2
CRT track y2.
std::vector< double > _adc_on_wire
ADC on wire to draw waveform.
std::vector< int > _hit_plane
Plane where the hit belongs to.
int _nstrips
Number of CRT strips.
std::vector< double > _chit_y
CRT hit y.
void ResetPmtTriggerVars(int n)
Resets pmt hardware trigger variables.
std::vector< double > _mhit_charge
Hit charge.
const geo::AuxDetGeometryCore * fAuxDetGeoCore
enum::sbnd::CRTPlane GetPlaneIndex(std::string tagger)
const long int TIME_CORRECTION
std::string fMuonTrackModuleLabel
Label for MuonTrack dataproduct (to be set via fcl)
std::vector< double > _ctrk_t1
CRT track t1.
std::vector< double > _ophit_amplitude
Amplitude of the optical hit.
std::vector< Float_t > W_truth
hadronic invariant mass
std::vector< float > _muontrk_z2
z coordinate closer to cathode
std::string fpmtTriggerModuleLabel
Label for pmtTrigger dataproduct (to be set vis fcl)
std::vector< double > _ctrk_adc1
CRT track adc1.
void ResetCrtSoftTriggerVars()
Resets crt software trigger variables.
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
std::vector< float > _muontrk_theta_yz
theta_yz trajectory angle
std::vector< Int_t > ccnc_truth
0=CC 1=NC
double _pmtSoftTrigger_prelimPE
Total photoelectron count 100 ns after the TTS.
std::pair< std::string, unsigned > ChannelToTagger(uint32_t channel)
PlaneID_t Plane
Index of the plane within its TPC.
std::vector< int > _ctrk_mod1x
CRT track mod2x.
std::vector< Float_t > genie_Px
std::vector< double > _ctrk_z1
CRT track z1.
int _nophits
Number of Optical Hits.
std::vector< int > _waveform_integral
Used to see progression of the waveform integral.
int _adc_count
Used for plotting waveforms.
bool freadpmtSoftTrigger
Add pmt software trigger info to output (to be set via fcl)
std::vector< Int_t > genie_trackID
std::vector< double > _hit_ph
Hit ph?
std::vector< Float_t > tpz_flux
Pz of parent particle leaving BNB target.
double _pmtSoftTrigger_promptPE
Trigger Time Stamp (TTS), ns (relative to start of beam spill)
AuxDetGeo const & AuxDet(unsigned int const ad=0) const
Returns the specified auxiliary detector.
bool fcheckTransparency
Checks for wire transprency (to be set via fcl)
std::vector< Float_t > enu_truth
true neutrino energy
std::vector< int > _crt_plane
CRT plane.
std::string fcrtSoftTriggerModuleLabel
Label for crt software trigger data product (to be set via fcl)
std::vector< double > _ophit_width
Width of the optical hit.
std::vector< Int_t > genie_primaries_pdg
std::vector< double > _ct_x1
CRT track x1.
void ResetMuonTracksVars(int n)
Resets crossing muon tracks tree variables.
std::vector< double > _ct_x2
CRT track x2.
std::vector< double > _ctrk_t2
CRT track t2.
std::vector< double > _ct_z1
CRT track z1.
bool freadpmtTrigger
Add pmt hardware trigger info to output (to be set via fcl)
int _subrun
The subrun number.
bool _pmtSoftTrigger_foundBeamTrigger
std::vector< Float_t > genie_mass
int _max_nctrks
maximum number of CRT tracks (to be set via fcl)
std::string fCRTTrackModuleLabel
Label for CRTTrack dataproduct (to be set via fcl)
bool freadOpHits
Add OpHits to output (to be set via fcl)
std::vector< Int_t > nuPDG_truth
neutrino PDG code
bool fmakeCRTtracks
Make the CRT tracks (to be set via fcl)
std::vector< int > _chit_plane
CRT hit plane.
std::vector< Float_t > lep_dcosz_truth
lepton dcos z
std::vector< double > _crt_pos_x
CRT position X.
std::vector< Int_t > genie_mother
const TGeoVolume * TotalVolume() const
int _ncts
Number of CRT tracks.
bool freadMuonHits
Add MuonTrack hits to output(to be set via fcl)
std::vector< double > _chit_x
CRT hit x.
std::vector< double > _chit_z
CRT hit z.
std::vector< Float_t > lep_mom_truth
lepton momentum
std::vector< double > _muontrk_t0
t0 (time of interaction)
std::vector< float > _muontrk_y1
y coordinate closer to anode
std::string fDigitModuleLabel
Label for digitizer (to be set via fcl)
bool freadcrtSoftTrigger
Add crt software trigger info to output (to be set via fcl)
std::vector< double > _ctrk_x2
CRT track x2.
static double tdiff(const art::Timestamp &ts1, const art::Timestamp &ts2)
int _max_hits
maximum number of hits (to be set via fcl)
std::vector< double > _hit_peakT
Hit peak time.
std::vector< double > _hit_charge
Hit charge.
constexpr WireID()=default
Default constructor: an invalid TPC ID.
std::vector< int > _ophit_opch
OpChannel of the optical hit.
std::vector< Int_t > genie_ND
std::vector< double > _ctrk_y1
CRT track y1.
void ResetPmtSoftTriggerVars()
Rests pmt software trigger variables.
geo::GeometryCore const * fGeometryService
std::vector< double > _ctrk_adc2
CRT track adc2.
std::vector< float > _muontrk_y2
y coordinate closer to cathode
int _pmtSoftTrigger_nAboveThreshold
Total photoelectron count before the TTS, during the beam spill.
void ResetMuonHitVars(int n)
Resets crossing muon hit tree variables.
std::vector< int > _mhit_channel
Channel where the hit belongs to.
TPCID_t TPC
Index of the TPC within its cryostat.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
void ResetCRTTracksVars(int n)
Resets crt tracks tree variables.
std::vector< double > _ct_time
CRT track time.
std::string pdType(size_t ch) const override
std::string fCRTHitModuleLabel
Label for CRTHit dataproduct (to be set via fcl)
OpDetGeo const & OpDetGeoFromOpChannel(unsigned int OpChannel) const
Returns the geo::OpDetGeo object for the given channel number.
int _pmtSoftTrigger_tts
Whether the beam spill was found or not.
std::vector< float > _muontrk_theta_xz
theta_xz trajectory angle
std::vector< Float_t > nuvtxx_truth
neutrino vertex x
std::vector< int > _ophit_opdet
OpDet of the optical hit.
TVector3 AuxDetChannelToPosition(uint32_t const &channel, std::string const &auxDetName) const
std::vector< int > _muontrk_type
type of muon track
std::vector< int > _crt_orient
CRT orientation (0 for y (horizontal) and 1 for x (vertical))
BEGIN_PROLOG could also be cout
std::vector< double > _ophit_area
Area of the optical hit.
void ResetVars()
Resets the variables that are saved to the TTree.
std::vector< double > _ct_pes
CRT track PEs.
bool freadTruth
Add Truth info to output (to be set via fcl)
std::vector< double > _ophit_opdet_x
OpDet X coordinate of the optical hit.