CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
ParticleKinematicLinearizedTrackState Class Reference

#include <ParticleKinematicLinearizedTrackState.h>

Inheritance diagram for ParticleKinematicLinearizedTrackState:
LinearizedTrackState< 6 > ReferenceCounted

Public Types

typedef
ReferenceCountingPointer
< LinearizedTrackState< 6 > > 
RefCountedLinearizedTrackState
 
- Public Types inherited from LinearizedTrackState< 6 >
typedef ROOT::Math::SMatrix
< double, N-2,
3, ROOT::Math::MatRepStd
< double, N-2, 3 > > 
AlgebraicMatrixM3
 
typedef ROOT::Math::SMatrix
< double, N,
3, ROOT::Math::MatRepStd
< double, N, 3 > > 
AlgebraicMatrixN3
 
typedef ROOT::Math::SMatrix
< double, N, N-2,
ROOT::Math::MatRepStd< double,
N, N-2 > > 
AlgebraicMatrixNM
 
typedef ROOT::Math::SMatrix
< double, N-2, N-2,
ROOT::Math::MatRepSym< double,
N-2 > > 
AlgebraicSymMatrixMM
 
typedef ROOT::Math::SMatrix
< double, N, N,
ROOT::Math::MatRepSym< double,
N > > 
AlgebraicSymMatrixNN
 
typedef ROOT::Math::SMatrix
< double, N+1, N+1,
ROOT::Math::MatRepSym< double,
N+1 > > 
AlgebraicSymMatrixOO
 
typedef ROOT::Math::SVector
< double, N-2 > 
AlgebraicVectorM
 
typedef ROOT::Math::SVector
< double, N
AlgebraicVectorN
 
typedef
ReferenceCountingPointer
< RefittedTrackState< N > > 
RefCountedRefittedTrackState
 

Public Member Functions

TrackCharge charge () const
 
virtual void checkParameters (AlgebraicVectorN &parameters) const
 
std::vector
< ReferenceCountingPointer
< LinearizedTrackState< 6 > > > 
components () const
 
const AlgebraicVector6constantTerm () const
 
RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrix77 &covarianceMatrix) const
 
bool hasError () const
 
const GlobalPointlinearizationPoint () const
 
virtual const AlgebraicMatrix64momentumJacobian () const
 
bool operator== (LinearizedTrackState< 6 > &other) const
 
const AlgebraicVector6parametersFromExpansion () const
 
RefCountedKinematicParticle particle () const
 
 ParticleKinematicLinearizedTrackState ()
 
virtual const AlgebraicMatrix63positionJacobian () const
 
AlgebraicSymMatrix66 predictedStateError () const
 
AlgebraicSymMatrix44 predictedStateMomentumError () const
 
AlgebraicVectorM predictedStateMomentumParameters () const
 
AlgebraicVector6 predictedStateParameters () const
 
AlgebraicSymMatrix66 predictedStateWeight (int &error) const
 
virtual AlgebraicVectorN refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const
 
virtual
ReferenceCountingPointer
< LinearizedTrackState< 6 > > 
stateWithNewLinearizationPoint (const GlobalPoint &newLP) const
 
virtual reco::TransientTrack track () const
 
double weightInMixture () const
 
- Public Member Functions inherited from LinearizedTrackState< 6 >
virtual
RefCountedRefittedTrackState 
createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const =0
 
virtual bool isValid () const
 
virtual bool operator== (LinearizedTrackState< N > &other) const =0
 
virtual ~LinearizedTrackState ()
 

Private Member Functions

void computeChargedJacobians () const
 
void computeJacobians () const
 
void computeNeutralJacobians () const
 
 ParticleKinematicLinearizedTrackState (const GlobalPoint &linP, RefCountedKinematicParticle &prt)
 

Private Attributes

TransientTrackKinematicStateBuilder builder
 
bool errorAvailable
 
bool impactPointAvailable
 
bool jacobiansAvailable
 
RefCountedKinematicParticle part
 
TrackCharge theCharge
 
AlgebraicVector6 theConstantTerm
 
AlgebraicVector6 theExpandedParams
 
GlobalPoint theLinPoint
 
AlgebraicMatrix64 theMomentumJacobian
 
AlgebraicMatrix63 thePositionJacobian
 
PerigeeKinematicState thePredState
 

