CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TransientTrackKinematicStateBuilder.cc
Go to the documentation of this file.
2 
3 using namespace reco;
4 
5 
7  const ParticleMass& m, float m_sigma) const
8 {
9 // FreeTrajectoryState * recState = track.impactPointState().freeState();
10  return buildState(*(track.impactPointState().freeState()), m, m_sigma);
11 }
12 
15  const KinematicParametersError& er, const TrackCharge& ch,
16  const MagneticField* field) const
17 {
18  return KinematicState(par, er, ch, field);
19 }
20 
22  const GlobalPoint& point, const ParticleMass& m,float m_sigma) const
23 {
24 // FreeTrajectoryState recState = track.trajectoryStateClosestToPoint(point).theState();
25  return buildState( track.trajectoryStateClosestToPoint(point).theState(), m, m_sigma);
26 }
27 
29  const ParticleMass& mass,float m_sigma) const
30 {
31 //building initial kinematic state
32  return buildState(state,mass,m_sigma);
33 }
34 
36  const ParticleMass& mass,float m_sigma, const GlobalPoint& point) const
37 {
38 //building initial kinematic state
39  KinematicState res = buildState(state,mass,m_sigma);
40 
41 //and propagating it to given point if needed
42  GlobalPoint inPos = state.position();
43  if((inPos.x() != point.x())||(inPos.y() != point.y())||(inPos.z() != point.z()))
44  {res = propagator.propagateToTheTransversePCA(res,point);}
45  return res;
46 }
47 
49  const GlobalPoint& point)const
50 {
51  KinematicState nState = propagator.propagateToTheTransversePCA(state, point);
52  return PerigeeKinematicState(nState, point);
53 }
54 using namespace std;
57  const ParticleMass& mass, float m_sigma) const
58 {
59  AlgebraicVector7 par;
61  par(0) = state.position().x();
62  par(1) = state.position().y();
63  par(2) = state.position().z();
64 
65 //getting the state of TransientTrack at the point
66  par(3) = state.momentum().x();
67  par(4) = state.momentum().y();
68  par(5) = state.momentum().z();
69  par(6) = mass;
70 
71 //cartesian covariance matrix (x,y,z,p_x,p_y,p_z)
72 //and mass-related components stays unchanged
73 // if(!state.hasCartesianError()) throw VertexException("KinematicStateClosestToPointBuilder:: FTS passed has no error matrix!");
74 
75  FreeTrajectoryState curvFts(state.parameters(), state.curvilinearError());
76 
77 // cout <<"Transformation\n"<<curvFts.cartesianError().matrix()<<endl;
78  cov.Place_at(curvFts.cartesianError().matrix(),0,0);
79  cov(6,6) = m_sigma * m_sigma;
80 
81 //making parameters & error
82  KinematicParameters wPar(par);
83  KinematicParametersError wEr(cov);
84  return KinematicState(wPar,wEr,state.charge(), &state.parameters().magneticField());
85 }
const GlobalTrajectoryParameters & parameters() const
const FreeTrajectoryState & theState() const
double ParticleMass
Definition: ParticleMass.h:5
T y() const
Definition: PV3DBase.h:62
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
Definition: Matrices.h:8
int TrackCharge
Definition: TrackCharge.h:4
ROOT::Math::SVector< double, 7 > AlgebraicVector7
Definition: Matrices.h:7
FreeTrajectoryState * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:63
GlobalVector momentum() const
GlobalPoint position() const
KinematicState operator()(const reco::TransientTrack &track, const ParticleMass &m, float m_sigma) const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
KinematicState buildState(const FreeTrajectoryState &state, const ParticleMass &mass, float m_sigma) const
char state
Definition: procUtils.cc:75
tuple mass
Definition: scaleCards.py:27
const MagneticField & magneticField() const
TrajectoryStateOnSurface impactPointState() const
T x() const
Definition: PV3DBase.h:61
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5