ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FPGATrackSimSecondStageAlg Class Reference

#include <FPGATrackSimSecondStageAlg.h>

Inheritance diagram for FPGATrackSimSecondStageAlg:
Collaboration diagram for FPGATrackSimSecondStageAlg:

Public Member Functions

 FPGATrackSimSecondStageAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~FPGATrackSimSecondStageAlg ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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

StatusCode writeOutputData (const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads_2nd, std::vector< FPGATrackSimTrack > const &tracks_2nd, FPGATrackSimDataFlowInfo const *dataFlowInfo)
 
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

std::string m_description
 
ToolHandle< IFPGATrackSimTrackExtensionToolm_trackExtensionTool {this, "TrackExtensionTool", "FPGATrackSimTrackExtensionTool", "Track extensoin tool"}
 
ToolHandle< IFPGATrackSimRoadFilterToolm_spRoadFilterTool {this, "SPRoadFilterTool", "FPGATrackSimSpacepointRoadFilterTool", "Spacepoint Road Filter Tool"}
 
ToolHandle< FPGATrackSimHoughRootOutputToolm_houghRootOutputTool {this, "HoughRootOutputTool", "FPGATrackSimHoughRootOutputTool/FPGATrackSimHoughRootOutputTool", "Hough ROOT Output Tool"}
 
ToolHandle< FPGATrackSimNNTrackToolm_NNTrackTool {this, "NNTrackTool", "FPGATrackSimNNTrackTool/FPGATrackSimNNTrackTool", "NN Track Tool"}
 
ToolHandle< FPGATrackSimTrackFitterToolm_trackFitterTool {this, "TrackFitter_2nd", "FPGATrackSimTrackFitterTool/FPGATrackSimTrackFitterTool_2nd", "2nd stage track fit tool"}
 
ToolHandle< FPGATrackSimOverlapRemovalToolm_overlapRemovalTool {this, "OverlapRemoval_2nd", "FPGATrackSimOverlapRemovalTool/FPGATrackSimOverlapRemovalTool_2nd", "2nd stage overlap removal tool"}
 
ToolHandle< FPGATrackSimOutputHeaderToolm_writeOutputTool {this, "OutputTool", "FPGATrackSimOutputHeaderTool/FPGATrackSimOutputHeaderTool", "Output tool"}
 
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMapping", "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
 
ServiceHandle< IFPGATrackSimEventSelectionSvcm_evtSel {this, "eventSelector", "FPGATrackSimEventSelectionSvc", "Event selection Svc"}
 
Gaudi::Property< bool > m_doSpacepoints {this, "Spacepoints", false, "flag to enable the spacepoint formation"}
 
Gaudi::Property< bool > m_doTracking {this, "tracking", false, "flag to enable the tracking"}
 
Gaudi::Property< bool > m_doMissingHitsChecks {this, "DoMissingHitsChecks", false}
 
Gaudi::Property< bool > m_doHoughRootOutput {this, "DoHoughRootOutput", false, "Dump output from the Hough Transform to flat ntuples"}
 
Gaudi::Property< bool > m_doNNTrack {this, "DoNNTrack", false, "Run NN track filtering"}
 
Gaudi::Property< bool > m_writeOutputData {this, "writeOutputData", true,"write the output TTree"}
 
Gaudi::Property< float > m_trackScoreCut {this, "TrackScoreCut", 25.0, "Minimum track score (e.g. chi2 or NN)." }
 
Gaudi::Property< bool > m_writeOutNonSPStripHits {this, "writeOutNonSPStripHits", true, "Write tracks to RootOutput if they have strip hits which are not SPs"}
 
Gaudi::Property< int > m_NumOfHitPerGrouping { this, "NumOfHitPerGrouping", 5, "Number of minimum overlapping hits for a track candidate to be removed in the HoughRootOutputTool"}
 
Gaudi::Property< bool > m_filterRoads {this, "FilterRoads", false, "enable first road filter"}
 
Gaudi::Property< bool > m_filterRoads2 {this, "FilterRoads2", false, "enable second road filter"}
 
Gaudi::Property< std::string > m_outputBranch {this, "outputBranchName", "LogicalEventOutputHeader", "Name of the branch for output data in output ROOT file." }
 
FPGATrackSimLogicalEventOutputHeaderm_logicEventOutputHeader = nullptr
 
long m_evt = 0
 
long m_nRoadsTot = 0
 
long m_nTracksTot = 0
 
long m_nTracksChi2Tot = 0
 
long m_nTracksChi2OLRTot = 0
 
long m_evt_truth = 0
 
long m_nRoadsFound = 0
 
long m_nTracksFound = 0
 
long m_nTracksChi2Found = 0
 
long m_nTracksChi2OLRFound = 0
 
ToolHandle< GenericMonitoringToolm_monTool {this,"MonTool", "", "Monitoring tool"}
 
SG::ReadHandleKey< FPGATrackSimHitCollectionm_FPGAHitKey {this, "FPGATrackSimHitKey", "FPGAHits_2nd", "FPGATrackSim Hits key"}
 
SG::ReadHandleKey< FPGATrackSimTrackCollectionm_FPGAInputTrackKey {this, "FPGATrackSimTrack1stKey", "FPGATracks_1st", "FPGATrackSim tracks 1st stage key"}
 