Friends

class ParticleKinematicLinearizedTrackStateFactory
 

Detailed Description

Definition at line 13 of file ParticleKinematicLinearizedTrackState.h.

Member Typedef Documentation

Definition at line 18 of file ParticleKinematicLinearizedTrackState.h.

Constructor & Destructor Documentation

ParticleKinematicLinearizedTrackState::ParticleKinematicLinearizedTrackState ( )
inline
ParticleKinematicLinearizedTrackState::ParticleKinematicLinearizedTrackState ( const GlobalPoint linP,
RefCountedKinematicParticle prt 
)
inlineprivate

Constructor with the linearization point and the track. Private, can only be used by LinearizedTrackFactory.

Definition at line 124 of file ParticleKinematicLinearizedTrackState.h.

Member Function Documentation

TrackCharge ParticleKinematicLinearizedTrackState::charge ( void  ) const
virtual

Method returning the impact point measurement

Implements LinearizedTrackState< 6 >.

Definition at line 54 of file ParticleKinematicLinearizedTrackState.cc.

Referenced by createRefittedTrackState().

55 {return part->initialState().particleCharge();}
part
Definition: HCALResponse.h:21
void ParticleKinematicLinearizedTrackState::checkParameters ( AlgebraicVectorN parameters) const
inlinevirtual

Reimplemented from LinearizedTrackState< 6 >.

Definition at line 185 of file ParticleKinematicLinearizedTrackState.cc.

References M_PI, and Parameters::parameters.

186 {
187  if (parameters(2) > M_PI) parameters(2)-= 2*M_PI;
188  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
189 }
dictionary parameters
Definition: Parameters.py:2
#define M_PI
Definition: BFit3D.cc:3
std::vector< ReferenceCountingPointer< LinearizedTrackState< 6 > > > ParticleKinematicLinearizedTrackState::components ( ) const
virtual

Implements LinearizedTrackState< 6 >.

Definition at line 151 of file ParticleKinematicLinearizedTrackState.cc.

152 {
153  std::vector<ReferenceCountingPointer<LinearizedTrackState<6> > > res;
154  res.reserve(1);
155  res.push_back(RefCountedLinearizedTrackState(
156  const_cast< ParticleKinematicLinearizedTrackState*>(this)));
157  return res;
158 }
ReferenceCountingPointer< LinearizedTrackState< 6 > > RefCountedLinearizedTrackState
void ParticleKinematicLinearizedTrackState::computeChargedJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for charged particles.

Definition at line 192 of file ParticleKinematicLinearizedTrackState.cc.

