1 #ifndef TrackVertexArbitration_H 2 #define TrackVertexArbitration_H 86 dRCut (params.getParameter<double>(
"dRCut")),
87 distCut (params.getParameter<double>(
"distCut")),
88 sigCut (params.getParameter<double>(
"sigCut")),
89 dLenFraction (params.getParameter<double>(
"dLenFraction")),
91 fitterTini (params.getParameter<double>(
"fitterTini")),
92 fitterRatio (params.getParameter<double>(
"fitterRatio")),
94 trackMinPt (params.getParameter<double>(
"trackMinPt")),
124 edm::LogError(
"DynamicCastingFailed") <<
"Casting of TransientTrack to CandidatePtrTransientTrack failed!";
145 using namespace reco;
158 std::vector<VTX> recoVertices;
162 std::map<unsigned int, Measurement1D> cachedIP;
163 for(
typename std::vector<VTX>::const_iterator
sv = secondaryVertices.begin();
164 sv != secondaryVertices.end(); ++
sv) {
170 std::vector<reco::TransientTrack> selTracks;
171 for(
unsigned int itrack = 0; itrack < selectedTracks.size(); itrack++){
177 if(cachedIP.find(itrack)!=cachedIP.end()) {
178 ipv=cachedIP[itrack];
181 cachedIP[itrack]=ipvp.second;
187 if(! tsos.isValid())
continue;
189 GlobalError refPointErr = tsos.cartesianError().position();
204 selTracks.push_back(tt);
213 selTracks.push_back(tt);
229 std::cout <<
"t : " << itrack <<
" ref " << ref.key() <<
" w: " << w
240 std::cout <<
" . t : " << itrack <<
" ref " << ref.key()<<
" w: " << w
242 <<
" pvip: " << ipv.
significance() <<
" " << ipv.
value() <<
" dr: " << dR << std::endl;
248 if(selTracks.size() >= 2)
251 singleFitVertex = theAdaptiveFitter.
vertex(selTracks,ssv);
252 if(singleFitVertex.
isValid()) { recoVertices.push_back(VTX(singleFitVertex));
255 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
virtual const daughters & daughterPtrVector() const
references to daughtes
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)
TrackVertexArbitration(const edm::ParameterSet ¶ms)
int numberOfValidPixelHits() const
TrajectoryStateOnSurface impactPointState() const
edm::InputTag beamSpotCollection
edm::InputTag trackCollection
Global3DVector GlobalVector