6 primaryVertexCollection (params.getParameter<edm::InputTag>(
"primaryVertices")),
7 secondaryVertexCollection (params.getParameter<edm::InputTag>(
"secondaryVertices")),
8 trackCollection (params.getParameter<edm::InputTag>(
"tracks")),
9 beamSpotCollection (params.getParameter<edm::InputTag>(
"beamSpot")),
10 dRCut (params.getParameter<double>(
"dRCut")),
11 distCut (params.getParameter<double>(
"distCut")),
12 sigCut (params.getParameter<double>(
"sigCut")),
13 dLenFraction (params.getParameter<double>(
"dLenFraction")),
14 fitterSigmacut (params.getParameter<double>(
"fitterSigmacut")),
15 fitterTini (params.getParameter<double>(
"fitterTini")),
16 fitterRatio (params.getParameter<double>(
"fitterRatio")),
17 trackMinLayers (params.getParameter<int32_t>(
"trackMinLayers")),
18 trackMinPt (params.getParameter<double>(
"trackMinPt")),
19 trackMinPixels (params.getParameter<int32_t>(
"trackMinPixels"))
26 if (track->hitPattern().trackerLayersWithMeasurement() <
trackMinLayers)
63 std::map<unsigned int, Measurement1D> cachedIP;
64 for(std::vector<reco::Vertex>::const_iterator sv = secondaryVertices.begin();
65 sv != secondaryVertices.end(); ++sv) {
73 GlobalPoint ssv(sv->position().x(),sv->position().y(),sv->position().z());
77 std::vector<reco::TransientTrack> selTracks;
78 for(
unsigned int itrack = 0; itrack < selectedTracks.
size(); itrack++){
79 TrackRef ref = (selectedTracks)[itrack];
89 float w = sv->trackWeight(ref);
91 if(cachedIP.find(itrack)!=cachedIP.end()) {
95 cachedIP[itrack]=ipvp.second;
111 selTracks.push_back(tt);
115 if(w > 0.5 && isv.second.value() > ipv.
value() )
std::cout <<
" - ";
119 if(w > 0.5 && isv.second.value() <= ipv.
value() && dR <
dRCut) {
120 selTracks.push_back(tt);
125 if(w > 0.5 && isv.second.value() <= ipv.
value() && dR >=
dRCut) {
136 std::cout <<
"t : " << itrack <<
" ref " << ref.
key() <<
" w: " << w
137 <<
" svip: " << isv.second.significance() <<
" " << isv.second.value()
147 std::cout <<
" . t : " << itrack <<
" ref " << ref.
key()<<
" w: " << w
148 <<
" svip: " << isv.second.significance() <<
" " << isv.second.value()
149 <<
" pvip: " << ipv.
significance() <<
" " << ipv.
value() <<
" dr: " << dR << std::endl;
155 if(selTracks.size() >= 2)
158 singleFitVertex = theAdaptiveFitter.
vertex(selTracks,ssv);
void setBeamSpot(const reco::BeamSpot &beamSpot)
reco::VertexCollection trackVertexArbitrator(edm::Handle< reco::BeamSpot > &beamSpot, const reco::Vertex &pv, edm::ESHandle< TransientTrackBuilder > &trackBuilder, const edm::RefVector< reco::TrackCollection > &selectedTracks, reco::VertexCollection &secondaryVertices)
std::vector< Vertex > VertexCollection
collection of Vertex objects
const Point & position() const
position
double residualX(int position) const
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const
bool trackFilterArbitrator(const reco::TrackRef &track) const
double significance() const
const Track & track() const
math::XYZTLorentzVectorD p4(float mass=0.13957018, float minWeight=0.5) const
Returns the four momentum of the sum of the tracks, assuming the given mass for the decay products...
key_type key() const
Accessor for product key.
double residualY(int position) const
double deltaR(const Vector1 &v1, const Vector2 &v2)
size_type size() const
Size of the RefVector.
TrackVertexArbitration(const edm::ParameterSet ¶ms)
Global3DVector GlobalVector