23 template <
class T>
T inline sqr(
T t) {
return t*
t;}
36 str <<
"\t pt: " << pt.
value() <<
"+/-"<<pt.
error()
37 <<
"\t phi: " << phi.
value() <<
"+/-"<<phi.
error()
38 <<
"\t cot: " << cotTheta.
value() <<
"+/-"<<cotTheta.
error()
39 <<
"\t tip: " << tip.
value() <<
"+/-"<<tip.
error()
40 <<
"\t zip: " << zip.
value() <<
"+/-"<<zip.
error()
53 float cosTheta =
cos(theta);
54 float sinTheta =
sin(theta);
58 float pt_v = track.
pt();
60 float covIPtTheta = track.
covariance(TrackBase::i_qoverp, TrackBase::i_lambda);
61 float errInvPt2 = ( errInvP2
62 +
sqr(cosTheta/pt_v)*errLambda2
63 + 2*(cosTheta/pt_v)*covIPtTheta
71 return print(pt, phi, cotTheta, tip, zip, track.
chi2(), track.
charge());
77 float pt_v = state.globalMomentum().perp();
78 float phi_v = state.globalMomentum().phi();
79 float theta_v = state.globalMomentum().theta();
82 float errPhi2 = curv.
matrix()(3,3);
83 float errLambda2 = curv.
matrix()(2,2);
84 float errInvP2 = curv.
matrix()(1,1);
85 float covIPtTheta = curv.
matrix()(1,2);
86 float cosTheta =
cos(theta_v);
87 float sinTheta =
sin(theta_v);
88 float errInvPt2 = ( errInvP2
89 +
sqr(cosTheta/pt_v)*errLambda2
90 + 2*(cosTheta/pt_v)*covIPtTheta) /
sqr(sinTheta);
91 float errCotTheta =
sqrt(errLambda2)/
sqr(sinTheta) ;
96 float zip_v = state.globalPosition().z();
97 float zip_e =
sqrt( state.localError().matrix()(4,4));
100 float tip_v = state.localPosition().x();
101 int tip_sign = (state.localMomentum().y()*cotTheta.
value() > 0) ? -1 : 1;
102 float tip_e =
sqrt( state.localError().matrix()(3,3) );
105 return print(pt, phi, cotTheta, tip, zip, 0., state.charge());
113 LogTrace(
"")<<
" *** PixelTrackBuilder::checkState: ";
114 LogTrace(
"")<<
"INPUT, ROTATION" << endl<<state.surface().rotation();
115 LogTrace(
"")<<
"INPUT, TSOS:"<<endl<<state;
122 TSCPBuilderNoMaterial tscpBuilder;
124 tscpBuilder(*(state.freeState()), origin);
126 LogTrace(
"")<<
"CHECK-2 FTS: " << fs;
140 const std::vector<const TrackingRecHit* >& hits,
145 LogDebug(
"PixelTrackBuilder::build");
146 LogTrace(
"")<<
"reconstructed TRIPLET kinematics:\n"<<
print(pt,phi,cotTheta,tip,zip,chi2,charge);
149 double cosTheta = cotTheta.
value()*sinTheta;
150 int tipSign = tip.
value() > 0 ? 1 : -1;
154 m(0,0) =
sqr(sinTheta) * (
174 sp*tipSign, -cp*tipSign, 0,
180 Plane impPointPlane(origin, rot);
187 LogTrace(
"")<<
"constructed TSOS :\n"<<
print(impactPointState);
189 int ndof = 2*hits.size()-5;
190 GlobalPoint vv = impactPointState.globalPosition();
196 impactPointState.charge(), impactPointState.curvilinearError());
199 LogTrace(
"") <<
"RECONSTRUCTED TRACK "<<origin<<
"\n"<<
print(*track,origin)<<std::endl;
double d0Error() const
error on d0
Local3DVector LocalVector
const FreeTrajectoryState & theState() const
double theta() const
polar angle
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Sin< T >::type sin(const T &t)
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
double phi() const
azimuthal angle of momentum vector
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
CovarianceMatrix covariance() const
return track covariance matrix
const SurfaceType & surface() const
double chi2() const
chi-squared of the fit
double pt() const
track transverse momentum
Cos< T >::type cos(const T &t)
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
double phiError() const
error on phi
double qoverpError() const
error on signed transverse curvature
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
BasicSingleTrajectoryState BasicTrajectoryStateOnSurface
void addReference() const
double lambdaError() const
error on lambda
const AlgebraicSymMatrix55 & matrix() const
Square< F >::type sqr(const F &f)
const RotationType & rotation() const
int charge() const
track electric charge
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...