References abs, funct::cos(), KinematicState::globalMomentum(), KinematicState::globalPosition(), M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), mathSSE::sqrt(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, PerigeeKinematicState::theState(), PV3DBase< T, PVType, FrameType >::theta(), X, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

193 {
194  GlobalPoint paramPt(theLinPoint);
195 
196  double field = part->currentState().magneticField()->inInverseGeV(thePredState.theState().globalPosition()).z();
197  double signTC = -part->currentState().particleCharge();
198 
199  double thetaAtEP = thePredState.theState().globalMomentum().theta();
200  double phiAtEP = thePredState.theState().globalMomentum().phi();
201  double ptAtEP = thePredState.theState().globalMomentum().perp();
202  double transverseCurvatureAtEP = field / ptAtEP*signTC;
203 
204  double x_v = thePredState.theState().globalPosition().x();
205  double y_v = thePredState.theState().globalPosition().y();
206  double z_v = thePredState.theState().globalPosition().z();
207  double X = x_v - paramPt.x() - sin(phiAtEP) / transverseCurvatureAtEP;
208  double Y = y_v - paramPt.y() + cos(phiAtEP) / transverseCurvatureAtEP;
209  double SS = X*X + Y*Y;
210  double S = sqrt(SS);
211 
212 // The track parameters at the expansion point
213  theExpandedParams[0] = transverseCurvatureAtEP;
214  theExpandedParams[1] = thetaAtEP;
215  theExpandedParams[3] = 1/transverseCurvatureAtEP - signTC * S;
216 
217  theExpandedParams[5] = part->currentState().mass();
218 
219  double phiFEP;
220  if (std::abs(X)>std::abs(Y)) {
221  double signX = (X>0.0? +1.0:-1.0);
222  phiFEP = -signTC * signX*acos(signTC*Y/S);
223  } else {
224  phiFEP = asin(-signTC*X/S);
225  if ((signTC*Y)<0.0)
226  phiFEP = M_PI - phiFEP;
227  }
228  if (phiFEP>M_PI) phiFEP-= 2*M_PI;
229  theExpandedParams[2] = phiFEP;
230  theExpandedParams[4] = z_v - paramPt.z() -
231  (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP)/transverseCurvatureAtEP;
232 
233  thePositionJacobian(2, 0) = - Y / (SS);
234  thePositionJacobian(2, 1) = X / (SS);
235  thePositionJacobian(3, 0) = - signTC * X / S;
236  thePositionJacobian(3, 1) = - signTC * Y / S;
237  thePositionJacobian(4, 0) = thePositionJacobian(2, 0)/tan(thetaAtEP)/transverseCurvatureAtEP;
238  thePositionJacobian(4, 1) = thePositionJacobian(2, 1)/tan(thetaAtEP)/transverseCurvatureAtEP;
239  thePositionJacobian(4, 2) = 1;
240 
241 //debug code - to be removed later
242 // cout<<"parameters for momentum jacobian: X "<<X<<endl;
243 // cout<<"parameters for momentum jacobian: Y "<<Y<<endl;
244 // cout<<"parameters for momentum jacobian: SS "<<SS<<endl;
245 // cout<<"parameters for momentum jacobian: PhiAtEP "<<phiAtEP<<endl;
246 // cout<<"parameters for momentum jacobian: curv "<<transverseCurvatureAtEP<<endl;
247 // cout<<"sin phi Atep "<<sin(phiAtEP)<<endl;
248 // cout<<"cos phi at EP "<<cos(phiAtEP)<<endl;
249 // cout<<"upper part is "<<X*cos(phiAtEP) + Y*sin(phiAtEP) <<endl;
250 // cout<<"lower part is"<<SS*transverseCurvatureAtEP*transverseCurvatureAtEP<<endl;
251 
252  theMomentumJacobian(0, 0) = 1;
253  theMomentumJacobian(1, 1) = 1;
254 
255  theMomentumJacobian(2, 0) = -
256  (X*cos(phiAtEP) + Y*sin(phiAtEP))/
257  (SS*transverseCurvatureAtEP*transverseCurvatureAtEP);
258 
259  theMomentumJacobian(2, 2) = (Y*cos(phiAtEP) - X*sin(phiAtEP)) /
260  (SS*transverseCurvatureAtEP);
261 
262  theMomentumJacobian(3, 0) =
263  (signTC * (Y*cos(phiAtEP) - X*sin(phiAtEP)) / S - 1)/
264  (transverseCurvatureAtEP*transverseCurvatureAtEP);
265 
266  theMomentumJacobian(3, 2) = signTC *(X*cos(phiAtEP) + Y*sin(phiAtEP))/
267  (S*transverseCurvatureAtEP);
268 
269  theMomentumJacobian(4, 0) = (phiAtEP - theExpandedParams(2)) /
270  tan(thetaAtEP)/(transverseCurvatureAtEP*transverseCurvatureAtEP)+
271  theMomentumJacobian(2, 0) / tan(thetaAtEP)/transverseCurvatureAtEP;
272 
273  theMomentumJacobian(4, 1) = (phiAtEP - theExpandedParams(2)) *
274  (1 + 1/(tan(thetaAtEP)*tan(thetaAtEP)))/transverseCurvatureAtEP;
275 
276  theMomentumJacobian(4, 2) = (theMomentumJacobian(2, 2) - 1) /
277  tan(thetaAtEP)/transverseCurvatureAtEP;
278 
279 
280  theMomentumJacobian(5, 3) = 1;
281 
282 // And finally the residuals:
283  AlgebraicVector3 expansionPoint;
284  expansionPoint[0] = thePredState.theState().globalPosition().x();
285  expansionPoint[1] = thePredState.theState().globalPosition().y();
286  expansionPoint[2] = thePredState.theState().globalPosition().z();
287  AlgebraicVector4 momentumAtExpansionPoint;
288  momentumAtExpansionPoint[0] = transverseCurvatureAtEP; // Transverse Curv
289  momentumAtExpansionPoint[1] = thetaAtEP;
290  momentumAtExpansionPoint[2] = phiAtEP;
291  momentumAtExpansionPoint[3] = theExpandedParams[5];
292 
294  thePositionJacobian * expansionPoint -
295  theMomentumJacobian * momentumAtExpansionPoint );
296 }
const KinematicState theState() const
T perp() const
Definition: PV3DBase.h:71
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
T y() const
Definition: PV3DBase.h:62
#define X(str)
Definition: MuonsGrabber.cc:49
#define abs(x)
Definition: mlp_lapack.h:159
GlobalVector globalMomentum() const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
double double double z
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
T sqrt(T t)
Definition: SSEVec.h:46
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
#define M_PI
Definition: BFit3D.cc:3
part
Definition: HCALResponse.h:21
ROOT::Math::SVector< double, 4 > AlgebraicVector4
T x() const
Definition: PV3DBase.h:61
GlobalPoint globalPosition() const
void ParticleKinematicLinearizedTrackState::computeJacobians ( ) const
private

