69 int nhits = hits.size();
70 if(nhits <2)
return 0;
93 for (
auto const & ih : hits)
97 points[
i] = recHit->globalPosition();
98 errors[
i] = recHit->globalPositionError();
99 isBarrel[++
i] = recHit->detUnit()->type().isBarrel();
111 float valPt = (invPt > 1.e-4) ? 1./invPt : 1.e4;
112 float errPt = 0.055*valPt + 0.017*valPt*valPt;
119 float valZip =
getZip(valTip, curvature, points[0],points[1]);
125 valPhi,valTip,valZip);
128 float errTip, errZip;
130 float errPhi = 0.002;
131 float errCotTheta = 0.002;
137 float cotTheta, intercept, covss, covii, covsi;
138 rzLine.fit(cotTheta, intercept, covss, covii, covsi);
139 chi2 = rzLine.chi2(cotTheta, intercept);
T getParameter(std::string const &) const
bool isBarrel(GeomDetEnumerators::SubDetector m)
Global3DPoint GlobalPoint
void getErrTipAndErrZip(float pt, float eta, float &errZip, float &errTip) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
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)
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
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
int getCharge(int phi1, int phi2, int phi3, int phi4, int mode)
T y() const
Cartesian y coordinate.
T const * product() const
edm::ParameterSet theConfig
#define declareDynArray(T, n, x)
float getPhi(float xC, float yC, int charge) const
const TransientTrackingRecHitBuilder * theTTRecHitBuilder
T x() const
Cartesian x coordinate.
const MagneticField * theField