56 (config.materialEffects >= brokenLinesCoarse) ? 1 : refTsos.localParameters().mixedFormatVector().kSize,
58 (config.materialEffects >= brokenLinesCoarse) ?
60 ( (config.materialEffects == breakPoints) ? 2*((config.
useBeamSpot) ? recHits.
size()+1 : recHits.
size())-2 : 0) ,
61 (config.materialEffects >= brokenLinesCoarse) ?
63 ( (config.materialEffects == breakPoints) ? 2*((config.
useBeamSpot) ? recHits.
size()+1 : recHits.
size())-2 : 0) ),
65 materialEffects_(config.materialEffects),
66 propDir_(config.propDir),
68 includeAPEs_(config.includeAPEs),
69 allowZeroMaterial_(config.allowZeroMaterial)
76 fwdRecHits.reserve(recHits.size());
77 for (TransientTrackingRecHit::ConstRecHitContainer::const_reverse_iterator it=recHits.rbegin();
78 it != recHits.rend(); ++it) {
79 fwdRecHits.push_back(*it);
93 (config.materialEffects >= brokenLinesCoarse) ? 1 : nPar,
95 (config.materialEffects >= brokenLinesCoarse) ? 2*nHits : ( (config.materialEffects == breakPoints) ? 2*nHits-2 : 0 ),
96 (config.materialEffects >= brokenLinesCoarse) ? 2*nHits-4 : ( (config.materialEffects == breakPoints) ? 2*nHits-2 : 0 ) ),
98 materialEffects_(config.materialEffects),
99 propDir_(config.propDir),
101 includeAPEs_(config.includeAPEs),
102 allowZeroMaterial_(config.allowZeroMaterial)
117 std::auto_ptr<MaterialEffectsUpdator> aMaterialEffectsUpdator
119 if (!aMaterialEffectsUpdator.get())
return false;
122 std::vector<AlgebraicMatrix> allJacobians;
128 std::vector<AlgebraicSymMatrix> allCurvatureChanges;
133 std::vector<AlgebraicMatrix> allProjections;
135 std::vector<AlgebraicSymMatrix> allDeltaParameterCovs;
139 std::vector<AlgebraicMatrix> allLocalToCurv;
141 std::vector<double> allSteps;
143 std::vector<AlgebraicMatrix> allCurvlinJacobians;
148 unsigned int iRow = 0;
159 if (!tsctbl.isValid()) {
160 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
161 <<
"TrajectoryStateClostestToBeamLine invalid. Skip track.";
170 std::pair< TrajectoryStateOnSurface, double > tsosWithPath =
171 propagator.propagateWithPath(pcaFts, refTsos.
surface());
173 if (!tsosWithPath.first.isValid())
return false;
187 allRecHits.push_back(bsRecHit);
192 TransientTrackingRecHit::ConstRecHitContainer::const_iterator itRecHit;
193 for ( itRecHit = recHits.begin(); itRecHit != recHits.end(); ++itRecHit ) {
195 allRecHits.push_back(hitPtr);
198 for ( itRecHit = allRecHits.begin(); itRecHit != allRecHits.end(); ++itRecHit ) {
208 allJacobians.push_back(fullJacobian);
211 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
216 allLocalToCurv.push_back(localToCurvilinear);
217 allSteps.push_back(0.);
218 allCurvlinJacobians.push_back(firstCurvlinJacobian);
224 double nextStep = 0.;
227 if (!this->
propagate(previousHitPtr->det()->surface(), previousTsos,
228 hitPtr->det()->
surface(), nextTsos,
229 nextJacobian, nextCurvlinJacobian, nextStep, magField)) {
233 allJacobians.push_back(nextJacobian);
234 fullJacobian = nextJacobian * previousChangeInCurvature * fullJacobian;
238 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
239 allLocalToCurv.push_back(localToCurvilinear);
240 if (nextStep == 0.) {
241 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct"
242 <<
"step 0. from id " << previousHitPtr->geographicalId()
243 <<
" to " << hitPtr->det()->geographicalId() <<
".";
246 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::construct" <<
"Skip track.";
250 allSteps.push_back(nextStep);
251 allCurvlinJacobians.push_back(nextCurvlinJacobian);
261 if ( !updatedTsos.isValid() )
return false;
263 if (
theTsosVec.back().localParameters().charge() )
266 /
theTsosVec.back().localParameters().signedInverseMomentum();
270 allDeltaParameterCovs.push_back( asHepMatrix<5>(updatedTsos.localError().matrix()) );
271 allCurvatureChanges.push_back(previousChangeInCurvature);
277 previousHitPtr = hitPtr;
300 allDeltaParameterCovs);
304 allDeltaParameterCovs, allLocalToCurv);
316 allDeltaParameterCovs);
320 allDeltaParameterCovs, allLocalToCurv);
322 if (!msOK)
return false;
345 switch (materialEffects) {
384 const std::pair<TrajectoryStateOnSurface, double> tsosWithPath =
388 if (!tsosWithPath.first.isValid())
return false;
390 nextStep = tsosWithPath.second;
394 tsosWithPath.first.globalPosition(),
395 tsosWithPath.first.globalMomentum(),
396 tsosWithPath.second);
397 const AlgebraicMatrix curvilinearJacobian = asHepMatrix<5,5>(aJacobian.jacobian());
401 const AlgebraicMatrix localToCurvilinear = asHepMatrix<5>(startTrafo.jacobian());
405 const AlgebraicMatrix curvilinearToLocal = asHepMatrix<5>(endTrafo.jacobian());
409 newCurvlinJacobian = curvilinearJacobian;
410 newJacobian = curvilinearToLocal * curvilinearJacobian * localToCurvilinear;
411 newTsos = tsosWithPath.first;
430 auto newHitPtr = hitPtr;
434 const LocalPoint localMeasurement = newHitPtr->localPosition();
435 const LocalError localMeasurementCov = newHitPtr->localPositionError();
447 if (localAPE.valid()) {
464 for (
int j = 0;
j < projectedJacobian.num_row(); ++
j) {
478 for (
int i = 0;
i < localPosition.num_row(); ++
i) {
486 const std::vector<AlgebraicMatrix> &allProjections,
487 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
488 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
507 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
509 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allJacobians[
k]);
512 deltaMaterialEffectsCov = paramMaterialEffectsCov.similarity(allProjections[k]);
519 paramMaterialEffectsCov += allDeltaParameterCovs[
k];
521 tempParameterCov = paramMaterialEffectsCov;
524 for (
unsigned int l = k+1;
l < allJacobians.size(); ++
l) {
525 tempParameterCov = allJacobians[
l] * allCurvatureChanges[
l] * tempParameterCov;
526 tempMeasurementCov = allProjections[
l] * tempParameterCov * allProjections[
k].T();
543 paramMaterialEffectsCov = paramMaterialEffectsCov.similarity(allCurvatureChanges[k]);
554 const std::vector<AlgebraicMatrix> &allProjections,
555 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
556 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
557 const std::vector<AlgebraicMatrix> &allLocalToCurv)
561 int offsetMeas =
nMeasPerHit * allJacobians.size();
566 MSprojection[0][1] = 1;
567 MSprojection[1][2] = 1;
572 for (
unsigned int k = 1;
k < allJacobians.size(); ++
k) {
575 tempJacobian = allJacobians[
k] * allCurvatureChanges[
k];
576 tempMSCov = allDeltaParameterCovs[
k-1].similarity(allLocalToCurv[
k-1]);
577 tempMSCovProj = tempMSCov.similarity(MSprojection);
583 tempMSJacProj = (allProjections[
k] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
585 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
586 <<
"Inversion 1 for break points failed: " << ierr;
594 for (
unsigned int l =
k+1;
l < allJacobians.size(); ++
l) {
597 tempJacobian = allJacobians[
l] * allCurvatureChanges[
l] * tempJacobian;
598 tempMSJacProj = (allProjections[
l] * ( tempJacobian * allLocalToCurv[
k-1].inverse(ierr) )) * MSprojection.T();
600 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBp"
601 <<
"Inversion 2 for break points failed: " << ierr;
619 const std::vector<AlgebraicMatrix> &allProjections,
620 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
621 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
622 const std::vector<AlgebraicMatrix> &allLocalToCurv,
634 int offsetMeas =
nMeasPerHit*allCurvlinJacobians.size();
638 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
642 QbypToCurv[0][0] = 1.;
644 AngleToCurv[1][1] = 1.;
645 AngleToCurv[2][0] = 1./cosLambda;
647 CurvToAngle[1][1] = 1.;
648 CurvToAngle[0][2] = cosLambda;
650 OffsetToCurv[3][0] = 1.;
651 OffsetToCurv[4][1] = 1.;
653 CurvToOffset[0][3] = 1.;
654 CurvToOffset[1][4] = 1.;
658 TrajToQbyp[0][0] = 1.;
660 TrajToOff1[0][1] = 1.;
661 TrajToOff1[1][2] = 1.;
663 TrajToOff2[0][3] = 1.;
664 TrajToOff2[1][4] = 1.;
667 AlgebraicMatrix JacCurvToOffsetL, JacOffsetToOffsetL, JacAngleToOffsetL, JacQbypToOffsetL, JacOffsetToAngleL;
668 AlgebraicMatrix JacCurvToOffsetN, JacOffsetToOffsetN, JacAngleToOffsetN, JacQbypToOffsetN, JacOffsetToAngleN;
672 JacCurvToOffsetN = CurvToOffset * allCurvlinJacobians[1];
673 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
674 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
675 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
676 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
678 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
679 <<
"Inversion 1 for fine broken lines failed: " << ierr;
682 JacOffsetToAngleC = -(JacOffsetToAngleN * JacOffsetToOffsetN);
683 JacQbypToAngleC = -(JacOffsetToAngleN * JacQbypToOffsetN);
685 AlgebraicMatrix JacTrajToAngle = JacQbypToAngleC * TrajToQbyp + JacOffsetToAngleC * TrajToOff1 + JacOffsetToAngleN * TrajToOff2;
690 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
691 <<
"Inversion 2 for fine broken lines failed: " << ierr;
702 for (
unsigned int k = 0;
k < allCurvlinJacobians.size(); ++
k) {
704 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
706 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
707 <<
"Inversion 3 for fine broken lines failed: " << ierr;
717 for (
unsigned int k = 1;
k < allCurvlinJacobians.size()-1; ++
k) {
724 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
725 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
730 tempJacL = allCurvlinJacobians[
k] * tempJacobian;
731 JacCurvToOffsetL = CurvToOffset * tempJacL.inverse(ierr);
734 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
735 <<
"Inversion 4 for fine broken lines failed: " << ierr;
738 JacOffsetToOffsetL = JacCurvToOffsetL * OffsetToCurv;
739 JacAngleToOffsetL = JacCurvToOffsetL * AngleToCurv;
740 JacQbypToOffsetL = JacCurvToOffsetL * QbypToCurv;
741 JacOffsetToAngleL =-JacAngleToOffsetL.inverse(ierr);
743 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
744 <<
"Inversion 5 for fine broken lines failed: " << ierr;
747 tempJacobian = tempJacobian * allCurvatureChanges[
k];
748 tempJacN = allCurvlinJacobians[
n] * tempJacobian;
749 JacCurvToOffsetN = CurvToOffset * tempJacN;
750 JacOffsetToOffsetN = JacCurvToOffsetN * OffsetToCurv;
751 JacAngleToOffsetN = JacCurvToOffsetN * AngleToCurv;
752 JacQbypToOffsetN = JacCurvToOffsetN * QbypToCurv;
753 JacOffsetToAngleN = JacAngleToOffsetN.inverse(ierr);
755 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
756 <<
"Inversion 6 for fine broken lines failed: " << ierr;
759 JacOffsetToAngleC = -(JacOffsetToAngleL * JacOffsetToOffsetL + JacOffsetToAngleN * JacOffsetToOffsetN);
760 JacQbypToAngleC = -(JacOffsetToAngleL * JacQbypToOffsetL + JacOffsetToAngleN * JacQbypToOffsetN);
790 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
791 const std::vector<AlgebraicMatrix> &allLocalToCurv,
792 const std::vector<double> &allSteps,
794 const double minStep)
806 double cosLambda =
sqrt((p.
x()*p.
x()+p.
y()*p.
y())/(p.
x()*p.
x()+p.
y()*p.
y()+p.
z()*p.
z()));
810 double delta (1.0/allSteps[1]);
821 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
822 <<
"Inversion 1 for coarse broken lines failed: " << ierr;
827 CurvToAngle[1][1] = 1.;
828 CurvToAngle[0][2] = cosLambda;
830 OffsetToCurv[3][0] = 1.;
831 OffsetToCurv[4][1] = 1.;
838 std::vector<unsigned int>
first(allSteps.size());
839 std::vector<unsigned int>
last (allSteps.size());
840 std::vector<unsigned int> plane(allSteps.size());
841 std::vector<double> sPlane(allSteps.size());
842 unsigned int nPlane = 0;
845 for (
unsigned int k = 1;
k < allSteps.size(); ++
k) {
847 if (fabs(allSteps[
k])>minStep) { nPlane += 1;
first[nPlane] =
k; }
850 sPlane[nPlane] += sTot;
852 if (nPlane < 2)
return false;
856 for (
unsigned int k = 0;
k <= nPlane; ++
k) { sPlane[
k] /= (double) (
last[
k]-
first[
k]+1); }
860 for (
unsigned int k = 0;
k < allSteps.size(); ++
k) {
863 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
865 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsBrl"
866 <<
"Inversion 2 for coarse broken lines failed: " << ierr;
870 unsigned int iPlane = plane[
k];
880 if (fabs(sTot) < fabs(sPlane[iPlane])) { jPlane = (iPlane>0) ? iPlane - 1 : 1; }
881 else { jPlane = (iPlane<nPlane) ? iPlane + 1 : nPlane -1 ;}
883 double sDiff = sPlane[iPlane] - sPlane[jPlane];
884 double iFrac = (sTot - sPlane[jPlane]) / sDiff;
885 double jFrac = 1.0 - iFrac;
900 for (
unsigned int i = 1;
i < nPlane; ++
i) {
908 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[
k]);
909 tempMSCovProj = tempMSCov.similarity(CurvToAngle);
914 double stepK = sPlane[
i] - sPlane[
l];
915 double stepN = sPlane[
n] - sPlane[
i];
916 double deltaK (1.0/stepK);
917 double deltaN (1.0/stepN);
922 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*l+1] = deltaK;
924 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
i ] = -(deltaK + deltaN);
925 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*
i+1] = -(deltaK + deltaN);
927 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas ][offsetPar+2*
n ] = deltaN;
928 theDerivatives[offsetMeas+
nMeasPerHit*iMsMeas+1][offsetPar+2*n+1] = deltaN;
937 const std::vector<AlgebraicMatrix> &allProjections,
938 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
939 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs)
944 const double minPrec = 1.0;
947 OffsetToLocal[3][0] = 1.;
948 OffsetToLocal[4][1] = 1.;
950 SlopeToLocal[1][0] = 1.;
951 SlopeToLocal[2][1] = 1.;
954 TMatrixDSym covariance(2), measPrecision(2), scatPrecision(2);
955 TMatrixD jacPointToPoint(5,5), identity(5,5), proLocalToMeas(2,2);
956 identity.UnitMatrix();
957 TVectorD measurement(2), scatterer(2), measPrecDiag(2);
962 unsigned int numHits = allJacobians.size();
963 std::vector<GblPoint> GblPointList;
964 GblPointList.reserve(numHits);
965 for (
unsigned int k = 0;
k < numHits; ++
k) {
968 clhep2root(allJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
971 GblPoint aGblPoint( jacPointToPoint );
974 clhep2root(allProjections[k] * OffsetToLocal, proLocalToMeas);
983 if (covariance(0,1) == 0.) {
985 for (
unsigned int row = 0; row < 2; ++row) {
986 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
988 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
992 measPrecision = covariance; measPrecision.InvertFast();
993 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
997 clhep2root(allDeltaParameterCovs[k].similarityT(SlopeToLocal), scatPrecision);
999 scatPrecision.InvertFast();
1005 e.
explainSelf().find(
"matrix is singular") != std::string::npos &&
1014 GblPointList.push_back( aGblPoint );
1017 theGblInput.push_back(std::make_pair(GblPointList, identity));
1025 const std::vector<AlgebraicMatrix> &allProjections,
1026 const std::vector<AlgebraicSymMatrix> &allCurvatureChanges,
1027 const std::vector<AlgebraicSymMatrix> &allDeltaParameterCovs,
1028 const std::vector<AlgebraicMatrix> &allLocalToCurv)
1033 const double minPrec = 1.0;
1037 OffsetToCurv[3][0] = 1.;
1038 OffsetToCurv[4][1] = 1.;
1043 TMatrixDSym covariance(2), measPrecision(2);
1044 TMatrixD jacPointToPoint(5,5), firstLocalToCurv(5,5), proLocalToMeas(2,2);
1045 TVectorD measurement(2), scatterer(2), measPrecDiag(2), scatPrecDiag(2);
1049 unsigned int numHits = allCurvlinJacobians.size();
1050 std::vector<GblPoint> GblPointList;
1051 GblPointList.reserve(numHits);
1052 for (
unsigned int k = 0;
k < numHits; ++
k) {
1054 JacOffsetToMeas = (allProjections[
k] * allLocalToCurv[
k].inverse(ierr) ) * OffsetToCurv;
1056 edm::LogError(
"Alignment") <<
"@SUB=ReferenceTrajectory::addMaterialEffectsGbl"
1057 <<
"Inversion 1 for general broken lines failed: " << ierr;
1062 clhep2root(allCurvlinJacobians[
k] * allCurvatureChanges[
k], jacPointToPoint);
1065 GblPoint aGblPoint( jacPointToPoint );
1077 if (covariance(0,1) == 0.) {
1079 for (
unsigned int row = 0; row < 2; ++row) {
1080 measPrecDiag(row) = ( 0. < covariance(row,row) ? 1.0/covariance(row,row) : 0. );
1082 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecDiag, minPrec);
1086 measPrecision = covariance; measPrecision.InvertFast();
1087 aGblPoint.
addMeasurement(proLocalToMeas, measurement, measPrecision, minPrec);
1091 tempMSCov = allDeltaParameterCovs[
k].similarity(allLocalToCurv[k]);
1092 for (
unsigned int row = 0; row < 2; ++row) {
1093 scatPrecDiag(row) = 1.0/tempMSCov[row+1][row+1];
1097 bool singularCovariance{
false};
1098 for (
int row = 0; row < scatPrecDiag.GetNrows(); ++row) {
1100 singularCovariance =
true;
1106 <<
"@SUB=ReferenceTrajectory::addMaterialEffectsCurvlinGbl"
1107 <<
"\nEncountered singular scatter covariance-matrix without allowing "
1108 <<
"for zero material.";
1115 GblPointList.push_back( aGblPoint );
1118 clhep2root(allLocalToCurv[0], firstLocalToCurv);
1119 theGblInput.push_back(std::make_pair(GblPointList, firstLocalToCurv));
1128 for (
int row = 0; row < in.num_row(); ++row) {
1135 for (
int row = 0; row < in.num_row(); ++row) {
1136 for (
int col = 0;
col < in.num_col(); ++
col) {
1137 out[row][
col] = in[row][
col];
1144 for (
int row = 0; row < in.num_row(); ++row) {
1145 for (
int col = 0;
col < in.num_col(); ++
col) {
1146 out[row][
col] = in[row][
col];
1157 if (this->useRecHit(hitPtr)) {
1159 switch (hitPtr->dimension()) {
1161 return getHitProjectionMatrixT<1>(hitPtr);
1163 return getHitProjectionMatrixT<2>(hitPtr);
1165 return getHitProjectionMatrixT<3>(hitPtr);
1167 return getHitProjectionMatrixT<4>(hitPtr);
1169 return getHitProjectionMatrixT<5>(hitPtr);
1171 throw cms::Exception(
"ReferenceTrajectory::getHitProjectionMatrix")
1172 <<
"Unexpected hit dimension: " << hitPtr->dimension() <<
"\n";
1181 template<
unsigned int N>
1198 holder.
setup<
N>(&
r, &V, &pf, &rMeas, &VMeas, dummyPars, dummyErr);
1199 hitPtr->getKfComponents(holder);
Code categoryCode() const
void setup(typename AlgebraicROOTObject< D >::Vector *params, typename AlgebraicROOTObject< D, D >::SymMatrix *errors, ProjectMatrix< double, 5, D > *projFunc, typename AlgebraicROOTObject< D >::Vector *measuredParams, typename AlgebraicROOTObject< D, D >::SymMatrix *measuredErrors, const AlgebraicVector5 &tsosLocalParameters, const AlgebraicSymMatrix55 &tsosLocalErrors)
AlgebraicMatrix theInnerTrajectoryToCurvilinear
double z0() const
z coordinate
void addMeasurement(const TMatrixD &aProjection, const TVectorD &aResiduals, const TVectorD &aPrecision, double minPrecision=0.)
Add a measurement to a point.
AlgebraicMatrix getHitProjectionMatrix(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
tuple MultipleScatteringUpdator
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
virtual bool addMaterialEffectsBrl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv, const GlobalTrajectoryParameters >p)
const LocalTrajectoryParameters & localParameters() const
const bool allowZeroMaterial_
AlgebraicMatrix theInnerLocalToTrajectory
int nominalValue() const
The nominal field value for this map in kGauss.
virtual std::string explainSelf() const
virtual void fillMeasurementAndError(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr, unsigned int iRow, const TrajectoryStateOnSurface &updatedTsos)
static const unsigned int nMeasPerHit
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
AlgebraicMatrix theDerivatives
unsigned int theNumberOfVirtualPars
Geom::Phi< T > phi() const
unsigned int theNumberOfVirtualMeas
virtual bool addMaterialEffectsLocalGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvatureChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParameterCovs)
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
SurfaceSide surfaceSide(const PropagationDirection dir) const
virtual bool propagate(const Plane &previousSurface, const TrajectoryStateOnSurface &previousTsos, const Plane &newSurface, TrajectoryStateOnSurface &newTsos, AlgebraicMatrix &newJacobian, AlgebraicMatrix &newCurvlinJacobian, double &nextStep, const MagneticField *magField) const
AlgebraicVector theParameters
AlgebraicVector theMeasurements
virtual bool addMaterialEffectsBp(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
tuple TSCBLBuilderNoMaterial
GlobalVector magneticFieldInInverseGeV(const GlobalPoint &x) const
const Plane & surface() const
The nominal surface of the GeomDet.
float signedInverseMomentum() const
Signed inverse momentum q/p (zero for neutrals).
virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot)
const PropagationDirection propDir_
AlgebraicSymMatrix theTrajectoryPositionCov
double dydz() const
dydz slope
virtual bool addMaterialEffectsCurvlinGbl(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs, const std::vector< AlgebraicMatrix > &allLocalToCurv)
const SurfaceType & surface() const
CLHEP::HepMatrix AlgebraicMatrix
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
static PlanePointer build(Args &&...args)
FreeTrajectoryState const * freeState(bool withErrors=true) const
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
GlobalVector momentum() const
void addScatterer(const TVectorD &aResiduals, const TVectorD &aPrecision)
Add a (thin) scatterer to a point.
MaterialEffectsUpdator * createUpdator(MaterialEffects materialEffects, double mass) const
const AlgebraicSymMatrix55 & matrix() const
ReferenceTrajectory(const TrajectoryStateOnSurface &referenceTsos, const TransientTrackingRecHit::ConstRecHitContainer &recHits, const MagneticField *magField, const reco::BeamSpot &beamSpot, const ReferenceTrajectoryBase::Config &config)
unsigned int theNumberOfHits
AlgebraicVector theTrajectoryPositions
virtual void fillDerivatives(const AlgebraicMatrix &projection, const AlgebraicMatrix &fullJacobian, unsigned int iRow)
AlgebraicROOTObject< D, 5 >::Matrix projection()
const LocalTrajectoryError & localError() const
const MaterialEffects materialEffects_
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
GlobalVector momentum() const
double dxdz() const
dxdz slope
TransientTrackingRecHit::ConstRecHitContainer theRecHits
std::vector< std::pair< std::vector< gbl::GblPoint >, TMatrixD > > theGblInput
GlobalPoint position() const
std::vector< ConstRecHitPointer > ConstRecHitContainer
AlgebraicSymMatrix theMeasurementsCov
AlgebraicMatrix getHitProjectionMatrixT(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
const AlgebraicVector & parameters() const
CLHEP::HepVector AlgebraicVector
ROOT::Math::SVector< double, D1 > Vector
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const GlobalTrajectoryParameters & globalParameters() const
void clhep2root(const AlgebraicVector &in, TVectorD &out)
AlgebraicVector5 mixedFormatVector() const
CLHEP::HepSymMatrix AlgebraicSymMatrix
std::vector< TrajectoryStateOnSurface > theTsosVec
double y0() const
y coordinate
virtual bool addMaterialEffectsCov(const std::vector< AlgebraicMatrix > &allJacobians, const std::vector< AlgebraicMatrix > &allProjections, const std::vector< AlgebraicSymMatrix > &allCurvChanges, const std::vector< AlgebraicSymMatrix > &allDeltaParaCovs)
virtual void fillTrajectoryPositions(const AlgebraicMatrix &projection, const AlgebraicVector &mixedLocalParams, unsigned int iRow)
unsigned int theNumberOfPars
bool useRecHit(const TransientTrackingRecHit::ConstRecHitPointer &hitPtr) const
tuple size
Write out results.
LocalError const & localAlignmentError() const
Return local alligment error.
tuple AnalyticalPropagator
double x0() const
x coordinate