ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool Class Referencefinal

#include <DenseEnvironmentsAmbiguityScoreProcessorTool.h>

Inheritance diagram for Trk::DenseEnvironmentsAmbiguityScoreProcessorTool:
Collaboration diagram for Trk::DenseEnvironmentsAmbiguityScoreProcessorTool:

Public Types

enum  ScoreCategory {
  ScoreCategory::kNtracks, ScoreCategory::kNcandidates, ScoreCategory::kNcandScoreZero, ScoreCategory::kNcandDouble,
  ScoreCategory::kNaccept, ScoreCategory::kNCounter
}
 
using Counter = AmbiCounter< ScoreCategory >
 
typedef std::multimap< TrackScore, const Track * > TrackScoreMap
 
typedef std::vector< const PrepRawData * > PrdSignature
 
typedef std::set< PrdSignaturePrdSignatureSet
 

Public Member Functions

 DenseEnvironmentsAmbiguityScoreProcessorTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~DenseEnvironmentsAmbiguityScoreProcessorTool ()
 
virtual StatusCode initialize () override final
 
virtual StatusCode finalize () override final
 
virtual void process (const TrackCollection &tracks, TracksScores *trackScoreTrackMap) const override final
 Do actual processing of event. More...
 
void statistics () override
 statistics output to be called by algorithm during finalize. More...
 
void dumpStat (MsgStream &out) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void addNewTracks (const TrackCollection &tracks, TracksScores *trackScoreTrackMap) const
 Add passed TrackCollection, and Trk::PrepRawData from tracks to caches. More...
 
void overlappingTracks (const TracksScores *scoreTrackMap, InDet::PixelGangedClusterAmbiguities *splitClusterMap, Trk::ClusterSplitProbabilityContainer &splitProbContainer, Trk::PRDtoTrackMap &prd_to_track_map) const
 Find SiS Tracks that share hits in the track score map. More...
 
void updatePixelSplitInformationForCluster (const std::pair< const InDet::PixelCluster *const, const Trk::TrackParameters * > &clusterTrkPara, InDet::PixelGangedClusterAmbiguities *splitClusterMap, Trk::ClusterSplitProbabilityContainer &splitProbContainer) const
 Update pixel split information based using the fitted track. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< ITrackScoringToolm_scoringTool {this, "ScoringTool", "Trk::TrackScoringTool/TrackScoringTool" }
 Scoring tool This tool is used to 'score' the tracks, i.e. More...
 
ToolHandle< Trk::IPRDtoTrackMapToolm_assoTool {this, "AssociationTool", "InDet::InDetPRDtoTrackMapToolGangedPixels" }
 
ToolHandle< Trk::IPRDtoTrackMapToolm_assoToolNotGanged {this, "AssociationToolNotGanged", "Trk::PRDtoTrackMapTool" }
 
ToolHandle< InDet::IPixelClusterSplitProbToolm_splitProbTool {this, "SplitProbTool", "InDet::NnPixelClusterSplitProbTool/NnPixelClusterSplitProbTool" }
 recalculate split prob tool More...
 
PublicToolHandle< Trk::ITrkObserverToolm_observerTool {this, "ObserverTool", "", "track observer within ambiguity solver"}
 Observer tool This tool is used to observe the tracks and their 'score'. More...
 
SG::ReadHandleKey< InDet::PixelGangedClusterAmbiguitiesm_splitClusterMapKey_last
 cluster split information generated by previous instances More...
 
SG::WriteHandleKey< InDet::PixelGangedClusterAmbiguitiesm_splitClusterMapKey
 cluster split information which m_splitClusterMap_last will be merged into More...
 
SG::WriteHandleKey< Trk::PRDtoTrackMapm_assoMapName {this,"AssociationMapName",""}
 key for the PRDtoTrackMap to be used by the ambiguity process to resolve the ambiguities. More...
 
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainerm_clusterSplitProbContainerIn {this,"InputClusterSplitProbabilityName",""}
 the key given to the newly created association map More...
 
SG::WriteHandleKey< Trk::ClusterSplitProbabilityContainerm_clusterSplitProbContainerOut {this,"OutputClusterSplitProbabilityName",""}
 the key given to the newly created association map More...
 
float m_sharedProbCut
 NN split sprob cut for 2 particle clusters. More...
 
float m_sharedProbCut2
 NN split sprob cut for 3 particle clusters. More...
 
std::vector< float > m_etaBounds
 eta intervals for internal monitoring More...
 
std::mutex m_statMutex
 
Counter m_stat ATLAS_THREAD_SAFE
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 40 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

Member Typedef Documentation

◆ Counter

◆ PrdSignature

◆ PrdSignatureSet

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TrackScoreMap

Member Enumeration Documentation

◆ ScoreCategory

