CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PerigeeMultiLTS.cc
Go to the documentation of this file.
6 
7 
8 
9 using namespace std;
10 
12  const reco::TransientTrack & track, const TrajectoryStateOnSurface& tsos)
13  : theLinPoint(linP), theTrack(track), theTSOS(tsos),
14  theCharge(theTrack.charge()), collapsedStateAvailable(false)
15 {
16  //Extract the TSOS components:
17 
18  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
19  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
20  ltComp.reserve(tsosComp.size());
21  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin();
22  it != tsosComp.end(); it++) {
23  // cout <<(*it).globalPosition()<<endl;
25  }
26 
27 }
28 
29 
31 {
34  }
36 }
37 
38 
43 {
45  return collapsedStateLT->constantTerm();
46 }
47 
52 {
54  return collapsedStateLT->positionJacobian();
55 }
56 
61 {
63  return collapsedStateLT->momentumJacobian();
64 }
65 
69 {
71  return collapsedStateLT->parametersFromExpansion();
72 }
73 
79 {
81  const PerigeeLinearizedTrackState* otherP =
82  dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
83  return otherP->predictedState();
84 }
85 
86 
88 {
90  return collapsedStateLT->hasError();
91 }
92 
94 {
96  return collapsedStateLT->predictedStateParameters();
97 }
98 
100 {
102  return collapsedStateLT->predictedStateMomentumParameters();
103 }
104 
106 {
108  return collapsedStateLT->predictedStateWeight(error) ;
109 }
110 
112 {
115 }
116 
118 {
120  return collapsedStateLT->predictedStateMomentumError() ;
121 }
122 
124 {
125  const PerigeeMultiLTS* otherP =
126  dynamic_cast<const PerigeeMultiLTS*>(&other);
127  if (otherP == 0) {
128  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
129  }
130  return (otherP->track() == theTrack);
131 }
132 
133 
136  (const GlobalPoint & newLP) const
137 {
139  new PerigeeMultiLTS(newLP, track(), theTSOS));
140 }
141 
144  const GlobalPoint & vertexPosition,
145  const AlgebraicVectorM & vectorParameters,
146  const AlgebraicSymMatrixOO & covarianceMatrix) const
147 {
148  TrajectoryStateClosestToPoint refittedTSCP =
150  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
151  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
152 }
153 
155  const RefCountedRefittedTrackState & theRefittedState) const
156 {
157  AlgebraicVector3 vertexPosition;
158  vertexPosition(0) = theRefittedState->position().x();
159  vertexPosition(1) = theRefittedState->position().y();
160  vertexPosition(2) = theRefittedState->position().z();
161  AlgebraicVectorN param = constantTerm() +
162  positionJacobian() * vertexPosition +
163  momentumJacobian() * theRefittedState->momentumVector();
164  if (param(2) > M_PI) param(2)-= 2*M_PI;
165  if (param(2) < -M_PI) param(2)+= 2*M_PI;
166 
167  return param;
168 }
169 
170 
172 {
173  if (parameters(2) > M_PI) parameters(2)-= 2*M_PI;
174  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
175 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
virtual const AlgebraicVectorN & constantTerm() const
dictionary parameters
Definition: Parameters.py:2
reco::TransientTrack theTrack
ROOT::Math::SVector< double, N > AlgebraicVectorN
Common base class.
virtual void checkParameters(AlgebraicVector5 &parameters) const
const TrajectoryStateClosestToPoint & predictedState() const
virtual const AlgebraicMatrixNM & momentumJacobian() const
const MagneticField * field() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
virtual AlgebraicVector5 refittedParamFromEquation(const RefCountedRefittedTrackState &theRefittedState) const
const TrajectoryStateOnSurface theTSOS
double charge(const std::vector< uint8_t > &Ampls)
virtual const AlgebraicVectorN & parametersFromExpansion() const
virtual const AlgebraicMatrixN3 & positionJacobian() const
ROOT::Math::SMatrix< double, 5, 3, ROOT::Math::MatRepStd< double, 5, 3 > > AlgebraicMatrix53
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const
GlobalPoint theLinPoint
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, N-2 > AlgebraicVectorM
LinearizedTrackStateFactory theLTSfactory
void prepareCollapsedState() const
AlgebraicVectorN predictedStateParameters() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
AlgebraicSymMatrixMM predictedStateMomentumError() const
virtual AlgebraicVectorM predictedStateMomentumParameters() const
#define M_PI
Definition: BFit3D.cc:3
virtual RefCountedLinearizedTrackState stateWithNewLinearizationPoint(const GlobalPoint &newLP) const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
bool operator==(LinearizedTrackState< 5 > &other) const
virtual reco::TransientTrack track() const
ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
bool hasError() const
TrackCharge charge() const
virtual RefCountedRefittedTrackState createRefittedTrackState(const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
RefCountedLinearizedTrackState collapsedStateLT
volatile std::atomic< bool > shutdown_flag false
std::vector< TrajectoryStateOnSurface > components() const
std::vector< RefCountedLinearizedTrackState > ltComp
AlgebraicSymMatrixNN predictedStateWeight(int &error) const
AlgebraicSymMatrixNN predictedStateError() const