1 #ifndef __sbnanalysis_ana_SBNOsc_NumuReco__
2 #define __sbnanalysis_ana_SBNOsc_NumuReco__
16 #include "canvas/Utilities/InputTag.h"
21 #include "TDatabasePDG.h"
24 #include "canvas/Persistency/Common/FindManyP.h"
26 #include "nusimdata/SimulationBase/MCTruth.h"
34 #include "LArReco/TrajectoryMCSFitter.h"
35 #include "LArReco/TrackMomentumCalculator.h"
43 #include "../CosmicIDAlgs/ApaCrossCosmicIdAlg.h"
44 #include "../CosmicIDAlgs/StoppingParticleCosmicIdAlg.h"
48 #include "../Data/CRTMatch.h"
49 #include "../Data/FlashMatch.h"
50 #include "../Data/Mode.h"
51 #include "../Data/RecoEvent.h"
52 #include "../Data/RecoParticle.h"
53 #include "../Data/RecoTrack.h"
54 #include "../Data/TruthMatch.h"
55 #include "../Data/MCType.h"
57 #include "../Histograms/CRTHisto.h"
79 void Initialize(fhicl::ParameterSet* config=NULL);
91 bool ProcessEvent(
const gallery::Event& ev,
const std::vector<event::Interaction> &truth, std::vector<event::RecoInteraction>&
reco);
218 std::map<size_t, numu::RecoTrack> &reco_tracks,
219 const std::vector<numu::RecoParticle> &particles);
241 const std::map<size_t, numu::RecoTrack> &
tracks,
242 const std::map<size_t, numu::RecoParticle> &particles);
326 bool InActive(
const TVector3 &v)
const;
393 #endif // __sbnanalysis_ana_SBNOsc_NumuReco__
std::map< int, art::Ptr< simb::MCTruth > > _true_particles_to_truth
bool verbose
Whether to print out info associated w/ selection.
bool requireTrack
Apply cut that requires each reconstructed vertex to have an associated primary track.
void Initialize(fhicl::ParameterSet *config=NULL)
std::vector< art::Ptr< simb::MCParticle > > _true_particles
std::array< float, 2 > BeamSpillWindow
std::vector< sbn::crt::CRTHit > _crt_hits_local
numu::TrackTruthMatch MatchTrack2Truth(size_t track_id)
numu::CRTHit SBND2numuCRTHit(const sbn::crt::CRTHit &hit)
std::vector< numu::RecoSlice > RecoSliceInfo(std::map< size_t, numu::RecoTrack > &reco_tracks, const std::vector< numu::RecoParticle > &particles)
std::vector< numu::RecoInteraction > * _selected
Branch container for the list of selected reco vertices.
std::vector< numu::CRTHit > InTimeCRTHits()
event::RecoInteraction CoreRecoInteraction(const std::vector< event::Interaction > &truth, const numu::RecoInteraction &vertex, double weight)
std::vector< art::Ptr< recob::PFParticle > > _tpc_particles
ClusterModuleLabel join with tracks
std::vector< unsigned > _tpc_tracks_to_particle_index
int GetPhotonMotherID(int mcparticle_id)
std::vector< art::Ptr< larpandoraobj::PFParticleMetadata > > _tpc_particles_to_metadata
StoppingParticleCosmicIdAlg _stopping_cosmic_alg
Algorithm for doing cosmic ID using a fit to the energy deposits.
std::vector< std::vector< geo::BoxBoundedGeo > > tpc_volumes
List of active tpc volumes – retreived from Geoemtry service.
Declaration of signal hit object.
numu::RecoEvent _recoEvent
Branch container for the RecoEvent.
std::vector< recob::OpHit > _op_hits_local
std::string CRTTrackTag
art tag for CRT tracks
unsigned _event_counter
Count processed events.
std::vector< std::vector< unsigned > > _tpc_particles_to_daughters
std::vector< art::Ptr< recob::Track > > _tpc_tracks
Contains data associated to particles from detector simulation.
numu::CRTMatch CRTMatching(const numu::RecoTrack &track, const recob::Track &pandora_track, const std::vector< art::Ptr< recob::Hit >> &track_hits)
process_name use argoneut_mc_hitfinder track
std::vector< std::vector< art::Ptr< recob::Vertex > > > _tpc_particles_to_vertex
CRTHistos _crt_histograms
process_name opflashCryoW ana
void CollectTruthInformation(const gallery::Event &ev)
std::vector< std::vector< art::Ptr< recob::Hit > > > _tpc_tracks_to_hits
std::vector< std::string > TPCRecoTagSuffixes
std::vector< size_t > RecoSliceTracks(const std::map< size_t, numu::RecoTrack > &tracks, const std::map< size_t, numu::RecoParticle > &particles)
ApaCrossCosmicIdAlg _apa_cross_cosmic_alg
Algorithm for doing cosmic ID by looking for tracks crossing APA.
std::vector< numu::RecoParticle > RecoParticleInfo()
trkf::TrackMomentumCalculator * _track_momentum_calculator
Calculator for range-based track momentum.
double trackMatchContainmentCut
numu::RecoEvent Reconstruct(const gallery::Event &ev, const std::vector< event::Interaction > &truth)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< std::vector< art::Ptr< anab::Calorimetry > > > _tpc_tracks_to_calo
std::map< size_t, numu::RecoTrack > RecoTrackInfo()
void CollectTPCInformation(const gallery::Event &ev)
Contains truth level information and additional fields for selection-defined reconstruction informati...
bool InActive(const TVector3 &v) const
numu::FlashMatch FlashMatching(const recob::Track &pandora_track, const numu::RecoTrack &track)
std::vector< std::string > uniformWeights
Weights taken from "EventWeight" that should be applied to the weight of each event.
process_name standard_reco_uboone reco
bool requireContained
Apply cut that requires each primary track to be contained inside the containment volume...
sbnd::CRTTrackMatchAlg * _crt_track_matchalg
Algorithm for matching reco Tracks -> CRT Tracks.
bool HasPrimaryTrack(const std::map< size_t, numu::RecoTrack > &tracks, const numu::RecoSlice &slice)
bool SelectSlice(const numu::RecoSlice &slice)
double cosmicWeight
Weight applied to all events matched to a cosmic track.
bool requireMatched
Apply cut that requires each reconstructed vertex to be matched to a truth vertex.
std::vector< std::vector< art::Ptr< anab::T0 > > > _tpc_particles_to_T0
TGraph * _cut_counts
Keep track of neutrinos per cut.
unsigned PMTTriggerThreshold
std::map< int, const sim::GeneratedParticleInfo * > _true_particles_to_generator_info
sbnd::CRTT0MatchAlg * _crt_hit_matchalg
Algorithm for matching reco Tracks -> CRT hits (T0's)
std::map< unsigned, unsigned > _tpc_particles_to_track_index
opdet::opHitFinderSBND * _op_hit_maker
Optical hit maker.
void CollectCRTInformation(const gallery::Event &ev)
std::vector< std::vector< art::Ptr< recob::PFParticle > > > _tpc_slices_to_particles
Electron neutrino event selection.
std::vector< art::Ptr< recob::OpHit > > _op_hit_ptrs
Base class for event selections.
double flashMatchTimeDifference
std::string FlashMatchTag
const std::vector< sbn::crt::CRTHit > * _crt_hits
std::map< size_t, numu::TrueParticle > MCParticleInfos()
numu::TrueParticle MCParticleInfo(const simb::MCParticle &particle)
Provides recob::Track data product.
Provides a base class aware of world box coordinates.
std::vector< geo::BoxBoundedGeo > containment_volumes
List of volumes for containment cuts – set by "containment_volumes".
std::string CorsikaTag
art tag for corsika MCTruth
bool ProcessEvent(const gallery::Event &ev, const std::vector< event::Interaction > &truth, std::vector< event::RecoInteraction > &reco)
std::vector< std::vector< art::Ptr< anab::ParticleID > > > _tpc_tracks_to_pid
std::vector< std::vector< art::Ptr< anab::T0 > > > _tpc_particles_to_flashT0
double CRTHitTimeCorrection
std::vector< geo::BoxBoundedGeo > active_volumes
List of active volumes per cryostat.
unsigned _nu_count
Count selected events.
std::string PFParticleTag
art tag for PFParticles
trkf::TrajectoryMCSFitter * _mcs_fitter
Calculator for MCS based momentum.
bool InBeamSpill(float time)
Config _config
The config.
double constantWeight
Constant weight to apply uniformly to each event.
Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Trac...
std::array< bool, 4 > RecoTrackTopology(const art::Ptr< recob::Track > &track)
std::vector< std::vector< unsigned > > _tpc_slices_to_particle_index
void CollectPMTInformation(const gallery::Event &ev)
const std::vector< sbn::crt::CRTTrack > * _crt_tracks
std::string MCParticleTag
art tag for MCParticle
std::vector< art::Ptr< recob::PFParticle > > _tpc_tracks_to_particles
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
std::vector< sbn::crt::CRTTrack > _crt_tracks_local
std::string RecoTrackTag
art tag for reconstructed tracks
void ApplyCosmicID(numu::RecoTrack &track)
std::string RecoVertexTag
art tag for reconstructed vertices
std::vector< art::Ptr< recob::Slice > > _tpc_slices