12 #ifndef PMAlgTracking_h 13 #define PMAlgTracking_h 61 std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > >
65 std::vector< std::pair< TVector3, size_t > >
getKinks(
void)
const 95 Name(
"TrackingOnlyPdg"),
96 Comment(
"PDG list to select which PFParticles should be reconstructed; all PFP's are used if the list is empty or starts with 0")
100 Name(
"TrackingSkipPdg"),
101 Comment(
"PDG list to select which PFParticles should NOT be reconstructed, e.g. skip EM-like if contains 11; no skipping if the list is empty or starts with 0")
105 Name(
"RunVertexing"),
106 Comment(
"find vertices from PFP hierarchy, join with tracks, reoptimize track-vertex structure")
111 const std::vector< recob::Cluster > & clusters,
112 const std::vector< recob::PFParticle > & pfparticles,
124 void buildTracks(
void);
125 void buildShowers(
void);
127 bool has(
const std::vector<int> & v,
int i)
const 129 for (
auto c : v) {
if (c == i)
return true; }
133 std::vector< std::vector< art::Ptr<recob::Hit> > >
fCluHits;
154 Name(
"MinSeedSize1stPass"),
Comment(
"min. cluster size used to start building a track in the 1st pass")
158 Name(
"MinSeedSize2ndPass"),
Comment(
"min. cluster size used to start building a track in the 2nd pass")
162 Name(
"TrackLikeThreshold"),
Comment(
"Threshold for track-like recognition")
166 Name(
"RunVertexing"),
Comment(
"find vertices from PFP hierarchy, join with tracks, reoptimize track-vertex structure")
170 Name(
"FlipToBeam"),
Comment(
"set the track direction to increasing Z values")
174 Name(
"FlipDownward"),
Comment(
"set the track direction to decreasing Y values (like cosmic rays)")
178 Name(
"FlipToX"),
Comment(
"set the track direction to decreasing X values (like cosmic rays in dual phase)")
182 Name(
"AutoFlip_dQdx"),
Comment(
"set the track direction to increasing dQ/dx (overrides FlipToBeam, FlipDownward and FlipToX if significant rise of dQ/dx at the track end)")
186 Name(
"MergeWithinTPC"),
Comment(
"merge witnin single TPC; finds tracks best matching by angle and displacement")
190 Name(
"MergeTransverseShift"),
Comment(
"max. transverse displacement [cm] between tracks")
194 Name(
"MergeAngle"),
Comment(
"max. angle [degree] between tracks (nearest segments)")
198 Name(
"StitchBetweenTPCs"),
Comment(
"stitch between TPCs; finds tracks best matching by angle and displacement")
202 Name(
"StitchDistToWall"),
Comment(
"max. track endpoint distance [cm] to TPC boundary")
206 Name(
"StitchTransverseShift"),
Comment(
"max. transverse displacement [cm] between tracks")
210 Name(
"StitchAngle"),
Comment(
"max. angle [degree] between tracks (nearest segments)")
214 Name(
"MatchT0inAPACrossing"),
Comment(
"match T0 of APA-crossing tracks using PMAlgStitcher")
218 Name(
"MatchT0inCPACrossing"),
Comment(
"match T0 of CPA-crossing tracks using PMAlgStitcher")
222 Name(
"Validation"),
Comment(
"tracks validation mode: hits, adc, calib")
226 Name(
"AdcValidationThr"),
Comment(
"thresholds for not-empty pixel in the ADC track validation")
230 Name(
"AdcImageAlg"),
Comment(
"ADC based image used for the track validation")
241 const std::vector< TH1F* > & hpassing,
const std::vector< TH1F* > & hrejected);
246 const std::vector< float > & trackLike);
267 double& dist,
double& cos3d,
bool& reverseOrder,
268 double distThr,
double distThrMin,
278 double validate(
pma::Track3D& trk,
unsigned int testView);
281 size_t minBuildSize,
unsigned int tpc,
unsigned int cryo);
286 size_t minSizeCompl,
unsigned int tpc,
unsigned int cryo,
geo::View_t first_view);
289 unsigned int tpc,
unsigned int cryo,
geo::View_t first_view)
291 return matchCluster(first_clu_idx, fCluHits[first_clu_idx], minSizeCompl, tpc, cryo, first_view);
295 size_t minSize,
double fraction,
296 unsigned int preferedView,
unsigned int testView,
297 unsigned int tpc,
unsigned int cryo)
const;
301 unsigned int testView,
bool add_nodes);
303 int maxCluster(
int first_idx_tag,
305 float xmin,
float xmax,
size_t min_clu_size,
306 geo::View_t view,
unsigned int tpc,
unsigned int cryo)
const;
308 int maxCluster(
size_t min_clu_size,
309 geo::View_t view,
unsigned int tpc,
unsigned int cryo)
const;
311 void listUsedClusters(
void)
const;
313 bool has(
const std::vector<size_t>& v,
size_t idx)
const 315 for (
auto c : v)
if (c == idx)
return true;
320 std::vector< std::vector< art::Ptr<recob::Hit> > >
fCluHits;
std::vector< std::vector< art::Ptr< recob::Hit > > > fCluHits
recob::Track convertFrom(const pma::Track3D &src, unsigned int tidx, int pdg=0)
geo::GeometryCore const * fGeom
std::vector< std::pair< TVector3, size_t > > getKinks(const pma::TrkCandidateColl &tracks) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
size_t fMinSeedSize2ndPass
Declaration of signal hit object.
bool fMatchT0inAPACrossing
double fMinTwoViewFraction
bool fMatchT0inCPACrossing
const detinfo::DetectorProperties * fDetProp
std::vector< std::vector< art::Ptr< recob::Hit > > > fCluHits
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices(const pma::TrkCandidateColl &tracks, bool onlyBranching=false) const
pma::PMAlgCosmicTagger fCosmicTagger
std::vector< std::pair< TVector3, size_t > > getKinks(void) const
double fStitchTransverseShift
std::map< int, pma::Vector3D > fPfpVtx
std::vector< double > fAdcValidationThr
std::vector< int > fTrackingOnlyPdg
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< float > fCluWeights
pma::PMAlgStitching fStitcher
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
pma::TrkCandidate matchCluster(int first_clu_idx, size_t minSizeCompl, unsigned int tpc, unsigned int cryo, geo::View_t first_view)
std::map< int, int > fPfpPdgCodes
Description of geometry of one entire detector.
Declaration of cluster object.
Provides recob::Track data product.
bool has(const std::vector< int > &v, int i) const
Encapsulate the geometry of a wire.
Track finding helper for the Projection Matching Algorithm.
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices(bool onlyBranching=false) const
std::vector< img::DataProviderAlg > fAdcImages
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
std::map< unsigned int, std::vector< size_t > > fTriedClusters
void guideEndpoints(pma::TrkCandidateColl &tracks)
std::map< size_t, pma::TrkCandidateColl > tpc_track_map
std::vector< geo::View_t > fAvailableViews
PMAlgTrackingBase(const std::vector< art::Ptr< recob::Hit > > &allhitlist, const pma::ProjectionMatchingAlg::Config &pmalgConfig, const pma::PMAlgVertexing::Config &pmvtxConfig)
const pma::TrkCandidateColl & result(void)
size_t fMinSeedSize1stPass
pma::TrkCandidateColl fResult
std::vector< size_t > fUsedClusters
std::map< unsigned int, tpc_view_hitmap > cryo_tpc_view_hitmap
EValidationMode fValidation
const std::vector< TH1F * > & fAdcInPassingPoints
const std::vector< TH1F * > & fAdcInRejectedPoints
pma::PMAlgVertexing fPMAlgVertexing
art framework interface to geometry description
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
pma::cryo_tpc_view_hitmap fHitMap
Encapsulate the construction of a single detector plane.
std::map< int, std::vector< art::Ptr< recob::Cluster > > > fPfpClusters