18 :
Track(associatedTrack)
50 :
Track(associatedTrack)
111 m_trackWithoutScattering.set(std::make_unique<Trk::Track>(*(atrack.m_trackWithoutScattering)));
114 for (
int i=0;i<6;i++)
119 AlignTSOSCollection * aTSOScoll = new AlignTSOSCollection;
120 aTSOScoll->reserve(atrack.m_alignTSOSCollection->size());
121 AlignTSOSIt itAtsos_end = atrack.m_alignTSOSCollection->end();
122 for(AlignTSOSIt itAtsos = atrack.m_alignTSOSCollection->begin(); itAtsos!=itAtsos_end; ++itAtsos) {
124 AlignTSOS * atsos = new AlignTSOS(**itAtsos);
125 aTSOScoll->push_back(atsos);
130 m_alignTSOSCollection=
nullptr;
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;
243 const Perigee* pp = track->perigeeParameters();
251 for(
int i=0;i<5;++i )
252 momCov += fabs( (*covMatrix)(4,i));
253 for(
int i=0;i<4;++i )
254 momCov += fabs( (*covMatrix)(i,4));
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;
448 double tinX0=meot->thicknessInX0();
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);
478 this->
fitQuality()->uniqueClone() :
nullptr ));
#define AmgSymMatrix(dim)
std::ostream & operator<<(std::ostream &lhs, const TestGaudiProperty &rhs)
DataModel_detail::const_iterator< DataVector > const_iterator
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< Residual >::const_iterator lastResidual() const
returns last Residual iterator
std::vector< Residual >::const_iterator firstResidual() const
returns first Residual iterator
Amg::VectorX * m_residuals
static void dumpTrackInfo(const Track &track, MsgStream &msg)
dump track information
AlignTSOSCollection::const_iterator lastAtsos() const
returns iterator pointer to last element in collection
double chi2() const
locally calculated chi2
std::vector< AlignModuleDerivatives > * m_derivativeErr
virtual ~AlignTrack()
destructor
const Amg::SymMatrixX * m_fullCovarianceMatrix
matrix containing full covariance matrix from track fitter
const Amg::MatrixX * m_derivativeMatrix
matrix containing derivative matrix from track fitter
@ NormalRefitted
normally refitted, without adding any pseudo-measurement
@ Original
not refitted, just copy constructed from original Track
@ BeamspotConstrained
refitted with beamspot constraint
@ VertexConstrained
refitted with vertex constraint
AlignVertex * m_vtx
pointer to the associated vertex
static void dumpLessTrackInfo(const Track &track, MsgStream &msg)
dump less track information
Amg::MatrixX * m_weightsFirstDeriv
AlignTSOSCollection::const_iterator firstAtsos() const
retrieve iterator pointer to first element in collection
const AlignTSOSCollection * alignTSOSCollection() const
returns collection of alignTSOS
const Track * m_originalTrack
point to original track
const Trk::Track * trackWithoutScattering() const
returns track with ScatteringAngle pointers all set to zero (used for refit by iPat)
std::vector< AlignModuleDerivatives > * m_derivatives
AlignTrackType m_type
refit type of this alignTrack
std::vector< std::pair< AlignModule *, std::vector< double > > > * m_actualSecondDerivatives
AlignTrack(const Track &associatedTrack)
constructor takes the track containing the original TrackStateOnSurface objects
double * m_trackAlignParamQuality
int m_nAlignTSOSMeas
variables
AlignTSOSCollection * m_alignTSOSCollection
collection of alignTSOS that make up the alignTrack
Amg::SymMatrixX * m_localErrorMat
matrix containing local error matrices along diagonal
void setAlignTSOSCollection(AlignTSOSCollection *atsosColl)
sets collection of AlignTSOS
CxxUtils::CachedUniquePtr< Trk::Track > m_trackWithoutScattering
bool isSLTrack() const
method to determine whether a straight line track or not
Amg::SymMatrixX * m_localErrorMatInv
inverse matrix containing local error matrices along diagonal
void dump(MsgStream &msg)
dump align track information
base class to integrate material effects on Trk::Track in a flexible way.
@ EnergyLossEffects
contains energy loss corrections
represents the full description of deflection and e-loss of a track in material.
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
Abstract Base Class for tracking surfaces.
represents the track state (measurement, material, fit parameters and quality) at a surface.
@ NumberOfTrackStateOnSurfaceTypes
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ InertMaterial
This represents inert material, and so will contain MaterialEffectsBase.
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
Track & operator=(const Track &rhs)
assignment operator
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
void findPerigee() const
Find perigee in the vector of track parameters.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > SymMatrixX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
DataVector< AlignTSOS >::const_iterator AlignTSOSIt
DataVector< AlignTSOS > AlignTSOSCollection
std::string dumpAlignTrackType(const AlignTrack::AlignTrackType type)
std::pair< AlignModule *, std::vector< Amg::VectorX > > AlignModuleDerivatives