18 :
Track(associatedTrack)
19 , m_originalTrack(nullptr)
22 , m_alignTSOSCollection(nullptr)
23 , m_localErrorMat(nullptr)
24 , m_localErrorMatInv(nullptr)
25 , m_derivativeMatrix(nullptr)
26 , m_fullCovarianceMatrix(nullptr)
27 , m_derivatives(nullptr)
28 , m_derivativeErr(nullptr)
29 , m_actualSecondDerivatives(nullptr)
30 , m_residuals(nullptr)
32 , m_weightsFirstDeriv(nullptr)
36 , m_trackWithoutScattering()
50 :
Track(associatedTrack)
51 , m_originalTrack(nullptr)
54 , m_localErrorMat(nullptr)
55 , m_localErrorMatInv(nullptr)
56 , m_derivativeMatrix(nullptr)
57 , m_fullCovarianceMatrix(nullptr)
58 , m_derivatives(nullptr)
59 , m_derivativeErr(nullptr)
60 , m_actualSecondDerivatives(nullptr)
61 , m_residuals(nullptr)
63 , m_weightsFirstDeriv(nullptr)
67 , m_trackWithoutScattering()
82 , m_originalTrack(atrack.m_originalTrack)
84 , m_nAlignTSOSMeas(atrack.m_nAlignTSOSMeas)
85 , m_localErrorMat(atrack.m_localErrorMat ?
87 , m_localErrorMatInv(atrack.m_localErrorMatInv ?
89 , m_derivativeMatrix(atrack.m_derivativeMatrix ?
91 , m_fullCovarianceMatrix(atrack.m_fullCovarianceMatrix ?
93 , m_derivatives(atrack.m_derivatives ?
95 , m_derivativeErr(atrack.m_derivativeErr ?
97 , m_actualSecondDerivatives(atrack.m_actualSecondDerivatives ?
99 , m_residuals(atrack.m_residuals ?
101 , m_weights(atrack.m_weights ?
103 , m_weightsFirstDeriv(atrack.m_weightsFirstDeriv ?
105 , m_chi2(atrack.m_chi2)
106 , m_chi2dof(atrack.m_chi2dof)
107 , m_trackAlignParamQuality(
new double[6])
108 , m_trackWithoutScattering()
114 for (
int i=0;
i<6;
i++)
162 for (
int i=0;
i<6;
i++)
186 new std::vector<AlignModuleDerivatives>(*(atrack.
m_derivatives)) :
nullptr;
189 new std::vector<AlignModuleDerivatives>(*(atrack.
m_derivativeErr)) :
nullptr;
251 for(
int i=0;
i<5;++
i )
253 for(
int i=0;
i<4;++
i )
280 msg<<
"ntsos "<<ntsos<<
":"<<
", type "<<tsos->dumpType();
291 msg <<
"," << ( tsos->fitQualityOnSurface() )<<
endmsg;
309 msg <<
", hmm... no material effects on track!"<<
endmsg;
323 for (
int iatsos=0;iatsos<natsos;iatsos++) {
324 const AlignTSOS* atsos=(*m_alignTSOSCollection)[iatsos];
325 std::vector<Residual>::const_iterator itRes = atsos->
firstResidual();
326 std::vector<Residual>::const_iterator itRes_end = atsos->
lastResidual();
327 for ( ; itRes != itRes_end; ++itRes,++imeas) {
328 double resNorm = itRes->residualNorm();
329 chi2 += resNorm*resNorm;
347 for (
int iatsos=0;iatsos<natsos;iatsos++)
359 for ( ; itAtsos != itAtsos_end; ++itAtsos) {
361 std::vector<Residual>::const_iterator itRes = atsos->
firstResidual();
362 std::vector<Residual>::const_iterator itRes_end = atsos->
lastResidual();
363 for ( ; itRes != itRes_end; ++itRes) {
364 (*m_localErrorMat)(matrixindex,matrixindex) = itRes->errSq();
365 (*m_localErrorMatInv)(matrixindex,matrixindex) = 1./itRes->errSq();
376 return sl<<
"Unknown ";
378 return sl<<
"Original ";
380 return sl<<
"NormalRefitted ";
382 return sl<<
"BeamspotConstrained ";
384 return sl<<
"VertexConstrained ";
386 return sl<<
"UNDEFINED ";
395 return sl<<
"Unknown ";
397 return sl<<
"Original ";
399 return sl<<
"NormalRefitted ";
401 return sl<<
"BeamspotConstrained ";
403 return sl<<
"VertexConstrained ";
405 return sl<<
"UNDEFINED ";
418 default:
return "UNDEFINED";
428 if (!states)
return nullptr;
435 auto newTrackStateOnSurfaces = std::make_unique<Trk::TrackStates>();
436 newTrackStateOnSurfaces->reserve(
states->size() );
438 for (; tsit!=tsit_end ; ++tsit) {
439 auto newMeas = (*tsit)->measurementOnTrack() ? (*tsit)->measurementOnTrack()->uniqueClone() :
nullptr;
440 auto newPars = (*tsit)->trackParameters() ? (*tsit)->trackParameters()->uniqueClone() :
nullptr;
441 auto newFitQoS= (*tsit)->fitQualityOnSurface();
442 auto meb = (*tsit)->materialEffectsOnTrack() ? (*tsit)->materialEffectsOnTrack()->uniqueClone() :
nullptr;
449 std::unique_ptr<Trk::EnergyLoss> eLoss =
451 ? std::unique_ptr<Trk::EnergyLoss>(meot->energyLoss()->clone())
454 std::bitset<MaterialEffectsBase::NumberOfMaterialEffectsTypes> typeMaterial;
462 std::bitset<TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
473 newTrackStateOnSurfaces->push_back(newTsos);
480 return m_trackWithoutScattering.get();