2 #include "../Histograms/Derived.h"
3 #include "../RecoUtils/GeoUtil.h"
4 #include "../TriggerEmulator/PMTTrigger.h"
5 #include "../NumuReco/TrackAlgo.h"
40 fhicl::ParameterSet dFV = \
41 cfg.get<fhicl::ParameterSet>(
"fiducial_volume_inset");
42 double dx = dFV.get<
double>(
"x");
43 double dy = dFV.get<
double>(
"y");
44 double zfront = dFV.get<
double>(
"zfront");
45 double zback = dFV.get<
double>(
"zback");
52 fhicl::ParameterSet dFV = \
53 cfg.get<fhicl::ParameterSet>(
"calorimetric_containment_volume_inset");
54 double dx = dFV.get<
double>(
"x");
55 double dy = dFV.get<
double>(
"y");
56 double zfront = dFV.get<
double>(
"zfront");
57 double zback = dFV.get<
double>(
"zback");
70 fhicl::ParameterSet dFV = \
71 cfg.get<fhicl::ParameterSet>(
"cosmic_containment_volume_inset");
72 double ytop = dFV.get<
double>(
"ytop");
73 double ybottom = dFV.get<
double>(
"ybottom");
74 double zfront = dFV.get<
double>(
"zfront");
75 double zback = dFV.get<
double>(
"zback");
78 contain.
Y = {geo.
MinY() + ybottom, geo.
MaxY() - ytop};
79 contain.
Z = {geo.
MinZ() + zfront, geo.
MaxZ() - zback};
87 std::map<std::string, bool> cuts;
91 cuts[
"T_fid"] =
InFV(core.
truth[truth_vertex_index].neutrino.position);
100 bool has_reco =
false;
101 for (
unsigned i = 0; i <
event.reco.size(); i++) {
102 const numu::RecoTrack &primary_track =
event.tracks.at(event.
reco[i].slice.primary_track_index);
103 if (event.
reco[i].match.has_match &&
104 event.
reco[i].match.mctruth_track_id == truth_vertex_index &&
110 cuts[
"T_reco"] = has_reco;
112 std::array<bool, Cuts::nTruthCuts> ret;
126 unsigned reco_vertex_index,
127 bool fSequentialCuts)
const {
128 std::map<std::string, bool> cuts;
134 bool has_intime_flash =
false;
137 has_intime_flash =
true;
141 cuts[
"R_flashtime"] = has_intime_flash;
145 cuts[
"R_fid"] =
false;
148 cuts[
"R_fid"] =
InFV(event.
reco[reco_vertex_index].position);
151 const numu::RecoTrack &primary_track =
event.tracks.at(event.
reco[reco_vertex_index].slice.primary_track_index);
162 bool time_in_spill =
false;
182 cuts[
"R_crtactive"] =
true;
186 cuts[
"R_crtactive"] =
false;
191 std::array<bool, Cuts::nCuts> ret;
193 if (fSequentialCuts && i > 0) ret[i] = ret[i-1] && cuts.at(
fConfig.
CutOrder[i]);
229 if (FV.ContainsPosition(v))
return true;
236 if (FV.ContainsPosition(v))
return true;
243 if (FV.ContainsPosition(v))
return true;
253 && CV.Y[1] > v.Y()) {
bool TimeInSpill(float time) const
float time
Time of flash [us].
std::array< double, 2 > Z
Track track
CRT Track match.
bool HasCRTHitMatch(const numu::RecoTrack &track) const
std::vector< geo::BoxBoundedGeo > ActiveVolumes(const geo::GeometryCore *geometry)
std::array< bool, nTruthCuts > ProcessTruthCuts(const numu::RecoEvent &event, const event::Event &core, unsigned truth_vertex_index, bool SequentialCuts=true) const
std::vector< geo::BoxBoundedGeo > active_volumes
float distance
//!< Distance from projected track to CRT Hit. Nonsense if present is false.
std::array< float, 2 > CRTHitTimeRange
const geo::GeometryCore * geometry
std::vector< geo::BoxBoundedGeo > calorimetric_containment_volumes
CRTMatch crt_match
CRTMatch.
bool present
Whether this CRTMatch has a matching track.
int mcparticle_id
MCParticle ID of the particle this track matches to (same as the ID of the RecoTrack of that particle...
double MinX() const
Returns the world x coordinate of the start of the box.
bool HasCRTTrackMatch(const numu::RecoTrack &track) const
std::vector< geo::BoxBoundedGeo > fiducial_volumes
bool InCosmicContainment(const TVector3 &v) const
double MaxX() const
Returns the world x coordinate of the end of the box.
std::array< bool, nCuts > ProcessRecoCuts(const numu::RecoEvent &event, unsigned reco_vertex_index, bool fSequentialCuts=true) const
process_name use argoneut_mc_hitfinder track
std::map< size_t, TrueParticle > particles
Map of indices to True particle information.
process_name opflashCryoW ana
std::vector< CRTHit > in_time_crt_hits
List of crt hits in time with the beam spill.
std::vector< RecoInteraction > reco
List of reconstructed vertices.
float CRTActivityPEThreshold
process_name standard_reco_uboone reco
TVector3 start
start position of track
FlashMatch flash_match
Result of flash matching algorithm on this slice.
float length
Length of track.
float MCSMomentum(const numu::RecoTrack &track)
std::array< double, 2 > Y
double MinZ() const
Returns the world z coordinate of the start of the box.
bool present
Whether this CRTMatch has a matching hit.
bool InFV(const TVector3 &v) const
std::vector< FlashTriggerPrimitive > flash_trigger_primitives
List of trigger primitives from optical detectors.
float CRTMatchTime(const numu::RecoTrack &track) const
Description of geometry of one entire detector.
bool PassFlashTrigger(const numu::RecoEvent &event) const
bool has_match
Whether a track match exists.
std::vector< VolYZ > cosmic_containment_volumes
std::vector< std::string > TruthCutOrder
double MaxY() const
Returns the world y coordinate of the end of the box.
double trackMatchCompletionCut
float dist2Match(const event::Interaction &truth, const std::vector< numu::RecoInteraction > &candidates)
The standard event data definition.
bool is_primary
Whether this track was produced as the "primary" process.
unsigned PMTNAboveThreshold
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 ...
double MaxZ() const
Returns the world z coordinate of the end of the box.
float pes
Number of PE's in hit.
std::array< float, 2 > CRTActivityTimeRange
float angle
Angle between TPC track and CRT track.
float trackMatchCompletion(unsigned truth_index, const numu::RecoEvent &event)
bool TimeInCRTActiveSpill(float time) const
TVector3 end
end position of track
std::vector< std::string > CutOrder
bool InCalorimetricContainment(const TVector3 &v) const
void Initialize(const fhicl::ParameterSet &cfg, const geo::GeometryCore *geometry)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
double MinY() const
Returns the world y coordinate of the start of the box.
HitMatch hit_match
CRT Hit match.
bool HasTrigger(const std::vector< FlashTriggerPrimitive > &primitives, int threshold, unsigned n_above_threshold)
std::vector< Interaction > truth
All truth interactions.
float time
Matching time [us] of track. T==0 is set to beam spill start time.