ATLAS Offline Software
CompetingRIOsOnTrackCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
8 #include <vector>
10 
12 {
14  // fillTransFromPStore( &m_errorMxCnv, persObj->m_localErrorMatrix, &transObj->m_localErrMat, log );
15 
18 
19  EigenHelpers::vectorToEigenMatrix(dummy.values, transObj->m_localCovariance, "CompetingRIOsOnTrackCnv_p1");
20 
21  #ifdef UseFloatsIn_CompetingRIOsOnTrack
22  auto tmpVector = std::vector<double>();
23  tmpVector.reserve(persObj->m_assignProb.size());
24  for (float itr : persObj->m_assignProb)
25  {
26  tmpVector.push_back((double)itr);
27  }
28  transObj->m_assignProb = std::move(tmpVector);
29  #else
30  transObj->m_assignProb = std::vector<double>(persObj->m_assignProb);
31  #endif
32 
33 }
34 
36 {
37  persObj->m_localParameters = toPersistent( &m_localParCnv, &transObj->m_localParams, log );
38 
39  Trk::ErrorMatrix pMat;
40  EigenHelpers::eigenMatrixToVector(pMat.values, transObj->m_localCovariance, "CompetingRIOsOnTrackCnv_p1");
41  persObj->m_localErrorMatrix = toPersistent( &m_errorMxCnv, &pMat, log );
42 
43  persObj->m_assignProb.assign (transObj->m_assignProb.begin(),
44  transObj->m_assignProb.end());
45 }
Trk::CompetingRIOsOnTrack_p1::m_localErrorMatrix
TPObjRef m_localErrorMatrix
Definition: CompetingRIOsOnTrack_p1.h:27
CompetingRIOsOnTrack.h
CompetingRIOsOnTrackCnv_p1::transToPers
void transToPers(const Trk::CompetingRIOsOnTrack *transObj, Trk::CompetingRIOsOnTrack_p1 *persObj, MsgStream &log)
Definition: CompetingRIOsOnTrackCnv_p1.cxx:35
CompetingRIOsOnTrackCnv_p1::m_errorMxCnv
ErrorMatrixCnv_p1 * m_errorMxCnv
Definition: CompetingRIOsOnTrackCnv_p1.h:31
CompetingRIOsOnTrackCnv_p1::persToTrans
void persToTrans(const Trk::CompetingRIOsOnTrack_p1 *persObj, Trk::CompetingRIOsOnTrack *transObj, MsgStream &log)
Definition: CompetingRIOsOnTrackCnv_p1.cxx:11
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
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...
Definition: TPConverter.h:145
Trk::ErrorMatrix
Definition: ErrorMatrixCnv_p1.h:25
EigenHelpers::vectorToEigenMatrix
static void vectorToEigenMatrix(VECTOR &vec, COVARIANCE &cov, const char *)
Helper fn to fill the covariance from the raw data (vec<float>)
Definition: EigenHelpers.h:22
Trk::CompetingRIOsOnTrack_p1::m_assignProb
std::vector< double > m_assignProb
Definition: CompetingRIOsOnTrack_p1.h:33
Trk::CompetingRIOsOnTrack
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
Definition: CompetingRIOsOnTrack.h:64
Trk::CompetingRIOsOnTrack::m_assignProb
std::vector< AssignmentProb > m_assignProb
assignment probabilities of the ROTs
Definition: CompetingRIOsOnTrack.h:125
EigenHelpers.h
python.xAODType.dummy
dummy
Definition: xAODType.py:4
Trk::CompetingRIOsOnTrack_p1
Definition: CompetingRIOsOnTrack_p1.h:20
Trk::MeasurementBase::m_localParams
LocalParameters m_localParams
Definition: MeasurementBase.h:111
EigenHelpers::eigenMatrixToVector
static void eigenMatrixToVector(VECTOR &vec, COVARIANCE &cov, const char *)
Helper fn to get raw data (vec<float>) from the covariance.
Definition: EigenHelpers.h:30
ITPConverterFor< TRANS_BASE >::toPersistent
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...
Definition: TPConverter.h:119
CompetingRIOsOnTrackCnv_p1::m_localParCnv
LocalParametersCnv_p1 * m_localParCnv
Definition: CompetingRIOsOnTrackCnv_p1.h:30
Trk::ErrorMatrix::values
std::vector< float > values
Definition: ErrorMatrixCnv_p1.h:27
Trk::MeasurementBase::m_localCovariance
Amg::MatrixX m_localCovariance
Definition: MeasurementBase.h:112
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CompetingRIOsOnTrackCnv_p1.h
Trk::CompetingRIOsOnTrack_p1::m_localParameters
TPObjRef m_localParameters
Definition: CompetingRIOsOnTrack_p1.h:25