Method calculating the track parameters and the Jacobians.

Definition at line 81 of file ParticleKinematicLinearizedTrackState.cc.

References abs, builder, computeChargedJacobians(), computeNeutralJacobians(), alignCSCRings::e, jacobiansAvailable, theCharge, theLinPoint, and thePredState.

Referenced by constantTerm(), hasError(), momentumJacobian(), parametersFromExpansion(), positionJacobian(), predictedStateError(), predictedStateMomentumError(), predictedStateMomentumParameters(), predictedStateParameters(), and predictedStateWeight().

82 {
83  GlobalPoint paramPt(theLinPoint);
84  thePredState = builder(part->currentState(), paramPt);
85 // bool valid = thePredState.isValid();
86 // if (!valid) std::cout <<"Help!!!!!!!!! State is invalid\n";
87 // if (!valid) return;
88  if (std::abs(theCharge)<1e-5) {
89 
90 //neutral track
92  }else{
93 
94 //charged track
96  }
97  jacobiansAvailable = true;
98 }
#define abs(x)
Definition: mlp_lapack.h:159
part
Definition: HCALResponse.h:21
void ParticleKinematicLinearizedTrackState::computeNeutralJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for neutral particles.

Definition at line 299 of file ParticleKinematicLinearizedTrackState.cc.

