ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
InDet::TRT_StandaloneTrackFinder Class Reference

#include <TRT_StandaloneTrackFinder.h>

Inheritance diagram for InDet::TRT_StandaloneTrackFinder:
Collaboration diagram for InDet::TRT_StandaloneTrackFinder:

Public Member Functions

 TRT_StandaloneTrackFinder (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Algotithm methods
More...
 
virtual ~TRT_StandaloneTrackFinder ()
 
StatusCode initialize ()
 
StatusCode execute (const EventContext &ctx) const
 
StatusCode finalize ()
 
MsgStream & dump (MsgStream &out) const
 Print internal tool parameters and status
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

enum  ECounter {
  kNTrtSeg, kNUsedSeg, kNRejectedSeg, kNTrtSegGood,
  kNSegFailed, kNTrkScoreZeroTotal, kNTrkSegUsedTotal, kNTRTTrkTotal,
  kNCounter
}
 Global Counters for final algorithm statistics. More...
 
typedef std::array< int, kNCounterCounter_t
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

MsgStream & dumpContainerNames (MsgStream &out) 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...
 

Static Private Member Functions

static MsgStream & dumpevent (MsgStream &, const InDet::TRT_StandaloneTrackFinder::Counter_t &)
 

Private Attributes

IntegerProperty m_minNumDriftCircles
 
DoubleProperty m_minPt
 
BooleanProperty m_oldLogic
 
ToolHandle< ITRT_SegmentToTrackToolm_segToTrackTool {this,"TRT_SegToTrackTool","InDet::TRT_SegmentToTrackTool"}
 Segment to track tool. More...
 
SG::ReadHandleKey< Trk::SegmentCollectionm_Segments {this , "InputSegmentsLocation","TRTSegments"}
 TRT segments to use. More...
 
SG::ReadHandleKey< Trk::PRDtoTrackMapm_prdToTrackMap {this,"PRDtoTrackMap",""}
 map between PRDs and tracks to identify shared hits. More...
 
SG::WriteHandleKey< TrackCollectionm_finalTracks {this,"OutputTracksLocation","TRTStandaloneTracks"}
 Tracks that will be passed out of AmbiProcessor. More...
 
std::mutex m_statMutex ATLAS_THREAD_SAFE
 
Counter_t m_total 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
 

Friends

MsgStream & operator<< (MsgStream &, const InDet::TRT_StandaloneTrackFinder::Counter_t &)
 

Detailed Description

InDet::TRT_StandaloneTrackFinde is an algorithm which produces tracks from stand-alone TRT segments with no Si extension

Author
Thoma.nosp@m.s.Ko.nosp@m.ffas@.nosp@m.cern.nosp@m..ch

Definition at line 49 of file TRT_StandaloneTrackFinder.h.

Member Typedef Documentation

◆ Counter_t

typedef std::array<int,kNCounter> InDet::TRT_StandaloneTrackFinder::Counter_t
private

Definition at line 116 of file TRT_StandaloneTrackFinder.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ECounter

Global Counters for final algorithm statistics.

Enumerator
kNTrtSeg 

Number of input TRT segments to be investigated per event.

kNUsedSeg 

Number of TRT segments excluded at input (by BackTracking tracks)

kNRejectedSeg 

Number of segments rejected in selection at input.

kNTrtSegGood 

Number of input TRT segments after cuts per event.

kNSegFailed 

Number of segments failing to translate to a track (inclusing refit)

kNTrkScoreZeroTotal 

Number of tracks rejected by score zero.

kNTrkSegUsedTotal 

Number of excluded segments by other TRT segments.

kNTRTTrkTotal 

Number of TRT-only tracks on output.

kNCounter 

Definition at line 106 of file TRT_StandaloneTrackFinder.h.

106  {kNTrtSeg,
107  kNUsedSeg,
108  kNRejectedSeg,
109  kNTrtSegGood,
110  kNSegFailed,
113  kNTRTTrkTotal,
114  kNCounter};

Constructor & Destructor Documentation

◆ TRT_StandaloneTrackFinder()

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

Standard Algotithm methods

Track events.

Definition at line 27 of file TRT_StandaloneTrackFinder.cxx.

29  : AthReentrantAlgorithm(name, pSvcLocator)
30 { }

◆ ~TRT_StandaloneTrackFinder()

InDet::TRT_StandaloneTrackFinder::~TRT_StandaloneTrackFinder ( )
virtualdefault

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; }

