1 #ifndef TrackVertexArbitration_H 2 #define TrackVertexArbitration_H 85 dRCut (params.getParameter<double>(
"dRCut")),
86 distCut (params.getParameter<double>(
"distCut")),
87 sigCut (params.getParameter<double>(
"sigCut")),
88 dLenFraction (params.getParameter<double>(
"dLenFraction")),
90 fitterTini (params.getParameter<double>(
"fitterTini")),
91 fitterRatio (params.getParameter<double>(
"fitterRatio")),
93 trackMinPt (params.getParameter<double>(
"trackMinPt")),
121 edm::LogError(
"DynamicCastingFailed") <<
"Casting of TransientTrack to CandidatePtrTransientTrack failed!";
142 using namespace reco;
155 std::vector<VTX> recoVertices;
159 std::map<unsigned int, Measurement1D> cachedIP;
160 for(
typename std::vector<VTX>::const_iterator sv = secondaryVertices.begin();
161 sv != secondaryVertices.end(); ++sv) {
163 GlobalPoint ssv(sv->position().x(),sv->position().y(),sv->position().z());
167 std::vector<reco::TransientTrack> selTracks;
168 for(
unsigned int itrack = 0; itrack < selectedTracks.size(); itrack++){
174 if(cachedIP.find(itrack)!=cachedIP.end()) {
175 ipv=cachedIP[itrack];
178 cachedIP[itrack]=ipvp.second;
184 if(! tsos.isValid())
continue;
186 GlobalError refPointErr = tsos.cartesianError().position();
201 selTracks.push_back(tt);
210 selTracks.push_back(tt);
226 std::cout <<
"t : " << itrack <<
" ref " << ref.key() <<
" w: " << w
237 std::cout <<
" . t : " << itrack <<
" ref " << ref.key()<<
" w: " << w
239 <<
" pvip: " << ipv.
significance() <<
" " << ipv.
value() <<
" dr: " << dR << std::endl;
245 if(selTracks.size() >= 2)
248 singleFitVertex = theAdaptiveFitter.
vertex(selTracks,ssv);
249 if(singleFitVertex.
isValid()) { recoVertices.push_back(VTX(singleFitVertex));
252 const VTX & extVertex = recoVertices.back();
reco::Vertex::Point convertPos(const GlobalPoint &p)
void setBeamSpot(const reco::BeamSpot &beamSpot)
bool isValid() const
Make the ReferenceCountingProxy method to check validity public.
TrackBaseRef trackBaseRef() const
reco::Vertex::Error convertError(const GlobalError &ge)
bool trackFilterArbitrator(const reco::TransientTrack &track) const
CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &) const override
const MagneticField * field() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int trackerLayersWithMeasurement() const
const Point & position() const
position
Measurement1D distance(const GlobalPoint &vtx1Position, const GlobalError &vtx1PositionError, const GlobalPoint &vtx2Position, const GlobalError &vtx2PositionError) const override
double pt() const
track transverse momentum
edm::InputTag secondaryVertexCollection
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
CandidatePtr candidate() const override
double deltaR(double eta1, double eta2, double phi1, double phi2)
const BasicTransientTrack * basicTransientTrack() const
double significance() const
float trackWeight(const reco::Vertex &sv, const reco::TransientTrack &track)
const Track & track() const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
edm::InputTag primaryVertexCollection
std::vector< VTX > trackVertexArbitrator(edm::Handle< reco::BeamSpot > &beamSpot, const reco::Vertex &pv, std::vector< reco::TransientTrack > &selectedTracks, std::vector< VTX > &secondaryVertices)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
const daughters & daughterPtrVector() const
references to daughtes
TrackVertexArbitration(const edm::ParameterSet ¶ms)
int numberOfValidPixelHits() const
TrajectoryStateOnSurface impactPointState() const
edm::InputTag beamSpotCollection
edm::InputTag trackCollection
Global3DVector GlobalVector