17 const std::string& name,
18 const IInterface* parent )
24 declareInterface< ITrackCollectionCnvTool >(
this );
33 return StatusCode::SUCCESS;
39 ATH_MSG_DEBUG(
"Sizes of containers before conversion: aod, xaod: " << aod->
size() <<
", " << xaod->
size() );
44 for( ;itr!=end;++itr ) {
58 ATH_MSG_DEBUG(
"Sizes of containers after conversion: aod, xaod: " << aod->
size() <<
", " << xaod->
size() );
60 return StatusCode::SUCCESS;
66 ATH_MSG_DEBUG(
"convertAndAugment: Sizes of containers before conversion: aod, xaod: " << aod->
size() <<
", " << xaod->
size() );
67 ATH_MSG_DEBUG(
"convertAndAugment: Size of track map: " << trk_map->size() );
71 ObservedTrackMap::const_iterator itrMap = trk_map->begin();
74 if(aod->
size() != trk_map->size()){
75 ATH_MSG_ERROR(
"convertAndAugment: Number of tracks different in collection to convert vs. observed tracks map: "<<aod->
size()<<
" vs. "<<trk_map->size());
76 return StatusCode::FAILURE;
79 for( ;itr!=end;++itr ) {
93 IdDec (*particle) = (*itrMap).first;
95#define DECORATE2(NAME, SEL, TYPE) \
96 static const SG::Decorator<TYPE> NAME##Dec (#NAME); \
97 NAME##Dec(*particle) = std::get<xAOD::ObserverToolIndex::SEL>((*itrMap).second)
98#define DECORATE(NAME, TYPE) DECORATE2(NAME, NAME, TYPE)
108 DECORATE(numSharedOrSplitPixels,
int);
113 DECORATE2(thishasblayer, hasIBLHit,
int);
114 DECORATE2(hassharedblayer, hasSharedIBLHit,
int);
115 DECORATE2(hassharedpixel, hasSharedPixel,
int);
116 DECORATE2(firstisshared, firstPixIsShared,
int);
131 const std::vector<xAOD::RejectionStep>& v_rejectStep =
132 std::get<xAOD::ObserverToolIndex::rejectStep_full>((*itrMap).second);
133 const std::vector<xAOD::RejectionReason>& v_rejectReason =
134 std::get<xAOD::ObserverToolIndex::rejectReason_full>((*itrMap).second);
137 rejectStep_fullDec(*particle).assign (v_rejectStep.begin(), v_rejectStep.end());
138 rejectReason_fullDec(*particle).assign (v_rejectReason.begin(), v_rejectReason.end());
139 ATH_MSG_DEBUG(
"convertAndAugment: Augmenting TrackParticle with id "
140 << IdDec(*particle) <<
" and rejectReason "
141 << rejectReasonDec(*particle)
142 <<
" (has chi2 = " << particle->chiSquared() <<
")");
146 "convertAndAugment: Sizes of containers after conversion: aod, xaod: "
147 << aod->
size() <<
", " << xaod->
size());
148 return StatusCode::SUCCESS;
166 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
std::map< int, std::tuple< Trk::Track *, double, xAOD::RejectionStep, xAOD::RejectionReason, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, float, float, int, std::vector< xAOD::RejectionStep >, std::vector< xAOD::RejectionReason > > > ObservedTrackMap
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
DataModel_detail::const_iterator< DataVector > const_iterator
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.
ElementLink implementation for ROOT usage.
Helper class to provide type-safe access to aux data.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".