7 max3DIPSignificance(params.getParameter<double>(
"seedMax3DIPSignificance")),
8 max3DIPValue(params.getParameter<double>(
"seedMax3DIPValue")),
9 min3DIPSignificance(params.getParameter<double>(
"seedMin3DIPSignificance")),
10 min3DIPValue(params.getParameter<double>(
"seedMin3DIPValue")),
24 std::vector<reco::TransientTrack>
result;
29 float pvDistance = ipSeed.second.value();
30 for(std::vector<reco::TransientTrack>::const_iterator
tt = tracks.begin();
tt!=tracks.end(); ++
tt ) {
32 if(*
tt==seed)
continue;
37 GlobalError ttPointErr =
tt->impactPointState().cartesianError().position();
44 float distanceFromPV = (dist.
points().second-
pv).
mag();
46 GlobalVector trackDir2D(
tt->impactPointState().globalDirection().x(),
tt->impactPointState().globalDirection().y(),0.);
50 float dotprodTrack = (dist.
points().first-
pv).
unit().dot(
tt->impactPointState().globalDirection().unit());
53 float w = distanceFromPV*distanceFromPV/(pvDistance*
distance);
67 distance*
distanceRatio <<
" < " << distanceFromPV <<
" crossingtoPV: " << distanceFromPV <<
" dis*scal " << distance*
distanceRatio <<
" < " << distanceFromPV <<
" dist: " << distance <<
" < " <<
clusterMaxDistance << std::endl;
71 result.push_back(*
tt);
72 seedingPoint =
GlobalPoint(
cp.x()*w+seedingPoint.
x(),
cp.
y()*w+seedingPoint.
y(),
cp.z()*w+seedingPoint.
z());
78 seedingPoint =
GlobalPoint(seedingPoint.
x()/sumWeights,seedingPoint.
y()/sumWeights,seedingPoint.
z()/sumWeights);
79 return std::pair<std::vector<reco::TransientTrack>,
GlobalPoint>(
result,seedingPoint);
93 std::vector<TransientTrack> seeds;
94 for(std::vector<TransientTrack>::const_iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
99 std::cout <<
"new seed " << it-selectedTracks.begin() <<
" ref " << it->trackBaseRef().key() <<
" " << ip.second.value() <<
" " << ip.second.significance() <<
" " << it->track().hitPattern().trackerLayersWithMeasurement() <<
" " << it->track().pt() <<
" " << it->track().eta() << std::endl;
101 seeds.push_back(*it);
108 for(std::vector<TransientTrack>::const_iterator
s = seeds.begin();
109 s != seeds.end(); ++
s, ++
i)
117 ntracks.first.push_back(*
s);
121 aCl.
tracks = ntracks.first;
122 clusters.push_back(aCl);
double clusterMaxSignificance
std::pair< std::vector< reco::TransientTrack >, GlobalPoint > nearTracks(const reco::TransientTrack &seed, const std::vector< reco::TransientTrack > &tracks, const reco::Vertex &primaryVertex) const
double max3DIPSignificance
std::pair< GlobalPoint, GlobalPoint > points() const override
std::vector< Cluster > clusters(const reco::Vertex &pv, const std::vector< reco::TransientTrack > &selectedTracks)
double min3DIPSignificance
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Global3DPoint GlobalPoint
const CartesianTrajectoryError cartesianError() const
std::vector< reco::TransientTrack > tracks
const Point & position() const
position
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
reco::TransientTrack seedingTrack
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
double clusterMaxDistance
GlobalPoint crossingPoint() const override
double clusterMinAngleCosine
float y() const
Same as rapidity().
Vector3DBase unit() const
double significance() const
float distance() const override
const GlobalError position() const
Position error submatrix.
TracksClusteringFromDisplacedSeed(const edm::ParameterSet ¶ms)
TrajectoryStateOnSurface impactPointState() const
GlobalVector globalDirection() const