10 m_originTracksKey{
""},
11 m_scoredTracksKey(
"Tracks"),
14 declareProperty(
"TrackInput" , m_originTracksKey);
15 declareProperty(
"TrackOutput" , m_scoredTracksKey);
16 declareProperty(
"AmbiguityScoreProcessor", m_scoreTool);
27 ATH_CHECK(m_scoreTool.retrieve( DisableTool{m_scoreTool.empty()} ));
28 ATH_CHECK(m_scoredTracksKey.initialize());
29 ATH_CHECK(m_originTracksKey.initialize());
30 return StatusCode::SUCCESS;
36 std::vector<SG::ReadHandle<TrackCollection>> handles = m_originTracksKey.makeHandles(ctx);
38 if (handles.size() > 1){
39 ATH_MSG_WARNING(
"More than one collection has been requested. Only the first collection is taken");
41 auto & theTrackCollectionHandle = handles.at(0);
42 if (not theTrackCollectionHandle.isValid()){
43 ATH_MSG_FATAL(
"Could not retrieve tracks from "<< theTrackCollectionHandle.key() );
44 return StatusCode::FAILURE;
46 const auto & theTrackCollection = *theTrackCollectionHandle;
47 std::unique_ptr<TracksScores> scoredTracks(
new TracksScores);
48 if (m_scoreTool.isEnabled()){
49 m_scoreTool->process(theTrackCollection, scoredTracks.get());
51 scoredTracks->reserve(theTrackCollection.size());
52 for(
const Track* trk: theTrackCollection ){
53 scoredTracks->push_back( std::pair<const Track*, float>(trk, 0));
59 return StatusCode::SUCCESS;
68 if (m_scoreTool.isEnabled()) {
69 m_scoreTool->statistics();
71 return StatusCode::SUCCESS;