SG::WriteHandleKey< FPGATrackSimHitContainerm_FPGAHitInRoadsKey {this, "FPGATrackSimHitInRoads2ndKey","FPGAHitsInRoads_2nd","FPGATrackSim Hits in 1st stage roads key"}
 
SG::WriteHandleKey< FPGATrackSimRoadCollectionm_FPGARoadKey {this, "FPGATrackSimRoad2ndKey","FPGARoads_2nd","FPGATrackSim Roads 2nd stage key"}
 
SG::WriteHandleKey< FPGATrackSimTrackCollectionm_FPGATrackKey {this, "FPGATrackSimTrack2ndKey","FPGATracks_2nd","FPGATrackSim Tracks 2nd stage key"}
 
SG::ReadHandleKey< FPGATrackSimTruthTrackCollectionm_FPGATruthTrackKey {this, "FPGATrackSimTruthTrackKey", "FPGATruthTracks", "FPGATrackSim truth tracks"}
 
SG::ReadHandleKey< FPGATrackSimOfflineTrackCollectionm_FPGAOfflineTrackKey {this, "FPGATrackSimOfflineTrackKey", "FPGAOfflineTracks", "FPGATrackSim offline tracks"}
 
DataObjIDColl m_extendedExtraObjects
 
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 42 of file FPGATrackSimSecondStageAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FPGATrackSimSecondStageAlg()

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

Definition at line 48 of file FPGATrackSimSecondStageAlg.cxx.

48  :
49  AthAlgorithm(name, pSvcLocator)
50 {
51 }

◆ ~FPGATrackSimSecondStageAlg()

virtual FPGATrackSimSecondStageAlg::~FPGATrackSimSecondStageAlg ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

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

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< 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< 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 FPGATrackSimSecondStageAlg::execute ( )
overridevirtual

Definition at line 103 of file FPGATrackSimSecondStageAlg.cxx.

