182 art::Handle< std::vector<recob::PFParticle> > pfParticleHandle;
184 art::FindManyP< recob::Track > pfPartToTrackAssoc(pfParticleHandle, event,
fTpcTrackModuleLabel);
189 art::FindManyP<anab::Calorimetry> findManyCalo(tpcTrackHandle, event,
fCaloModuleLabel);
192 std::vector<recob::Track> nuTracks;
193 for (
const size_t daughterId : pfparticle.
Daughters()){
196 art::Ptr<recob::PFParticle> pParticle = pfParticleMap.at(daughterId);
197 const std::vector< art::Ptr<recob::Track> > associatedTracks(pfPartToTrackAssoc.at(pParticle.key()));
198 if(associatedTracks.size() != 1)
continue;
201 nuTracks.push_back(track);
217 if(nuTracks.size() == 0)
return false;
220 std::sort(nuTracks.begin(), nuTracks.end(), [](
auto&
left,
auto&
right){
221 return left.Length() >
right.Length();});
225 std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(track.ID());
241 auto crtTrackHandle =
event.getValidHandle<std::vector<sbn::crt::CRTTrack>>(
fCrtTrackModuleLabel);
242 std::vector<sbn::crt::CRTTrack> crtTracks = (*crtTrackHandle);
249 std::vector<recob::Track>
tracks;
250 for(
auto const& tpcTrack : (*tpcTrackHandle)){
251 tracks.push_back(tpcTrack);
258 std::vector<std::pair<recob::Track, double>> secondaryTracks;
260 TVector3 start = track.Vertex<TVector3>();
261 TVector3
end = track.End<TVector3>();
265 for(
size_t i = 1; i < nuTracks.size(); i++){
269 TVector3 start2 = track2.
Vertex<TVector3>();
270 TVector3 end2 = track2.
End<TVector3>();
273 double angle = (end - start).Angle(end2 - start2);
274 secondaryTracks.push_back(std::make_pair(track2, angle));
280 if(secondaryTracks.size() > 0){
282 std::sort(secondaryTracks.begin(), secondaryTracks.end(), [](
auto&
left,
auto&
right){
296 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.ID());
299 std::vector<art::Ptr<anab::Calorimetry>> calos2 = findManyCalo.at(track2.
ID());
308 std::vector<art::Ptr<recob::Hit>> hits2 = findManyHits.at(track2.
ID());
315 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
316 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
325 if(secondaryTracks.size() == 0){
329 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.ID());
340 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
341 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
ClusterModuleLabel join with tracks
bool BeamFlash(std::vector< double > flashes, double beamTimeMin, double beamTimeMax)
ApaCrossCosmicIdAlg acTag
bool CpaCrossCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< recob::Track > tracks, art::FindManyP< recob::Hit > hitAssoc)
art::InputTag fCaloModuleLabel
bool PandoraT0CosmicId(recob::Track track, const art::Event &event)
bool InFiducial(geo::Point_t point)
art::InputTag fCrtHitModuleLabel
art::InputTag fCrtTrackModuleLabel
bool FiducialVolumeCosmicId(recob::Track track)
process_name use argoneut_mc_hitfinder track
double fMinVertexDistance
CpaCrossCosmicIdAlg ccTag
CrtTrackCosmicIdAlg ctTag
double Length(size_t p=0) const
Access to various track properties.
bool StoppingParticleCosmicId(recob::Track track, std::vector< art::Ptr< anab::Calorimetry >> calos)
bool CrtTrackCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTTrack > crtTracks, const art::Event &event)
Point_t const & Vertex() const
auto end(FixedBins< T, C > const &) noexcept
PandoraT0CosmicIdAlg ptTag
bool CrtHitCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< sbn::crt::CRTHit > crtHits, const art::Event &event)
bool GeometryCosmicId(recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, bool tpc0Flash, bool tpc1Flash)
GeometryCosmicIdAlg geoTag
bool PandoraNuScoreCosmicId(recob::Track track, const art::Event &event)
StoppingParticleCosmicIdAlg spTag
Point_t const & End() const
bool ApaCrossCosmicId(detinfo::DetectorPropertiesData const &detProp, recob::Track track, std::vector< art::Ptr< recob::Hit >> hits, std::vector< double > t0Tpc0, std::vector< double > t0Tpc1)
PandoraNuScoreCosmicIdAlg pnTag
finds tracks best matching by angle
FiducialVolumeCosmicIdAlg fvTag
bool fApplyPandoraNuScoreCut
art::InputTag fTpcTrackModuleLabel
art::InputTag fPandoraLabel
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
double fMinSecondTrackLength