54 std::auto_ptr<VertexReconstructor>
vtxReco;
59 beamSpotCollection(params.getParameter<edm::InputTag>(
"beamSpot")),
60 primaryVertexCollection(params.getParameter<edm::InputTag>(
"primaryVertices")),
62 minHits(params.getParameter<unsigned int>(
"minHits")),
63 minPt(params.getParameter<double>(
"minPt")),
64 min3DIPSignificance(params.getParameter<double>(
"seedMin3DIPSignificance")),
65 min3DIPValue(params.getParameter<double>(
"seedMin3DIPValue")),
66 clusterMaxDistance(params.getParameter<double>(
"clusterMaxDistance")),
67 clusterMaxSignificance(params.getParameter<double>(
"clusterMaxSignificance")),
68 clusterScale(params.getParameter<double>(
"clusterScale")),
69 clusterMinAngleCosine(params.getParameter<double>(
"clusterMinAngleCosine")),
70 vertexMinAngleCosine(params.getParameter<double>(
"vertexMinAngleCosine")),
71 vertexMinDLen2DSig(params.getParameter<double>(
"vertexMinDLen2DSig")),
72 vertexMinDLenSig(params.getParameter<double>(
"vertexMinDLenSig")),
76 produces<reco::VertexCollection>();
82 if (track->hitPattern().trackerLayersWithMeasurement() < (int)
minHits)
84 if (track->pt() <
minPt )
94 std::vector<reco::TransientTrack>
result;
99 float pvDistance = ipSeed.second.value();
101 for(std::vector<reco::TransientTrack>::const_iterator tt = tracks.begin();tt!=tracks.end(); ++tt ) {
103 if(*tt==seed)
continue;
109 GlobalError ttPointErr = tt->impactPointState().cartesianError().position();
116 float distanceFromPV = (dist.
points().second-pv).
mag();
118 GlobalVector trackDir2D(tt->impactPointState().globalDirection().x(),tt->impactPointState().globalDirection().y(),0.);
120 float dotprodTrackSeed2D = trackDir2D.
unit().
dot(seedDir2D.
unit());
122 float dotprodTrack = (dist.
points().first-pv).
unit().dot(tt->impactPointState().globalDirection().unit());
125 float w = distanceFromPV*distanceFromPV/(pvDistance*distance);
131 distance*
clusterScale < distanceFromPV*distanceFromPV/pvDistance &&
134 result.push_back(*tt);
135 seedingPoint =
GlobalPoint(
cp.x()*w+seedingPoint.
x(),
cp.y()*w+seedingPoint.
y(),
cp.z()*w+seedingPoint.
z());
141 seedingPoint =
GlobalPoint(seedingPoint.
x()/sumWeights,seedingPoint.
y()/sumWeights,seedingPoint.
z()/sumWeights);
142 return std::pair<std::vector<reco::TransientTrack>,
GlobalPoint>(
result,seedingPoint);
149 using namespace reco;
151 double sigmacut = 3.0;
181 std::vector<TransientTrack> tts;
182 std::vector<TransientTrack> seeds;
184 for(TrackCollection::const_iterator
track =
tracks->begin();
206 for(
unsigned int i = 0;
i < 7;
i++) {
207 for(
unsigned int j = 0;
j < 7;
j++) {
209 cov(
i,
j) = pv.covariance(
i,
j);
217 std::vector< std::vector<TransientTrack> > clusters;
218 for(std::vector<TransientTrack>::const_iterator
s = seeds.begin();
219 s != seeds.end(); ++
s,++
i)
224 if(ntracks.first.size() == 0 )
continue;
225 ntracks.first.push_back(*
s);
226 clusters.push_back(ntracks.first);
227 std::vector<TransientVertex>
vertices;
229 vertices =
vtxReco->vertices(ntracks.first, bs);
231 singleFitVertex = theAdaptiveFitter.
vertex(ntracks.first,ntracks.second);
233 vertices.push_back(singleFitVertex);
239 for(std::vector<TransientVertex>::const_iterator
v = vertices.begin();
240 v != vertices.end(); ++
v) {
251 std::vector<reco::TransientTrack> ts =
v->originalTracks();
252 for(std::vector<reco::TransientTrack>::const_iterator
i = ts.begin();
253 i != ts.end(); ++
i) {
255 float w =
v->trackWeight(*
i);
256 if (w > 0.5) dir+=
i->impactPointState().globalDirection();
262 GlobalPoint ppv(pv.position().x(),pv.position().y(),pv.position().z());
263 GlobalPoint sv((*v).position().x(),(*v).position().y(),(*v).position().z());
267 recoVertices->push_back(*
v);
273 event.put(recoVertices);
virtual float distance() const
virtual Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const
math::Error< dimension >::type CovarianceMatrix
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)
double clusterMaxSignificance
void setBeamSpot(const reco::BeamSpot &beamSpot)
virtual GlobalPoint crossingPoint() const
#define DEFINE_FWK_MODULE(type)
edm::InputTag trackCollection
Global3DPoint GlobalPoint
edm::InputTag primaryVertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
virtual void produce(edm::Event &event, const edm::EventSetup &es)
const Point & position() const
position
double clusterMaxDistance
bool trackFilter(const reco::TrackRef &track) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double clusterMinAngleCosine
double min3DIPSignificance
const CartesianTrajectoryError & cartesianError() const
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const
std::auto_ptr< VertexReconstructor > vtxReco
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
GlobalError position() const
Position error submatrix.
std::pair< std::vector< reco::TransientTrack >, GlobalPoint > nearTracks(const reco::TransientTrack &seed, const std::vector< reco::TransientTrack > &tracks, const reco::Vertex &primaryVertex) const
InclusiveVertexFinder(const edm::ParameterSet ¶ms)
Vector3DBase unit() const
double significance() const
double vertexMinDLen2DSig
edm::InputTag beamSpotCollection
TrajectoryStateOnSurface impactPointState() const
virtual std::pair< GlobalPoint, GlobalPoint > points() const
GlobalVector globalDirection() const
double vertexMinAngleCosine