104 {
105 #ifdef BENCHMARK_LOGICALHITSALG
106  std::chrono::time_point<std::chrono::steady_clock> t_0, t_1;
108 #endif
109 
110  const EventContext& ctx = getContext();
111 
112  // Get reference to hits from StoreGate.
113  // Hits have been procesed by the DataPrep algorithm. Now, we need to read them.
114  // If they aren't passed, assume this means we are done.
116  if (!FPGAHits.isValid()) {
117  if (m_evt == 0) {
118  ATH_MSG_WARNING("Didn't receive FPGAHits_2nd on first event; assuming no input events.");
119  }
120  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
121  if (!appMgr) {
122  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
123  return StatusCode::FAILURE;
124  }
125  return appMgr->stopRun();
126  }
127 
129  if (!FPGAInputTracks.isValid()) {
130  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
131  if (!appMgr) {
132  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
133  return StatusCode::FAILURE;
134  }
135  return appMgr->stopRun();
136  }
137 
138  // Set up write handles.
141 
142  ATH_CHECK( FPGARoads_2nd.record (std::make_unique<FPGATrackSimRoadCollection>()));
143  ATH_CHECK( FPGAHitsInRoads_2nd.record (std::make_unique<FPGATrackSimHitContainer>()));
144 
146  ATH_CHECK(FPGATracks_2ndHandle.record (std::make_unique<FPGATrackSimTrackCollection>()));
147 
148  // Query the event selection service to make sure this event passed cuts.
149  if (!m_evtSel->getSelectedEvent()) {
150  ATH_MSG_DEBUG("Event skipped by: " << m_evtSel->name());
151  return StatusCode::SUCCESS;
152  }
153 
154  // Event passes cuts, count it. technically, DataPrep does this now.
155  m_evt++;
156 
157  // If we get here, FPGAHits_2nd is valid, copy it over.
158  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits_2nd;
159  phits_2nd.reserve(FPGAHits->size());
160  for (const auto& hit : *FPGAHits) {
161  phits_2nd.push_back(std::make_shared<const FPGATrackSimHit>(hit));
162  }
163 
164  std::vector<std::shared_ptr<const FPGATrackSimTrack>> tracks_1st;
165  tracks_1st.reserve(FPGAInputTracks->size());
166  for (const auto& track : *FPGAInputTracks) {
167  tracks_1st.push_back(std::make_shared<const FPGATrackSimTrack>(track));
168  }
169  ATH_MSG_DEBUG("Retrieved " << phits_2nd.size() << " hits and " << tracks_1st.size() << " tracks from storegate");
170 
171  // Get truth tracks from DataPrep as well.
173  if (!FPGATruthTracks.isValid()) {
174  ATH_MSG_ERROR("Could not find FPGA Truth Track Collection with key " << FPGATruthTracks.key());
175  return StatusCode::FAILURE;
176  }
177 
178  // Same for offline tracks.
180  if (!FPGAOfflineTracks.isValid()) {
181  ATH_MSG_ERROR("Could not find FPGA Offline Track Collection with key " << FPGAOfflineTracks.key());
182  return StatusCode::FAILURE;
183  }
184 
185  // Get second stage roads from tracks.
186  std::vector<std::shared_ptr<const FPGATrackSimRoad>> prefilter_roads;
187  std::vector<std::shared_ptr<const FPGATrackSimRoad>> roads = prefilter_roads;
188 
189  // Use the track extension tool to actually produce a new set of roads.
190  ATH_CHECK(m_trackExtensionTool->extendTracks(phits_2nd, tracks_1st, roads));
191 
192  for (auto const &road : roads) {
193  std::vector<FPGATrackSimHit> road_hits;
194  ATH_MSG_DEBUG("Hough Road X Y: " << road->getX() << " " << road->getY());
195  for (size_t l = 0; l < road->getNLayers(); ++l) {
196  for (const auto &layerH : road->getHits(l)) {
197  road_hits.push_back(*layerH);
198  }
199  }
200  FPGAHitsInRoads_2nd->push_back(road_hits);
201  FPGARoads_2nd->push_back(*road);
202  }
203 
204  auto mon_nroads = Monitored::Scalar<unsigned>("nroads_2nd", roads.size());
205  for (auto const &road : roads) {
206  unsigned bitmask = road->getHitLayers();
207  for (size_t l = 0; l < m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers(); l++) {
208  if (bitmask & (1 << l)) {
209  auto mon_layerIDs = Monitored::Scalar<unsigned>("layerIDs_2nd",l);
210  Monitored::Group(m_monTool,mon_layerIDs);
211  }
212  }
213  }
214  Monitored::Group(m_monTool, mon_nroads);
215 
216  TIME(m_troads);
217 
218  // NOTE: for now we don't support road filtering again in the second stage,
219  // except for the special case of the spacepoint road filter tool. In principle filters
220  // could be added here.
221 
222  // Spacepoint road filter tool. Needed when fitting to spacepoints.
223  std::vector<std::shared_ptr<const FPGATrackSimRoad>> post_spfilter_roads;
224  if (m_doSpacepoints) {
225  ATH_CHECK(m_spRoadFilterTool->filterRoads(roads, post_spfilter_roads));
226  roads = post_spfilter_roads;
227  }
228  auto mon_nroads_postfilter = Monitored::Scalar<unsigned>("nroads_2nd_postfilter", roads.size());
229  Monitored::Group(m_monTool, mon_nroads_postfilter);
230 
231  TIME(m_troad_filter);
232 
233  // Get tracks, again, after extrapolation.
234  // All of this code is effectively copied from LogicalHitsProcessAlg, except we use 2nd stage now.
235  std::vector<FPGATrackSimTrack> tracks;
236  if (m_doTracking) {
237  if (m_doNNTrack) {
238  ATH_MSG_DEBUG("Performing NN tracking");
239  ATH_CHECK(m_NNTrackTool->getTracks(roads, tracks));
240  }
241  else {
242  ATH_CHECK(m_trackFitterTool->getTracks(roads, tracks));
243  float bestchi2 = 1.e15;
244  for (const FPGATrackSimTrack& track : tracks) {
245  float chi2 = track.getChi2ndof();
246  if (chi2 < bestchi2) bestchi2 = chi2;
247  auto mon_chi2 = Monitored::Scalar<float>("chi2_2nd_all", chi2);
248  Monitored::Group(m_monTool, mon_chi2);
249  }
250  auto mon_best_chi2 = Monitored::Scalar<float>("best_chi2_2nd",bestchi2);
251  Monitored::Group(m_monTool,mon_best_chi2);
252  }
253  }
254  else { // we are not doing tracking so get the number of combinations for monitoring
255  int ntrackDummy = 0;
256  for (const std::shared_ptr<const FPGATrackSimRoad>& road : roads) {
257  ntrackDummy += road->getNHitCombos();
258  }
259  tracks.resize(ntrackDummy); // just filled with dummy tracks for monitoring
260  }
261  auto mon_ntracks = Monitored::Scalar<unsigned>("ntrack_2nd", tracks.size());
262  Monitored::Group(m_monTool,mon_ntracks);
263 
264  TIME(m_ttracks);
265 
266  // Overlap removal
267  ATH_CHECK(m_overlapRemovalTool->runOverlapRemoval(tracks));
268  unsigned ntrackOLRChi2 = 0;
269  for (const FPGATrackSimTrack& track : tracks) {
270  if (track.getChi2ndof() < m_trackScoreCut) {
272  if (track.passedOR()) {
273  ntrackOLRChi2++;
275 
276  // For tracks passing overlap removal-- record the chi2 so we can figure out the right cut.
277  float chi2olr = track.getChi2ndof();
278  auto mon_chi2_or = Monitored::Scalar<float>("chi2_2nd_afterOLR", chi2olr);
279  Monitored::Group(m_monTool, mon_chi2_or);
280  }
281  }
282  }
283  auto mon_ntracks_olr = Monitored::Scalar<unsigned>("ntrack_2nd_afterOLR", ntrackOLRChi2);
284  Monitored::Group(m_monTool,mon_ntracks_olr);
285 
286  m_nRoadsTot += roads.size();
287  m_nTracksTot += tracks.size();
288 
289  // Do some simple monitoring of efficiencies. okay, we need truth tracks here.
290  std::vector<FPGATrackSimTruthTrack> truthtracks = *FPGATruthTracks;
291  std::vector<FPGATrackSimOfflineTrack> offlineTracks = *FPGAOfflineTracks;
292  if (truthtracks.size() > 0) {
293  m_evt_truth++;
294  auto passroad = Monitored::Scalar<bool>("eff_road_2nd",(roads.size() > 0));
295  auto passtrack = Monitored::Scalar<bool>("eff_track_2nd",(tracks.size() > 0));
296  auto truthpT_zoom = Monitored::Scalar<float>("pT_zoom_2nd",truthtracks.front().getPt()*0.001);
297  auto truthpT = Monitored::Scalar<float>("pT_2nd",truthtracks.front().getPt()*0.001);
298  auto trutheta = Monitored::Scalar<float>("eta_2nd",truthtracks.front().getEta());
299  auto truthphi= Monitored::Scalar<float>("phi_2nd",truthtracks.front().getPhi());
300  auto truthd0= Monitored::Scalar<float>("d0_2nd",truthtracks.front().getD0());
301  auto truthz0= Monitored::Scalar<float>("z0_2nd",truthtracks.front().getZ0());
302  if (roads.size() > 0) m_nRoadsFound++;
303  bool passchi2 = false;
304  bool passchi2OLR = false;
305  if (tracks.size() > 0) {
306  m_nTracksFound++;
307  for (const auto& track : tracks) {
308  if (track.getChi2ndof() < 10) {
309  passchi2 = true;
310  if (track.passedOR()) {
311  passchi2OLR = true;
312  break;
313  }
314  }
315  }
316  }
317  if (passchi2) m_nTracksChi2Found++;
318  if (passchi2OLR) m_nTracksChi2OLRFound++;
319  auto passtrackchi2 = Monitored::Scalar<bool>("eff_track_chi2_2nd",passchi2);
320  Monitored::Group(m_monTool,passroad,passtrack,truthpT_zoom,truthpT,trutheta,truthphi,truthd0,truthz0,passtrackchi2);
321  }
322 
323  for (const FPGATrackSimTrack& track : tracks) FPGATracks_2ndHandle->push_back(track);
324 
325  TIME(m_tOR);
326 
327  // Write the output and reset
328  if (m_writeOutputData) {
329  auto dataFlowInfo = std::make_unique<FPGATrackSimDataFlowInfo>();
330  ATH_CHECK(writeOutputData(roads, tracks, dataFlowInfo.get()));
331  }
332 
333  // This one we can do-- by passing in truth and offline tracks via storegate above.
334  if (m_doHoughRootOutput) {
335  ATH_CHECK(m_houghRootOutputTool->fillTree(roads, truthtracks, offlineTracks, phits_2nd, m_writeOutNonSPStripHits, m_trackScoreCut, m_NumOfHitPerGrouping));
336  }
337 
338  // Reset data pointers
340 
341  TIME(m_tfin);
342 
343  return StatusCode::SUCCESS;
344 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode FPGATrackSimSecondStageAlg::finalize ( )
overridevirtual

Definition at line 377 of file FPGATrackSimSecondStageAlg.cxx.

378 {
379 #ifdef BENCHMARK_LOGICALHITSALG
380  ATH_MSG_INFO("Timings:" <<
381  "\nroads (2nd): " << std::setw(10) << m_troads <<
382  "\nroad filter (2nd): " << std::setw(10) << m_troad_filter <<
383  "\ntracks (2nd): " << std::setw(10) << m_ttracks <<
384  "\nOR (2nd): " << std::setw(10) << m_tOR <<
385  "\nmon (2nd): " << std::setw(10) << m_tmon <<
386  "\nfin (@nd): " << std::setw(10) << m_tfin
387  );
388 #endif
389 
390  ATH_MSG_INFO("PRINTING FPGATRACKSIM SIMPLE STATS: SECOND STAGE");
391  ATH_MSG_INFO("========================================================================================");
392  ATH_MSG_INFO("Inclusive efficiency to find a road = " << m_nRoadsFound/(float)m_evt_truth);
393  ATH_MSG_INFO("Inclusive efficiency to find a track = " << m_nTracksFound/(float)m_evt_truth);
394  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 = " << m_nTracksChi2Found/(float)m_evt_truth);
395  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 and OLR = " << m_nTracksChi2OLRFound/(float)m_evt_truth);
396 
397 
398  ATH_MSG_INFO("Number of 2nd stage roads/event = " << m_nRoadsTot/(float)m_evt);
399  ATH_MSG_INFO("Number of 2nd stage track combinations/event = " << m_nTracksTot/(float)m_evt);
400  ATH_MSG_INFO("Number of 2nd stage tracks passing chi2/event = " << m_nTracksChi2Tot/(float)m_evt);
401  ATH_MSG_INFO("Number of 2nd stage tracks passing chi2 and OLR/event = " << m_nTracksChi2OLRTot/(float)m_evt);
402  ATH_MSG_INFO("========================================================================================");
403 
404  return StatusCode::SUCCESS;
405 }

◆ initialize()

StatusCode FPGATrackSimSecondStageAlg::initialize ( )
overridevirtual

Definition at line 54 of file FPGATrackSimSecondStageAlg.cxx.

55 {
56  std::stringstream ss(m_description);
57  std::string line;
58  ATH_MSG_INFO("Tag config:");
59  if (!m_description.empty()) {
60  while (std::getline(ss, line, '\n')) {
61  ATH_MSG_INFO('\t' << line);
62  }
63  }
64 
65  ATH_CHECK(m_houghRootOutputTool.retrieve(EnableTool{m_doHoughRootOutput}));
66  ATH_CHECK(m_NNTrackTool.retrieve(EnableTool{m_doNNTrack}));
67  if (m_doSpacepoints) ATH_CHECK(m_spRoadFilterTool.retrieve(EnableTool{m_spRoadFilterTool}));
68 
69  ATH_CHECK(m_trackFitterTool.retrieve(EnableTool{m_doTracking}));
70  ATH_CHECK(m_overlapRemovalTool.retrieve());
71  ATH_CHECK(m_writeOutputTool.retrieve());
72  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
73  ATH_CHECK(m_trackExtensionTool.retrieve());
74 
75  ATH_MSG_DEBUG("initialize() Instantiating root objects");
76 
77  // This file should only need to generate one output tool!
78  m_logicEventOutputHeader = m_writeOutputTool->addOutputBranch(m_outputBranch.value(), true);
79 
80  ATH_MSG_DEBUG("initialize() Setting branch");
81 
82  if (!m_monTool.empty())
83  ATH_CHECK(m_monTool.retrieve());
84 
92 
93  ATH_MSG_DEBUG("initialize() Finished");
94 
95  return StatusCode::SUCCESS;
96 }

◆ inputHandles()

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

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< 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< 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< 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< 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< 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  }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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  }

