7 min3DIPSignificance(params.getParameter<double>(
"seedMin3DIPSignificance")),
8 min3DIPValue(params.getParameter<double>(
"seedMin3DIPValue")),
9 clusterMaxDistance(params.getParameter<double>(
"clusterMaxDistance")),
10 clusterMaxSignificance(params.getParameter<double>(
"clusterMaxSignificance")),
11 clusterScale(params.getParameter<double>(
"clusterScale")),
12 clusterMinAngleCosine(params.getParameter<double>(
"clusterMinAngleCosine"))
22 std::vector<reco::TransientTrack>
result;
23 TwoTrackMinimumDistance dist;
27 float pvDistance = ipSeed.second.value();
29 float densityFactor = 2./
sqrt(20.*80);
30 for(std::vector<reco::TransientTrack>::const_iterator
tt = tracks.begin();
tt!=tracks.end(); ++
tt ) {
32 if(*
tt==seed)
continue;
38 GlobalError ttPointErr =
tt->impactPointState().cartesianError().position();
45 float distanceFromPV = (dist.points().second-pv).
mag();
46 float distance = dist.distance();
47 GlobalVector trackDir2D(
tt->impactPointState().globalDirection().x(),
tt->impactPointState().globalDirection().y(),0.);
51 float dotprodTrack = (dist.points().first-pv).
unit().dot(
tt->impactPointState().globalDirection().unit());
54 float w = distanceFromPV*distanceFromPV/(pvDistance*distance);
68 distance*
clusterScale <<
" < " << densityFactor*distanceFromPV <<
" crossingtoPV: " << distanceFromPV <<
" dis*scal " << distance*
clusterScale <<
" < " << densityFactor*distanceFromPV <<
" dist: " << distance <<
" < " <<
clusterMaxDistance << std::endl;
72 result.push_back(*
tt);
73 seedingPoint =
GlobalPoint(
cp.x()*w+seedingPoint.
x(),
cp.y()*w+seedingPoint.
y(),
cp.z()*w+seedingPoint.
z());
79 seedingPoint =
GlobalPoint(seedingPoint.
x()/sumWeights,seedingPoint.
y()/sumWeights,seedingPoint.
z()/sumWeights);
80 return std::pair<std::vector<reco::TransientTrack>,
GlobalPoint>(
result,seedingPoint);
90 const std::vector<reco::TransientTrack> & selectedTracks
94 std::vector<TransientTrack> seeds;
95 for(std::vector<TransientTrack>::const_iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
100 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;
102 seeds.push_back(*it);
109 for(std::vector<TransientTrack>::const_iterator
s = seeds.begin();
110 s != seeds.end(); ++
s, ++
i)
118 ntracks.first.push_back(*
s);
122 aCl.
tracks = ntracks.first;
double clusterMaxSignificance
virtual Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const
std::pair< std::vector< reco::TransientTrack >, GlobalPoint > nearTracks(const reco::TransientTrack &seed, const std::vector< reco::TransientTrack > &tracks, const reco::Vertex &primaryVertex) const
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
reco::TransientTrack seedingTrack
double clusterMaxDistance
double clusterMinAngleCosine
Vector3DBase unit() const
double significance() const
const GlobalError position() const
Position error submatrix.
TracksClusteringFromDisplacedSeed(const edm::ParameterSet ¶ms)
TrajectoryStateOnSurface impactPointState() const
GlobalVector globalDirection() const