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

#include <FPGATrackSimDataPrepAlg.h>

Inheritance diagram for FPGATrackSimDataPrepAlg:
Collaboration diagram for FPGATrackSimDataPrepAlg:

Public Member Functions

 FPGATrackSimDataPrepAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~FPGATrackSimDataPrepAlg ()=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, V, H > &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 readInputs (bool &done)
 
StatusCode processInputs (SG::WriteHandle< FPGATrackSimHitCollection > &FPGAHitUnmapped, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClusters)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &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
 
int m_ev = 0
 
ToolHandle< IFPGATrackSimInputToolm_hitSGInputTool {this, "SGInputTool", "", "Input tool from SG"}
 
ToolHandle< IFPGATrackSimEventInputHeaderToolm_hitInputTool {this, "InputTool", "FPGATrackSimSGToRawHitsTool/FPGATrackSimSGToRawHitsTool", "Input Tool"}
 
ToolHandle< FPGATrackSimReadRawRandomHitsToolm_hitInputTool2 {this, "InputTool2", "FPGATrackSimReadRawRandomHitsTool/FPGATrackSimReadRawRandomHitsTool", "Potential 2nd input Tool to load data from more than one source"}
 
ToolHandleArray< FPGATrackSimRawToLogicalHitsToolm_hitMapTools {this, "RawToLogicalHitsTools", {}, "Raw To Logical Tools"}
 
ToolHandle< IFPGATrackSimHitFilteringToolm_hitFilteringTool {this, "HitFilteringTool", "FPGATrackSimHitFilteringTool/FPGATrackSimHitFilteringTool", "Hit Filtering Tool"}
 
ToolHandle< FPGATrackSimClusteringToolIm_clusteringTool {this, "ClusteringTool", "FPGATrackSimClusteringTool/FPGATrackSimClusteringTool", "Hit Clustering Tool"}
 
ToolHandle< FPGATrackSimOutputHeaderToolm_writeOutputTool {this, "OutputTool", "FPGATrackSimOutputHeaderTool/FPGATrackSimOutputHeaderTool", "Output tool"}
 
ToolHandleArray< FPGATrackSim::FPGATrackSimEventSelectionToolm_eventSelectionTools {this, "eventSelectors", {}, "Event selection Tools"}
 
ServiceHandle< IChronoStatSvc > m_chrono {this,"ChronoStatSvc","ChronoStatSvc"}
 
Gaudi::Property< int > m_firstInputToolN {this, "FirstInputToolN", 1, "number of times to use event from first input tool"}
 
Gaudi::Property< int > m_secondInputToolN {this, "SecondInputToolN", 0, "number of times to use event from second input tool"}
 
Gaudi::Property< bool > m_doHitFiltering {this, "HitFiltering", false, "flag to enable hit/cluster filtering"}
 
Gaudi::Property< int > m_clustering {this, "Clustering", 0, "int to enable the clustering and say how many times to run it"}
 
Gaudi::Property< bool > m_writeOutputData {this, "writeOutputData", true,"write the output TTree"}
 
Gaudi::Property< bool > m_doEvtSel {this, "doEvtSel", false, "do event selection"}
 
Gaudi::Property< bool > m_useInternalTruthTracks {this,"useInternalTruthTracks", false, "case when runnin on RDO file (and not or wrapper)"}
 
Gaudi::Property< bool > m_recordHits {this,"recordHits", true, "For F-100 this is not needed"}
 
Gaudi::Property< std::string > m_preClusterBranch {this, "preClusterBranch", "LogicalEventInputHeader_PreCluster", "Name of the branch for pre-cluster input data in output ROOT file." }
 
Gaudi::Property< std::string > m_postClusterBranch {this, "postClusterBranch", "LogicalEventInputHeader_PostCluster", "Name of the branch for post-cluster input data in output ROOT file." }
 
FPGATrackSimEventInputHeader m_eventHeader
 
FPGATrackSimEventInputHeader m_firstInputHeader
 
FPGATrackSimLogicalEventInputHeaderm_logicEventHeader_precluster = nullptr
 
FPGATrackSimLogicalEventInputHeaderm_logicEventHeader = nullptr
 
std::unique_ptr< FPGATrackSimClusterCollectionm_clusters = std::make_unique<FPGATrackSimClusterCollection>()
 
std::vector< FPGATrackSimHitm_hits_miss {}
 
double m_evt = 0
 
unsigned long m_nPixClusters = 0
 
unsigned m_nMaxPixClusters = 0
 
unsigned long m_nStripClusters = 0
 
unsigned m_nMaxStripClusters = 0
 
unsigned m_nMaxClusters = 0
 
ToolHandle< GenericMonitoringToolm_monTool {this,"MonTool", "", "Monitoring tool"}
 
SG::WriteHandleKeyArray< FPGATrackSimClusterCollectionm_FPGAClusterKey {this, "FPGATrackSimClusterKey",{"FPGAClusters_1st"},"FPGATrackSim Clusters key"}
 
SG::WriteHandleKey< FPGATrackSimHitCollectionm_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim Hits key"}
 
SG::WriteHandleKey< FPGATrackSimHitCollectionm_FPGAHitUnmappedKey {this, "FPGATrackSimHitUnmappedKey","FPGAHitsUnmapped_1st","FPGATrackSim Unmapped Hits 1st stage key"}
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_inputTruthParticleContainerKey {this, "TruthTrackContainer", "TruthParticles", "Truth Particle Container"}
 
SG::WriteHandleKey< xAODTruthParticleLinkVectorm_truthLinkContainerKey {this, "TruthLinks", "xAODFPGATruthLinks", "Output EF xAODTruthLinks container"}
 
SG::WriteHandleKey< FPGATrackSimTruthTrackCollectionm_FPGATruthTrackKey {this, "FPGATrackSimTruthTrackKey", "FPGATruthTracks", "FPGATrackSim truth tracks"}
 
SG::WriteHandleKey< FPGATrackSimOfflineTrackCollectionm_FPGAOfflineTrackKey {this, "FPGATrackSimOfflineTrackKey", "FPGAOfflineTracks", "FPGATrackSim offline tracks"}
 
SG::WriteHandleKey< FPGATrackSimEventInfom_FPGAEventInfoKey {this, "FPGATrackSimEventInfoKey", "FPGAEventInfo", "FPGATrackSim event info"}
 
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 57 of file FPGATrackSimDataPrepAlg.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

◆ FPGATrackSimDataPrepAlg()

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

Definition at line 37 of file FPGATrackSimDataPrepAlg.cxx.

37  :
38  AthAlgorithm(name, pSvcLocator)
39 {
40 }

◆ ~FPGATrackSimDataPrepAlg()

virtual FPGATrackSimDataPrepAlg::~FPGATrackSimDataPrepAlg ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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 FPGATrackSimDataPrepAlg::execute ( )
overridevirtual

Definition at line 97 of file FPGATrackSimDataPrepAlg.cxx.

98 {
99  const EventContext& ctx = getContext();
100 
101  // Read inputs
102  bool done = false;
103  ATH_CHECK(readInputs(done));
104 
105  if (done) {
106  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
107  if (!appMgr) {
108  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
109  return StatusCode::FAILURE;
110  }
111  return appMgr->stopRun();
112  }
113 
115  ATH_CHECK( FPGAHits.record (std::make_unique<FPGATrackSimHitCollection>()));
116 
118  ATH_CHECK( FPGAHitUnmapped.record (std::make_unique<FPGATrackSimHitCollection>()));
119 
121  ATH_CHECK( FPGAClusters.record (std::make_unique<FPGATrackSimClusterCollection>()));
122 
124  ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>()));
125 
127  ATH_CHECK(FPGATruthTracks.record(std::make_unique<FPGATrackSimTruthTrackCollection>()));
128 
130  ATH_CHECK(FPGAOfflineTracks.record(std::make_unique<FPGATrackSimOfflineTrackCollection>()));
131  // Apply event selection based on truth tracks
132  if (m_doEvtSel) {
133  bool acceptEvent = false;
134  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: EventSelection");
136  {
137  if (eventSelector->selectEvent(m_eventHeader)) {
138  ATH_MSG_DEBUG("Event accepted by: " << eventSelector->name());
139  acceptEvent = true;
140  }
141  }
142  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: EventSelection");
143  if (m_useInternalTruthTracks && acceptEvent) {
144  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: TruthMatching");
145  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainer(m_inputTruthParticleContainerKey, ctx); // Read offline TruthParticles
146  if (!truthParticleContainer.isValid()) {
147  ATH_MSG_ERROR("No valid truth particle container with key " << truthParticleContainer.key());
148  return StatusCode::FAILURE;
149  }
150  ATH_MSG_DEBUG("making mp of truth particles");
151  std::unordered_map<HepMcParticleLink::barcode_type, std::pair<const xAOD::TruthParticle*, size_t>> truthParticlesMap;
152  size_t truthParticleIndex = 0;
153  for (const xAOD::TruthParticle* truthParticle : *truthParticleContainer) {
154  truthParticlesMap.insert(std::make_pair(HepMC::uniqueID(truthParticle), std::make_pair(truthParticle,truthParticleIndex)));
155  truthParticleIndex++;
156  }
158  truthLinkVec->reserve(fpgaTruthTracks.size());
159  ATH_MSG_DEBUG("begin truth matching for " << fpgaTruthTracks.size() << " FPGA truth tracks");
160  for (const FPGATrackSimTruthTrack& fpgaTruthTrack : fpgaTruthTracks) {
161  auto it = truthParticlesMap.find(fpgaTruthTrack.getUniqueID()); // TODO FIXME need to check FPGATrackSimTruthTrack uniqueIDs are properly filled
162  if (it != truthParticlesMap.end()) {
163  ElementLink<xAOD::TruthParticleContainer> truthParticleLink(*truthParticleContainer, it->second.second);
164  // TODO: check if we can avoid using the previously-created map and look directly for the unique ID in the link vector container
165  truthLinkVec->push_back(new xAODTruthParticleLink(HepMcParticleLink(HepMC::uniqueID(it->second.first), 0,
167  ATH_MSG_DEBUG("Truth link added");
168  }
169  }
170  if (truthLinkVec->empty()) {
171  ATH_MSG_DEBUG("No truth particles selected. Skipping event...");
172  return StatusCode::SUCCESS;
173  }
174  std::stable_sort(truthLinkVec->begin(), truthLinkVec->end(), SortTruthParticleLink());
175  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: TruthMatching");
176  }
177  }
178  else {
179  ATH_MSG_DEBUG("No Event Selection applied");
180  for (auto eventSelector : m_eventSelectionTools) {
181  eventSelector->setSelectedEvent(true);
182  }
183  }
184 
185  // Event passes cuts, count it
186  m_evt++;
187 
188  // Map, cluster, and filter hits
189  ATH_CHECK(processInputs(FPGAHitUnmapped, FPGAClusters));
190 
191  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: get truth/offline tracks");
192  // Now that this is done, push truth tracks back to storegate.
193  for (const auto& truthtrack : m_logicEventHeader->optional().getTruthTracks()) {
194  FPGATruthTracks->push_back(truthtrack);
195  }
196 
197  // Need to do the same for offline tracks.
198  for (const auto& offlineTrack : m_logicEventHeader->optional().getOfflineTracks()) {
199  FPGAOfflineTracks->push_back(offlineTrack);
200  }
201 
202  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: get truth/offline tracks");
203 
204  // Get reference to hits
205 
206  // Recording Data
208  {
209  // Get reference to hits
210  const unsigned& regionID = eventSelector->getRegionID();
211 
212  auto mon_regionID = Monitored::Scalar<unsigned>("regionID", regionID);
213  Monitored::Group(m_monTool, mon_regionID);
214  }
215 
216  std::vector<FPGATrackSimHit> const& hits = m_logicEventHeader->towers().at(0).hits();
217  if (m_recordHits) {
218  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: record hits");
219  // If and when we set up code to run over more than one region/tower at a time this will need to be updated
220  FPGAHits->reserve(hits.size());
221  for (const auto& hit : hits) {
222  if (hit.isReal()) FPGAHits->push_back(hit);
223  }
224  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: record hits");
225  }
226 
227  auto mon_nhits = Monitored::Scalar<unsigned>("nHits", hits.size());
228  auto mon_nhits_unmapped = Monitored::Scalar<unsigned>("nHits_unmapped", m_hits_miss.size());
229  Monitored::Group(m_monTool, mon_nhits, mon_nhits_unmapped);
230 
231  // Put the FPGATrackSim event info on storegate so later algorithms can access it easily.
233  ATH_CHECK(FPGAEventInfo.record(std::make_unique<FPGATrackSimEventInfo>(m_eventHeader.event())));
234 
235  // Write the output and reset
236  if (m_writeOutputData)
237  ATH_CHECK(m_writeOutputTool->writeData());
238 
239  // Reset data pointers
243 
244  return StatusCode::SUCCESS;
245 }

◆ 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 FPGATrackSimDataPrepAlg::finalize ( )
overridevirtual

Definition at line 349 of file FPGATrackSimDataPrepAlg.cxx.

350 {
351  ATH_MSG_INFO("PRINTING FPGATRACKSIM SIMPLE DATAPREP STATS");
352  ATH_MSG_INFO("========================================================================================");
353  ATH_MSG_INFO("Number of pixel clusters/event = " << m_nPixClusters/m_evt);
354  ATH_MSG_INFO("Number of strip clusters/event = " << m_nStripClusters/m_evt);
355  ATH_MSG_INFO("Max number of pixel clusters in an event = " << m_nMaxPixClusters);
356  ATH_MSG_INFO("Max number of strip clusters in an event = " << m_nMaxStripClusters);
357  ATH_MSG_INFO("Max number of clusters in an event = " << m_nMaxClusters);
358 
359  return StatusCode::SUCCESS;
360 }

◆ initialize()

StatusCode FPGATrackSimDataPrepAlg::initialize ( )
overridevirtual

Definition at line 43 of file FPGATrackSimDataPrepAlg.cxx.

44 {
45  std::stringstream ss(m_description);
46  std::string line;
47  ATH_MSG_INFO("Tag config:");
48  if (!m_description.empty()) {
49  while (std::getline(ss, line, '\n')) {
50  ATH_MSG_INFO('\t' << line);
51  }
52  }
53 
54 
55  ATH_CHECK(m_hitSGInputTool.retrieve(EnableTool{!m_hitSGInputTool.empty()}));
56 
57  ATH_CHECK(m_hitInputTool.retrieve(EnableTool{!m_hitInputTool.empty()}));
58  ATH_CHECK(m_hitInputTool2.retrieve(EnableTool{m_secondInputToolN > 0 && !m_hitInputTool2.empty()}));
59  ATH_CHECK(m_hitMapTools.retrieve());
60  ATH_CHECK(m_hitFilteringTool.retrieve(EnableTool{m_doHitFiltering}));
61  ATH_CHECK(m_clusteringTool.retrieve(EnableTool{m_clustering > 0}));
62 
63  ATH_CHECK(m_writeOutputTool.retrieve());
64  ATH_CHECK(m_eventSelectionTools.retrieve());
65 
66 
67  ATH_MSG_DEBUG("initialize() Instantiating root objects");
69  m_logicEventHeader = m_writeOutputTool->addInputBranch(m_postClusterBranch.value(), true);
70 
71  ATH_MSG_DEBUG("initialize() Setting branch");
72 
73  if (!m_monTool.empty())
74  ATH_CHECK(m_monTool.retrieve());
75 
76  ATH_CHECK( m_FPGAClusterKey.initialize() );
84 
85  ATH_CHECK( m_chrono.retrieve() );
86  ATH_MSG_DEBUG("initialize() Finished");
87 
88 
89  return StatusCode::SUCCESS;
90 }

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

◆ processInputs()

StatusCode FPGATrackSimDataPrepAlg::processInputs ( SG::WriteHandle< FPGATrackSimHitCollection > &  FPGAHitUnmapped,
SG::WriteHandle< FPGATrackSimClusterCollection > &  FPGAClusters 
)
private

Definition at line 293 of file FPGATrackSimDataPrepAlg.cxx.

295 {
296  m_clusters->clear();
297  m_hits_miss.clear();
298 
299  // Map hits
300  ATH_MSG_DEBUG("Running hits conversion");
303  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: RawToLogical");
304  for (auto hitMapTool : m_hitMapTools){
305  ATH_CHECK(hitMapTool->convert(1, m_eventHeader, *m_logicEventHeader));
306  }
307  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: RawToLogical");
308 
309 
310  for (const FPGATrackSimHit& hit : m_hits_miss) FPGAHitUnmapped->push_back(hit);
311 
312 
313  ATH_MSG_DEBUG("Hits conversion done, #unmapped hists = " << m_hits_miss.size());
314 
315  // At this stage, copy the logicEventHeader.
317 
318  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: Clustering");
319  // Clustering
320  for (int ic = 0; ic < m_clustering; ic++) {
321  ATH_MSG_DEBUG("Running clustering");
323  // I think I also want to pass m_clusters to random removal (but won't work currently)
324  if (m_doHitFiltering) ATH_CHECK(m_hitFilteringTool->DoRandomRemoval(*m_logicEventHeader, false));
325  unsigned npix(0), nstrip(0);
326  for (const FPGATrackSimCluster& cluster : *m_clusters) {
327  if (cluster.getClusterEquiv().isPixel()) npix++;
328  else nstrip++;
329  }
330  m_nPixClusters += npix;
331  m_nStripClusters += nstrip;
332  if (npix > m_nMaxPixClusters) m_nMaxPixClusters = npix;
333  if (nstrip > m_nMaxStripClusters) m_nMaxStripClusters = nstrip;
334  if (m_clusters->size() > m_nMaxClusters) m_nMaxClusters = m_clusters->size();
335  }
336  FPGAClusters->insert(
337  FPGAClusters->end(),
338  std::make_move_iterator(m_clusters->begin()),
339  std::make_move_iterator(m_clusters->end()));
340 
341  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: Clustering");
342 
343  return StatusCode::SUCCESS;
344 }

◆ readInputs()

StatusCode FPGATrackSimDataPrepAlg::readInputs ( bool &  done)
private

Definition at line 252 of file FPGATrackSimDataPrepAlg.cxx.

253 {
254 
255  if ( !m_hitSGInputTool.empty()) {
256  ATH_CHECK(m_hitSGInputTool->readData(&m_eventHeader, Gaudi::Hive::currentContext()));
257  ATH_MSG_DEBUG("Loaded " << m_eventHeader.nHits() << " hits in event header from SG");
258 
259  return StatusCode::SUCCESS;
260  }
261 
262  if (m_ev % m_firstInputToolN == 0)
263  {
264  // Read primary input
265  ATH_CHECK(m_hitInputTool->readData(&m_firstInputHeader, done));
266  if (done)
267  {
268  ATH_MSG_DEBUG("Cannot read more events from file, returning");
269  return StatusCode::SUCCESS; // end of loop over events
270  }
271  }
272 
274 
275  // Read secondary input
276  for (int i = 0; i < m_secondInputToolN; i++)
277  {
278  ATH_CHECK(m_hitInputTool2->readData(&m_eventHeader, done, false));
279  if (done)
280  {
281  ATH_MSG_INFO("Cannot read more events from file, returning");
282  return StatusCode::SUCCESS;
283  }
284  }
285 
286  m_ev++;
287 
288  return StatusCode::SUCCESS;
289 }

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

Member Data Documentation

◆ m_chrono

ServiceHandle<IChronoStatSvc> FPGATrackSimDataPrepAlg::m_chrono {this,"ChronoStatSvc","ChronoStatSvc"}
private

Definition at line 82 of file FPGATrackSimDataPrepAlg.h.

◆ m_clustering

Gaudi::Property<int> FPGATrackSimDataPrepAlg::m_clustering {this, "Clustering", 0, "int to enable the clustering and say how many times to run it"}
private

Definition at line 88 of file FPGATrackSimDataPrepAlg.h.

◆ m_clusteringTool

ToolHandle<FPGATrackSimClusteringToolI> FPGATrackSimDataPrepAlg::m_clusteringTool {this, "ClusteringTool", "FPGATrackSimClusteringTool/FPGATrackSimClusteringTool", "Hit Clustering Tool"}
private

Definition at line 78 of file FPGATrackSimDataPrepAlg.h.

◆ m_clusters

std::unique_ptr<FPGATrackSimClusterCollection> FPGATrackSimDataPrepAlg::m_clusters = std::make_unique<FPGATrackSimClusterCollection>()
private

Definition at line 105 of file FPGATrackSimDataPrepAlg.h.

◆ m_description

std::string FPGATrackSimDataPrepAlg::m_description
private

Definition at line 69 of file FPGATrackSimDataPrepAlg.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_doEvtSel

Gaudi::Property<bool> FPGATrackSimDataPrepAlg::m_doEvtSel {this, "doEvtSel", false, "do event selection"}
private

Definition at line 90 of file FPGATrackSimDataPrepAlg.h.

◆ m_doHitFiltering

Gaudi::Property<bool> FPGATrackSimDataPrepAlg::m_doHitFiltering {this, "HitFiltering", false, "flag to enable hit/cluster filtering"}
private

Definition at line 87 of file FPGATrackSimDataPrepAlg.h.

◆ m_ev

int FPGATrackSimDataPrepAlg::m_ev = 0
private

Definition at line 70 of file FPGATrackSimDataPrepAlg.h.

◆ m_eventHeader

FPGATrackSimEventInputHeader FPGATrackSimDataPrepAlg::m_eventHeader
private

Definition at line 99 of file FPGATrackSimDataPrepAlg.h.

◆ m_eventSelectionTools

ToolHandleArray<FPGATrackSim::FPGATrackSimEventSelectionTool> FPGATrackSimDataPrepAlg::m_eventSelectionTools {this, "eventSelectors", {}, "Event selection Tools"}
private

Definition at line 80 of file FPGATrackSimDataPrepAlg.h.

◆ m_evt

double FPGATrackSimDataPrepAlg::m_evt = 0
private

Definition at line 109 of file FPGATrackSimDataPrepAlg.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_firstInputHeader

FPGATrackSimEventInputHeader FPGATrackSimDataPrepAlg::m_firstInputHeader
private

Definition at line 100 of file FPGATrackSimDataPrepAlg.h.

◆ m_firstInputToolN

Gaudi::Property<int> FPGATrackSimDataPrepAlg::m_firstInputToolN {this, "FirstInputToolN", 1, "number of times to use event from first input tool"}
private

Definition at line 85 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAClusterKey

SG::WriteHandleKeyArray<FPGATrackSimClusterCollection> FPGATrackSimDataPrepAlg::m_FPGAClusterKey {this, "FPGATrackSimClusterKey",{"FPGAClusters_1st"},"FPGATrackSim Clusters key"}
private

Definition at line 125 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAEventInfoKey

SG::WriteHandleKey<FPGATrackSimEventInfo> FPGATrackSimDataPrepAlg::m_FPGAEventInfoKey {this, "FPGATrackSimEventInfoKey", "FPGAEventInfo", "FPGATrackSim event info"}
private

Definition at line 134 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAHitKey

SG::WriteHandleKey<FPGATrackSimHitCollection> FPGATrackSimDataPrepAlg::m_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim Hits key"}
private

Definition at line 126 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAHitUnmappedKey

SG::WriteHandleKey<FPGATrackSimHitCollection> FPGATrackSimDataPrepAlg::m_FPGAHitUnmappedKey {this, "FPGATrackSimHitUnmappedKey","FPGAHitsUnmapped_1st","FPGATrackSim Unmapped Hits 1st stage key"}
private

Definition at line 127 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAOfflineTrackKey

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

Definition at line 133 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGATruthTrackKey

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

Definition at line 132 of file FPGATrackSimDataPrepAlg.h.

◆ m_hitFilteringTool

ToolHandle<IFPGATrackSimHitFilteringTool> FPGATrackSimDataPrepAlg::m_hitFilteringTool {this, "HitFilteringTool", "FPGATrackSimHitFilteringTool/FPGATrackSimHitFilteringTool", "Hit Filtering Tool"}
private

Definition at line 77 of file FPGATrackSimDataPrepAlg.h.

◆ m_hitInputTool

ToolHandle<IFPGATrackSimEventInputHeaderTool> FPGATrackSimDataPrepAlg::m_hitInputTool {this, "InputTool", "FPGATrackSimSGToRawHitsTool/FPGATrackSimSGToRawHitsTool", "Input Tool"}
private

Definition at line 74 of file FPGATrackSimDataPrepAlg.h.

◆ m_hitInputTool2

ToolHandle<FPGATrackSimReadRawRandomHitsTool> FPGATrackSimDataPrepAlg::m_hitInputTool2 {this, "InputTool2", "FPGATrackSimReadRawRandomHitsTool/FPGATrackSimReadRawRandomHitsTool", "Potential 2nd input Tool to load data from more than one source"}
private

Definition at line 75 of file FPGATrackSimDataPrepAlg.h.

◆ m_hitMapTools

ToolHandleArray<FPGATrackSimRawToLogicalHitsTool> FPGATrackSimDataPrepAlg::m_hitMapTools {this, "RawToLogicalHitsTools", {}, "Raw To Logical Tools"}
private

Definition at line 76 of file FPGATrackSimDataPrepAlg.h.

◆ m_hits_miss

std::vector<FPGATrackSimHit> FPGATrackSimDataPrepAlg::m_hits_miss {}
private

Definition at line 106 of file FPGATrackSimDataPrepAlg.h.

◆ m_hitSGInputTool

ToolHandle<IFPGATrackSimInputTool> FPGATrackSimDataPrepAlg::m_hitSGInputTool {this, "SGInputTool", "", "Input tool from SG"}
private

Definition at line 73 of file FPGATrackSimDataPrepAlg.h.

◆ m_inputTruthParticleContainerKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> FPGATrackSimDataPrepAlg::m_inputTruthParticleContainerKey {this, "TruthTrackContainer", "TruthParticles", "Truth Particle Container"}
private

Definition at line 129 of file FPGATrackSimDataPrepAlg.h.

◆ m_logicEventHeader

FPGATrackSimLogicalEventInputHeader* FPGATrackSimDataPrepAlg::m_logicEventHeader = nullptr
private

Definition at line 102 of file FPGATrackSimDataPrepAlg.h.

◆ m_logicEventHeader_precluster

FPGATrackSimLogicalEventInputHeader* FPGATrackSimDataPrepAlg::m_logicEventHeader_precluster = nullptr
private

Definition at line 101 of file FPGATrackSimDataPrepAlg.h.

◆ m_monTool

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

Definition at line 122 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxClusters = 0
private

Definition at line 115 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxPixClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxPixClusters = 0
private

Definition at line 112 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxStripClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxStripClusters = 0
private

Definition at line 114 of file FPGATrackSimDataPrepAlg.h.

◆ m_nPixClusters

unsigned long FPGATrackSimDataPrepAlg::m_nPixClusters = 0
private

Definition at line 111 of file FPGATrackSimDataPrepAlg.h.

◆ m_nStripClusters

unsigned long FPGATrackSimDataPrepAlg::m_nStripClusters = 0
private

Definition at line 113 of file FPGATrackSimDataPrepAlg.h.

◆ m_postClusterBranch

Gaudi::Property<std::string> FPGATrackSimDataPrepAlg::m_postClusterBranch {this, "postClusterBranch", "LogicalEventInputHeader_PostCluster", "Name of the branch for post-cluster input data in output ROOT file." }
private

Definition at line 96 of file FPGATrackSimDataPrepAlg.h.

◆ m_preClusterBranch

Gaudi::Property<std::string> FPGATrackSimDataPrepAlg::m_preClusterBranch {this, "preClusterBranch", "LogicalEventInputHeader_PreCluster", "Name of the branch for pre-cluster input data in output ROOT file." }
private

Definition at line 95 of file FPGATrackSimDataPrepAlg.h.

◆ m_recordHits

Gaudi::Property<bool> FPGATrackSimDataPrepAlg::m_recordHits {this,"recordHits", true, "For F-100 this is not needed"}
private

Definition at line 92 of file FPGATrackSimDataPrepAlg.h.

◆ m_secondInputToolN

Gaudi::Property<int> FPGATrackSimDataPrepAlg::m_secondInputToolN {this, "SecondInputToolN", 0, "number of times to use event from second input tool"}
private

Definition at line 86 of file FPGATrackSimDataPrepAlg.h.

◆ m_truthLinkContainerKey

SG::WriteHandleKey<xAODTruthParticleLinkVector> FPGATrackSimDataPrepAlg::m_truthLinkContainerKey {this, "TruthLinks", "xAODFPGATruthLinks", "Output EF xAODTruthLinks container"}
private

Definition at line 130 of file FPGATrackSimDataPrepAlg.h.

◆ m_useInternalTruthTracks

Gaudi::Property<bool> FPGATrackSimDataPrepAlg::m_useInternalTruthTracks {this,"useInternalTruthTracks", false, "case when runnin on RDO file (and not or wrapper)"}
private

Definition at line 91 of file FPGATrackSimDataPrepAlg.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_writeOutputData

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

Definition at line 89 of file FPGATrackSimDataPrepAlg.h.

◆ m_writeOutputTool

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

Definition at line 79 of file FPGATrackSimDataPrepAlg.h.


The documentation for this class was generated from the following files:
FPGATrackSimDataPrepAlg::readInputs
StatusCode readInputs(bool &done)
Definition: FPGATrackSimDataPrepAlg.cxx:252
FPGATrackSimDataPrepAlg::m_chrono
ServiceHandle< IChronoStatSvc > m_chrono
Definition: FPGATrackSimDataPrepAlg.h:82
FPGATrackSimDataPrepAlg::m_evt
double m_evt
Definition: FPGATrackSimDataPrepAlg.h:109
FPGATrackSimDataPrepAlg::m_recordHits
Gaudi::Property< bool > m_recordHits
Definition: FPGATrackSimDataPrepAlg.h:92
FPGATrackSimDataPrepAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimDataPrepAlg.h:122
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
FPGATrackSimDataPrepAlg::m_hitSGInputTool
ToolHandle< IFPGATrackSimInputTool > m_hitSGInputTool
Definition: FPGATrackSimDataPrepAlg.h:73
FPGATrackSimOptionalEventInfo::getOfflineTracks
const std::vector< FPGATrackSimOfflineTrack > & getOfflineTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:32
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimDataPrepAlg::m_hitInputTool2
ToolHandle< FPGATrackSimReadRawRandomHitsTool > m_hitInputTool2
Definition: FPGATrackSimDataPrepAlg.h:75
FPGATrackSimDataPrepAlg::m_nMaxStripClusters
unsigned m_nMaxStripClusters
Definition: FPGATrackSimDataPrepAlg.h:114
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimDataPrepAlg::m_eventHeader
FPGATrackSimEventInputHeader m_eventHeader
Definition: FPGATrackSimDataPrepAlg.h:99
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimDataPrepAlg::m_logicEventHeader_precluster
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_precluster
Definition: FPGATrackSimDataPrepAlg.h:101
FPGATrackSimDataPrepAlg::m_useInternalTruthTracks
Gaudi::Property< bool > m_useInternalTruthTracks
Definition: FPGATrackSimDataPrepAlg.h:91
SG::ReadHandle< xAOD::TruthParticleContainer >
FPGATrackSimDataPrepAlg::m_logicEventHeader
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader
Definition: FPGATrackSimDataPrepAlg.h:102
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
FPGATrackSimDataPrepAlg::m_hitMapTools
ToolHandleArray< FPGATrackSimRawToLogicalHitsTool > m_hitMapTools
Definition: FPGATrackSimDataPrepAlg.h:76
FPGATrackSimDataPrepAlg::m_ev
int m_ev
Definition: FPGATrackSimDataPrepAlg.h:70
skel.it
it
Definition: skel.GENtoEVGEN.py:407
FPGATrackSimDataPrepAlg::m_FPGAEventInfoKey
SG::WriteHandleKey< FPGATrackSimEventInfo > m_FPGAEventInfoKey
Definition: FPGATrackSimDataPrepAlg.h:134
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPGATrackSimDataPrepAlg::m_description
std::string m_description
Definition: FPGATrackSimDataPrepAlg.h:69
FPGATrackSimDataPrepAlg::m_FPGAOfflineTrackKey
SG::WriteHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
Definition: FPGATrackSimDataPrepAlg.h:133
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
std::stable_sort
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
Definition: DVL_algorithms.h:711
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
FPGATrackSimOptionalEventInfo::getTruthTracks
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:37
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
FPGATrackSimEventInputHeader::nHits
int nHits() const
Definition: FPGATrackSimEventInputHeader.h:38
FPGATrackSimDataPrepAlg::m_nStripClusters
unsigned long m_nStripClusters
Definition: FPGATrackSimDataPrepAlg.h:113
FPGATrackSimDataPrepAlg::m_writeOutputData
Gaudi::Property< bool > m_writeOutputData
Definition: FPGATrackSimDataPrepAlg.h:89
FPGATrackSimDataPrepAlg::m_hitFilteringTool
ToolHandle< IFPGATrackSimHitFilteringTool > m_hitFilteringTool
Definition: FPGATrackSimDataPrepAlg.h:77
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
FPGATrackSimDataPrepAlg::m_doEvtSel
Gaudi::Property< bool > m_doEvtSel
Definition: FPGATrackSimDataPrepAlg.h:90
FPGATrackSimLogicalEventInputHeader::optional
FPGATrackSimOptionalEventInfo const & optional() const
Definition: FPGATrackSimLogicalEventInputHeader.h:32
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
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
FPGATrackSimDataPrepAlg::m_FPGAHitKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimDataPrepAlg.h:126
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
FPGATrackSimDataPrepAlg::m_nMaxPixClusters
unsigned m_nMaxPixClusters
Definition: FPGATrackSimDataPrepAlg.h:112
FPGATrackSimDataPrepAlg::m_doHitFiltering
Gaudi::Property< bool > m_doHitFiltering
Definition: FPGATrackSimDataPrepAlg.h:87
FPGATrackSimDataPrepAlg::m_FPGAHitUnmappedKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitUnmappedKey
Definition: FPGATrackSimDataPrepAlg.h:127
FPGATrackSimDataPrepAlg::m_clustering
Gaudi::Property< int > m_clustering
Definition: FPGATrackSimDataPrepAlg.h:88
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
FPGATrackSimDataPrepAlg::m_inputTruthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleContainerKey
Definition: FPGATrackSimDataPrepAlg.h:129
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
FPGATrackSimLogicalEventInputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventInputHeader.cxx:10
FPGATrackSimEventInputHeader::event
FPGATrackSimEventInfo const & event() const
Definition: FPGATrackSimEventInputHeader.h:33
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
grepfile.ic
int ic
Definition: grepfile.py:33
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:240
FPGATrackSimDataPrepAlg::m_secondInputToolN
Gaudi::Property< int > m_secondInputToolN
Definition: FPGATrackSimDataPrepAlg.h:86
FPGATrackSimDataPrepAlg::m_FPGAClusterKey
SG::WriteHandleKeyArray< FPGATrackSimClusterCollection > m_FPGAClusterKey
Definition: FPGATrackSimDataPrepAlg.h:125
FPGATrackSimDataPrepAlg::m_nMaxClusters
unsigned m_nMaxClusters
Definition: FPGATrackSimDataPrepAlg.h:115
FPGATrackSimDataPrepAlg::m_writeOutputTool
ToolHandle< FPGATrackSimOutputHeaderTool > m_writeOutputTool
Definition: FPGATrackSimDataPrepAlg.h:79
FPGATrackSimEventInputHeader::optional
FPGATrackSimOptionalEventInfo const & optional() const
Definition: FPGATrackSimEventInputHeader.h:34
FPGATrackSimDataPrepAlg::m_clusteringTool
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
Definition: FPGATrackSimDataPrepAlg.h:78
FPGATrackSimDataPrepAlg::m_preClusterBranch
Gaudi::Property< std::string > m_preClusterBranch
Definition: FPGATrackSimDataPrepAlg.h:95
FPGATrackSimDataPrepAlg::processInputs
StatusCode processInputs(SG::WriteHandle< FPGATrackSimHitCollection > &FPGAHitUnmapped, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClusters)
Definition: FPGATrackSimDataPrepAlg.cxx:293
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
FPGATrackSimDataPrepAlg::m_postClusterBranch
Gaudi::Property< std::string > m_postClusterBranch
Definition: FPGATrackSimDataPrepAlg.h:96
a
TList * a
Definition: liststreamerinfos.cxx:10
h
FPGATrackSimDataPrepAlg::m_clusters
std::unique_ptr< FPGATrackSimClusterCollection > m_clusters
Definition: FPGATrackSimDataPrepAlg.h:105
FPGATrackSimDataPrepAlg::m_truthLinkContainerKey
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
Definition: FPGATrackSimDataPrepAlg.h:130
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimDataPrepAlg::m_firstInputToolN
Gaudi::Property< int > m_firstInputToolN
Definition: FPGATrackSimDataPrepAlg.h:85
FPGATrackSimDataPrepAlg::m_hits_miss
std::vector< FPGATrackSimHit > m_hits_miss
Definition: FPGATrackSimDataPrepAlg.h:106
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
LArNewCalib_DelayDump_OFC_Cali.eventSelector
eventSelector
Definition: LArNewCalib_DelayDump_OFC_Cali.py:112
FPGATrackSimDataPrepAlg::m_eventSelectionTools
ToolHandleArray< FPGATrackSim::FPGATrackSimEventSelectionTool > m_eventSelectionTools
Definition: FPGATrackSimDataPrepAlg.h:80
enableBenchmark
constexpr bool enableBenchmark
Definition: FPGATrackSimDataPrepAlg.cxx:27
FPGATrackSimLogicalEventInputHeader::towers
const std::vector< FPGATrackSimTowerInputHeader > & towers() const
Definition: FPGATrackSimLogicalEventInputHeader.h:36
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
FPGATrackSimDataPrepAlg::m_hitInputTool
ToolHandle< IFPGATrackSimEventInputHeaderTool > m_hitInputTool
Definition: FPGATrackSimDataPrepAlg.h:74
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
FPGATrackSimDataPrepAlg::m_firstInputHeader
FPGATrackSimEventInputHeader m_firstInputHeader
Definition: FPGATrackSimDataPrepAlg.h:100
FPGATrackSimEventInputHeader::reset
void reset()
Definition: FPGATrackSimEventInputHeader.cxx:14
FPGATrackSimDataPrepAlg::m_FPGATruthTrackKey
SG::WriteHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimDataPrepAlg.h:132
FPGATrackSimTruthTrackCollection
std::vector< FPGATrackSimTruthTrack > FPGATrackSimTruthTrackCollection
Definition: FPGATrackSimTruthTrackCollection.h:14
fitman.k
k
Definition: fitman.py:528
FPGATrackSimDataPrepAlg::m_nPixClusters
unsigned long m_nPixClusters
Definition: FPGATrackSimDataPrepAlg.h:111
ServiceHandle< ICondSvc >