◆ dump()

MsgStream & InDet::TRT_StandaloneTrackFinder::dump ( MsgStream &  out) const

Print internal tool parameters and status

Definition at line 206 of file TRT_StandaloneTrackFinder.cxx.

207 {
208  // out<<std::endl;
209 
210  return dumpContainerNames(out);
211 }

◆ dumpContainerNames()

MsgStream & InDet::TRT_StandaloneTrackFinder::dumpContainerNames ( MsgStream &  out) const
private

Definition at line 225 of file TRT_StandaloneTrackFinder.cxx.

226 {
227  const std::string::size_type max_width =65;
228 
229  out<<std::endl
230  <<"|----------------------------------------------------------------------"
231  <<"-------------------|"<<std::endl;
232  out<<"| Location of input tracks | "<<m_Segments.key() << std::setw( max_width-m_Segments.key().size())<< " " << "|" <<std::endl;
233  out<<"| Location of output tracks | "<<m_finalTracks.key() << std::setw( max_width-m_finalTracks.key().size()) << " " << "|" <<std::endl;
234  out<<"|----------------------------------------------------------------------"
235  <<"-------------------|";
236  return out;
237 }

◆ dumpevent()

MsgStream & InDet::TRT_StandaloneTrackFinder::dumpevent ( MsgStream &  out,
const InDet::TRT_StandaloneTrackFinder::Counter_t counter 
)
staticprivate

Definition at line 214 of file TRT_StandaloneTrackFinder.cxx.

214  {
215  out<<"| counters |" << counter << std::endl;
216  return out;
217 }

◆ 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 InDet::TRT_StandaloneTrackFinder::execute ( const EventContext &  ctx) const

Retrieve segments from StoreGate

Definition at line 55 of file TRT_StandaloneTrackFinder.cxx.

