3 #include "../TriggerEmulator/PMTTrigger.h"
12 #define INT_HISTO(name, n_bins, lo, hi) name = new TH1D((#name + postfix).c_str(), #name, n_bins, lo, hi); StoreHisto(name)
13 #define INT_HISTO2D(name, n_binsx, xlo, xhi, n_binsy, ylo, yhi) name = new TH2D((#name + postfix).c_str(), #name, n_binsx, xlo, xhi, n_binsy, ylo, yhi); StoreHisto(name)
14 #define INT_HISTO2D_BINSY(name, n_binsx, xlo, xhi, n_binsy, binsy) name = new TH2D((#name + postfix).c_str(), #name, n_binsx, xlo, xhi, n_binsy, binsy); StoreHisto(name)
36 double intout_times[4] = {-3000., 0., 1.6, 3000.};
93 const std::vector<event::Interaction> &truth) {
114 double true_time =
event.particles.at(mcparticle_id).start_time;
118 if (true_time < 0. || true_time > 1.6) {
133 double true_track_momentum =
event.particles.at(mcparticle_id).start_momentum.Mag();
134 track_p->Fill(true_track_momentum);
136 int crosses_tpc_val =
event.particles.at(mcparticle_id).crosses_tpc;
139 double length =
event.particles.at(mcparticle_id).length;
147 nuE->Fill(truth[mctruth_id].neutrino.energy);
148 Q2->Fill(truth[mctruth_id].neutrino.Q2);
168 double closest_time_dist = -1;
169 double closest_time = 0.;
176 if (hit.
pes > maxpe) maxpe = hit.
pes;
182 if (closest_time_dist < 0. || closest_time_dist > 1
e-3) {
183 double this_time_dist = -1;
184 if (hit.
time > -0.2 && hit.
time < 1.8) this_time_dist = 0.;
185 else if (hit.
time < 0.) this_time_dist = -hit.
time -0.2;
186 if (this_time_dist >= 0. && (this_time_dist < closest_time_dist || closest_time_dist < 0.)) {
187 closest_time = hit.
time;
188 closest_time_dist = this_time_dist;
192 if (closest_time_dist >= 0.) {
199 std::cout <<
"Max PE: " << maxpe << std::endl;
float time
Time of flash [us].
TH2D * fmatch_score_true_time
TH1D * fmatch_score_outtime
TVector3 momentum
Three-momentum.
TH1D * true_contained_length
True contained length of primary track.
TH1D * closest_crt_hit_time
void FillEvent(const numu::RecoEvent &event)
FinalStateParticle lepton
The primary final state lepton.
TH1D * track_p
Primary track momentum.
TH1D * dist_to_match
Distance from this vertex to the closest matching vertex reco->truth and truth->reco.
TH1D * n_reco_vertices
Number of reconstructed vertices in the event with this vertex.
TruthMatch match
Info for mathing to truth.
TH1D * nuE
Neutrino energy.
int mcparticle_id
MCParticle ID of the particle this track matches to (same as the ID of the RecoTrack of that particle...
int primary_track_index
Index of the primary track.
double MinX() const
Returns the world x coordinate of the start of the box.
Neutrino neutrino
The neutrino.
double MaxX() const
Returns the world x coordinate of the end of the box.
process_name opflashCryoW ana
TH2D * intime_crt_hits_xy
std::vector< CRTHit > in_time_crt_hits
List of crt hits in time with the beam spill.
TH2D * fmatch_score_true_time_zoom
TH1D * beam_center_distance
Distance of the neutrino interaction to the beam center.
TVector3 location
Location of the hit.
std::vector< RecoInteraction > reco
List of reconstructed vertices.
TVector3 position
location of the vertex
TH2D * fmatch_time_true_time_zoom
std::map< size_t, RecoTrack > tracks
Map of track indices to Track information.
void Initialize(const std::string &prefix, const geo::BoxBoundedGeo &detector_volume, const std::vector< double > &tagger_volume)
FlashMatch flash_match
Result of flash matching algorithm on this slice.
TH1D * maxpe_crt_intime_hit
Maximum number of PE's in a single CRT hit in time with the beam.
TH1D * Q2
Q2 of the interaction.
TH2D * intime_crt_hits_xz
float length
Length of track.
TH1D * fmatch_score_intime
double MinZ() const
Returns the world z coordinate of the start of the box.
float completion
Fraction of energy deposits by true particle matched by this track.
bool has_match
Whether a track match exists.
double MaxY() const
Returns the world y coordinate of the end of the box.
TH2D * intime_crt_hits_yz
float dist2Match(const event::Interaction &truth, const std::vector< numu::RecoInteraction > &candidates)
size_t nfinalstate
Size of finalstate.
TrackTruthMatch match
Truth matching information.
RecoSlice slice
Particle content of the interaction.
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
float energy
Neutrino energy (GeV)
double MaxZ() const
Returns the world z coordinate of the end of the box.
float pes
Number of PE's in hit.
TVector3 position
Neutrino interaction position.
#define INT_HISTO(name, n_bins, lo, hi)
TH1D * fmatch_time_real_time
float truth_vertex_distance
Distance from truth interaction vertex to this vertex.
TH1D * track_length
Length of the reconstructed primary track.
float trackMatchCompletion(unsigned truth_index, const numu::RecoEvent &event)
int mctruth_track_id
index of the primary track into the list of MCTruths. -1 if no match.
TH1D * crosses_tpc
Whether the primary track crosses a TPC boundary.
float score
score of flash matching
TH1D * primary_track_completion
Completion of the primary track.
double MinY() const
Returns the world y coordinate of the start of the box.
void Fill(const numu::RecoInteraction &vertex, const numu::RecoEvent &event, const std::vector< event::Interaction > &core_truth)
TH1D * true_track_multiplicity
True particle multiplicity of the interaction.
All truth information associated with one neutrino interaction.
BEGIN_PROLOG could also be cout
#define INT_HISTO2D(name, n_binsx, xlo, xhi, n_binsy, ylo, yhi)