12 #ifndef PMAlgTracking_h 13 #define PMAlgTracking_h 16 #include "canvas/Persistency/Common/FindManyP.h" 37 class DetectorProperties;
66 std::vector<std::pair<TVector3, std::vector<std::pair<size_t, bool>>>>
69 return fPMAlgVertexing.getVertices(fResult, onlyBranching);
72 std::vector<std::pair<TVector3, size_t>>
75 return fPMAlgVertexing.getKinks(fResult);
102 Name(
"TrackingOnlyPdg"),
103 Comment(
"PDG list to select which PFParticles should be reconstructed; all PFP's are used if " 104 "the list is empty or starts with 0")};
107 Name(
"TrackingSkipPdg"),
108 Comment(
"PDG list to select which PFParticles should NOT be reconstructed, e.g. skip EM-like " 109 "if contains 11; no skipping if the list is empty or starts with 0")};
112 Name(
"RunVertexing"),
114 "find vertices from PFP hierarchy, join with tracks, reoptimize track-vertex structure")};
118 const std::vector<recob::Cluster>& clusters,
119 const std::vector<recob::PFParticle>& pfparticles,
120 const art::FindManyP<recob::Hit>& hitsFromClusters,
121 const art::FindManyP<recob::Cluster>& clusFromPfps,
122 const art::FindManyP<recob::Vertex>& vtxFromPfps,
134 has(
const std::vector<int>& v,
int i)
const 137 if (
c == i)
return true;
142 std::vector<std::vector<art::Ptr<recob::Hit>>>
fCluHits;
164 Name(
"MinSeedSize1stPass"),
165 Comment(
"min. cluster size used to start building a track in the 1st pass")};
168 Name(
"MinSeedSize2ndPass"),
169 Comment(
"min. cluster size used to start building a track in the 2nd pass")};
172 Comment(
"Threshold for track-like recognition")};
175 Name(
"RunVertexing"),
177 "find vertices from PFP hierarchy, join with tracks, reoptimize track-vertex structure")};
180 Comment(
"set the track direction to increasing Z values")};
183 Name(
"FlipDownward"),
184 Comment(
"set the track direction to decreasing Y values (like cosmic rays)")};
188 Comment(
"set the track direction to decreasing X values (like cosmic rays in dual phase)")};
191 Name(
"AutoFlip_dQdx"),
192 Comment(
"set the track direction to increasing dQ/dx (overrides FlipToBeam, FlipDownward and " 193 "FlipToX if significant rise of dQ/dx at the track end)")};
196 Name(
"MergeWithinTPC"),
197 Comment(
"merge witnin single TPC; finds tracks best matching by angle and displacement")};
200 Name(
"MergeTransverseShift"),
201 Comment(
"max. transverse displacement [cm] between tracks")};
205 Comment(
"max. angle [degree] between tracks (nearest segments)")};
208 Name(
"StitchBetweenTPCs"),
209 Comment(
"stitch between TPCs; finds tracks best matching by angle and displacement")};
212 Name(
"StitchDistToWall"),
213 Comment(
"max. track endpoint distance [cm] to TPC boundary")};
216 Name(
"StitchTransverseShift"),
217 Comment(
"max. transverse displacement [cm] between tracks")};
221 Comment(
"max. angle [degree] between tracks (nearest segments)")};
224 Name(
"MatchT0inAPACrossing"),
225 Comment(
"match T0 of APA-crossing tracks using PMAlgStitcher")};
228 Name(
"MatchT0inCPACrossing"),
229 Comment(
"match T0 of CPA-crossing tracks using PMAlgStitcher")};
232 Comment(
"tracks validation mode: hits, adc, calib")};
235 Name(
"AdcValidationThr"),
236 Comment(
"thresholds for not-empty pixel in the ADC track validation")};
240 Comment(
"ADC based image used for the track validation")};
244 const std::vector<recob::Wire>& wires,
251 const std::vector<TH1F*>& hpassing,
252 const std::vector<TH1F*>& hrejected);
254 void init(
const art::FindManyP<recob::Hit>& hitsFromClusters);
256 void init(
const art::FindManyP<recob::Hit>& hitsFromClusters,
257 const std::vector<float>& trackLike);
259 void init(
const art::FindManyP<recob::Hit>& hitsFromClusters,
260 const art::FindManyP<recob::Hit>& hitsFromEmParts);
285 double cosThr)
const;
299 unsigned int testView);
328 detProp, first_clu_idx, fCluHits[first_clu_idx], minSizeCompl, tpc, cryo, first_view);
335 unsigned int preferedView,
336 unsigned int testView,
338 unsigned int cryo)
const;
343 unsigned int testView,
354 unsigned int cryo)
const;
356 int maxCluster(
size_t min_clu_size,
geo::View_t view,
unsigned int tpc,
unsigned int cryo)
const;
361 has(
const std::vector<size_t>& v,
size_t idx)
const 364 if (
c == idx)
return true;
369 std::vector<std::vector<art::Ptr<recob::Hit>>>
fCluHits;
std::vector< std::pair< TVector3, size_t > > getKinks() const
std::map< int, pma::Vector3D > fPfpVtx
recob::Track convertFrom(const pma::Track3D &src, unsigned int tidx, int pdg=0)
geo::GeometryCore const * fGeom
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
size_t fMinSeedSize2ndPass
bool fMatchT0inAPACrossing
double fMinTwoViewFraction
ChannelGroupService::Name Name
std::map< size_t, pma::TrkCandidateColl > tpc_track_map
bool fMatchT0inCPACrossing
std::map< unsigned int, tpc_view_hitmap > cryo_tpc_view_hitmap
pma::PMAlgCosmicTagger fCosmicTagger
std::map< int, std::vector< art::Ptr< recob::Cluster > > > fPfpClusters
double fStitchTransverseShift
std::map< unsigned int, std::vector< size_t > > fTriedClusters
std::vector< double > fAdcValidationThr
std::vector< int > fTrackingOnlyPdg
pma::PMAlgStitching fStitcher
std::map< int, int > fPfpPdgCodes
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices(bool onlyBranching=false) const
float fTrackLikeThreshold
std::vector< int > fTrackingSkipPdg
const std::vector< recob::Wire > & fWires
bool has(const std::vector< size_t > &v, size_t idx) const
pma::ProjectionMatchingAlg fProjectionMatchingAlg
double fMergeTransverseShift
General LArSoft Utilities.
Description of geometry of one entire detector.
std::vector< size_t > fUsedClusters
const pma::TrkCandidateColl & result()
Definition of data types for geometry description.
def validate(nxgraph, desc)
bool has(const std::vector< int > &v, int i) const
std::vector< std::vector< art::Ptr< recob::Hit > > > fCluHits
std::vector< std::vector< art::Ptr< recob::Hit > > > fCluHits
Track finding helper for the Projection Matching Algorithm.
std::vector< float > fCluWeights
Implementation of the Projection Matching Algorithm.
Declaration of signal hit object.
Contains all timing reference information for the detector.
const std::vector< TH1F * > & fAdcInPassingPoints
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
const std::vector< TH1F * > & fAdcInRejectedPoints
Provides recob::Track data product.
std::vector< geo::View_t > fAvailableViews
size_t fMinSeedSize1stPass
pma::TrkCandidateColl fResult
EValidationMode fValidation
LArSoft geometry interface.
pma::PMAlgVertexing fPMAlgVertexing
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
pma::TrkCandidate matchCluster(detinfo::DetectorPropertiesData const &detProp, int first_clu_idx, size_t minSizeCompl, unsigned int tpc, unsigned int cryo, geo::View_t first_view)
pma::cryo_tpc_view_hitmap fHitMap
std::vector< img::DataProviderAlg > fAdcImages