56 {
57 
58  Counter_t counter {};
60 
62  //
63 
65  if(!segments.isValid()){
66  ATH_MSG_FATAL ("No segment with name " << m_Segments.key() << " found in StoreGate!");
67  return StatusCode::FAILURE;
68  }
69 
70  SG::ReadHandle<Trk::PRDtoTrackMap > prd_to_track_map;
71  const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
72  if (!m_prdToTrackMap.key().empty()) {
74  if(!prd_to_track_map.isValid()){
75  ATH_MSG_FATAL ("Failed to get " << m_prdToTrackMap.key() << ".");
76  return StatusCode::FAILURE;
77  }
78  prd_to_track_map_cptr = prd_to_track_map.cptr();
79  }
80 
81  // statistics...
82  counter[kNTrtSeg] = int(segments->size());
83  ATH_MSG_DEBUG ("TRT track container size " << counter[kNTrtSeg]);
84  ATH_MSG_DEBUG ("Begin looping over all TRT segments in the event");
85  for(const Trk::Segment *base_segment: *segments) {
86 
87  // Get the track segment
88  const Trk::TrackSegment *trackTRT = dynamic_cast<const Trk::TrackSegment*>(base_segment);
89 
90  if(!trackTRT) {
91 
92  ATH_MSG_WARNING ("No pointer to segment, should not happen !");
93  continue;
94 
95  } else {
96 
97  ATH_MSG_DEBUG ("--> start evaluating new segment");
98 
99  // start with pt preselection, get the segment parameters
100  const Amg::VectorX& p = trackTRT->localParameters();
101  if ( std::abs(sin(p(3))/p(4)) < m_minPt*0.9 ) {
102  // Statistics...
104  ATH_MSG_DEBUG ("Segment pt = " << std::abs(sin(p(3))/p(4)) << " , fails pre-cut, drop it !");
105  continue;
106  }
107 
108  // Check if segment has already been assigned to a BackTrack
109  if(m_segToTrackTool->segIsUsed(*trackTRT, prd_to_track_map_cptr)) {
110  // Statistics...
111  counter[kNUsedSeg]++;
112  ATH_MSG_DEBUG ("Segment excluded by BackTrack, drop it !");
113  continue;
114  }
115 
116  // Get the number of the TRT track segment ROTs
117  int nROTs = trackTRT->numberOfMeasurementBases();
118  ATH_MSG_DEBUG ("Number Of ROTs " << nROTs);
119 
120  bool is_toLower = false; // to handle special case
121 
122  // Cases where the min number of required TRT drift circles drops to 10
123  if(nROTs <= m_minNumDriftCircles && m_oldLogic) {
124  ATH_MSG_DEBUG ("Few DCs, can we recover ?");
125 
126  is_toLower = m_segToTrackTool->toLower(*trackTRT);
127  if (is_toLower) {
128  ATH_MSG_DEBUG ("We recovered this one, let's try...");
129  }
130  }
131 
132  if(nROTs < m_minNumDriftCircles && !is_toLower) {
133  // statistics...
135  ATH_MSG_DEBUG ("Segment fails number of DC requirements, reject it");
136  }
137  else {
138  // statistics
140  ATH_MSG_DEBUG ("Segment considered for further processing, enter into list");
141 
142  // Transform the original TRT segment into a track
143  Trk::Track* trtSeg = m_segToTrackTool->segToTrack(ctx, *trackTRT);
144  if(!trtSeg){
145  // Statistics...
146  counter[kNSegFailed]++;
147  ATH_MSG_DEBUG ("Failed to make a track out of the TRT segment!");
148  continue;
149  }
150 
151  // get all TSOS
153  if((int)ttsos->size()<10) {
154  // Statistics...
155  counter[kNSegFailed]++;
156  ATH_MSG_DEBUG ("Too few ROTs on track, reject !");
157  delete trtSeg;
158  continue;
159  }
160  // add the track to list
161  m_segToTrackTool->addNewTrack(trtSeg,event_data);
162  }
163  }
164  }
165 
166  // now resolve tracks
167  ATH_MSG_DEBUG ("Creating track container ");
168 
169  std::unique_ptr<TrackCollection> final_tracks(m_segToTrackTool->resolveTracks(prd_to_track_map.cptr(),event_data));
170  if (!final_tracks || SG::WriteHandle<TrackCollection>(m_finalTracks,ctx).record(std::move(final_tracks)).isFailure()) {
171  ATH_MSG_WARNING ("Could not save the reconstructed TRT seeded Si tracks!");
172  return StatusCode::FAILURE;
173  }
174 
175  // Update the total counters
179  {
180  std::lock_guard<std::mutex> lock(m_statMutex);
181  for (int idx=0; idx< kNCounter; ++idx) {
182  m_total[idx]+=counter[idx];
183  }
184  }
185 
186  // Print common event information
187  ATH_MSG_DEBUG( counter << std::endl );
188 
189  return StatusCode::SUCCESS;
190 }

◆ 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 InDet::TRT_StandaloneTrackFinder::finalize ( )

Definition at line 196 of file TRT_StandaloneTrackFinder.cxx.

197 {
198  ATH_MSG_DEBUG( m_total << std::endl );
199  return StatusCode::SUCCESS;
200 }

◆ initialize()

StatusCode InDet::TRT_StandaloneTrackFinder::initialize ( )

Definition at line 39 of file TRT_StandaloneTrackFinder.cxx.

40 {
41  m_total = {};
42 
43  ATH_CHECK(m_segToTrackTool.retrieve());
44 
45  ATH_CHECK(m_Segments.initialize());
47  ATH_CHECK(m_finalTracks.initialize());
48 
49  return StatusCode::SUCCESS;
50 }