References funct::cos(), KinematicState::globalMomentum(), KinematicState::globalPosition(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, PerigeeKinematicState::theState(), PV3DBase< T, PVType, FrameType >::theta(), X, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

300 {
301  GlobalPoint paramPt(theLinPoint);
302  double thetaAtEP = thePredState.theState().globalMomentum().theta();
303  double phiAtEP = thePredState.theState().globalMomentum().phi();
304  double ptAtEP = thePredState.theState().globalMomentum().perp();
305 
306 
307  double x_v = thePredState.theState().globalPosition().x();
308  double y_v = thePredState.theState().globalPosition().y();
309  double z_v = thePredState.theState().globalPosition().z();
310  double X = x_v - paramPt.x();
311  double Y = y_v - paramPt.y();
312 
313 // The track parameters at the expansion point
314  theExpandedParams[0] = 1 / ptAtEP;
315  theExpandedParams[1] = thetaAtEP;
316  theExpandedParams[2] = phiAtEP;
317  theExpandedParams[3] = X*sin(phiAtEP) - Y*cos(phiAtEP);
318  theExpandedParams[4] = z_v - paramPt.z() -
319  (X*cos(phiAtEP) + Y*sin(phiAtEP)) / tan(thetaAtEP);
320  theExpandedParams[5] = part->currentState().mass();
321 
322 // The Jacobian: (all at the expansion point)
323 // [i,j]
324 // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
325 // j = 0: x_v, 1: y_v, 2: z_v
326  thePositionJacobian(3, 0) = sin(phiAtEP);
327  thePositionJacobian(3, 1) = - cos(phiAtEP);
328  thePositionJacobian(4, 0) = - cos(phiAtEP)/tan(thetaAtEP);
329  thePositionJacobian(4, 1) = - sin(phiAtEP)/tan(thetaAtEP);
330  thePositionJacobian(4, 2) = 1;
331 
332 // [i,j]
333 // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
334 // j = 0: rho = 1/pt , 1: theta, 2: phi_v
335  theMomentumJacobian(0, 0) = 1;
336  theMomentumJacobian(1, 1) = 1;
337  theMomentumJacobian(2, 2) = 1;
338 
339  theMomentumJacobian(3, 2) = X*cos(phiAtEP) + Y*sin(phiAtEP);
341  (1 + 1/(tan(thetaAtEP)*tan(thetaAtEP)));
342 
343  theMomentumJacobian(4, 2) = (X*sin(phiAtEP) - Y*cos(phiAtEP))/tan(thetaAtEP);
344  theMomentumJacobian(5, 3) = 1;
345 
346 // And finally the residuals:
347  AlgebraicVector3 expansionPoint;
348  expansionPoint[0] = thePredState.theState().globalPosition().x();
349  expansionPoint[1] = thePredState.theState().globalPosition().y();
350  expansionPoint[2] = thePredState.theState().globalPosition().z();
351  AlgebraicVector4 momentumAtExpansionPoint;
352  momentumAtExpansionPoint[0] = 1 / ptAtEP;
353  momentumAtExpansionPoint[1] = thetaAtEP;
354  momentumAtExpansionPoint[2] = phiAtEP;
355  momentumAtExpansionPoint[3] = theExpandedParams[5];
356 
358  thePositionJacobian * expansionPoint -
359  theMomentumJacobian * momentumAtExpansionPoint );
360 }
const KinematicState theState() const
T perp() const
Definition: PV3DBase.h:71
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
T y() const
Definition: PV3DBase.h:62
#define X(str)
Definition: MuonsGrabber.cc:49
GlobalVector globalMomentum() const
ROOT::Math::SVector< double, 6 > AlgebraicVector6
Geom::Theta< T > theta() const
Definition: PV3DBase.h:74
T z() const
Definition: PV3DBase.h:63
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
part
Definition: HCALResponse.h:21
ROOT::Math::SVector< double, 4 > AlgebraicVector4
T x() const
Definition: PV3DBase.h:61
GlobalPoint globalPosition() const
const AlgebraicVector6 & ParticleKinematicLinearizedTrackState::constantTerm ( ) const
virtual

Method returning the constant term of the Taylor expansion of measurement equation

Implements LinearizedTrackState< 6 >.

Definition at line 5 of file ParticleKinematicLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, and theConstantTerm.

Referenced by refittedParamFromEquation().

ParticleKinematicLinearizedTrackState::RefCountedRefittedTrackState ParticleKinematicLinearizedTrackState::createRefittedTrackState ( const GlobalPoint vertexPosition,
const AlgebraicVectorM vectorParameters,
const AlgebraicSymMatrix77 covarianceMatrix 
) const

Definition at line 109 of file ParticleKinematicLinearizedTrackState.cc.

References charge(), conversions_cfi::conversions, KinematicPerigeeConversions::kinematicState(), and lst.

112 {
114  KinematicState lst = conversions.kinematicState(vectorParameters, vertexPosition,
115  charge(), covarianceMatrix, part->currentState().magneticField());
117  return rst;
118 }
int lst[30]
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
KinematicState kinematicState(const AlgebraicVector4 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix77 &theCovarianceMatrix, const MagneticField *field) const
part
Definition: HCALResponse.h:21
bool ParticleKinematicLinearizedTrackState::hasError ( void  ) const
virtual
const GlobalPoint& ParticleKinematicLinearizedTrackState::linearizationPoint ( ) const
inlinevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 6 >.

Definition at line 33 of file ParticleKinematicLinearizedTrackState.h.

References theLinPoint.

const AlgebraicMatrix64 & ParticleKinematicLinearizedTrackState::momentumJacobian ( ) const
virtual
bool ParticleKinematicLinearizedTrackState::operator== ( LinearizedTrackState< 6 > &  other) const

Definition at line 60 of file ParticleKinematicLinearizedTrackState.cc.

References particle().

61 {
63  dynamic_cast<const ParticleKinematicLinearizedTrackState*>(&other);
64  if (otherP == 0) {
65  throw VertexException(" ParticleKinematicLinearizedTrackState:: don't know how to compare myself to non-kinematic track state");
66  }
67  return (*(otherP->particle()) == *part);}
Common base class.
part
Definition: HCALResponse.h:21
const AlgebraicVector6 & ParticleKinematicLinearizedTrackState::parametersFromExpansion ( ) const
virtual
RefCountedKinematicParticle ParticleKinematicLinearizedTrackState::particle ( ) const

