ATLAS Offline Software
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::HoleSearchValidation Class Reference

#include <HoleSearchValidation.h>

Inheritance diagram for InDet::HoleSearchValidation:
Collaboration diagram for InDet::HoleSearchValidation:

Classes

struct  Parts
 

Public Member Functions

 HoleSearchValidation (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor. More...
 
 ~HoleSearchValidation ()
 Default Destructor. More...
 
StatusCode initialize ()
 standard Athena-Algorithm method More...
 
StatusCode execute (const EventContext &ctx) const
 standard Athena-Algorithm method More...
 
StatusCode finalize ()
 standard Athena-Algorithm method More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) 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 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
 

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 printInfoTSoS (const Trk::TrackStateOnSurface *tsos) const
 
unsigned int doHoleSearch (const Trk::Track *track) const
 
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

const AtlasDetectorIDm_idHelper
 
const PixelIDm_pixelID
 
const SCT_IDm_sctID
 
const TRT_IDm_trtID
 
const SiliconIDm_siliconID
 
ToolHandle< Trk::ITrackHoleSearchToolm_holeSearchTool
 
SG::ReadHandleKey< TrackCollectionm_trackCollectionKey
 jobOption: name of the TrackCollection More...
 
SG::WriteHandleKey< TrackCollectionm_trackCollectionOutputKey
 jobOption: name of the TrackCollection More...
 
bool m_saveNewTracksInSG
 jobOption: save new tracks to SG ? More...
 
bool m_removeParts [Parts::kNParts]
 
bool m_removeOverlapHitsOnly
 
bool m_ignoreTrackEnds
 
bool m_randomRemovalMode
 
unsigned int m_maxNumberOfHoles
 
ServiceHandle< IAthRNGSvcm_rndmGenSvc
 Random number generator. More...
 
std::string m_randomEngineName
 Name of the random number stream. More...
 
std::mutex m_trackStatsMutex
 
std::vector< std::vector< unsigned int > > m_trackStats ATLAS_THREAD_SAFE
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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 52 of file HoleSearchValidation.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ HoleSearchValidation()

HoleSearchValidation::HoleSearchValidation ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Standard Athena-Algorithm Constructor.

Definition at line 30 of file HoleSearchValidation.cxx.

30  :
31  AthReentrantAlgorithm(name, pSvcLocator),
32  m_idHelper(nullptr),
33  m_pixelID(nullptr),
34  m_sctID(nullptr),
35  m_trtID(nullptr),
36  m_siliconID(nullptr),
37  m_holeSearchTool("InDet::InDetTrackHoleSearchTool"),
38  m_trackCollectionKey("Tracks"),
39  m_saveNewTracksInSG(false),
40  m_removeParts {},
42  m_ignoreTrackEnds(true),
43  m_randomRemovalMode(false),
45  m_rndmGenSvc("AthRNGSvc", name),
46  m_randomEngineName("HoleSearchRnd")
47 
48 {
49  declareProperty("HoleSearchTool" , m_holeSearchTool);
50  declareProperty("TrackCollection" , m_trackCollectionKey, "Name of the reference track collection");
51 
52  declareProperty("SaveNewTracksInSG" , m_saveNewTracksInSG , "Boolean: save tracks in SG");
53 
54  // for (unsigned int part_i=0; part_i<Parts::kNParts; ++part_i) {
55  // m_removeParts[part_i]=false;
56  // }
57  declareProperty("RemovePIX0" , m_removeParts[Parts::kPix0] , "Remove hit(s) in PIXEL layer 0");
58  declareProperty("RemovePIX1" , m_removeParts[Parts::kPix1] , "Remove hit(s) in PIXEL layer 1");
59  declareProperty("RemovePIX2" , m_removeParts[Parts::kPix2] , "Remove hit(s) in PIXEL layer 2");
60 
61  declareProperty("RemoveSCT0" , m_removeParts[Parts::kSct0] , "Remove hit(s) in SCT layer 0");
62  declareProperty("RemoveSCT1" , m_removeParts[Parts::kSct1] , "Remove hit(s) in SCT layer 1");
63  declareProperty("RemoveSCT2" , m_removeParts[Parts::kSct2] , "Remove hit(s) in SCT layer 2");
64  declareProperty("RemoveSCT3" , m_removeParts[Parts::kSct3] , "Remove hit(s) in SCT layer 3");
65 
66  declareProperty("RemoveSCT4" , m_removeParts[Parts::kSct4] , "Remove hit(s) in SCT endcap layer 4");
67  declareProperty("RemoveSCT5" , m_removeParts[Parts::kSct5] , "Remove hit(s) in SCT endcap layer 5");
68  declareProperty("RemoveSCT6" , m_removeParts[Parts::kSct6] , "Remove hit(s) in SCT endcap layer 6");
69  declareProperty("RemoveSCT7" , m_removeParts[Parts::kSct7] , "Remove hit(s) in SCT endcap layer 7");
70  declareProperty("RemoveSCT8" , m_removeParts[Parts::kSct8] , "Remove hit(s) in SCT endcap layer 8");
71 
72  declareProperty("RemoveSCTSide0" , m_removeParts[Parts::kSctSide0] , "Remove SCT hits on side 0");
73  declareProperty("RemoveSCTSide1" , m_removeParts[Parts::kSctSide1] , "Remove SCT hits on side 1");
74 
75  declareProperty("RemoveOverlapHitsOnly" , m_removeOverlapHitsOnly, "Only remove overlap track hits");
76  declareProperty("IgnoreTrackEnds" , m_ignoreTrackEnds , "Ignore hits at the end of the track");
77 
78  declareProperty("RandomRemovalMode" , m_randomRemovalMode , "Randomly remove track hits (overwrites the other flags!)");
79  declareProperty("MaximalHoles" , m_maxNumberOfHoles , "Number of maximal holes to be created");
80 
81  declare( m_trackCollectionOutputKey );
82 
83  // start with 10x10
84  m_trackStats = std::vector< std::vector< unsigned int> >(0, std::vector< unsigned int>(0));
85 }