◆ 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.

◆ 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  }

Friends And Related Function Documentation

◆ operator<<

MsgStream& operator<< ( MsgStream &  ,
const InDet::TRT_StandaloneTrackFinder::Counter_t  
)
friend

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::mutex m_statMutex InDet::TRT_StandaloneTrackFinder::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 118 of file TRT_StandaloneTrackFinder.h.

◆ ATLAS_THREAD_SAFE [2/2]

Counter_t m_total InDet::TRT_StandaloneTrackFinder::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 119 of file TRT_StandaloneTrackFinder.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_finalTracks

SG::WriteHandleKey<TrackCollection> InDet::TRT_StandaloneTrackFinder::m_finalTracks {this,"OutputTracksLocation","TRTStandaloneTracks"}
private

Tracks that will be passed out of AmbiProcessor.

Recreated anew each time process() is called Output track collection

Definition at line 101 of file TRT_StandaloneTrackFinder.h.

◆ m_minNumDriftCircles

IntegerProperty InDet::TRT_StandaloneTrackFinder::m_minNumDriftCircles
private
Initial value:
{this, "MinNumDriftCircles", 15,
"Minimum number of drift circles for TRT segment tracks"}

Definition at line 81 of file TRT_StandaloneTrackFinder.h.

◆ m_minPt

DoubleProperty InDet::TRT_StandaloneTrackFinder::m_minPt
private
Initial value:
{this, "MinPt", 1.0 * GeV,
"Minimum pt cut for TRT only (used in preselection * 0.9)"}

Definition at line 84 of file TRT_StandaloneTrackFinder.h.

◆ m_oldLogic

BooleanProperty InDet::TRT_StandaloneTrackFinder::m_oldLogic
private
Initial value:
{this, "OldTransitionLogic", true,
"use old transition region hit logic "}

Definition at line 87 of file TRT_StandaloneTrackFinder.h.

◆ m_prdToTrackMap

SG::ReadHandleKey<Trk::PRDtoTrackMap> InDet::TRT_StandaloneTrackFinder::m_prdToTrackMap {this,"PRDtoTrackMap",""}
private

map between PRDs and tracks to identify shared hits.

Definition at line 96 of file TRT_StandaloneTrackFinder.h.

◆ m_Segments

SG::ReadHandleKey<Trk::SegmentCollection > InDet::TRT_StandaloneTrackFinder::m_Segments {this , "InputSegmentsLocation","TRTSegments"}
private

TRT segments to use.

Definition at line 94 of file TRT_StandaloneTrackFinder.h.

◆ m_segToTrackTool

ToolHandle< ITRT_SegmentToTrackTool > InDet::TRT_StandaloneTrackFinder::m_segToTrackTool {this,"TRT_SegToTrackTool","InDet::TRT_SegmentToTrackTool"}
private

Segment to track tool.

