101 std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(track.
ID());
103 art::FindManyP<anab::Calorimetry> findManyCalo(tpcTrackHandle, event,
fCaloModuleLabel);
117 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.
ID());
130 std::vector<recob::Track>
tracks;
131 for(
auto const& tpcTrack : (*tpcTrackHandle)){
132 tracks.push_back(tpcTrack);
145 auto crtTrackHandle =
event.getValidHandle<std::vector<sbn::crt::CRTTrack>>(_config.CRTTrackTag);
146 std::vector<sbn::crt::CRTTrack> crtTracks = (*crtTrackHandle);
153 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
154 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
164 bool CosmicIdAlg::CosmicId(
recob::PFParticle pfparticle, std::map<
size_t, art::Ptr<recob::PFParticle> > pfParticleMap,
const art::Event& event, std::vector<double> t0Tpc0, std::vector<double> t0Tpc1){
167 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
169 art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, event,
fTpcTrackModuleLabel);
174 art::FindManyP<anab::Calorimetry> findManyCalo(tpcTrackHandle, event,
fCaloModuleLabel);
177 std::vector<recob::Track> nuTracks;
178 for (
const size_t daughterId : pfparticle.
Daughters()){
181 art::Ptr<recob::PFParticle> pParticle = pfParticleMap.at(daughterId);
182 const std::vector< art::Ptr<recob::Track> > associatedTracks(pfPartToTrackAssoc.at(pParticle.key()));
183 if(associatedTracks.size() != 1)
continue;
186 nuTracks.push_back(track);
197 if(nuTracks.size() == 0)
return false;
200 std::sort(nuTracks.begin(), nuTracks.end(), [](
auto&
left,
auto&
right){
201 return left.Length() >
right.Length();});
205 std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(track.ID());
221 auto crtTrackHandle =
event.getValidHandle<std::vector<sbn::crt::CRTTrack>>(
fCrtTrackModuleLabel);
222 std::vector<sbn::crt::CRTTrack> crtTracks = (*crtTrackHandle);
229 std::vector<recob::Track>
tracks;
230 for(
auto const& tpcTrack : (*tpcTrackHandle)){
231 tracks.push_back(tpcTrack);
238 std::vector<std::pair<recob::Track, double>> secondaryTracks;
240 TVector3 start = track.Vertex<TVector3>();
241 TVector3
end = track.End<TVector3>();
245 for(
size_t i = 1; i < nuTracks.size(); i++){
249 TVector3 start2 = track2.
Vertex<TVector3>();
250 TVector3 end2 = track2.
End<TVector3>();
253 double angle = (end - start).Angle(end2 - start2);
254 secondaryTracks.push_back(std::make_pair(track2, angle));
260 if(secondaryTracks.size() > 0){
262 std::sort(secondaryTracks.begin(), secondaryTracks.end(), [](
auto&
left,
auto&
right){
276 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.ID());
279 std::vector<art::Ptr<anab::Calorimetry>> calos2 = findManyCalo.at(track2.
ID());
288 std::vector<art::Ptr<recob::Hit>> hits2 = findManyHits.at(track2.
ID());
295 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
296 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
305 if(secondaryTracks.size() == 0){
309 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.ID());
320 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
321 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
fhicl::Atom< art::InputTag > CrtTrackModuleLabel
bool CrtHitCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTHit > crtHits)
bool CrtTrackCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< sbn::crt::CRTTrack > crtTracks)
bool GeometryCosmicId(recob::Track &track, std::vector< art::Ptr< recob::Hit >> &hits, std::map< geo::TPCID, bool > &tpc_flashes)
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
fhicl::Table< PandoraT0CosmicIdAlg::Config > PTTagAlg
fhicl::Table< BeamTime > BeamTimeLimits
void reconfigure(const Config &config)
bool FiducialVolumeCosmicId(recob::Track track)
ClusterModuleLabel join with tracks
art::InputTag fTpcTrackModuleLabel
fhicl::Atom< double > MinMergeAngle
double fMinVertexDistance
fhicl::Atom< double > MinSecondTrackLength
fhicl::Atom< bool > ApplyApaCrossCut
CosmicIdAlg(const Config &config)
bool ApaCrossCosmicId(const recob::Track &track, std::vector< art::Ptr< recob::Hit >> &hits, std::map< geo::CryostatID, std::vector< double >> &t_zeros)
process_name use argoneut_mc_hitfinder track
fhicl::Atom< bool > ApplyStoppingCut
process_name opflashCryoW ana
bool CosmicId(recob::Track track, const art::Event &event, std::vector< double > t0Tpc0, std::vector< double > t0Tpc1)
bool InFiducial(geo::Point_t point)
ApaCrossCosmicIdAlg acTag
fhicl::Atom< art::InputTag > PandoraLabel
StoppingParticleCosmicIdAlg spTag
PandoraT0CosmicIdAlg ptTag
fhicl::Table< StoppingParticleCosmicIdAlg::Config > SPTagAlg
CrtTrackCosmicIdAlg ctTag
FiducialVolumeCosmicIdAlg fvTag
double Length(size_t p=0) const
Access to various track properties.
fhicl::Table< FiducialVolumeCosmicIdAlg::Config > FVTagAlg
fhicl::Atom< art::InputTag > CaloModuleLabel
art::InputTag fCaloModuleLabel
fhicl::Atom< bool > ApplyCrtTrackCut
Point_t const & Vertex() const
auto end(FixedBins< T, C > const &) noexcept
fhicl::Table< ApaCrossCosmicIdAlg::Config > ACTagAlg
fhicl::Atom< bool > UseTrackAngleVeto
bool BeamFlash(std::vector< double > flashes, double beamTimeMin, double beamTimeMax)
art::InputTag fCrtTrackModuleLabel
fhicl::Table< CpaCrossCosmicIdAlg::Config > CCTagAlg
std::vector< bool > fOriginalSettings
double fMinSecondTrackLength
fhicl::Atom< bool > ApplyCrtHitCut
fhicl::Atom< double > MinVertexDistance
fhicl::Atom< bool > ApplyCpaCrossCut
bool CpaCrossCosmicId(recob::Track track, std::vector< recob::Track > tracks, art::FindManyP< recob::Hit > hitAssoc)
process_name showerreco Particles Coinciding wih the Vertex services ScanOptions nu_mu CC
Hierarchical representation of particle flow.
bool PandoraT0CosmicId(recob::Track track, const art::Event &event)
fhicl::Atom< bool > ApplyFiducialCut
GeometryCosmicIdAlg geoTag
void SetCuts(bool FV, bool SP, bool Geo, bool CC, bool AC, bool CT, bool CH, bool PT)
Point_t const & End() const
finds tracks best matching by angle
fhicl::Atom< art::InputTag > CrtHitModuleLabel
CpaCrossCosmicIdAlg ccTag
art::InputTag fCrtHitModuleLabel
fhicl::Table< CrtTrackCosmicIdAlg::Config > CTTagAlg
art::InputTag fPandoraLabel
fhicl::Atom< bool > ApplyPandoraT0Cut
bool StoppingParticleCosmicId(recob::Track track, std::vector< art::Ptr< anab::Calorimetry >> calos)
fhicl::Atom< bool > ApplyGeometryCut
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
fhicl::Atom< art::InputTag > TpcTrackModuleLabel
fhicl::Table< CrtHitCosmicIdAlg::Config > CHTagAlg