50 int nhits = hits.size();
51 if(nhits <2)
return 0;
53 vector<GlobalPoint> points;
54 vector<GlobalError>
errors;
55 vector<bool> isBarrel;
73 for (vector<const TrackingRecHit*>::const_iterator ih = hits.begin();
74 ih!= hits.end(); ih++)
79 points.push_back(recHit->globalPosition());
80 errors.push_back(recHit->globalPositionError());
81 isBarrel.push_back(recHit->detUnit()->type().isBarrel() );
93 float valPt = (invPt > 1.e-4) ? 1./invPt : 1.e4;
94 float errPt = 0.055*valPt + 0.017*valPt*valPt;
101 float valZip =
getZip(valTip, curvature, points[0],points[1]);
107 valPhi,valTip,valZip);
110 float errTip, errZip;
112 float errPhi = 0.002;
113 float errCotTheta = 0.002;
118 RZLine rzLine(points,errors,isBarrel);
119 float cotTheta, intercept, covss, covii, covsi;
120 rzLine.fit(cotTheta, intercept, covss, covii, covsi);
121 chi2 = rzLine.chi2(cotTheta, intercept);
134 return builder.
build(
pt,
phi, cotTheta, tip, zip, chi2,
T getParameter(std::string const &) const
Global3DPoint GlobalPoint
void getErrTipAndErrZip(float pt, float eta, float &errZip, float &errTip) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
int getCharge(const std::vector< GlobalPoint > &points) const
const TrackerGeometry * theTracker
T inversePt(T curvature, const edm::EventSetup &iSetup)
float getZip(float d0, float curv, const GlobalPoint &inner, const GlobalPoint &outer) const
T curvature(T InversePt, const edm::EventSetup &iSetup)
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
reco::Track * build(const Measurement1D &pt, const Measurement1D &phi, const Measurement1D &cotTheta, const Measurement1D &tip, const Measurement1D &zip, float chi2, int charge, const std::vector< const TrackingRecHit * > &hits, const MagneticField *mf, const GlobalPoint &reference=GlobalPoint(0, 0, 0)) const
float getCotThetaAndUpdateZip(const GlobalPoint &inner, const GlobalPoint &outer, float radius, float phi, float d0, float &zip) const
T y() const
Cartesian y coordinate.
T const * product() const
edm::ParameterSet theConfig
float getPhi(float xC, float yC, int charge) const
const TransientTrackingRecHitBuilder * theTTRecHitBuilder
T x() const
Cartesian x coordinate.
const MagneticField * theField