CMS 3D CMS Logo

PerigeeMultiLTS.cc
Go to the documentation of this file.
6 
7 using namespace std;
8 
11  const TrajectoryStateOnSurface& tsos)
12  : theLinPoint(linP), theTrack(track), theTSOS(tsos), theCharge(theTrack.charge()), collapsedStateAvailable(false) {
13  //Extract the TSOS components:
14 
15  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
16  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
17  ltComp.reserve(tsosComp.size());
18  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin(); it != tsosComp.end(); it++) {
19  // cout <<(*it).globalPosition()<<endl;
21  }
22 }
23 
27  }
29 }
30 
37  return collapsedStateLT->constantTerm();
38 }
39 
46  return collapsedStateLT->positionJacobian();
47 }
48 
55  return collapsedStateLT->momentumJacobian();
56 }
57 
63  return collapsedStateLT->parametersFromExpansion();
64 }
65 
73  const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
74  return otherP->predictedState();
75 }
76 
80  return collapsedStateLT->hasError();
81 }
82 
86  return collapsedStateLT->predictedStateParameters();
87 }
88 
92  return collapsedStateLT->predictedStateMomentumParameters();
93 }
94 
98  return collapsedStateLT->predictedStateWeight(error);
99 }
100 
104  return collapsedStateLT->predictedStateError();
105 }
106 
110  return collapsedStateLT->predictedStateMomentumError();
111 }
112 
114  const PerigeeMultiLTS* otherP = dynamic_cast<const PerigeeMultiLTS*>(&other);
115  if (otherP == nullptr) {
116  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
117  }
118  return (otherP->track() == theTrack);
119 }
120 
122  const GlobalPoint& newLP) const {
124 }
125 
127  const GlobalPoint& vertexPosition,
128  const AlgebraicVectorM& vectorParameters,
129  const AlgebraicSymMatrixOO& covarianceMatrix) const {
131  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
132  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
133 }
134 
136  AlgebraicVector3 vertexPosition;
137  vertexPosition(0) = theRefittedState->position().x();
138  vertexPosition(1) = theRefittedState->position().y();
139  vertexPosition(2) = theRefittedState->position().z();
140  AlgebraicVectorN param =
141  constantTerm() + positionJacobian() * vertexPosition + momentumJacobian() * theRefittedState->momentumVector();
142  if (param(2) > M_PI)
143  param(2) -= 2 * M_PI;
144  if (param(2) < -M_PI)
145  param(2) += 2 * M_PI;
146 
147  return param;
148 }
149 
151  if (parameters(2) > M_PI)
152  parameters(2) -= 2 * M_PI;
153  if (parameters(2) < -M_PI)
154  parameters(2) += 2 * M_PI;
155 }
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition: AlgebraicROOTObjects.h:21
PerigeeMultiLTS::hasError
bool hasError() const override
Definition: PerigeeMultiLTS.cc:77
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
PerigeeMultiLTS::theTrack
reco::TransientTrack theTrack
Definition: PerigeeMultiLTS.h:138
funct::false
false
Definition: Factorize.h:29
PerigeeMultiLTS::PerigeeMultiLTS
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
Definition: PerigeeMultiLTS.cc:9
PerigeeLinearizedTrackState::predictedState
const TrajectoryStateClosestToPoint & predictedState() const
Definition: PerigeeLinearizedTrackState.h:212
VertexException
Common base class.
Definition: VertexException.h:12
PerigeeMultiLTS::createRefittedTrackState
RefCountedRefittedTrackState createRefittedTrackState(const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const override
Definition: PerigeeMultiLTS.cc:126
PerigeeMultiLTS
Definition: PerigeeMultiLTS.h:14
PerigeeMultiLTS::momentumJacobian
const AlgebraicMatrixNM & momentumJacobian() const override
Definition: PerigeeMultiLTS.cc:52
PerigeeMultiLTS::predictedStateMomentumParameters
AlgebraicVectorM predictedStateMomentumParameters() const override
Definition: PerigeeMultiLTS.cc:89
PerigeeMultiLTS::RefCountedLinearizedTrackState
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
Definition: PerigeeMultiLTS.h:16
PerigeeMultiLTS.h
ReferenceCountingPointer< LinearizedTrackState< 5 > >
PerigeeMultiLTS::constantTerm
const AlgebraicVectorN & constantTerm() const override
Definition: PerigeeMultiLTS.cc:34
relativeConstraints.error
error
Definition: relativeConstraints.py:53
AlgebraicMatrix53
ROOT::Math::SMatrix< double, 5, 3, ROOT::Math::MatRepStd< double, 5, 3 > > AlgebraicMatrix53
Definition: AlgebraicROOTObjects.h:53
LinearizedTrackStateFactory::linearizedTrackState
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
Definition: LinearizedTrackStateFactory.cc:9
PerigeeRefittedTrackState
Definition: PerigeeRefittedTrackState.h:18
PerigeeMultiLTS::checkParameters
void checkParameters(AlgebraicVector5 &parameters) const override
Definition: PerigeeMultiLTS.cc:150
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PerigeeRefittedTrackState.h
PerigeeMultiLTS::operator==
bool operator==(LinearizedTrackState< 5 > &other) const override
Definition: PerigeeMultiLTS.cc:113
PerigeeConversions::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
Definition: PerigeeConversions.cc:97
PerigeeMultiLTS::charge
TrackCharge charge() const override
Definition: PerigeeMultiLTS.h:95
PerigeeConversions.h
PerigeeMultiLTS::refittedParamFromEquation
AlgebraicVector5 refittedParamFromEquation(const RefCountedRefittedTrackState &theRefittedState) const override
Definition: PerigeeMultiLTS.cc:135
trackingPlots.other
other
Definition: trackingPlots.py:1464
PerigeeMultiLTS::theTSOS
const TrajectoryStateOnSurface theTSOS
Definition: PerigeeMultiLTS.h:140
Point3DBase< float, GlobalTag >
PerigeeMultiLTS::theLinPoint
GlobalPoint theLinPoint
Definition: PerigeeMultiLTS.h:137
PerigeeMultiLTS::theLTSfactory
LinearizedTrackStateFactory theLTSfactory
Definition: PerigeeMultiLTS.h:143
PerigeeMultiLTS::predictedState
const TrajectoryStateClosestToPoint & predictedState() const
Definition: PerigeeMultiLTS.cc:70
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TrajectoryStateOnSurface::components
Components const & components() const
Definition: TrajectoryStateOnSurface.h:85
PerigeeMultiLTS::positionJacobian
const AlgebraicMatrixN3 & positionJacobian() const override
Definition: PerigeeMultiLTS.cc:43
PerigeeMultiLTS::predictedStateMomentumError
AlgebraicSymMatrixMM predictedStateMomentumError() const override
Definition: PerigeeMultiLTS.cc:107
PerigeeMultiLTS::predictedStateWeight
AlgebraicSymMatrixNN predictedStateWeight(int &error) const override
Definition: PerigeeMultiLTS.cc:95
LinearizedTrackState< 5 >::RefCountedRefittedTrackState
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
Definition: LinearizedTrackState.h:47
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:108
PerigeeMultiLTS::predictedStateError
AlgebraicSymMatrixNN predictedStateError() const override
Definition: PerigeeMultiLTS.cc:101
PerigeeMultiLTS::ltComp
std::vector< RefCountedLinearizedTrackState > ltComp
Definition: PerigeeMultiLTS.h:141
AlignmentTrackSelector_cfi.theCharge
theCharge
Definition: AlignmentTrackSelector_cfi.py:20
LinearizedTrackState< 5 >::AlgebraicVectorN
ROOT::Math::SVector< double, N > AlgebraicVectorN
Definition: LinearizedTrackState.h:38
PerigeeMultiLTS::parametersFromExpansion
const AlgebraicVectorN & parametersFromExpansion() const override
Definition: PerigeeMultiLTS.cc:60
std
Definition: JetResolutionObject.h:76
reco::TransientTrack
Definition: TransientTrack.h:19
PerigeeLinearizedTrackState.h
LinearizedTrackState< 5 >::AlgebraicSymMatrixOO
ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
Definition: LinearizedTrackState.h:45
PerigeeMultiLTS::track
reco::TransientTrack track() const override
Definition: PerigeeMultiLTS.h:35
PerigeeMultiLTS::predictedStateParameters
AlgebraicVectorN predictedStateParameters() const override
Definition: PerigeeMultiLTS.cc:83
LinearizedTrackState< 5 >
VertexException.h
PerigeeMultiLTS::collapsedStateAvailable
bool collapsedStateAvailable
Definition: PerigeeMultiLTS.h:145
PerigeeMultiLTS::stateWithNewLinearizationPoint
RefCountedLinearizedTrackState stateWithNewLinearizationPoint(const GlobalPoint &newLP) const override
Definition: PerigeeMultiLTS.cc:121
PerigeeMultiLTS::collapsedStateLT
RefCountedLinearizedTrackState collapsedStateLT
Definition: PerigeeMultiLTS.h:142
PerigeeLinearizedTrackState
Definition: PerigeeLinearizedTrackState.h:33
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
LinearizedTrackState< 5 >::AlgebraicVectorM
ROOT::Math::SVector< double, N - 2 > AlgebraicVectorM
Definition: LinearizedTrackState.h:39
PerigeeMultiLTS::prepareCollapsedState
void prepareCollapsedState() const
Definition: PerigeeMultiLTS.cc:24