21 std::cout <<
"TrackClusterizerInZ: algorithm=gap, zSeparation=" << zSep << std::endl;
28 vector<reco::TransientTrack> tks =
tracks;
30 vector<vector<reco::TransientTrack> >
clusters;
35 stable_sort(tks.begin(), tks.end(), recTrackLessZ);
38 vector<reco::TransientTrack>::const_iterator it = tks.begin();
39 vector<reco::TransientTrack> currentCluster;
40 currentCluster.push_back(*it);
43 for (; it != tks.end(); it++) {
44 double zPrev = currentCluster.back().stateAtBeamLine().trackStateAtPCA().position().z();
45 double zCurr = (*it).stateAtBeamLine().trackStateAtPCA().position().z();
49 currentCluster.push_back(*it);
53 currentCluster.clear();
54 currentCluster.push_back(*it);
65 desc.add<
double>(
"zSeparation", 1.0);
66 desc.addUntracked<
bool>(
"verbose",
false);
T getParameter(std::string const &) const
GapClusterizerInZ(const edm::ParameterSet &conf)
TrajectoryStateClosestToBeamLine stateAtBeamLine() const
T getUntrackedParameter(std::string const &, T const &) const
GlobalPoint position() const
Abs< T >::type abs(const T &t)
FTS const & trackStateAtPCA() const
auto const & tracks
cannot be loose
float zSeparation() const
static void fillPSetDescription(edm::ParameterSetDescription &desc)
std::vector< std::vector< reco::TransientTrack > > clusterize(const std::vector< reco::TransientTrack > &tracks) const override