|
ATLAS Offline Software
|
Go to the documentation of this file.
33 const Trk ::TrackParameters_p2* ,
35 throw std::runtime_error(
36 "TrackParametersCnv_p2::persToTrans shouldn't be called any more!");
44 std::unique_ptr<AmgSymMatrix(5)>(transErrorMatrix(persObj,
log));
67 for (
unsigned int i = 0;
i <
size; ++
i){
91 <<
" created - so these parameters cannot be made!" <<
endmsg;
98 AmgSymMatrix(5)* TrackParametersCnv_p2::transErrorMatrix(
const Trk :: TrackParameters_p2 *persObj,MsgStream&
log){
100 if (!persObj->m_errorMatrix.isNull()){
111 TrackParametersCnv_p2::transSurface(
const Trk ::TrackParameters_p2* persObj,
117 if (!persObj->m_transform.empty()){
118 auto transform = std::make_unique<Amg::Transform3D>();
129 log << MSG::WARNING <<
"Free surface of type=" <<
static_cast<int>(
type)
130 <<
" isn't currently supported in TrackParametersCnv_p2" <<
endmsg;
137 if (!
id.get_compact() && persObj->m_associatedDetElementId != 0)
138 id =
Identifier(persObj->m_associatedDetElementId);
143 log << MSG::WARNING <<
"Surface of type=" <<
static_cast<int>(
type)
144 <<
" was not found by the eventCnvTool." <<
endmsg;
156 Trk ::TrackParameters_p2* persObj,
160 bool deleteAtEnd =
false;
167 unsigned int nRows = transObj->parameters().rows();
168 persObj->m_parameters.resize(
nRows);
169 for(
unsigned int i = 0;
i <
nRows;
i++ ){
170 persObj->m_parameters[
i] = transObj->parameters()[
i];
175 if (transObj->covariance()) {
176 newcov = *(transObj->covariance());
180 transObj->momentum(),
181 transObj->charge(), newcov);
182 transObj = curvilinear;
189 if (transObj->covariance()){
205 persObj->m_parameters.resize(7);
206 for (
unsigned int i = 0;
i < 3; ++
i) {
207 persObj->m_parameters[
i] = transObj->position()[
i];
208 persObj->m_parameters[
i + 3] = transObj->momentum()[
i];
210 persObj->m_parameters[6] = transObj->charge();
226 persObj->m_surfaceType =
static_cast<uint8_t>(surf->
type());
235 *surf != s_nominalPerigeeSurface)) {
237 persObj->m_transform);
CurvilinearParametersT< TrackParametersDim, Charged, PlaneSurface > CurvilinearParameters
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
ErrorMatrixCnv_p1 * m_emConverter
static void fillPersSurface(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj, MsgStream &log)
static void eigenTransform3DToVector(const Amg::Transform3D &trans, T &vec)
Convert HepGeom::Transform3D to std :: vector<double>
std::vector< float > m_parameters
void transToPers(const Trk::TrackParameters *transObj, Trk::TrackParameters_p2 *persObj, MsgStream &log)
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
value_type get_compact() const
Get the compact id.
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
TrackParameters_v1 TrackParameters
virtual const Trk::Surface * baseSurface() const
return the base surface (simplified for persistification)
ParametersT< TrackParametersDim, Charged, StraightLineSurface > AtaStraightLine
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
const Amg::Transform3D * cachedTransform() const
Return the cached transformation directly.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
uint8_t m_surfaceType
Used to recreate the correct TrackParameters.
static void eigenMatrixToVector(VECTOR &vec, COVARIANCE &cov, const char *)
Helper fn to get raw data (vec<float>) from the covariance.
static void vectorToEigenTransform3D(const T &vec, Amg::Transform3D &trans)
Convert std :: vector<double> to Amg::Transform3D.
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
static bool isPersistifiableType(const Trk ::TrackParameters *transObj)
void persToTrans(const Trk ::TrackParameters_p2 *persObj, Trk ::TrackParameters *transObj, MsgStream &log)
static void convertTransCurvilinearToPers(const Trk ::TrackParameters *transObj, Trk ::TrackParameters_p2 *persObj)
std::vector< float > values
AmgSymMatrix(5) *TrackParametersCnv_p2
ParametersT< TrackParametersDim, Charged, PlaneSurface > AtaPlane
unsigned constexpr int nRows
Trk::TrackParameters * createTransient(const Trk::TrackParameters_p2 *persObj, MsgStream &log)
constexpr virtual SurfaceType type() const =0
Returns the Surface type to avoid dynamic casts.