12 #ifndef PMAlgVertexing_h 13 #define PMAlgVertexing_h 38 Name(
"MinTrackLength"),
39 Comment(
"min. length of tracks used to find vtx candidates (short tracks attached later)")
44 Comment(
"detect significant kinks on long tracks")
49 Comment(
"min. angle [deg] in XY of a kink")
54 Comment(
"threshold in no. of stdev of all segment angles needed to tag a kink")
81 const std::vector< TVector3 >& vtx_input);
83 std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > >
89 bool has(
const std::vector<size_t>& v,
size_t idx)
const 91 for (
auto c : v)
if (c == idx)
return true;
97 size_t makeVertices(std::vector< pma::VtxCandidate >& candidates);
103 double convolute(
size_t idx,
size_t len,
double* adc,
double const* shape)
const;
Vertex finding helper for the Projection Matching Algorithm.
pma::TrkCandidateColl fEmTracks
pma::TrkCandidateColl fShortTracks
std::vector< std::pair< TVector3, size_t > > getKinks(const pma::TrkCandidateColl &tracks) const
void collectTracks(pma::TrkCandidateColl &result)
void reconfigure(const Config &config)
fhicl::Atom< double > MinTrackLength
std::vector< std::pair< TVector3, std::vector< std::pair< size_t, bool > > > > getVertices(const pma::TrkCandidateColl &tracks, bool onlyBranching=false) const
PMAlgVertexing(const Config &config)
void findKinksOnTracks(pma::TrkCandidateColl &trk_input) const
Remove penalty on the angle if kink detected and reopt track.
fhicl::Atom< bool > FindKinks
std::vector< std::pair< double, double > > getdQdx(const pma::Track3D &trk) const
Get dQ/dx sequence to detect various features.
pma::TrkCandidateColl fOutTracks
fhicl::Atom< double > KinkMinStd
pma::TrkCandidateColl fExcludedTracks
size_t makeVertices(std::vector< pma::VtxCandidate > &candidates)
Track finding helper for the Projection Matching Algorithm.
double convolute(size_t idx, size_t len, double *adc, double const *shape) const
Get convolution value.
void sortTracks(const pma::TrkCandidateColl &trk_input)
PMAlgVertexing(const fhicl::ParameterSet &pset)
virtual ~PMAlgVertexing(void)
bool isSingleParticle(pma::Track3D *trk1, pma::Track3D *trk2) const
Check if colinear in 3D and dQ/dx with no significant step.
std::vector< pma::VtxCandidate > secondPassCandidates(void)
void splitMergedTracks(pma::TrkCandidateColl &trk_input) const
Split track and add vertex and reoptimize when dQ/dx step detected.
fhicl::Atom< double > KinkMinDeg
size_t run(pma::TrkCandidateColl &trk_input)
std::vector< pma::VtxCandidate > firstPassCandidates(void)
bool has(const std::vector< size_t > &v, size_t idx) const
void mergeBrokenTracks(pma::TrkCandidateColl &trk_input) const