32 const Trk ::TrackParameters_p2* ,
33 Trk ::TrackParameters* , MsgStream& ) {
34 throw std::runtime_error(
35 "TrackParametersCnv_p2::persToTrans shouldn't be called any more!");
43 std::unique_ptr<AmgSymMatrix(5)>(transErrorMatrix(persObj, log));
55 for (
unsigned int i=0; i<size; ++i) parameters[i]=persObj->
m_parameters[i];
66 for (
unsigned int i = 0; i < size; ++i){
89 log << MSG::DEBUG <<
"No surface of type=" <<
static_cast<int>(
type)
90 <<
" created - so these parameters cannot be made!" <<
endmsg;
97AmgSymMatrix(5)* TrackParametersCnv_p2::transErrorMatrix(
const Trk :: TrackParameters_p2 *persObj,MsgStream& log){
99 if (!persObj->m_errorMatrix.isNull()){
104 Amg::expand(dummy.values.begin(), dummy.values.end(), *cov);
116 if (!persObj->m_transform.empty()){
117 auto transform = std::make_unique<Amg::Transform3D>();
118 EigenHelpers::vectorToEigenTransform3D( persObj->m_transform, *transform.get());
128 log << MSG::WARNING <<
"Free surface of type=" <<
static_cast<int>(
type)
129 <<
" isn't currently supported in TrackParametersCnv_p2" <<
endmsg;
136 if (!
id.get_compact() && persObj->m_associatedDetElementId != 0)
137 id =
Identifier(persObj->m_associatedDetElementId);
142 log << MSG::WARNING <<
"Surface of type=" <<
static_cast<int>(
type)
143 <<
" was not found by the eventCnvTool." <<
endmsg;
155 Trk ::TrackParameters_p2* persObj,
159 bool deleteAtEnd =
false;
166 unsigned int nRows = transObj->parameters().rows();
167 persObj->m_parameters.resize( nRows);
168 for(
unsigned int i = 0; i < nRows; i++ ){
169 persObj->m_parameters[i] = transObj->parameters()[i];
174 if (transObj->covariance()) {
175 newcov = *(transObj->covariance());
179 transObj->momentum(),
180 transObj->charge(), newcov);
181 transObj = curvilinear;
188 if (transObj->covariance()){
200 const Trk ::TrackParameters* transObj, Trk ::TrackParameters_p2* persObj) {
204 persObj->m_parameters.resize(7);
205 for (
unsigned int i = 0; i < 3; ++i) {
206 persObj->m_parameters[i] = transObj->position()[i];
207 persObj->m_parameters[i + 3] = transObj->momentum()[i];
209 persObj->m_parameters[6] = transObj->charge();
225 persObj->m_surfaceType =
static_cast<uint8_t
>(surf->
type());
234 *surf != s_nominalPerigeeSurface)) {
236 persObj->m_transform);
#define AmgSymMatrix(dim)
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
void persToTrans(const Trk ::TrackParameters_p2 *persObj, Trk ::TrackParameters *transObj, MsgStream &log)
Trk::TrackParameters * createTransient(const Trk::TrackParameters_p2 *persObj, MsgStream &log)
ErrorMatrixCnv_p1 * m_emConverter
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
void transToPers(const Trk::TrackParameters *transObj, Trk::TrackParameters_p2 *persObj, MsgStream &log)
static void convertTransCurvilinearToPers(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj)
static void fillPersSurface(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj, MsgStream &log)
AmgSymMatrix(5) *transErrorMatrix(const Trk const Trk::Surface * transSurface(const Trk ::TrackParameters_p2 *persObj, Trk::SurfaceType type, MsgStream &log)
static bool isPersistifiableType(const Trk ::TrackParameters *transObj)
std::vector< float > values
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
Abstract Base Class for tracking surfaces.
const Amg::Transform3D * cachedTransform() const
Return the cached transformation directly.
virtual const Trk::Surface * baseSurface() const
return the base surface (simplified for persistification)
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
virtual constexpr SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.
std::vector< float > m_parameters
uint8_t m_surfaceType
Used to recreate the correct TrackParameters.
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
static void eigenMatrixToVector(VECTOR &vec, COVARIANCE &cov, const char *)
SurfaceType
This enumerator simplifies the persistency & calculations,.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
ParametersT< TrackParametersDim, Charged, StraightLineSurface > AtaStraightLine
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
ParametersBase< TrackParametersDim, Charged > TrackParameters
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane