108 std::vector<art::Ptr<recob::Hit>> hits = findManyHits.at(track.
ID());
110 art::FindManyP<anab::Calorimetry> findManyCalo(tpcTrackHandle, event,
fCaloModuleLabel);
112 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(event);
131 std::vector<art::Ptr<anab::Calorimetry>> calos = findManyCalo.at(track.
ID());
144 std::vector<recob::Track>
tracks;
145 for(
auto const& tpcTrack : (*tpcTrackHandle)){
146 tracks.push_back(tpcTrack);
159 auto crtTrackHandle =
event.getValidHandle<std::vector<sbn::crt::CRTTrack>>(
fCrtTrackModuleLabel);
160 std::vector<sbn::crt::CRTTrack> crtTracks = (*crtTrackHandle);
167 auto crtHitHandle =
event.getValidHandle<std::vector<sbn::crt::CRTHit>>(
fCrtHitModuleLabel);
168 std::vector<sbn::crt::CRTHit> crtHits = (*crtHitHandle);
179 recob::PFParticle pfparticle, std::map<
size_t, art::Ptr<recob::PFParticle> > pfParticleMap,
const art::Event& event, std::vector<double> t0Tpc0, std::vector<double> t0Tpc1){
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);
fhicl::Atom< bool > ApplyCrtHitCut
fhicl::Atom< bool > ApplyGeometryCut
const std::vector< size_t > & Daughters() const
Returns the collection of daughter particles.
fhicl::Atom< art::InputTag > CrtHitModuleLabel
fhicl::Atom< art::InputTag > TpcTrackModuleLabel
fhicl::Table< CpaCrossCosmicIdAlg::Config > CCTagAlg
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
std::vector< bool > fOriginalSettings
bool PandoraT0CosmicId(recob::Track track, const art::Event &event)
fhicl::Atom< bool > ApplyCpaCrossCut
fhicl::Table< PandoraT0CosmicIdAlg::Config > PTTagAlg
bool InFiducial(geo::Point_t point)
art::InputTag fCrtHitModuleLabel
art::InputTag fCrtTrackModuleLabel
fhicl::Atom< double > MinMergeAngle
bool FiducialVolumeCosmicId(recob::Track track)
fhicl::Table< FiducialVolumeCosmicIdAlg::Config > FVTagAlg
bool CosmicId(recob::Track track, const art::Event &event, std::vector< double > t0Tpc0, std::vector< double > t0Tpc1)
CosmicIdAlg(const Config &config)
process_name use argoneut_mc_hitfinder track
double fMinVertexDistance
fhicl::Atom< bool > ApplyCrtTrackCut
fhicl::Table< CrtTrackCosmicIdAlg::Config > CTTagAlg
fhicl::Atom< bool > ApplyStoppingCut
fhicl::Atom< double > MinVertexDistance
CpaCrossCosmicIdAlg ccTag
CrtTrackCosmicIdAlg ctTag
void reconfigure(const Config &config)
fhicl::Atom< double > MinSecondTrackLength
fhicl::Atom< bool > ApplyPandoraNuScoreCut
double Length(size_t p=0) const
Access to various track properties.
fhicl::Atom< bool > ApplyFiducialCut
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)
fhicl::Atom< art::InputTag > CaloModuleLabel
Point_t const & Vertex() const
auto end(FixedBins< T, C > const &) noexcept
PandoraT0CosmicIdAlg ptTag
fhicl::Table< CrtHitCosmicIdAlg::Config > CHTagAlg
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
fhicl::Table< StoppingParticleCosmicIdAlg::Config > SPTagAlg
process_name showerreco Particles Coinciding wih the Vertex services ScanOptions nu_mu CC
fhicl::Table< ApaCrossCosmicIdAlg::Config > ACTagAlg
fhicl::Table< BeamTime > BeamTimeLimits
Hierarchical representation of particle flow.
bool PandoraNuScoreCosmicId(recob::Track track, const art::Event &event)
fhicl::Table< PandoraNuScoreCosmicIdAlg::Config > PNTagAlg
fhicl::Atom< art::InputTag > CrtTrackModuleLabel
StoppingParticleCosmicIdAlg spTag
fhicl::Atom< bool > ApplyApaCrossCut
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)
stream1 can override from command line with o or output services user sbnd
PandoraNuScoreCosmicIdAlg pnTag
finds tracks best matching by angle
fhicl::Atom< bool > UseTrackAngleVeto
FiducialVolumeCosmicIdAlg fvTag
fhicl::Atom< bool > ApplyPandoraT0Cut
bool fApplyPandoraNuScoreCut
art::InputTag fTpcTrackModuleLabel
fhicl::Atom< art::InputTag > PandoraLabel
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
void SetCuts(bool FV, bool SP, bool Geo, bool CC, bool AC, bool CT, bool CH, bool PT, bool PN)