◆ writeOutputData()

StatusCode FPGATrackSimSecondStageAlg::writeOutputData ( const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  roads_2nd,
std::vector< FPGATrackSimTrack > const tracks_2nd,
FPGATrackSimDataFlowInfo const dataFlowInfo 
)
private

Definition at line 347 of file FPGATrackSimSecondStageAlg.cxx.

350 {
352 
353  ATH_MSG_DEBUG("NFPGATrackSimRoads_2nd = " << roads_2nd.size() << ", NFPGATrackSimTracks_2nd = " << tracks_2nd.size());
354 
355  if (!m_writeOutputData) return StatusCode::SUCCESS;
358  if (m_doTracking) {
361  }
362 
363 
366 
367  // It would be nice to rearrange this so both algorithms use one instance of this tool, I think.
368  // Which means that dataprep can't call writeData because that does Fill().
369  ATH_CHECK(m_writeOutputTool->writeData());
370 
371  return StatusCode::SUCCESS;
372 }

Member Data Documentation

◆ m_description

std::string FPGATrackSimSecondStageAlg::m_description
private

Definition at line 54 of file FPGATrackSimSecondStageAlg.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doHoughRootOutput

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_doHoughRootOutput {this, "DoHoughRootOutput", false, "Dump output from the Hough Transform to flat ntuples"}
private