◆ ~HoleSearchValidation()

HoleSearchValidation::~HoleSearchValidation ( )
default

Default Destructor.

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ doHoleSearch()

unsigned int HoleSearchValidation::doHoleSearch ( const Trk::Track track) const
private

Definition at line 476 of file HoleSearchValidation.cxx.

477 {
478  ATH_MSG_VERBOSE( "start hole search for track ( " << track << ")" ) ;
479  unsigned int nHoles(0);
480 
481  std::unique_ptr<const Trk::TrackStates> holesOnTrack
482  (m_holeSearchTool->getHolesOnTrack(*track, track->info().particleHypothesis()));
483  // loop over holes
484  if (!holesOnTrack) {
485  ATH_MSG_WARNING( "HoleSearchTool returned NULL !" ) ;
486  return nHoles;
487  } else {
488  nHoles = holesOnTrack->size();
489  ATH_MSG_DEBUG( "found " << nHoles << " holes on track." ) ;
490  for (Trk::TrackStates::const_iterator it=holesOnTrack->begin();
491  it!=holesOnTrack->end(); ++it) {
492  if (!(*it)) {
493  ATH_MSG_WARNING( "TrackStateOnSurface from hole search tool == Null" ) ;
494  continue;
495  }
496  ATH_MSG_DEBUG( "Found hole:" ) ;
497  printInfoTSoS( *it );
498  } // end loop on holes
499  }
500  return nHoles;
501 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode HoleSearchValidation::execute ( const EventContext &  ctx) const

standard Athena-Algorithm method

Definition at line 151 of file HoleSearchValidation.cxx.

151  {
152 
153  ATHRNG::RNGWrapper* wrapper = m_rndmGenSvc->getEngine(this, m_randomEngineName);
154  wrapper->setSeed (this->name(), ctx);
155  CLHEP::HepRandomEngine* engine = wrapper->getEngine (ctx);
156 
157  std::array<bool,Parts::kNParts> remove_parts{};
158  for (unsigned int part_i=0; part_i<Parts::kNParts; ++part_i) {
159  remove_parts[part_i]=( !m_randomRemovalMode ? m_removeParts[part_i] : false );
160  }
161  ATH_MSG_VERBOSE( "HoleSearchValidation execute() start" ) ;
162 
163  std::unique_ptr<TrackCollection> newTrackCollection( m_saveNewTracksInSG ? std::make_unique<TrackCollection>() : nullptr );
164 
165  // get track collection
167  if (!tracks.isValid()) {
168  ATH_MSG_ERROR("Missing input track collection " << m_trackCollectionKey.key());
169  return StatusCode::FAILURE;
170  }
171 
172  // loop over tracks
173  TrackCollection::const_iterator trackIterator = tracks->begin();
174  for ( ; trackIterator < tracks->end(); ++trackIterator) {
175  if (!((*trackIterator))) {
176  ATH_MSG_WARNING( "TrackCollection " << m_trackCollectionKey.key() << "contains empty entries" ) ;
177  continue;
178  }
179 
180  // get all TSOS
181  const Trk::Track& track = *(*trackIterator);
182  const Trk::TrackStates* tsos = track.trackStateOnSurfaces();
183  ATH_MSG_DEBUG( "Perform hole search on unmodified track (" << *trackIterator << ")"
184  << " which contains " << tsos->size() <<" track states" ) ;
185  // perform hole search
186  unsigned int oldHoles = doHoleSearch( *trackIterator );
187 
188  auto vecTsos = std::make_unique<Trk::TrackStates>();
189 
190  // loop over TSOS, copy TSOS and push into vector
191  Trk::TrackStates::const_iterator iTsos = tsos->begin();
192  Trk::TrackStates::const_iterator iTsosEnd = tsos->end();
193 
194  unsigned int nRemoved = 0;
195 
196  std::vector< unsigned int > pixelHitsPerLayer = std::vector< unsigned int>(3);
197  std::vector< unsigned int > sctHitsPerLayer = std::vector< unsigned int>(9);
198 
199  // in case of removing the end hits we need to parse the track first once,
200  // variables will be call pl (for preloop)
201  int maxPixelLayerBarrel = -1;
202  int maxPixelLayerEndcap = -1;
203  int maxSctLayerBarrel = -1;
204  int maxSctLayerEndcap = -1;
205 
207  ATH_MSG_VERBOSE( "Parsing track first to find end layers and maximal numbers" ) ;
208  for ( ; iTsos != iTsosEnd ; ++iTsos) {
209  //
210  Identifier plSurfaceID;
211  const Trk::MeasurementBase* plMesb = (*iTsos)->measurementOnTrack();
212  if (plMesb && plMesb->associatedSurface().associatedDetectorElement()){
213  plSurfaceID = plMesb->associatedSurface().associatedDetectorElement()->identify();
214  // to find out whether it is barrel / endcap
215  // check pixel / sct
216  if ( m_idHelper->is_pixel( plSurfaceID ) ) {
217  int plLayer = abs(m_pixelID->layer_disk( plSurfaceID ));
218  bool isBarrel = m_pixelID->is_barrel( plSurfaceID );
219  // set the maximal pixel layer: barrel / ec
220  if ( isBarrel )
221  maxPixelLayerBarrel = plLayer > maxPixelLayerBarrel ? plLayer : maxPixelLayerBarrel;
222  else
223  maxPixelLayerEndcap = plLayer > maxPixelLayerEndcap ? plLayer : maxPixelLayerEndcap;
224  } else if (m_idHelper->is_sct( plSurfaceID ) ) {
225  int plLayer = abs(m_sctID->layer_disk( plSurfaceID ));
226  bool isBarrel = m_sctID->is_barrel( plSurfaceID );
227  // set the maximal pixel layer: barrel / ec
228  if ( isBarrel )
229  maxSctLayerBarrel = plLayer > maxSctLayerBarrel ? plLayer : maxSctLayerBarrel;
230  else
231  maxSctLayerEndcap = plLayer > maxSctLayerEndcap ? plLayer : maxSctLayerEndcap;
232  }
233  }
234  }
235  // sct overrules pixels
236  maxPixelLayerBarrel = maxSctLayerBarrel > 0 ? -1 : maxPixelLayerBarrel;
237  maxPixelLayerEndcap = maxSctLayerEndcap > 0 ? -1 : maxPixelLayerEndcap;
238  // reset to start the main loop correctly
239  iTsos = tsos->begin();
240  }
241 
242 
243  for ( ; iTsos != iTsosEnd ; ++iTsos) {
244  if ((*iTsos)->type(Trk::TrackStateOnSurface::Measurement)) {
245 
246  Identifier surfaceID;
247  const Trk::MeasurementBase* mesb = (*iTsos)->measurementOnTrack();
248 
249  // also reset the identifiers
250  unsigned int randomHoles = 0;
251  if (m_randomRemovalMode){
252  // ---------------------------------------------------------------------------------------
253  randomHoles = (unsigned int)(m_maxNumberOfHoles*CLHEP::RandFlat::shoot(engine));
254  ATH_MSG_VERBOSE("Random mode chosen: will create " << randomHoles << " holes on the track.");
255 
256  // max int pixel
257  unsigned int maxPixel = maxPixelLayerBarrel > maxPixelLayerEndcap
258  ? maxPixelLayerBarrel : maxPixelLayerEndcap;
259  // max int sct
260  unsigned int maxSct = maxSctLayerBarrel > maxSctLayerEndcap
261  ? maxSctLayerBarrel : maxSctLayerEndcap;
262  // -------------------------------------------------------------------
263  int maxHit = maxPixel + maxSct;
264  int holesTriggered = 0;
265  maxHit -= m_ignoreTrackEnds ? 1 : 0;
266  // make the switch
267  for (unsigned int ihole = 0; ihole < randomHoles && holesTriggered < int(randomHoles); ++ihole){
268  // throw the dices
269  unsigned int holeId = (unsigned int)(maxHit*CLHEP::RandFlat::shoot(engine));
270  ATH_MSG_VERBOSE( "Random mode : layer identifier " << holeId << " chosen." );
271  {
272  // now switch between --------
273  switch (holeId) {
274  case 0 : { remove_parts[Parts::kPix0] = true; ++holesTriggered; }; break;
275  case 1 : { remove_parts[Parts::kPix1] = true; ++holesTriggered; }; break;
276  case 2 : { remove_parts[Parts::kPix2] = true; ++holesTriggered; }; break;
277  case 3 : { remove_parts[Parts::kSct0] = true; ++holesTriggered; }; break;
278  case 4 : { remove_parts[Parts::kSct1] = true; ++holesTriggered; }; break;
279  case 5 : { remove_parts[Parts::kSct2] = true; ++holesTriggered; }; break;
280  case 6 : { remove_parts[Parts::kSct3] = true; ++holesTriggered; }; break;
281  case 7 : { remove_parts[Parts::kSct4] = true; ++holesTriggered; }; break;
282  case 8 : { remove_parts[Parts::kSct5] = true; ++holesTriggered; }; break;
283  case 9 : { remove_parts[Parts::kSct6] = true; ++holesTriggered; }; break;
284  case 10 : { remove_parts[Parts::kSct7] = true; ++holesTriggered; }; break;
285  case 11 : { remove_parts[Parts::kSct8] = true; ++holesTriggered; }; break;
286  default : break;
287  }
288  // make the side decision on the side
289  if (holeId > 2) {
290  double sideDecision = CLHEP::RandFlat::shoot(engine);
291  if ( sideDecision < 1./3. )
292  remove_parts[Parts::kSctSide0] = true;
293  else if ( sideDecision < 2./3. )
294  remove_parts[Parts::kSctSide1] = true;
295  else {
296  remove_parts[Parts::kSctSide0] = true;
297  remove_parts[Parts::kSctSide1] = true;
298  ++holesTriggered;
299  }
300  }
301  }
302  }
303  }
304 
305  // hits, outliers
306  if (mesb != nullptr && mesb->associatedSurface().associatedDetectorElement() != nullptr) {
307  surfaceID = mesb->associatedSurface().associatedDetectorElement()->identify();
308  // the pixel case
309  if ( m_idHelper->is_pixel( surfaceID ) ) {
310  int layer = abs(m_pixelID->layer_disk( surfaceID ));
311  // check barrel / ec
312  bool isBarrel = m_pixelID->is_barrel( surfaceID );
313  // indicate how many pixel hits are per layer
314  pixelHitsPerLayer[layer]++;
315  ATH_MSG_VERBOSE( "Pixel hits on layer " << layer << " : " << pixelHitsPerLayer[layer] ) ;
316  // check for last layer
317  bool isLastLayer = (isBarrel && layer == maxPixelLayerBarrel) || (!isBarrel && layer == maxPixelLayerEndcap);
318  // only in the ignore track case
319  if (m_ignoreTrackEnds && isLastLayer){
320  ATH_MSG_VERBOSE( "This pixel hit is not removed, it is at the track end." ) ;
321  } else if ( !m_removeOverlapHitsOnly || pixelHitsPerLayer[layer] > 1) {
322  if ( !m_ignoreTrackEnds && layer == 0 && remove_parts[Parts::kPix0] ) {
323  ATH_MSG_DEBUG( "Removing PIXEL layer 0 hit" ) ;
324  printInfoTSoS( *iTsos );
325  nRemoved++;
326  continue;
327  } else if( layer == 1 && remove_parts[Parts::kPix1] ) {
328  ATH_MSG_DEBUG( "Removing PIXEL layer 1 hit" ) ;
329  printInfoTSoS( *iTsos );
330  nRemoved++;
331  continue;
332  } else if( layer == 2 && remove_parts[Parts::kPix2] ) {
333  ATH_MSG_DEBUG( "Removing PIXEL layer 2 hit" ) ;
334  printInfoTSoS( *iTsos );
335  nRemoved++;
336  continue;
337  }
338  }
339  } else if ( m_idHelper->is_sct( surfaceID ) ) {
340  int layer = abs(m_sctID->layer_disk( surfaceID ));
341  // check barrel / ec
342  bool isBarrel = m_sctID->is_barrel( surfaceID );
343  // counter for number of layers
344  sctHitsPerLayer[layer]++;
345  ATH_MSG_VERBOSE( "SCT hits on layer " << layer << " : " << sctHitsPerLayer[layer] ) ;
346  // steer the side to be removed
347  int side = m_sctID->side( surfaceID );
348  bool canRemoveSide = (side == 0) ? remove_parts[Parts::kSctSide0] : remove_parts[Parts::kSctSide1];
349  // check for last layer
350  bool isLastLayer = (isBarrel && layer == maxSctLayerBarrel) || (!isBarrel && layer == maxSctLayerEndcap);
351  // only in the ignore track case
352  if (m_ignoreTrackEnds && isLastLayer){
353  ATH_MSG_VERBOSE( "This SCT hit is not removed, it is at the track end." ) ;
354  } else if ( layer == 0 && remove_parts[Parts::kSct0] && canRemoveSide ) {
355  ATH_MSG_DEBUG( "Removing SCT layer 0 hit" ) ;
356  printInfoTSoS( *iTsos );
357  nRemoved++;
358  continue;
359  } else if ( layer == 1 && remove_parts[Parts::kSct1] && canRemoveSide ) {
360  ATH_MSG_DEBUG( "Removing SCT layer 1 hit" ) ;
361  printInfoTSoS( *iTsos );
362  nRemoved++;
363  continue;
364  } else if ( layer == 2 && remove_parts[Parts::kSct2] && canRemoveSide ) {
365  ATH_MSG_DEBUG( "Removing SCT layer 2 hit" ) ;
366  printInfoTSoS( *iTsos );
367  nRemoved++;
368  continue;
369  } else if ( layer == 3 && remove_parts[Parts::kSct3] && canRemoveSide ) {
370  ATH_MSG_DEBUG( "Removing SCT layer 3 hit" ) ;
371  printInfoTSoS( *iTsos );
372  nRemoved++;
373  continue;
374  } else if ( layer == 4 && remove_parts[Parts::kSct4] && canRemoveSide ) {
375  ATH_MSG_DEBUG( "Removing SCT endcap layer 4 hit" ) ;
376  printInfoTSoS( *iTsos );
377  nRemoved++;
378  continue;
379  } else if ( layer == 5 && remove_parts[Parts::kSct5] && canRemoveSide ) {
380  ATH_MSG_DEBUG( "Removing SCT endcap layer 5 hit" ) ;
381  printInfoTSoS( *iTsos );
382  nRemoved++;
383  continue;
384  } else if ( layer == 6 && remove_parts[Parts::kSct6] && canRemoveSide ) {
385  ATH_MSG_DEBUG( "Removing SCT endcap layer 6 hit" ) ;
386  printInfoTSoS( *iTsos );
387  nRemoved++;
388  continue;
389  } else if ( layer == 7 && remove_parts[Parts::kSct7] && canRemoveSide ) {
390  ATH_MSG_DEBUG( "Removing SCT endcap layer 7 hit" ) ;
391  printInfoTSoS( *iTsos );
392  nRemoved++;
393  continue;
394  } else if ( layer == 8 && remove_parts[Parts::kSct8] && canRemoveSide ) {
395  ATH_MSG_DEBUG( "Removing SCT endcap layer 8 hit" ) ;
396  printInfoTSoS( *iTsos );
397  nRemoved++;
398  continue;
399  }
400 
401  } // end SCT hit
402  } // end have identifier
403  } // end TSoS is of type measurement
404 
405  const Trk::TrackStateOnSurface* newTsos = new Trk::TrackStateOnSurface(**iTsos);
406  vecTsos->push_back(newTsos);
407  } // end loop over all TSoS
408 
409  ATH_MSG_DEBUG( "Removed total of " << nRemoved << " TSoS on track." ) ;
410 
411  Trk::Track* newTrack = new Trk::Track(track.info(), std::move(vecTsos), nullptr );
412  ATH_MSG_VERBOSE( "Perform hole search on new track:" ) ;
413  // perform hole search
414  unsigned int newHoles = doHoleSearch( newTrack );
415  unsigned int foundHoles = abs(static_cast<int>(newHoles) - static_cast<int>(oldHoles));
416 
417  if ( foundHoles == nRemoved )
418  ATH_MSG_DEBUG( "== OK : "<< nRemoved <<" generated holes out of which all were found" ) ;
419  else
420  ATH_MSG_DEBUG( "== PROBLEM : "<< nRemoved <<" generated holes out of which "<< newHoles - oldHoles << " were found" ) ;
421 
422  // fill track statistics
423  // first, check size of vectors
424  {
425  std::lock_guard<std::mutex> lock(m_trackStatsMutex);
426  while (m_trackStats.size() < nRemoved+1) {
427  m_trackStats.emplace_back(0 );
428  }
429  while (m_trackStats[nRemoved].size() < foundHoles+1) {
430  m_trackStats[nRemoved].push_back( 0 );
431  }
432  ATH_MSG_DEBUG( "m_trackStats.size()= " << m_trackStats.size() );
433  // // increase counter
434  m_trackStats[nRemoved][foundHoles]++;
435  }
436 
437  // posibly save new track into container and SG
438  if (m_saveNewTracksInSG) {
439  newTrackCollection->push_back( newTrack );
440  } else {
441  delete newTrack; // TSOS are owned by track (so no need to delete them manually)
442  }
443 
444  } // end loop over all input tracks
445  ATH_MSG_DEBUG( "Finished looping over all input tracks" ) ;
446 
447  if (m_saveNewTracksInSG) {
448  SG::WriteHandle<TrackCollection> newTrackCollection_handle(m_trackCollectionOutputKey,ctx);
449  if (newTrackCollection_handle.record( std::move(newTrackCollection) ).isFailure()){
450  ATH_MSG_ERROR("Failed to record output collection " << m_trackCollectionOutputKey.key());
451  return StatusCode::FAILURE;
452  }
453  }
454  return StatusCode::SUCCESS;
455 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

StatusCode HoleSearchValidation::finalize ( )

standard Athena-Algorithm method

Definition at line 457 of file HoleSearchValidation.cxx.

457  {
458  ATH_MSG_INFO( "HoleSearchValidation finalize()" ) ;
459 
460  ATH_MSG_INFO( "Printing statistics for hole search validation:" ) ;
461  ATH_MSG_INFO( " # removed hits | # tracks / found holes | ... " ) ;
462  for ( unsigned int nRemoved = 0; nRemoved < m_trackStats.size(); ++nRemoved) {
463  unsigned int nTracks = 0;
464  for ( unsigned int holes = 0; holes < m_trackStats[nRemoved].size(); ++holes) nTracks += m_trackStats[nRemoved][holes];
465  if ( nTracks == 0) continue;
466  ATH_MSG_INFO( "Removed " << nRemoved << " hits from track -- found: " ) ;
467  for ( unsigned int holes = 0; holes < m_trackStats[nRemoved].size(); ++holes) {
468  ATH_MSG_INFO( " -- " << 100.0 * m_trackStats[nRemoved][holes]/float(nTracks)
469  << "% of tracks with " << holes << " holes (" << m_trackStats[nRemoved][holes] << " / " << float(nTracks) << ")") ;
470  }
471  }
472 
473  return StatusCode::SUCCESS;
474 }

◆ initialize()

StatusCode HoleSearchValidation::initialize ( )

standard Athena-Algorithm method

Definition at line 89 of file HoleSearchValidation.cxx.

89  {
90  ATH_MSG_INFO( "HoleSearchValidation initialize()" ) ;
91 
92  //ID Helper
93  StatusCode sc = detStore()->retrieve(m_idHelper, "AtlasID" );
94  if (sc.isFailure()) {
95  ATH_MSG_WARNING( "Could not get AtlasDetectorID !" ) ;
96  return StatusCode::SUCCESS;
97  }else{
98  ATH_MSG_DEBUG( "Found AtlasDetectorID" ) ;
99  }
100 
101  sc = detStore()->retrieve(m_pixelID, "PixelID");
102  if (sc.isFailure()) {
103  ATH_MSG_WARNING( "Could not get Pixel ID helper !" ) ;
104  return StatusCode::SUCCESS;
105  }
106  ATH_MSG_DEBUG( "Initialized PixelIDHelper" ) ;
107 
108  sc = detStore()->retrieve(m_sctID, "SCT_ID");
109  if (sc.isFailure()) {
110  ATH_MSG_WARNING( "Could not get SCT ID helper !" ) ;
111  return StatusCode::SUCCESS;
112  }
113  ATH_MSG_DEBUG( "Initialized SCTIDHelper" ) ;
114 
115  sc = detStore()->retrieve(m_trtID, "TRT_ID");
116  if (sc.isFailure()) {
117  ATH_MSG_WARNING( "Could not get TRT ID helper !" ) ;
118  return StatusCode::SUCCESS;
119  }
120  ATH_MSG_DEBUG( "Initialized TRTIDHelper" ) ;
121 
122  sc = detStore()->retrieve(m_siliconID, "SiliconID");
123  if (sc.isFailure()) {
124  ATH_MSG_WARNING( "Could not get Silicon ID helper !" ) ;
125  return StatusCode::SUCCESS;
126  }
127  ATH_MSG_DEBUG( "Initialized SiliconIDHelper" ) ;
128 
129 
130  // Get HoleSearchTool
131  sc = m_holeSearchTool.retrieve();
132  if (sc.isFailure()) {
133  ATH_MSG_FATAL( "Could not retrieve "<< m_holeSearchTool ) ;
134  return sc;
135  }
136 
137  if ( m_rndmGenSvc.retrieve().isFailure() ){
138  ATH_MSG_FATAL( "Could not retrieve " << m_rndmGenSvc );
139  return StatusCode::FAILURE;
140  }
141 
142  ATH_CHECK(m_trackCollectionKey.initialize());
143  if (m_saveNewTracksInSG) {
144  m_trackCollectionOutputKey = m_trackCollectionKey.key() + "_removedHits";
146  }
147 
148  return StatusCode::SUCCESS;
149 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ printInfoTSoS()

void HoleSearchValidation::printInfoTSoS ( const Trk::TrackStateOnSurface tsos) const
private

Definition at line 504 of file HoleSearchValidation.cxx.

505 {
506 
507  ATH_MSG_VERBOSE( "Position : " << tsos->trackParameters()->position()
508  << " with R = " << sqrt(pow(tsos->trackParameters()->position().x(),2)
509  +pow(tsos->trackParameters()->position().y(),2)) );
510  Identifier surfaceID;
511  const Trk::MeasurementBase* mesb = tsos->measurementOnTrack();
512  // hits, outliers
513  if (mesb != nullptr && mesb->associatedSurface().associatedDetectorElement() != nullptr) {
514  surfaceID = mesb->associatedSurface().associatedDetectorElement()->identify();
515  if ( m_siliconID->is_barrel( surfaceID ) ) {
516  ATH_MSG_VERBOSE( " -- Barrel:");
517  } else {
518  ATH_MSG_VERBOSE( " -- Endcap:");
519  }
520  if ( m_idHelper->is_sct( surfaceID ) ) {
521  ATH_MSG_VERBOSE( " -> SCT layer = " << m_sctID->layer_disk( surfaceID )
522  << " side = " << m_sctID->side( surfaceID ) );
523  //ATH_MSG_VERBOSE( m_sctID->show_to_string(surfaceID) ) ;
524 
525  }
526  if ( m_idHelper->is_pixel( surfaceID ) ) {
527  ATH_MSG_VERBOSE( " -> PIXEL layer = " << m_pixelID->layer_disk( surfaceID ) );
528  //ATH_MSG_VERBOSE( m_pixelID->show_to_string(surfaceID) ) ;
529  }
530  }
531 
532 }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

std::vector< std::vector< unsigned int > > m_trackStats InDet::HoleSearchValidation::ATLAS_THREAD_SAFE
mutableprivate

tracks as function of [#generated holes, #found holes]. Guarded by m_trackStatsMutex

Definition at line 118 of file HoleSearchValidation.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_holeSearchTool

ToolHandle<Trk::ITrackHoleSearchTool> InDet::HoleSearchValidation::m_holeSearchTool
private

Definition at line 77 of file HoleSearchValidation.h.

◆ m_idHelper

const AtlasDetectorID* InDet::HoleSearchValidation::m_idHelper
private

Definition at line 71 of file HoleSearchValidation.h.

◆ m_ignoreTrackEnds

bool InDet::HoleSearchValidation::m_ignoreTrackEnds
private

Definition at line 108 of file HoleSearchValidation.h.

◆ m_maxNumberOfHoles

unsigned int InDet::HoleSearchValidation::m_maxNumberOfHoles
private

Definition at line 111 of file HoleSearchValidation.h.

◆ m_pixelID

const PixelID* InDet::HoleSearchValidation::m_pixelID
private

Definition at line 72 of file HoleSearchValidation.h.

◆ m_randomEngineName

std::string InDet::HoleSearchValidation::m_randomEngineName
private

Name of the random number stream.

Definition at line 114 of file HoleSearchValidation.h.

◆ m_randomRemovalMode

bool InDet::HoleSearchValidation::m_randomRemovalMode
private

Definition at line 110 of file HoleSearchValidation.h.

◆ m_removeOverlapHitsOnly

bool InDet::HoleSearchValidation::m_removeOverlapHitsOnly
private

Definition at line 107 of file HoleSearchValidation.h.

◆ m_removeParts

bool InDet::HoleSearchValidation::m_removeParts[Parts::kNParts]
private

Definition at line 106 of file HoleSearchValidation.h.

◆ m_rndmGenSvc

ServiceHandle<IAthRNGSvc> InDet::HoleSearchValidation::m_rndmGenSvc
private

Random number generator.

Definition at line 113 of file HoleSearchValidation.h.

◆ m_saveNewTracksInSG

bool InDet::HoleSearchValidation::m_saveNewTracksInSG
private

jobOption: save new tracks to SG ?

Definition at line 82 of file HoleSearchValidation.h.

◆ m_sctID

const SCT_ID* InDet::HoleSearchValidation::m_sctID
private

Definition at line 73 of file HoleSearchValidation.h.

◆ m_siliconID

const SiliconID* InDet::HoleSearchValidation::m_siliconID
private

Definition at line 75 of file HoleSearchValidation.h.

◆ m_trackCollectionKey

SG::ReadHandleKey<TrackCollection> InDet::HoleSearchValidation::m_trackCollectionKey
private

jobOption: name of the TrackCollection

Definition at line 78 of file HoleSearchValidation.h.

◆ m_trackCollectionOutputKey

SG::WriteHandleKey<TrackCollection> InDet::HoleSearchValidation::m_trackCollectionOutputKey
private

jobOption: name of the TrackCollection

Definition at line 79 of file HoleSearchValidation.h.

◆ m_trackStatsMutex

std::mutex InDet::HoleSearchValidation::m_trackStatsMutex
mutableprivate

Definition at line 117 of file HoleSearchValidation.h.

◆ m_trtID

const TRT_ID* InDet::HoleSearchValidation::m_trtID
private

Definition at line 74 of file HoleSearchValidation.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
InDet::HoleSearchValidation::m_randomEngineName
std::string m_randomEngineName
Name of the random number stream.
Definition: HoleSearchValidation.h:114
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
InDet::HoleSearchValidation::Parts::kSct5
@ kSct5
Definition: HoleSearchValidation.h:96
Trk::Surface::associatedDetectorElement
const TrkDetElementBase * associatedDetectorElement() const
return associated Detector Element
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
InDet::HoleSearchValidation::printInfoTSoS
void printInfoTSoS(const Trk::TrackStateOnSurface *tsos) const
Definition: HoleSearchValidation.cxx:504
InDet::HoleSearchValidation::Parts::kPix2
@ kPix2
Definition: HoleSearchValidation.h:89
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
xAOD::JetInput::Track
@ Track
Definition: JetContainerInfo.h:61
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
SiliconID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - generic, i.e. works for EITHER pixel or sct id.
Definition: SiliconID.h:156
InDet::HoleSearchValidation::Parts::kSct3
@ kSct3
Definition: HoleSearchValidation.h:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
InDet::HoleSearchValidation::Parts::kSct8
@ kSct8
Definition: HoleSearchValidation.h:99
InDet::HoleSearchValidation::Parts::kSct6
@ kSct6
Definition: HoleSearchValidation.h:97
InDet::HoleSearchValidation::m_removeParts
bool m_removeParts[Parts::kNParts]
Definition: HoleSearchValidation.h:106
InDet::HoleSearchValidation::m_maxNumberOfHoles
unsigned int m_maxNumberOfHoles
Definition: HoleSearchValidation.h:111
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
InDet::HoleSearchValidation::m_rndmGenSvc
ServiceHandle< IAthRNGSvc > m_rndmGenSvc
Random number generator.
Definition: HoleSearchValidation.h:113
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrkDetElementBase::identify
virtual Identifier identify() const =0
Identifier.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
InDet::HoleSearchValidation::m_ignoreTrackEnds
bool m_ignoreTrackEnds
Definition: HoleSearchValidation.h:108
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
TRT::Hit::side
@ side
Definition: HitInfo.h:83
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
InDet::HoleSearchValidation::m_sctID
const SCT_ID * m_sctID
Definition: HoleSearchValidation.h:73
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
InDet::HoleSearchValidation::m_trackStatsMutex
std::mutex m_trackStatsMutex
Definition: HoleSearchValidation.h:117
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
InDet::HoleSearchValidation::Parts::kSct4
@ kSct4
Definition: HoleSearchValidation.h:95
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDet::HoleSearchValidation::m_holeSearchTool
ToolHandle< Trk::ITrackHoleSearchTool > m_holeSearchTool
Definition: HoleSearchValidation.h:77
InDet::HoleSearchValidation::m_trackCollectionKey
SG::ReadHandleKey< TrackCollection > m_trackCollectionKey
jobOption: name of the TrackCollection
Definition: HoleSearchValidation.h:78
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
InDet::HoleSearchValidation::Parts::kPix1
@ kPix1
Definition: HoleSearchValidation.h:88
InDet::HoleSearchValidation::Parts::kSct1
@ kSct1
Definition: HoleSearchValidation.h:92
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
InDet::HoleSearchValidation::Parts::kPix0
@ kPix0
Definition: HoleSearchValidation.h:87
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::HoleSearchValidation::doHoleSearch
unsigned int doHoleSearch(const Trk::Track *track) const
Definition: HoleSearchValidation.cxx:476
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
InDet::HoleSearchValidation::Parts::kSct7
@ kSct7
Definition: HoleSearchValidation.h:98
DataVector< const Trk::TrackStateOnSurface >
InDet::HoleSearchValidation::m_saveNewTracksInSG
bool m_saveNewTracksInSG
jobOption: save new tracks to SG ?
Definition: HoleSearchValidation.h:82
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
InDet::HoleSearchValidation::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: HoleSearchValidation.h:71
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
InDet::HoleSearchValidation::m_trtID
const TRT_ID * m_trtID
Definition: HoleSearchValidation.h:74
Trk::MeasurementBase
Definition: MeasurementBase.h:58
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::MeasurementBase::associatedSurface
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDet::HoleSearchValidation::m_pixelID
const PixelID * m_pixelID
Definition: HoleSearchValidation.h:72
InDet::HoleSearchValidation::Parts::kSct2
@ kSct2
Definition: HoleSearchValidation.h:93
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
InDet::HoleSearchValidation::Parts::kSctSide1
@ kSctSide1
Definition: HoleSearchValidation.h:101
InDet::HoleSearchValidation::m_siliconID
const SiliconID * m_siliconID
Definition: HoleSearchValidation.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::HoleSearchValidation::m_trackCollectionOutputKey
SG::WriteHandleKey< TrackCollection > m_trackCollectionOutputKey
jobOption: name of the TrackCollection
Definition: HoleSearchValidation.h:79
h
InDet::HoleSearchValidation::m_removeOverlapHitsOnly
bool m_removeOverlapHitsOnly
Definition: HoleSearchValidation.h:107
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
InDet::HoleSearchValidation::Parts::kSctSide0
@ kSctSide0
Definition: HoleSearchValidation.h:100
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
InDet::HoleSearchValidation::m_randomRemovalMode
bool m_randomRemovalMode
Definition: HoleSearchValidation.h:110
InDet::HoleSearchValidation::Parts::kNParts
@ kNParts
Definition: HoleSearchValidation.h:102
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDet::HoleSearchValidation::Parts::kSct0
@ kSct0
Definition: HoleSearchValidation.h:91
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
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
SCT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
Definition: SCT_ID.h:721
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14