Enumerator
kNtracks 
kNcandidates 
kNcandScoreZero 
kNcandDouble 
kNaccept 
kNCounter 

Definition at line 44 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

44  {
45  kNtracks,
46  kNcandidates,
47  kNcandScoreZero,
48  kNcandDouble,
49  kNaccept,
50  kNCounter
51  };

Constructor & Destructor Documentation

◆ DenseEnvironmentsAmbiguityScoreProcessorTool()

Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::DenseEnvironmentsAmbiguityScoreProcessorTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 24 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

27  :
28  AthAlgTool(t,n,p),
29  m_etaBounds{0.8, 1.6, 2.5,4.0},
30  m_stat(m_etaBounds)
31 {
32 
33  declareInterface<ITrackAmbiguityScoreProcessorTool>(this);
34  declareProperty("SplitClusterMap_old" , m_splitClusterMapKey_last);
35  declareProperty("SplitClusterMap_new" , m_splitClusterMapKey);
36  declareProperty("sharedProbCut" , m_sharedProbCut = 0.3);
37  declareProperty("sharedProbCut2" , m_sharedProbCut2 = 0.3);
38  declareProperty("etaBounds" , m_etaBounds,"eta intervals for internal monitoring");
39 
40 }

◆ ~DenseEnvironmentsAmbiguityScoreProcessorTool()

Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::~DenseEnvironmentsAmbiguityScoreProcessorTool ( )
virtualdefault

Member Function Documentation

◆ addNewTracks()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks ( const TrackCollection tracks,
Trk::TracksScores trackScoreTrackMap 
) const
private

Add passed TrackCollection, and Trk::PrepRawData from tracks to caches.

Parameters
tracksthe TrackCollection is looped over, and each Trk::Track is added to the various caches. The Trk::PrepRawData from each Trk::Track are added to the IPRD_AssociationTool

Definition at line 163 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