Definition at line 79 of file FPGATrackSimSecondStageAlg.h.

◆ m_doMissingHitsChecks

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_doMissingHitsChecks {this, "DoMissingHitsChecks", false}
private

Definition at line 78 of file FPGATrackSimSecondStageAlg.h.

◆ m_doNNTrack

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_doNNTrack {this, "DoNNTrack", false, "Run NN track filtering"}
private

Definition at line 80 of file FPGATrackSimSecondStageAlg.h.

◆ m_doSpacepoints

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_doSpacepoints {this, "Spacepoints", false, "flag to enable the spacepoint formation"}
private

Definition at line 76 of file FPGATrackSimSecondStageAlg.h.

◆ m_doTracking

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_doTracking {this, "tracking", false, "flag to enable the tracking"}
private

Definition at line 77 of file FPGATrackSimSecondStageAlg.h.

◆ m_evt

long FPGATrackSimSecondStageAlg::m_evt = 0
private

Definition at line 100 of file FPGATrackSimSecondStageAlg.h.

◆ m_evt_truth

long FPGATrackSimSecondStageAlg::m_evt_truth = 0
private

Definition at line 106 of file FPGATrackSimSecondStageAlg.h.

◆ m_evtSel

ServiceHandle<IFPGATrackSimEventSelectionSvc> FPGATrackSimSecondStageAlg::m_evtSel {this, "eventSelector", "FPGATrackSimEventSelectionSvc", "Event selection Svc"}
private

Definition at line 73 of file FPGATrackSimSecondStageAlg.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_filterRoads

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_filterRoads {this, "FilterRoads", false, "enable first road filter"}
private

Definition at line 88 of file FPGATrackSimSecondStageAlg.h.

◆ m_filterRoads2

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_filterRoads2 {this, "FilterRoads2", false, "enable second road filter"}
private

Definition at line 89 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGAHitInRoadsKey

SG::WriteHandleKey<FPGATrackSimHitContainer> FPGATrackSimSecondStageAlg::m_FPGAHitInRoadsKey {this, "FPGATrackSimHitInRoads2ndKey","FPGAHitsInRoads_2nd","FPGATrackSim Hits in 1st stage roads key"}
private

Definition at line 124 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGAHitKey

SG::ReadHandleKey<FPGATrackSimHitCollection> FPGATrackSimSecondStageAlg::m_FPGAHitKey {this, "FPGATrackSimHitKey", "FPGAHits_2nd", "FPGATrackSim Hits key"}
private

Definition at line 120 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGAInputTrackKey

SG::ReadHandleKey<FPGATrackSimTrackCollection> FPGATrackSimSecondStageAlg::m_FPGAInputTrackKey {this, "FPGATrackSimTrack1stKey", "FPGATracks_1st", "FPGATrackSim tracks 1st stage key"}
private

Definition at line 121 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGAOfflineTrackKey

SG::ReadHandleKey<FPGATrackSimOfflineTrackCollection> FPGATrackSimSecondStageAlg::m_FPGAOfflineTrackKey {this, "FPGATrackSimOfflineTrackKey", "FPGAOfflineTracks", "FPGATrackSim offline tracks"}
private

Definition at line 130 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGARoadKey

SG::WriteHandleKey<FPGATrackSimRoadCollection> FPGATrackSimSecondStageAlg::m_FPGARoadKey {this, "FPGATrackSimRoad2ndKey","FPGARoads_2nd","FPGATrackSim Roads 2nd stage key"}
private

Definition at line 125 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGATrackKey

SG::WriteHandleKey<FPGATrackSimTrackCollection> FPGATrackSimSecondStageAlg::m_FPGATrackKey {this, "FPGATrackSimTrack2ndKey","FPGATracks_2nd","FPGATrackSim Tracks 2nd stage key"}
private

Definition at line 126 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimSecondStageAlg::m_FPGATrackSimMapping {this, "FPGATrackSimMapping", "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"}
private

Definition at line 72 of file FPGATrackSimSecondStageAlg.h.

◆ m_FPGATruthTrackKey

SG::ReadHandleKey<FPGATrackSimTruthTrackCollection> FPGATrackSimSecondStageAlg::m_FPGATruthTrackKey {this, "FPGATrackSimTruthTrackKey", "FPGATruthTracks", "FPGATrackSim truth tracks"}
private

Definition at line 129 of file FPGATrackSimSecondStageAlg.h.

◆ m_houghRootOutputTool

ToolHandle<FPGATrackSimHoughRootOutputTool> FPGATrackSimSecondStageAlg::m_houghRootOutputTool {this, "HoughRootOutputTool", "FPGATrackSimHoughRootOutputTool/FPGATrackSimHoughRootOutputTool", "Hough ROOT Output Tool"}
private

Definition at line 63 of file FPGATrackSimSecondStageAlg.h.

◆ m_logicEventOutputHeader

FPGATrackSimLogicalEventOutputHeader* FPGATrackSimSecondStageAlg::m_logicEventOutputHeader = nullptr
private

Definition at line 95 of file FPGATrackSimSecondStageAlg.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> FPGATrackSimSecondStageAlg::m_monTool {this,"MonTool", "", "Monitoring tool"}
private

Definition at line 117 of file FPGATrackSimSecondStageAlg.h.

◆ m_NNTrackTool

ToolHandle<FPGATrackSimNNTrackTool> FPGATrackSimSecondStageAlg::m_NNTrackTool {this, "NNTrackTool", "FPGATrackSimNNTrackTool/FPGATrackSimNNTrackTool", "NN Track Tool"}
private

Definition at line 66 of file FPGATrackSimSecondStageAlg.h.

◆ m_nRoadsFound

long FPGATrackSimSecondStageAlg::m_nRoadsFound = 0
private

Definition at line 107 of file FPGATrackSimSecondStageAlg.h.

◆ m_nRoadsTot

long FPGATrackSimSecondStageAlg::m_nRoadsTot = 0
private

Definition at line 101 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksChi2Found

long FPGATrackSimSecondStageAlg::m_nTracksChi2Found = 0
private

Definition at line 109 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksChi2OLRFound

long FPGATrackSimSecondStageAlg::m_nTracksChi2OLRFound = 0
private

Definition at line 110 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksChi2OLRTot

long FPGATrackSimSecondStageAlg::m_nTracksChi2OLRTot = 0
private

Definition at line 104 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksChi2Tot

long FPGATrackSimSecondStageAlg::m_nTracksChi2Tot = 0
private

Definition at line 103 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksFound

long FPGATrackSimSecondStageAlg::m_nTracksFound = 0
private

Definition at line 108 of file FPGATrackSimSecondStageAlg.h.

◆ m_nTracksTot

long FPGATrackSimSecondStageAlg::m_nTracksTot = 0
private

Definition at line 102 of file FPGATrackSimSecondStageAlg.h.

◆ m_NumOfHitPerGrouping

Gaudi::Property<int> FPGATrackSimSecondStageAlg::m_NumOfHitPerGrouping { this, "NumOfHitPerGrouping", 5, "Number of minimum overlapping hits for a track candidate to be removed in the HoughRootOutputTool"}
private

Definition at line 84 of file FPGATrackSimSecondStageAlg.h.

◆ m_outputBranch

Gaudi::Property<std::string> FPGATrackSimSecondStageAlg::m_outputBranch {this, "outputBranchName", "LogicalEventOutputHeader", "Name of the branch for output data in output ROOT file." }
private

Definition at line 92 of file FPGATrackSimSecondStageAlg.h.

◆ m_overlapRemovalTool

ToolHandle<FPGATrackSimOverlapRemovalTool> FPGATrackSimSecondStageAlg::m_overlapRemovalTool {this, "OverlapRemoval_2nd", "FPGATrackSimOverlapRemovalTool/FPGATrackSimOverlapRemovalTool_2nd", "2nd stage overlap removal tool"}
private

Definition at line 68 of file FPGATrackSimSecondStageAlg.h.

◆ m_spRoadFilterTool

ToolHandle<IFPGATrackSimRoadFilterTool> FPGATrackSimSecondStageAlg::m_spRoadFilterTool {this, "SPRoadFilterTool", "FPGATrackSimSpacepointRoadFilterTool", "Spacepoint Road Filter Tool"}
private

Definition at line 60 of file FPGATrackSimSecondStageAlg.h.

◆ m_trackExtensionTool

ToolHandle<IFPGATrackSimTrackExtensionTool> FPGATrackSimSecondStageAlg::m_trackExtensionTool {this, "TrackExtensionTool", "FPGATrackSimTrackExtensionTool", "Track extensoin tool"}
private

