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"))
20 if (track->hitPattern().trackerLayersWithMeasurement() < 4)
22 if (track->pt() < 0.4 )
24 if (track->hitPattern().numberOfValidPixelHits() < 1)
46 double sigmacut = 3.0;
63 for(std::vector<reco::Vertex>::const_iterator sv = secondaryVertices.begin();
64 sv != secondaryVertices.end(); ++sv) {
72 GlobalPoint ssv(sv->position().x(),sv->position().y(),sv->position().z());
76 std::vector<reco::TransientTrack> selTracks;
77 for(
unsigned int itrack = 0; itrack < selectedTracks.
size(); itrack++){
78 TrackRef ref = (selectedTracks)[itrack];
88 float w = sv->trackWeight(ref);
97 if(( isv.second.value() < ipv.second.value() ) && isv.second.value() <
distCut && isv.second.value() < dlen.
value()*
dLenFraction
104 selTracks.push_back(tt);
108 if(w > 0.5 && isv.second.value() > ipv.second.value() )
std::cout <<
" - ";
112 if(w > 0.5 && isv.second.value() <= ipv.second.value() && dR <
dRCut) {
113 selTracks.push_back(tt);
118 if(w > 0.5 && isv.second.value() <= ipv.second.value() && dR >=
dRCut) {
129 std::cout <<
"t : " << itrack <<
" ref " << ref.
key() <<
" w: " << w
130 <<
" svip: " << isv.second.significance() <<
" " << isv.second.value()
131 <<
" pvip: " << ipv.second.significance() <<
" " << ipv.second.value() <<
" res " << tt.
track().
residualX(0) <<
"," << tt.
track().
residualY(0)
132 <<
" tpvip: " << itpv.second.significance() <<
" " << itpv.second.value() <<
" dr: " << dR << std::endl;
140 std::cout <<
" . t : " << itrack <<
" ref " << ref.
key()<<
" w: " << w
141 <<
" svip: " << isv.second.significance() <<
" " << isv.second.value()
142 <<
" pvip: " << ipv.second.significance() <<
" " << ipv.second.value() <<
" dr: " << dR << std::endl;
148 if(selTracks.size() >= 2)
151 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
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