164  {
166  stat.newEvent();
167  std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap( m_assoTool->createPRDtoTrackMap() );
168  PrdSignatureSet prdSigSet;
169  ATH_MSG_DEBUG ("Number of tracks at Input: "<<tracks.size());
170  const std::array<ScoreCategory, 3> categoryMapping {ScoreCategory::kNcandScoreZero, ScoreCategory::kNcandDouble, ScoreCategory::kNaccept};
171  constexpr bool dropDuplicateTracks{true};
172  int nZeroScore = 0;
173  int nDuplicates = 0;
174  int nToMap = 0;
175  for(const Track* pThisTrack : tracks) {
176  ATH_MSG_VERBOSE ("Processing track candidate "<<pThisTrack);
177  stat.incrementCounterByRegion(ScoreCategory::kNcandidates,pThisTrack); // @TODO should go to the score processor
178  TrackScore score = m_scoringTool->score(*pThisTrack);
179  const auto category =
181  dropDuplicateTracks,
182  m_assoTool, *prdToTrackMap,
183  prdSigSet);
184  if (category<categoryMapping.size()) {
185  stat.incrementCounterByRegion(categoryMapping[category],pThisTrack);
186  }
187  ATH_MSG_DEBUG(AmbiguityProcessor::debugMessage[category]);
188 
190  ATH_MSG_VERBOSE ("Track ("<< pThisTrack <<") has score "<<score);
191  trackScoreTrackMap->push_back(std::make_pair(pThisTrack, -score));
192  if (m_observerTool.isEnabled()) {
193  nToMap++;
194  }
195  } else if (m_observerTool.isEnabled() &&
197  int input_track_uid = AmbiguityProcessor::getUid();
198  m_observerTool->addInputTrack(input_track_uid, *pThisTrack);
199  m_observerTool->updateTrackMap(input_track_uid,
200  static_cast<double>(score),
203  nZeroScore++;
204  } else if (m_observerTool.isEnabled() &&
206  int input_track_uid = AmbiguityProcessor::getUid();
207  m_observerTool->addInputTrack(input_track_uid, *pThisTrack);
208  m_observerTool->updateTrackMap(input_track_uid,
209  static_cast<double>(score),
212  nDuplicates++;
213  }
214  }
215  {
216  std::lock_guard<std::mutex> lock(m_statMutex);
217  m_stat += stat;
218  }
219  if (m_observerTool.isEnabled()){
220  if ((unsigned int) (nZeroScore+nDuplicates+nToMap) != tracks.size()){
221  ATH_MSG_ERROR("(nZeroScore+nDuplicates+nToMap) = "<<nZeroScore+nDuplicates+nToMap<<" but tracks.size() = "<<tracks.size());
222  }
223  else{
224  ATH_MSG_DEBUG("Track observer too sanity check passed!");
225  }
226  }
227 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ dumpStat()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::dumpStat ( MsgStream &  out) const

Definition at line 361 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

362 {
363  auto parseFileName=[](const std::string & fullname){
364  auto dotPosition = fullname.rfind('.');
365  auto slashPosition = fullname.rfind('/');
366  auto stringLength = dotPosition - slashPosition;
367  return fullname.substr(slashPosition, stringLength);
368  };
369  std::streamsize ss = out.precision();
370  int iw=9;
371  out << "Output from ";
372  out << parseFileName(__FILE__);
373  out << "::";
374  out << __func__;
375  out << "\n";
376  out << "------------------------------------------------------------------------------------" << "\n";
377  out << " Number of events processed : "<< m_stat.globalCount(Counter::nEvents) << "\n";
378  if (m_stat.globalCount(Counter::nInvalidTracks)>0) {
379  out << " Number of invalid tracks : "<< m_stat.globalCount(Counter::nInvalidTracks) << "\n";
380  }
381  if (m_stat.globalCount(Counter::nTracksWithoutParam)>0) {
382  out << " Tracks without parameters : "<< m_stat.globalCount(Counter::nTracksWithoutParam) << "\n";
383  }
384  out << " statistics by eta range ------All---Barrel---Trans.-- Endcap-- Forwrd-- " << "\n";
385  out << "------------------------------------------------------------------------------------" << "\n";
386  out << m_stat.dumpRegions(" Number of candidates at input :", ScoreCategory::kNcandidates,iw);
387  out << m_stat.dumpRegions(" - candidates rejected score 0 :", ScoreCategory::kNcandScoreZero,iw);
388  out << m_stat.dumpRegions(" - candidates rejected as double :", ScoreCategory::kNcandDouble,iw);
389  out << "------------------------------------------------------------------------------------" << "\n";
390  out << std::setiosflags(std::ios::fixed | std::ios::showpoint) << std::setprecision(2)
391  << " definition: ( 0.0 < Barrel < " << m_etaBounds[Counter::iBarrel] << " < Transition < " << m_etaBounds[Counter::iTransi]
392  << " < Endcap < " << m_etaBounds[Counter::iEndcap] << " < Forward < " << m_etaBounds[Counter::iForwrd] << " )" << "\n";
393  out << "------------------------------------------------------------------------------------" << "\n";
394  out << std::setprecision(ss);
395 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::finalize ( )
finaloverridevirtual

Definition at line 74 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

74  {
75  return StatusCode::SUCCESS;
76 }

◆ initialize()

StatusCode Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::initialize ( )
finaloverridevirtual

Definition at line 47 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

47  {
48  StatusCode sc = StatusCode::SUCCESS;
49  ATH_CHECK( m_scoringTool.retrieve());
50  ATH_CHECK( m_assoTool.retrieve()) ;
51  ATH_CHECK( m_assoToolNotGanged.retrieve( DisableTool{m_assoToolNotGanged.empty()} )) ;
53 
54  ATH_CHECK(m_splitProbTool.retrieve( DisableTool{m_splitProbTool.empty()} ));
57 
60 
61  ATH_CHECK(m_observerTool.retrieve(DisableTool{m_observerTool.empty()}));
62 
63  if (m_etaBounds.size() != Counter::nRegions) {
64  ATH_MSG_FATAL("There must be exactly " << (Counter::nRegions) << " eta bounds but "
65  << m_etaBounds.size() << " are set." );
66  return StatusCode::FAILURE;
67  }
68 
69  return sc;
70 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & Trk::ITrackAmbiguityScoreProcessorTool::interfaceID ( )
inlinestaticinherited

Definition at line 37 of file ITrackAmbiguityScoreProcessorTool.h.

38 {
39  return IID_ITrackAmbiguityScoreProcessorTool;
40 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ overlappingTracks()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks ( const TracksScores scoreTrackMap,
InDet::PixelGangedClusterAmbiguities splitClusterMap,
Trk::ClusterSplitProbabilityContainer splitProbContainer,
Trk::PRDtoTrackMap prd_to_track_map 
) const
private

Find SiS Tracks that share hits in the track score map.

Definition at line 270 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

274 {
275  const Trk::IPRDtoTrackMapTool *the_asso_tool = (m_assoToolNotGanged.isEnabled() ? &(*m_assoToolNotGanged) : &(*m_assoTool));
276  // Function currently does nothing useful except for printing debug information
277  ATH_MSG_DEBUG ("Starting to resolve overlapping tracks");
278  // Map to add all pixel clusters on track to
279  std::map< const InDet::PixelCluster*, const Trk::TrackParameters* > setOfPixelClustersOnTrack;
280  std::map< const InDet::PixelCluster*, const Trk::Track* > setOfPixelClustersToTrackAssoc;
281  // Fill pixel cluster into the above map
282  // Fill all PRD infromation into the association tool
283  for( const std::pair<const Track*, float>& scoredTracksItem : *scoredTracks ){
284  // clean it out to make sure not to many shared hits
285  ATH_MSG_VERBOSE ("--- Adding next track "<<scoredTracksItem.first
286  << ":" << (scoredTracksItem.first->trackParameters() ? scoredTracksItem.first->trackParameters()->front()->pT() : -1.)
287  << ", " << scoredTracksItem.first->measurementsOnTrack()->size()
288  <<"\t with score "<<-scoredTracksItem.second << " to PRD map");
289 
290  // This should only be done in region defined by Jets
291  // ..... for now let do the whole detector coudl be slow
292  if(the_asso_tool->addPRDs( prdToTrackMap, *scoredTracksItem.first ).isSuccess()){
293  ATH_MSG_VERBOSE("--- Added hits to the association tool");
294  } else {
295  ATH_MSG_VERBOSE("--- Failed to add hits to the association tool");
296  continue;
297  }
298  // get all prds on 'track'
299  const Trk::TrackStates* tsosVec = scoredTracksItem.first->trackStateOnSurfaces();
300  if(!tsosVec){
301  ATH_MSG_WARNING("TSOS vector does not exist");
302  continue;
303  }
304  ATH_MSG_VERBOSE("---> Looping over TSOS's to allow for cluster updates: "<< tsosVec->size() );
305  Trk::TrackStates::const_iterator tsos = tsosVec->begin();
306  for (; tsos != tsosVec->end(); ++tsos) {
307  const MeasurementBase* measurement = (*tsos)->measurementOnTrack();
308  if(!measurement || ! (*tsos)->trackParameters()){
309  ATH_MSG_VERBOSE("---- TSOS has either no measurement or parameters: "<< measurement << " " << (*tsos)->trackParameters() );
310  continue;
311  }
312  if (!measurement->type(Trk::MeasurementBaseType::RIO_OnTrack)) continue;
313  const Trk::RIO_OnTrack* rio = static_cast<const Trk::RIO_OnTrack*>(measurement);
315  const InDet::PixelCluster* pixel = static_cast<const InDet::PixelCluster*> ( rio->prepRawData() );
316  assert( pixel);
317  //Update the pixel split information if the element is unique (The second element of the pair indiciates if the element was inserted into the map)
318  auto ret = setOfPixelClustersOnTrack.insert(std::make_pair( pixel, (*tsos)->trackParameters() ));
319  if (ret.second && m_splitProbTool.isEnabled()) {
320  updatePixelSplitInformationForCluster( *(ret.first), splitClusterMap, splitProbContainer);
321  }
322  setOfPixelClustersToTrackAssoc.insert( std::make_pair( pixel, scoredTracksItem.first ) );
323  }
324  }
325  }
326  if (msgLvl(MSG::VERBOSE)) {
327  // now loop as long as map is not empty
328  std::vector< std::pair< const InDet::PixelCluster*, const Trk::Track* > > sorted;
329  sorted.reserve( setOfPixelClustersToTrackAssoc.size() );
330  for( const std::pair< const InDet::PixelCluster* const, const Trk::Track* > &pixelTrackItem : setOfPixelClustersToTrackAssoc ) {
331  sorted.emplace_back(pixelTrackItem );
332  }
333  std::sort( sorted.begin(), sorted.end(), [](const std::pair< const InDet::PixelCluster*, const Trk::Track* > &a,
334  const std::pair< const InDet::PixelCluster*, const Trk::Track* > &b) {
335  return a.first->getHashAndIndex().collHash() < b.first->getHashAndIndex().collHash()
336  || ( a.first->getHashAndIndex().collHash() == b.first->getHashAndIndex().collHash()
337  && a.first->getHashAndIndex().objIndex() < b.first->getHashAndIndex().objIndex() );
338  });
339  for (const std::pair< const InDet::PixelCluster*, const Trk::Track* > &pixelTrackItem : sorted) {
340  ATH_MSG_VERBOSE ("---- Checking if track shares pixel hits if other tracks: " << pixelTrackItem.first << " with R " << pixelTrackItem.first->globalPosition().perp() );
341  // find out how many tracks use this hit already
342  Trk::PRDtoTrackMap::ConstPrepRawDataTrackMapRange range = prdToTrackMap.onTracks( *pixelTrackItem.first );
343  int numberOfTracksWithThisPrd = std::distance(range.first,range.second);
344  if (msgLvl(MSG::VERBOSE)) {
345  TString tracks("---- number of tracks with this shared Prd: ");
346  tracks += numberOfTracksWithThisPrd;
347  for (Trk::IPRD_AssociationTool::ConstPRD_MapIt it =range.first; it != range.second;++it ){
348  tracks += " ";
349  tracks += Form( " %p",(void*)(it->second));
350  double pt = (it->second->trackParameters() ? it->second->trackParameters()->front()->pT() : -1);
351  tracks += Form(":%.3f", pt);
352  tracks += Form(",%i",static_cast<int>(it->second->measurementsOnTrack()->size()));
353  }
354  ATH_MSG_VERBOSE (tracks);
355  }
356  }
357  }
358 }

◆ process()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::process ( const TrackCollection tracks,
Trk::TracksScores trackScoreTrackMap 
) const
finaloverridevirtual

Do actual processing of event.

Takes a track container, and then returns the tracks which have been selected

Implements Trk::ITrackAmbiguityScoreProcessorTool.

Definition at line 96 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

97  {
98  const EventContext& ctx = Gaudi::Hive::currentContext();
99  InDet::PixelGangedClusterAmbiguities *splitClusterMap = nullptr;
100  if(!m_splitClusterMapKey.key().empty()){
101  if(!m_splitClusterMapKey_last.key().empty()){
103  if ( !splitClusterMapHandle_last.isValid() ){
104  ATH_MSG_ERROR("Could not read last splitClusterMap.");
105  }
106  splitClusterMap = new InDet::PixelGangedClusterAmbiguities(*splitClusterMapHandle_last);
107  }
108  else{
109  splitClusterMap = new InDet::PixelGangedClusterAmbiguities();
110  }
111  }
112 
114  if (!m_clusterSplitProbContainerIn.key().empty()) {
115  splitProbContainerIn = SG::ReadHandle( m_clusterSplitProbContainerIn, ctx);
116  if (!splitProbContainerIn.isValid()) {
117  ATH_MSG_ERROR( "Failed to get input cluster split probability container " << m_clusterSplitProbContainerIn.key());
118  }
119  }
120  std::unique_ptr<Trk::ClusterSplitProbabilityContainer> splitProbContainerCleanup(!m_clusterSplitProbContainerIn.key().empty()
121  ? std::make_unique<ClusterSplitProbabilityContainer>(*splitProbContainerIn)
122  : std::make_unique<ClusterSplitProbabilityContainer>());
124  Trk::ClusterSplitProbabilityContainer *splitProbContainer;
125 
126  // Have to write the ClusterSplitProbabilityContainer first, to allow child tools to already use this new container.
127  if (!m_clusterSplitProbContainerOut.key().empty()) {
129  if (splitProbContainerHandle.record(std::move(splitProbContainerCleanup)).isFailure()) {
130  ATH_MSG_FATAL( "Failed to record output cluster split probability container " << m_clusterSplitProbContainerOut.key());
131  }
132  splitProbContainer=splitProbContainerHandle.ptr();
133  }
134  else {
135  splitProbContainer=splitProbContainerCleanup.get();
136  }
137 
138  addNewTracks(tracks, trackScoreTrackMap);
139  std::unique_ptr<Trk::PRDtoTrackMap> prdToTrackMap( m_assoToolNotGanged.isEnabled()
140  ? m_assoToolNotGanged->createPRDtoTrackMap()
141  : m_assoTool->createPRDtoTrackMap() );
142  overlappingTracks(trackScoreTrackMap, splitClusterMap, *splitProbContainer, *prdToTrackMap);
143  if (!m_assoMapName.key().empty()) {
145  (m_assoToolNotGanged.isEnabled()
146  ? m_assoToolNotGanged->reduceToStorableMap(std::move(prdToTrackMap))
147  : m_assoTool->reduceToStorableMap(std::move(prdToTrackMap)) )).isFailure()) {
148  ATH_MSG_FATAL("Failed to add PRD to track association map " << m_assoMapName.key() << ".");
149  }
150  }
151  if(!m_splitClusterMapKey.key().empty()){
153  splitClusterMapHandle = std::unique_ptr<InDet::PixelGangedClusterAmbiguities>(splitClusterMap);
154  if( !splitClusterMapHandle.isValid() ){
155  ATH_MSG_ERROR("Could not record splitClusterMap.");
156  }
157  }
158 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ statistics()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::statistics ( )
overridevirtual

statistics output to be called by algorithm during finalize.

Implements Trk::ITrackAmbiguityScoreProcessorTool.

Definition at line 79 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

79  {
80  if (msgLvl(MSG::INFO)) {
81  MsgStream &out=msg(MSG::INFO);
82  out << " -- statistics " << "\n";
83  std::lock_guard<std::mutex> lock( m_statMutex );
84  dumpStat(out);
85  out << endmsg;
86  }
87 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updatePixelSplitInformationForCluster()

void Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformationForCluster ( const std::pair< const InDet::PixelCluster *const, const Trk::TrackParameters * > &  clusterTrkPara,
InDet::PixelGangedClusterAmbiguities splitClusterMap,
Trk::ClusterSplitProbabilityContainer splitProbContainer 
) const
private

Update pixel split information based using the fitted track.

Definition at line 231 of file DenseEnvironmentsAmbiguityScoreProcessorTool.cxx.

235 {
236 
237  // Recalculate the split prob with the use of the track parameters
238  InDet::PixelClusterSplitProb splitProb = m_splitProbTool->splitProbability( *clusterTrkPara.first, *clusterTrkPara.second );
239  // update the split prob information on the cluster -- the use of the split flag is now questionable -- possible itP will now indicate if the cluster is shared between multiple tracks
240  const InDet::PixelCluster* pixelCluster = clusterTrkPara.first;
241  if (msgLvl(MSG::DEBUG)) {
243  ? splitProbContainer.splitProbability(pixelCluster)
245 
246  ATH_MSG_DEBUG ( "---- "<< pixelCluster->globalPosition().perp()
247  <<" Updating split probs 1: " << pixelCluster->identify() << ": Old " << splitProbCurrent.splitProbability1() << " New " << splitProb.splitProbability(2)
248  <<" Probs 2: Old " << splitProbCurrent.splitProbability2() << " New " << splitProb.splitProbability(3)
249  << "\n"
250  << " --- pixelCluster: " << *pixelCluster
251  << "\n"
252  << " --- trk params: " << *clusterTrkPara.second );
253  }
255  splitProbNew = splitProbContainer.setSplitInformation(pixelCluster, splitProb.splitProbability(2), splitProb.splitProbability(3));
256 
257  if(splitClusterMap){
258  if( splitProbNew.splitProbability2() >= m_sharedProbCut2){
259  splitClusterMap->insert(std::make_pair( pixelCluster, pixelCluster ) );
260  splitClusterMap->insert(std::make_pair( pixelCluster, pixelCluster ) );
261  } else if ( splitProbNew.splitProbability1() >= m_sharedProbCut ){
262  splitClusterMap->insert(std::make_pair( pixelCluster, pixelCluster ) );
263  }
264  }
265 
266 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

Counter m_stat Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::ATLAS_THREAD_SAFE
mutableprivate

◆ m_assoMapName

SG::WriteHandleKey<Trk::PRDtoTrackMap> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoMapName {this,"AssociationMapName",""}
private

key for the PRDtoTrackMap to be used by the ambiguity process to resolve the ambiguities.

the key given to the newly created association map

Definition at line 118 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_assoTool

ToolHandle<Trk::IPRDtoTrackMapTool> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoTool {this, "AssociationTool", "InDet::InDetPRDtoTrackMapToolGangedPixels" }
private

◆ m_assoToolNotGanged

ToolHandle<Trk::IPRDtoTrackMapTool> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoToolNotGanged {this, "AssociationToolNotGanged", "Trk::PRDtoTrackMapTool" }
private

◆ m_clusterSplitProbContainerIn

SG::ReadHandleKey<Trk::ClusterSplitProbabilityContainer> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_clusterSplitProbContainerIn {this,"InputClusterSplitProbabilityName",""}
private

the key given to the newly created association map

Definition at line 121 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_clusterSplitProbContainerOut

SG::WriteHandleKey<Trk::ClusterSplitProbabilityContainer> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_clusterSplitProbContainerOut {this,"OutputClusterSplitProbabilityName",""}
private

the key given to the newly created association map

Definition at line 123 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etaBounds

std::vector<float> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_etaBounds
private

eta intervals for internal monitoring

Definition at line 132 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_observerTool

PublicToolHandle<Trk::ITrkObserverTool> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_observerTool {this, "ObserverTool", "", "track observer within ambiguity solver"}
private

Observer tool This tool is used to observe the tracks and their 'score'.

Definition at line 109 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_scoringTool

ToolHandle<ITrackScoringTool> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_scoringTool {this, "ScoringTool", "Trk::TrackScoringTool/TrackScoringTool" }
private

Scoring tool This tool is used to 'score' the tracks, i.e.

to quantify what a good track is.

Todo:
The actual tool that is used should be configured through job options

Definition at line 95 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_sharedProbCut

float Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_sharedProbCut
private

NN split sprob cut for 2 particle clusters.

Definition at line 127 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_sharedProbCut2

float Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_sharedProbCut2
private

NN split sprob cut for 3 particle clusters.

Definition at line 130 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_splitClusterMapKey

SG::WriteHandleKey<InDet::PixelGangedClusterAmbiguities> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitClusterMapKey
private

cluster split information which m_splitClusterMap_last will be merged into

Definition at line 115 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_splitClusterMapKey_last

SG::ReadHandleKey<InDet::PixelGangedClusterAmbiguities> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitClusterMapKey_last
private

cluster split information generated by previous instances

Definition at line 112 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_splitProbTool

ToolHandle<InDet::IPixelClusterSplitProbTool> Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitProbTool {this, "SplitProbTool", "InDet::NnPixelClusterSplitProbTool/NnPixelClusterSplitProbTool" }
private

recalculate split prob tool

Definition at line 105 of file DenseEnvironmentsAmbiguityScoreProcessorTool.h.

◆ m_statMutex

std::mutex Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_statMutex
mutableprivate

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
AmbiCounter::iEndcap
@ iEndcap
Definition: AmbiCounter.h:19
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
AmbiguityProcessor::TrackAccepted
@ TrackAccepted
Definition: AmbiguityProcessorUtility.h:24
AmbiguityProcessor::categoriseTrack
TrackFilterCategory categoriseTrack(const Trk::Track &track, const Trk::TrackScore &score, const bool dropDuplicates, const AssociationTool &associate, AssociationMap &map, DuplicationCheckSet &set)
Definition: AmbiguityProcessorUtility.cxx:15
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
xAOD::addNewTracks
@ addNewTracks
Definition: TrackingPrimitives.h:461
xAOD::trackScoreZero
@ trackScoreZero
Definition: TrackingPrimitives.h:476
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::ScoreCategory::kNcandScoreZero
@ kNcandScoreZero
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_clusterSplitProbContainerOut
SG::WriteHandleKey< Trk::ClusterSplitProbabilityContainer > m_clusterSplitProbContainerOut
the key given to the newly created association map
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:124
InDet::PixelClusterSplitProb
Definition: PixelClusterSplitProb.h:25
Trk::ClusterSplitProbabilityContainer::setSplitInformation
ProbabilityInfo & setSplitInformation(const PrepRawData *cluster, float prob1, float prob2)
Definition: ClusterSplitProbabilityContainer.h:45
InDet::PixelGangedClusterAmbiguities
std::multimap< const SiCluster *, const SiCluster *, ::InDet::compare_SiCluster > PixelGangedClusterAmbiguities
Definition: PixelGangedClusterAmbiguities.h:46
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AmbiguityProcessor::TrackIsDuplicate
@ TrackIsDuplicate
Definition: AmbiguityProcessorUtility.h:24
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo
Definition: ClusterSplitProbabilityContainer.h:22
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitClusterMapKey_last
SG::ReadHandleKey< InDet::PixelGangedClusterAmbiguities > m_splitClusterMapKey_last
cluster split information generated by previous instances
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:112
Trk::IPRDtoTrackMapTool::addPRDs
virtual StatusCode addPRDs(Trk::PRDtoTrackMap &prd_to_track_map, const Track &track) const =0
Add the PRDs from this track to the store.
AmbiCounter::iForwrd
@ iForwrd
Definition: AmbiCounter.h:19
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_scoringTool
ToolHandle< ITrackScoringTool > m_scoringTool
Scoring tool This tool is used to 'score' the tracks, i.e.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:96
AmbiCounter::nInvalidTracks
@ nInvalidTracks
Definition: AmbiCounter.h:22
skel.it
it
Definition: skel.GENtoEVGEN.py:423
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_clusterSplitProbContainerIn
SG::ReadHandleKey< Trk::ClusterSplitProbabilityContainer > m_clusterSplitProbContainerIn
the key given to the newly created association map
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:122
test_pyathena.pt
pt
Definition: test_pyathena.py:11
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
AmbiCounter::iTransi
@ iTransi
Definition: AmbiCounter.h:19
Trk::RIO_OnTrack::rioType
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_observerTool
PublicToolHandle< Trk::ITrkObserverTool > m_observerTool
Observer tool This tool is used to observe the tracks and their 'score'.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:109
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::ScoreCategory::kNcandDouble
@ kNcandDouble
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
AmbiCounter::nRegions
@ nRegions
Definition: AmbiCounter.h:19
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoToolNotGanged
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoToolNotGanged
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:102
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::ScoreCategory::kNcandidates
@ kNcandidates
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::overlappingTracks
void overlappingTracks(const TracksScores *scoreTrackMap, InDet::PixelGangedClusterAmbiguities *splitClusterMap, Trk::ClusterSplitProbabilityContainer &splitProbContainer, Trk::PRDtoTrackMap &prd_to_track_map) const
Find SiS Tracks that share hits in the track score map.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.cxx:270
AmbiCounter::nTracksWithoutParam
@ nTracksWithoutParam
Definition: AmbiCounter.h:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoTool
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:99
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_statMutex
std::mutex m_statMutex
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:133
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::ScoreCategory::kNaccept
@ kNaccept
ret
T ret(T t)
Definition: rootspy.cxx:260
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ReweightUtils.category
category
Definition: ReweightUtils.py:15
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::dumpStat
void dumpStat(MsgStream &out) const
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.cxx:361
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
Trk::TrackScore
float TrackScore
Definition: TrackScore.h:10
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AmbiguityProcessor::ScoreIsZero
@ ScoreIsZero
Definition: AmbiguityProcessorUtility.h:24
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector< const Trk::TrackStateOnSurface >
beamspotman.stat
stat
Definition: beamspotman.py:266
Trk::IPRDtoTrackMapTool
Interface for handling the mapping between Trk::Track and Trk::PrepRawData.
Definition: IPRDtoTrackMapTool.h:38
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_assoMapName
SG::WriteHandleKey< Trk::PRDtoTrackMap > m_assoMapName
key for the PRDtoTrackMap to be used by the ambiguity process to resolve the ambiguities.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:119
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::IPRD_AssociationTool::ConstPRD_MapIt
PrepRawDataTrackMap::const_iterator ConstPRD_MapIt
Definition: IPRD_AssociationTool.h:45
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_etaBounds
std::vector< float > m_etaBounds
eta intervals for internal monitoring
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:132
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Trk::ClusterSplitProbabilityContainer
Container to associate Cluster with cluster splitting probabilities.
Definition: ClusterSplitProbabilityContainer.h:17
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::addNewTracks
void addNewTracks(const TrackCollection &tracks, TracksScores *trackScoreTrackMap) const
Add passed TrackCollection, and Trk::PrepRawData from tracks to caches.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.cxx:163
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitProbTool
ToolHandle< InDet::IPixelClusterSplitProbTool > m_splitProbTool
recalculate split prob tool
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:106
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::PrdSignatureSet
std::set< PrdSignature > PrdSignatureSet
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:56
AmbiCounter::nEvents
@ nEvents
Definition: AmbiCounter.h:21
Trk::RIO_OnTrack::prepRawData
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
taskman.nDuplicates
int nDuplicates
Definition: taskman.py:152
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
InDet::PixelCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelCluster.h:49
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::pixelCluster
@ pixelCluster
Definition: MeasurementType.h:22
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_splitClusterMapKey
SG::WriteHandleKey< InDet::PixelGangedClusterAmbiguities > m_splitClusterMapKey
cluster split information which m_splitClusterMap_last will be merged into
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:115
AmbiCounter::iBarrel
@ iBarrel
Definition: AmbiCounter.h:19
xAOD::duplicateTrack
@ duplicateTrack
Definition: TrackingPrimitives.h:477
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_sharedProbCut2
float m_sharedProbCut2
NN split sprob cut for 3 particle clusters.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:130
h
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::m_sharedProbCut
float m_sharedProbCut
NN split sprob cut for 2 particle clusters.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:127
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
AmbiguityProcessor::getUid
int getUid()
Definition: AmbiguityProcessorUtility.cxx:60
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo::splitProbability1
float splitProbability1() const
Definition: ClusterSplitProbabilityContainer.h:24
Trk::ClusterSplitProbabilityContainer::splitProbability
const ProbabilityInfo & splitProbability(const PrepRawData *cluster) const
Definition: ClusterSplitProbabilityContainer.h:35
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::Counter
AmbiCounter< ScoreCategory > Counter
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.h:52
Trk::RIO_OnTrackType::PixelCluster
@ PixelCluster
Definition: RIO_OnTrack.h:57
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
Trk::DenseEnvironmentsAmbiguityScoreProcessorTool::updatePixelSplitInformationForCluster
void updatePixelSplitInformationForCluster(const std::pair< const InDet::PixelCluster *const, const Trk::TrackParameters * > &clusterTrkPara, InDet::PixelGangedClusterAmbiguities *splitClusterMap, Trk::ClusterSplitProbabilityContainer &splitProbContainer) const
Update pixel split information based using the fitted track.
Definition: DenseEnvironmentsAmbiguityScoreProcessorTool.cxx:231
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::ClusterSplitProbabilityContainer::getNoSplitProbability
static const ProbabilityInfo & getNoSplitProbability()
Definition: ClusterSplitProbabilityContainer.h:33
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo::splitProbability2
float splitProbability2() const
Definition: ClusterSplitProbabilityContainer.h:25
SiliconTech::pixel
@ pixel
Trk::PRDtoTrackMap::ConstPrepRawDataTrackMapRange
std::pair< PrepRawDataTrackMap::const_iterator, PrepRawDataTrackMap::const_iterator > ConstPrepRawDataTrackMapRange
Definition: PRDtoTrackMap.h:44
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
InDet::PixelClusterSplitProb::splitProbability
double splitProbability(unsigned int nParticles=2) const
return method : total split probability
Definition: PixelClusterSplitProb.h:60