Definition at line 57 of file FPGATrackSimSecondStageAlg.h.

◆ m_trackFitterTool

ToolHandle<FPGATrackSimTrackFitterTool> FPGATrackSimSecondStageAlg::m_trackFitterTool {this, "TrackFitter_2nd", "FPGATrackSimTrackFitterTool/FPGATrackSimTrackFitterTool_2nd", "2nd stage track fit tool"}
private

Definition at line 67 of file FPGATrackSimSecondStageAlg.h.

◆ m_trackScoreCut

Gaudi::Property<float> FPGATrackSimSecondStageAlg::m_trackScoreCut {this, "TrackScoreCut", 25.0, "Minimum track score (e.g. chi2 or NN)." }
private

Definition at line 82 of file FPGATrackSimSecondStageAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeOutNonSPStripHits

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_writeOutNonSPStripHits {this, "writeOutNonSPStripHits", true, "Write tracks to RootOutput if they have strip hits which are not SPs"}
private

Definition at line 83 of file FPGATrackSimSecondStageAlg.h.

◆ m_writeOutputData

Gaudi::Property<bool> FPGATrackSimSecondStageAlg::m_writeOutputData {this, "writeOutputData", true,"write the output TTree"}
private

Definition at line 81 of file FPGATrackSimSecondStageAlg.h.

◆ m_writeOutputTool

ToolHandle<FPGATrackSimOutputHeaderTool> FPGATrackSimSecondStageAlg::m_writeOutputTool {this, "OutputTool", "FPGATrackSimOutputHeaderTool/FPGATrackSimOutputHeaderTool", "Output tool"}
private

Definition at line 71 of file FPGATrackSimSecondStageAlg.h.