Definition at line 57 of file ParticleKinematicLinearizedTrackState.cc.

References part.

Referenced by operator==().

58 {return part;}
const AlgebraicMatrix63 & ParticleKinematicLinearizedTrackState::positionJacobian ( ) const
virtual
AlgebraicSymMatrix66 ParticleKinematicLinearizedTrackState::predictedStateError ( ) const
virtual
AlgebraicSymMatrix44 ParticleKinematicLinearizedTrackState::predictedStateMomentumError ( ) const
virtual

4x4 error matrix ofe xtended perigee mometum components

Implements LinearizedTrackState< 6 >.

Definition at line 131 of file ParticleKinematicLinearizedTrackState.cc.

References computeJacobians(), error, jacobiansAvailable, PerigeeKinematicState::perigeeError(), thePredState, and ExtendedPerigeeTrajectoryError::weightMatrix().

132 {
133  int error;
138  res.Place_at(m3,0,0);
139  res(3,0) = thePredState.perigeeError().weightMatrix(error)(5,5);
140  res(3,1) = thePredState.perigeeError().weightMatrix(error)(5,0);
141  res(3,2) = thePredState.perigeeError().weightMatrix(error)(5,1);
142  res(3,3) = thePredState.perigeeError().weightMatrix(error)(5,2);
143  return res;
144 }
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
const AlgebraicSymMatrix66 & weightMatrix(int &error) const
const ExtendedPerigeeTrajectoryError & perigeeError() const
AlgebraicVector4 ParticleKinematicLinearizedTrackState::predictedStateMomentumParameters ( ) const
virtual

returns predicted 4-momentum in extended perigee parametrization

Implements LinearizedTrackState< 6 >.

Definition at line 120 of file ParticleKinematicLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, PerigeeKinematicState::perigeeParameters(), thePredState, and ExtendedPerigeeTrajectoryParameters::vector().

Referenced by refittedParamFromEquation().

121 {
123  AlgebraicVector4 res;
124  res[0] = thePredState.perigeeParameters().vector()(0);
125  res[1] = thePredState.perigeeParameters().vector()(1);
126  res[2] = thePredState.perigeeParameters().vector()(2);
127  res[3] = thePredState.perigeeParameters().vector()(5);
128  return res;
129 }
const ExtendedPerigeeTrajectoryParameters & perigeeParameters() const
ROOT::Math::SVector< double, 4 > AlgebraicVector4
AlgebraicVector6 ParticleKinematicLinearizedTrackState::predictedStateParameters ( ) const
virtual

Method returning the track state at the point of closest approach to the linearization point, in the transverse plane (a.k.a. transverse impact point). extended perigee predicted parameters

Implements LinearizedTrackState< 6 >.

Definition at line 29 of file ParticleKinematicLinearizedTrackState.cc.

References computeJacobians(), jacobiansAvailable, PerigeeKinematicState::perigeeParameters(), thePredState, and ExtendedPerigeeTrajectoryParameters::vector().

AlgebraicSymMatrix66 ParticleKinematicLinearizedTrackState::predictedStateWeight ( int &  error) const
virtual

Full predicted weight matrix

Implements LinearizedTrackState< 6 >.

Definition at line 35 of file ParticleKinematicLinearizedTrackState.cc.

References computeJacobians(), i, jacobiansAvailable, PerigeeKinematicState::perigeeError(), thePredState, ExtendedPerigeeTrajectoryError::weightMatrix(), and detailsBasic3DVector::z.

36 {
38  int i = 0;
40  error = i;
41  return z;
42 // return thePredState.perigeeError().weightMatrix(error);
43 }
int i
Definition: DBlmapReader.cc:9
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
double double double z
const AlgebraicSymMatrix66 & weightMatrix(int &error) const
const ExtendedPerigeeTrajectoryError & perigeeError() const
AlgebraicVector6 ParticleKinematicLinearizedTrackState::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
virtual

Method returning the parameters of the Taylor expansion evaluated with the refitted state.

Implements LinearizedTrackState< 6 >.

Definition at line 161 of file ParticleKinematicLinearizedTrackState.cc.

