40 MsgStream& log )
const {
43 ATH_MSG(
"Converting xAOD::TrackParticleAuxContainer_v1 to current version..." );
56 for(
size_t i = 0; i < oldObj->
size(); ++i ) {
59 oldInt.setStore( oldObj );
62 for(
size_t i = 0; i < newObj->
size(); ++i ) {
65 newInt.setStore( newObj );
69 uint8_t numberOfBLayerHits=0,numberOfBLayerSharedHits=0,numberOfBLayerOutliers=0,numberOfBLayerSplitHits=0,expectBLayerHit=0;
70 std::vector<float> covMatrixVec;
72 for(
size_t i = 0; i < oldInt.
size(); ++i ) {
75 x = oldInt[ i ]->parameterX(
index);
76 y = oldInt[ i ]->parameterY(
index);
77 newInt[ i ]->setRadiusOfFirstHit(std::sqrt(
x*
x +
y*
y));
79 ATH_MSG(
"Can't find first hit!" );
83 static const SG::AuxElement::ConstAccessor< uint8_t > numberOfBLayerHitsAcc(
"numberOfBLayerHits" );
84 static const SG::AuxElement::ConstAccessor< uint8_t > numberOfBLayerSharedHitsAcc(
"numberOfBLayerSharedHits" );
85 static const SG::AuxElement::ConstAccessor< uint8_t > numberOfBLayerOutliersAcc(
"numberOfBLayerOutliers" );
86 static const SG::AuxElement::ConstAccessor< uint8_t > numberOfBLayerSplitHitsAcc(
"numberOfBLayerSplitHits" );
87 static const SG::AuxElement::ConstAccessor< uint8_t > expectBLayerHitAcc(
"expectBLayerHit" );
89 if( numberOfBLayerHitsAcc.isAvailable( *( oldInt[ i ] ) ) ) {
91 numberOfBLayerHits = numberOfBLayerHitsAcc( *( oldInt[ i ] ) );
96 if( numberOfBLayerSharedHitsAcc.isAvailable( *( oldInt[ i ] ) ) ) {
98 numberOfBLayerSharedHits = numberOfBLayerSharedHitsAcc( *( oldInt[ i ] ) );
103 if( numberOfBLayerOutliersAcc.isAvailable( *( oldInt[ i ] ) ) ) {
105 numberOfBLayerOutliers = numberOfBLayerOutliersAcc( *( oldInt[ i ] ) );
110 if( numberOfBLayerSplitHitsAcc.isAvailable( *( oldInt[ i ] ) ) ) {
112 numberOfBLayerSplitHits = numberOfBLayerSplitHitsAcc( *( oldInt[ i ] ) );
117 if( expectBLayerHitAcc.isAvailable( *( oldInt[ i ] ) ) ) {
118 expectBLayerHit = expectBLayerHitAcc( *( oldInt[ i ] ) );
124 static const SG::AuxElement::ConstAccessor< std::vector<float> > definingParametersCovMatrixAcc(
"definingParametersCovMatrix" );
126 if( definingParametersCovMatrixAcc.isAvailable( *( oldInt[ i ] ) ) ) {
128 covMatrixVec = definingParametersCovMatrixAcc( *( oldInt[ i ] ) );
129 if (!covMatrixVec.empty()) {
130 xAOD::ParametersCovMatrix_t cov;
131 Amg::expand( covMatrixVec.begin(), covMatrixVec.end(),cov );
132 newInt[ i ]->setDefiningParametersCovMatrix(cov);
142 ATH_MSG(
"Converting xAOD::TrackParticleAuxContainer_v1 to current version "
virtual void transToPers(const xAOD::TrackParticleAuxContainer *, xAOD::TrackParticleAuxContainer_v1 *, MsgStream &log) const override
Dummy function inherited from the base class.
xAODTrackParticleAuxContainerCnv_v1()
Default constructor.
virtual void persToTrans(const xAOD::TrackParticleAuxContainer_v1 *oldObj, xAOD::TrackParticleAuxContainer *newObj, MsgStream &log) const override
Function converting from the old type to the current one.
Temporary container used until we have I/O for AuxStoreInternal.
Class describing a TrackParticle.
void copyAuxStoreThinned(const SG::IConstAuxStore &orig, SG::IAuxStore ©, const SG::ThinningInfo *info)
Helper to copy an aux store while applying thinning.