Definition at line 91 of file TRT_StandaloneTrackFinder.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:
InDet::TRT_StandaloneTrackFinder::kNTrtSegGood
@ kNTrtSegGood
Number of input TRT segments after cuts per event.
Definition: TRT_StandaloneTrackFinder.h:109
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
InDet::TRT_StandaloneTrackFinder::kNSegFailed
@ kNSegFailed
Number of segments failing to translate to a track (inclusing refit)
Definition: TRT_StandaloneTrackFinder.h:110
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
InDet::TRT_StandaloneTrackFinder::kNTrtSeg
@ kNTrtSeg
Number of input TRT segments to be investigated per event.
Definition: TRT_StandaloneTrackFinder.h:106
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::ITRT_SegmentToTrackTool::EventData::knTrkScoreZero
@ knTrkScoreZero
Number of tracks rejected by score zero.
Definition: ITRT_SegmentToTrackTool.h:52
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
InDet::TRT_StandaloneTrackFinder::m_minNumDriftCircles
IntegerProperty m_minNumDriftCircles
Definition: TRT_StandaloneTrackFinder.h:82
Trk::PRDtoTrackMap
Definition: PRDtoTrackMap.h:17
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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
InDet::TRT_StandaloneTrackFinder::kNUsedSeg
@ kNUsedSeg
Number of TRT segments excluded at input (by BackTracking tracks)
Definition: TRT_StandaloneTrackFinder.h:107
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::TrackSegment
Definition: TrackSegment.h:56
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDet::TRT_StandaloneTrackFinder::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
map between PRDs and tracks to identify shared hits.
Definition: TRT_StandaloneTrackFinder.h:97
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::Segment::numberOfMeasurementBases
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s)
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:193
InDet::TRT_StandaloneTrackFinder::kNCounter
@ kNCounter
Definition: TRT_StandaloneTrackFinder.h:114
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
InDet::TRT_StandaloneTrackFinder::kNTrkSegUsedTotal
@ kNTrkSegUsedTotal
Number of excluded segments by other TRT segments.
Definition: TRT_StandaloneTrackFinder.h:112
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
InDet::TRT_StandaloneTrackFinder::kNRejectedSeg
@ kNRejectedSeg
Number of segments rejected in selection at input.
Definition: TRT_StandaloneTrackFinder.h:108
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
InDet::TRT_StandaloneTrackFinder::m_segToTrackTool
ToolHandle< ITRT_SegmentToTrackTool > m_segToTrackTool
Segment to track tool.
Definition: TRT_StandaloneTrackFinder.h:92
Trk::Segment
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
InDet::TRT_StandaloneTrackFinder::dumpContainerNames
MsgStream & dumpContainerNames(MsgStream &out) const
Definition: TRT_StandaloneTrackFinder.cxx:225
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
InDet::TRT_StandaloneTrackFinder::m_finalTracks
SG::WriteHandleKey< TrackCollection > m_finalTracks
Tracks that will be passed out of AmbiProcessor.
Definition: TRT_StandaloneTrackFinder.h:102
ITk::EventData
InDet::SiSpacePointsSeedMakerEventData EventData
Definition: ITkSiSpacePointsSeedMaker.h:63
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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::MeasurementBase >
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
InDet::TRT_StandaloneTrackFinder::kNTRTTrkTotal
@ kNTRTTrkTotal
Number of TRT-only tracks on output.
Definition: TRT_StandaloneTrackFinder.h:113
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
InDet::TRT_StandaloneTrackFinder::m_Segments
SG::ReadHandleKey< Trk::SegmentCollection > m_Segments
TRT segments to use.
Definition: TRT_StandaloneTrackFinder.h:95
h
InDet::TRT_StandaloneTrackFinder::Counter_t
std::array< int, kNCounter > Counter_t
Definition: TRT_StandaloneTrackFinder.h:116
InDet::TRT_StandaloneTrackFinder::m_oldLogic
BooleanProperty m_oldLogic
Definition: TRT_StandaloneTrackFinder.h:88
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDet::ITRT_SegmentToTrackTool::EventData::knTRTTrk
@ knTRTTrk
Number of TRT-only tracks on output.
Definition: ITRT_SegmentToTrackTool.h:54
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
InDet::TRT_StandaloneTrackFinder::m_minPt
DoubleProperty m_minPt
Definition: TRT_StandaloneTrackFinder.h:85
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDet::ITRT_SegmentToTrackTool::EventData::knTrkSegUsed
@ knTrkSegUsed
Number of excluded segments by other TRT segments.
Definition: ITRT_SegmentToTrackTool.h:53
test_pyathena.counter
counter
Definition: test_pyathena.py:15
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
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
InDet::TRT_StandaloneTrackFinder::kNTrkScoreZeroTotal
@ kNTrkScoreZeroTotal
Number of tracks rejected by score zero.
Definition: TRT_StandaloneTrackFinder.h:111