References constantTerm(), M_PI, momentumJacobian(), positionJacobian(), and predictedStateMomentumParameters().

163 {
164  AlgebraicVectorM momentum = theRefittedState->momentumVector();
165  if ((momentum(2)*predictedStateMomentumParameters()(2) < 0)&&(std::fabs(momentum(2))>M_PI/2) ) {
166  if (predictedStateMomentumParameters()(2) < 0.) momentum(2)-= 2*M_PI;
167  if (predictedStateMomentumParameters()(2) > 0.) momentum(2)+= 2*M_PI;
168  }
169 
170  AlgebraicVector3 vertexPosition;
171  vertexPosition(0) = theRefittedState->position().x();
172  vertexPosition(1) = theRefittedState->position().y();
173  vertexPosition(2) = theRefittedState->position().z();
174  AlgebraicVector6 param = constantTerm() +
175  positionJacobian() * vertexPosition +
176  momentumJacobian() * momentum;
177 
178  if (param(2) > M_PI) param(2)-= 2*M_PI;
179  if (param(2) < -M_PI) param(2)+= 2*M_PI;
180 
181  return param;
182 }
ROOT::Math::SVector< double, 6 > AlgebraicVector6
virtual const AlgebraicMatrix64 & momentumJacobian() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, N-2 > AlgebraicVectorM
virtual const AlgebraicMatrix63 & positionJacobian() const
#define M_PI
Definition: BFit3D.cc:3
ReferenceCountingPointer< LinearizedTrackState< 6 > > ParticleKinematicLinearizedTrackState::stateWithNewLinearizationPoint ( const GlobalPoint newLP) const
virtual

Returns a new linearized state with respect to a new linearization point. A new object of the same type is returned, without change to the existing one.

Implements LinearizedTrackState< 6 >.

Definition at line 102 of file ParticleKinematicLinearizedTrackState.cc.

reco::TransientTrack ParticleKinematicLinearizedTrackState::track ( void  ) const
virtual

Implements LinearizedTrackState< 6 >.

Definition at line 362 of file ParticleKinematicLinearizedTrackState.cc.

363 {
364  throw VertexException(" ParticleKinematicLinearizedTrackState:: no TransientTrack to return");
365 }
Common base class.
double ParticleKinematicLinearizedTrackState::weightInMixture ( ) const
virtual

Implements LinearizedTrackState< 6 >.

Definition at line 146 of file ParticleKinematicLinearizedTrackState.cc.

147 {return 1.;}

Friends And Related Function Documentation

Definition at line 17 of file ParticleKinematicLinearizedTrackState.h.

Member Data Documentation

TransientTrackKinematicStateBuilder ParticleKinematicLinearizedTrackState::builder
private

Definition at line 147 of file ParticleKinematicLinearizedTrackState.h.

Referenced by computeJacobians().

bool ParticleKinematicLinearizedTrackState::errorAvailable
mutableprivate

Definition at line 149 of file ParticleKinematicLinearizedTrackState.h.

bool ParticleKinematicLinearizedTrackState::impactPointAvailable
mutableprivate

Definition at line 159 of file ParticleKinematicLinearizedTrackState.h.

bool ParticleKinematicLinearizedTrackState::jacobiansAvailable
mutableprivate
RefCountedKinematicParticle ParticleKinematicLinearizedTrackState::part
private

Definition at line 146 of file ParticleKinematicLinearizedTrackState.h.

Referenced by particle().

TrackCharge ParticleKinematicLinearizedTrackState::theCharge
private

Definition at line 157 of file ParticleKinematicLinearizedTrackState.h.

Referenced by computeJacobians().

AlgebraicVector6 ParticleKinematicLinearizedTrackState::theConstantTerm
mutableprivate
AlgebraicVector6 ParticleKinematicLinearizedTrackState::theExpandedParams
mutableprivate
GlobalPoint ParticleKinematicLinearizedTrackState::theLinPoint
private
AlgebraicMatrix64 ParticleKinematicLinearizedTrackState::theMomentumJacobian
mutableprivate
AlgebraicMatrix63 ParticleKinematicLinearizedTrackState::thePositionJacobian
mutableprivate
PerigeeKinematicState ParticleKinematicLinearizedTrackState::thePredState
mutableprivate