The documentation for this class was generated from the following files:
FPGATrackSimSecondStageAlg::m_trackFitterTool
ToolHandle< FPGATrackSimTrackFitterTool > m_trackFitterTool
Definition: FPGATrackSimSecondStageAlg.h:67
checkFileSG.line
line
Definition: checkFileSG.py:75
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
FPGATrackSimSecondStageAlg::m_nRoadsFound
long m_nRoadsFound
Definition: FPGATrackSimSecondStageAlg.h:107
FPGATrackSimSecondStageAlg::m_FPGAHitKey
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimSecondStageAlg.h:120
FPGATrackSimSecondStageAlg::m_doHoughRootOutput
Gaudi::Property< bool > m_doHoughRootOutput
Definition: FPGATrackSimSecondStageAlg.h:79
FPGATrackSimSecondStageAlg::m_doNNTrack
Gaudi::Property< bool > m_doNNTrack
Definition: FPGATrackSimSecondStageAlg.h:80
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimSecondStageAlg::m_FPGATrackKey
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
Definition: FPGATrackSimSecondStageAlg.h:126
FPGATrackSimSecondStageAlg::m_FPGAInputTrackKey
SG::ReadHandleKey< FPGATrackSimTrackCollection > m_FPGAInputTrackKey
Definition: FPGATrackSimSecondStageAlg.h:121
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimSecondStageAlg::m_trackScoreCut
Gaudi::Property< float > m_trackScoreCut
Definition: FPGATrackSimSecondStageAlg.h:82
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
FPGATrackSimSecondStageAlg::m_NumOfHitPerGrouping
Gaudi::Property< int > m_NumOfHitPerGrouping
Definition: FPGATrackSimSecondStageAlg.h:84
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
FPGATrackSimSecondStageAlg::m_houghRootOutputTool
ToolHandle< FPGATrackSimHoughRootOutputTool > m_houghRootOutputTool
Definition: FPGATrackSimSecondStageAlg.h:63
FPGATrackSimSecondStageAlg::m_logicEventOutputHeader
FPGATrackSimLogicalEventOutputHeader * m_logicEventOutputHeader
Definition: FPGATrackSimSecondStageAlg.h:95
FPGATrackSimSecondStageAlg::m_FPGARoadKey
SG::WriteHandleKey< FPGATrackSimRoadCollection > m_FPGARoadKey
Definition: FPGATrackSimSecondStageAlg.h:125
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
FPGATrackSimLogicalEventOutputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventOutputHeader.cxx:12
FPGATrackSimSecondStageAlg::m_trackExtensionTool
ToolHandle< IFPGATrackSimTrackExtensionTool > m_trackExtensionTool
Definition: FPGATrackSimSecondStageAlg.h:57
FPGATrackSimSecondStageAlg::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimSecondStageAlg.h:72
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
FPGATrackSimSecondStageAlg::writeOutputData
StatusCode writeOutputData(const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads_2nd, std::vector< FPGATrackSimTrack > const &tracks_2nd, FPGATrackSimDataFlowInfo const *dataFlowInfo)
Definition: FPGATrackSimSecondStageAlg.cxx:347
FPGATrackSimSecondStageAlg::m_evt_truth
long m_evt_truth
Definition: FPGATrackSimSecondStageAlg.h:106
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPGATrackSimSecondStageAlg::m_nTracksChi2Tot
long m_nTracksChi2Tot
Definition: FPGATrackSimSecondStageAlg.h:103
FPGATrackSimLogicalEventOutputHeader::getDataFlowInfo
FPGATrackSimDataFlowInfo const & getDataFlowInfo() const
Definition: FPGATrackSimLogicalEventOutputHeader.h:47
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
FPGATrackSimSecondStageAlg::m_evtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
Definition: FPGATrackSimSecondStageAlg.h:73
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
FPGATrackSimSecondStageAlg::m_nTracksChi2OLRFound
long m_nTracksChi2OLRFound
Definition: FPGATrackSimSecondStageAlg.h:110
FPGATrackSimLogicalEventOutputHeader::addFPGATrackSimTracks_2nd
void addFPGATrackSimTracks_2nd(std::vector< FPGATrackSimTrack > const &tracks_2nd)
Definition: FPGATrackSimLogicalEventOutputHeader.h:44
python.handimod.now
now
Definition: handimod.py:675
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
FPGATrackSimSecondStageAlg::m_doSpacepoints
Gaudi::Property< bool > m_doSpacepoints
Definition: FPGATrackSimSecondStageAlg.h:76
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
FPGATrackSimSecondStageAlg::m_FPGATruthTrackKey
SG::ReadHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimSecondStageAlg.h:129
FPGATrackSimSecondStageAlg::m_writeOutNonSPStripHits
Gaudi::Property< bool > m_writeOutNonSPStripHits
Definition: FPGATrackSimSecondStageAlg.h:83
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
TIME
#define TIME(name)
Definition: FPGATrackSimSecondStageAlg.cxx:41
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimSecondStageAlg::m_FPGAOfflineTrackKey
SG::ReadHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
Definition: FPGATrackSimSecondStageAlg.h:130
AthCommonDataStore< AthCommonMsg< 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
FPGATrackSimSecondStageAlg::m_outputBranch
Gaudi::Property< std::string > m_outputBranch
Definition: FPGATrackSimSecondStageAlg.h:92
FPGATrackSimSecondStageAlg::m_writeOutputTool
ToolHandle< FPGATrackSimOutputHeaderTool > m_writeOutputTool
Definition: FPGATrackSimSecondStageAlg.h:71
FPGATrackSimLogicalEventOutputHeader::setDataFlowInfo
void setDataFlowInfo(FPGATrackSimDataFlowInfo const &info)
Definition: FPGATrackSimLogicalEventOutputHeader.h:48
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:228
FPGATrackSimSecondStageAlg::m_NNTrackTool
ToolHandle< FPGATrackSimNNTrackTool > m_NNTrackTool
Definition: FPGATrackSimSecondStageAlg.h:66
FPGATrackSimSecondStageAlg::m_writeOutputData
Gaudi::Property< bool > m_writeOutputData
Definition: FPGATrackSimSecondStageAlg.h:81
FPGATrackSimSecondStageAlg::m_spRoadFilterTool
ToolHandle< IFPGATrackSimRoadFilterTool > m_spRoadFilterTool
Definition: FPGATrackSimSecondStageAlg.h:60
FPGATrackSimSecondStageAlg::m_overlapRemovalTool
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool
Definition: FPGATrackSimSecondStageAlg.h:68
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
FPGATrackSimLogicalEventOutputHeader::reserveFPGATrackSimTracks_2nd
void reserveFPGATrackSimTracks_2nd(size_t size)
Definition: FPGATrackSimLogicalEventOutputHeader.h:43
a
TList * a
Definition: liststreamerinfos.cxx:10
h
FPGATrackSimSecondStageAlg::m_nRoadsTot
long m_nRoadsTot
Definition: FPGATrackSimSecondStageAlg.h:101
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimSecondStageAlg::m_nTracksFound
long m_nTracksFound
Definition: FPGATrackSimSecondStageAlg.h:108
FPGATrackSimSecondStageAlg::m_nTracksChi2OLRTot
long m_nTracksChi2OLRTot
Definition: FPGATrackSimSecondStageAlg.h:104
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
FPGATrackSimSecondStageAlg::m_doTracking
Gaudi::Property< bool > m_doTracking
Definition: FPGATrackSimSecondStageAlg.h:77
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
FPGATrackSimSecondStageAlg::m_FPGAHitInRoadsKey
SG::WriteHandleKey< FPGATrackSimHitContainer > m_FPGAHitInRoadsKey
Definition: FPGATrackSimSecondStageAlg.h:124
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
FPGATrackSimSecondStageAlg::m_evt
long m_evt
Definition: FPGATrackSimSecondStageAlg.h:100
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
FPGATrackSimLogicalEventOutputHeader::reserveFPGATrackSimRoads_2nd
void reserveFPGATrackSimRoads_2nd(size_t size)
Definition: FPGATrackSimLogicalEventOutputHeader.h:31
FPGATrackSimSecondStageAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimSecondStageAlg.h:117
FPGATrackSimLogicalEventOutputHeader::addFPGATrackSimRoads_2nd
void addFPGATrackSimRoads_2nd(const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads_2nd)
Definition: FPGATrackSimLogicalEventOutputHeader.h:32
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
FPGATrackSimSecondStageAlg::m_description
std::string m_description
Definition: FPGATrackSimSecondStageAlg.h:54
FPGATrackSimSecondStageAlg::m_nTracksTot
long m_nTracksTot
Definition: FPGATrackSimSecondStageAlg.h:102
FPGATrackSimSecondStageAlg::m_nTracksChi2Found
long m_nTracksChi2Found
Definition: FPGATrackSimSecondStageAlg.h:109
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >