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_writePreClusterBranch {this, "writePreClusterBranch", true, "If set to false, never write precluster branches"}
 
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 39 of file FPGATrackSimDataPrepAlg.cxx.

39  :
40  AthAlgorithm(name, pSvcLocator)
41 {
42 }

◆ ~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 99 of file FPGATrackSimDataPrepAlg.cxx.

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

◆ 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 351 of file FPGATrackSimDataPrepAlg.cxx.

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

◆ initialize()

StatusCode FPGATrackSimDataPrepAlg::initialize ( )
overridevirtual

Definition at line 45 of file FPGATrackSimDataPrepAlg.cxx.

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

◆ 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 295 of file FPGATrackSimDataPrepAlg.cxx.

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

◆ readInputs()

StatusCode FPGATrackSimDataPrepAlg::readInputs ( bool &  done)
private

Definition at line 254 of file FPGATrackSimDataPrepAlg.cxx.

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

◆ 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 108 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 93 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 102 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 112 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 103 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 128 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAEventInfoKey

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

Definition at line 137 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAHitKey

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

Definition at line 129 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 130 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGAOfflineTrackKey

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

Definition at line 136 of file FPGATrackSimDataPrepAlg.h.

◆ m_FPGATruthTrackKey

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

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

◆ m_logicEventHeader

FPGATrackSimLogicalEventInputHeader* FPGATrackSimDataPrepAlg::m_logicEventHeader = nullptr
private

Definition at line 105 of file FPGATrackSimDataPrepAlg.h.

◆ m_logicEventHeader_precluster

FPGATrackSimLogicalEventInputHeader* FPGATrackSimDataPrepAlg::m_logicEventHeader_precluster = nullptr
private

Definition at line 104 of file FPGATrackSimDataPrepAlg.h.

◆ m_monTool

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

Definition at line 125 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxClusters = 0
private

Definition at line 118 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxPixClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxPixClusters = 0
private

Definition at line 115 of file FPGATrackSimDataPrepAlg.h.

◆ m_nMaxStripClusters

unsigned FPGATrackSimDataPrepAlg::m_nMaxStripClusters = 0
private

Definition at line 117 of file FPGATrackSimDataPrepAlg.h.

◆ m_nPixClusters

unsigned long FPGATrackSimDataPrepAlg::m_nPixClusters = 0
private

Definition at line 114 of file FPGATrackSimDataPrepAlg.h.

◆ m_nStripClusters

unsigned long FPGATrackSimDataPrepAlg::m_nStripClusters = 0
private

Definition at line 116 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 99 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 98 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 95 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 133 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 94 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.

◆ m_writePreClusterBranch

Gaudi::Property<bool> FPGATrackSimDataPrepAlg::m_writePreClusterBranch {this, "writePreClusterBranch", true, "If set to false, never write precluster branches"}
private

Definition at line 90 of file FPGATrackSimDataPrepAlg.h.


The documentation for this class was generated from the following files:
FPGATrackSimDataPrepAlg::readInputs
StatusCode readInputs(bool &done)
Definition: FPGATrackSimDataPrepAlg.cxx:254
FPGATrackSimDataPrepAlg::m_chrono
ServiceHandle< IChronoStatSvc > m_chrono
Definition: FPGATrackSimDataPrepAlg.h:82
FPGATrackSimDataPrepAlg::m_evt
double m_evt
Definition: FPGATrackSimDataPrepAlg.h:112
FPGATrackSimDataPrepAlg::m_recordHits
Gaudi::Property< bool > m_recordHits
Definition: FPGATrackSimDataPrepAlg.h:95
FPGATrackSimDataPrepAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimDataPrepAlg.h:125
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:117
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimDataPrepAlg::m_eventHeader
FPGATrackSimEventInputHeader m_eventHeader
Definition: FPGATrackSimDataPrepAlg.h:102
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:104
FPGATrackSimDataPrepAlg::m_useInternalTruthTracks
Gaudi::Property< bool > m_useInternalTruthTracks
Definition: FPGATrackSimDataPrepAlg.h:94
SG::ReadHandle< xAOD::TruthParticleContainer >
FPGATrackSimDataPrepAlg::m_writePreClusterBranch
Gaudi::Property< bool > m_writePreClusterBranch
Definition: FPGATrackSimDataPrepAlg.h:90
FPGATrackSimDataPrepAlg::m_logicEventHeader
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader
Definition: FPGATrackSimDataPrepAlg.h:105
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:137
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:136
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:116
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:93
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:129
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:115
FPGATrackSimDataPrepAlg::m_doHitFiltering
Gaudi::Property< bool > m_doHitFiltering
Definition: FPGATrackSimDataPrepAlg.h:87
FPGATrackSimDataPrepAlg::m_FPGAHitUnmappedKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitUnmappedKey
Definition: FPGATrackSimDataPrepAlg.h:130
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:132
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:128
FPGATrackSimDataPrepAlg::m_nMaxClusters
unsigned m_nMaxClusters
Definition: FPGATrackSimDataPrepAlg.h:118
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:98
FPGATrackSimDataPrepAlg::processInputs
StatusCode processInputs(SG::WriteHandle< FPGATrackSimHitCollection > &FPGAHitUnmapped, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClusters)
Definition: FPGATrackSimDataPrepAlg.cxx:295
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:99
a
TList * a
Definition: liststreamerinfos.cxx:10
h
FPGATrackSimDataPrepAlg::m_clusters
std::unique_ptr< FPGATrackSimClusterCollection > m_clusters
Definition: FPGATrackSimDataPrepAlg.h:108
FPGATrackSimDataPrepAlg::m_truthLinkContainerKey
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
Definition: FPGATrackSimDataPrepAlg.h:133
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:109
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:29
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:103
FPGATrackSimEventInputHeader::reset
void reset()
Definition: FPGATrackSimEventInputHeader.cxx:14
FPGATrackSimDataPrepAlg::m_FPGATruthTrackKey
SG::WriteHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimDataPrepAlg.h:135
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:114
ServiceHandle< ICondSvc >