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

#include <FPGATrackSimNNTrackTool.h>

Inheritance diagram for FPGATrackSimNNTrackTool:
Collaboration diagram for FPGATrackSimNNTrackTool:

Public Member Functions

 FPGATrackSimNNTrackTool (const std::string &, const std::string &, const IInterface *)
 
virtual StatusCode initialize () override
 
StatusCode getTracks (std::vector< FPGATrackSimRoad * > &roads, std::vector< FPGATrackSimTrack > &tracks, const FPGATrackSimNNMap *nnMap)
 
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 sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static float getXScale ()
 
static float getYScale ()
 
static float getZScale ()
 

Public Attributes

Gaudi::Property< double > m_NNCut { this, "NNCut", 0.0, " NN output value to cut on when selecting good tracks"}
 
Gaudi::Property< double > m_chi2_scalefactor { this, "Chi2ScaleFactor", 40/(1-0.1), "Scale factor to use in converting to a chi2, Nominal chi2ndof cut is 40 and we want to use NN>0.0075 (or NN<(1-0.0075)"}
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void compute_truth (FPGATrackSimTrack &newtrk) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc","FPGATrackSimMappingSvc"}
 
ServiceHandle< ITHistSvc > m_tHistSvc {this, "THistSvc","THistSvc"}
 
std::vector< float > m_x
 
std::vector< float > m_y
 
std::vector< float > m_z
 
std::vector< float > m_barcodefrac
 
std::vector< int > m_barcode
 
std::vector< int > m_eventindex
 
std::vector< unsigned int > m_isPixel
 
std::vector< unsigned int > m_layer
 
std::vector< unsigned int > m_isBarrel
 
std::vector< unsigned int > m_etawidth
 
std::vector< unsigned int > m_phiwidth
 
std::vector< unsigned int > m_etamodule
 
std::vector< unsigned int > m_phimodule
 
std::vector< unsigned int > m_ID
 
std::vector< float > m_truth_d0
 
std::vector< float > m_truth_z0
 
std::vector< float > m_truth_pt
 
std::vector< float > m_truth_eta
 
std::vector< float > m_truth_phi
 
std::vector< float > m_truth_pdg
 
std::vector< int > m_truth_q
 
std::vector< int > m_truth_barcode
 
std::vector< int > m_truth_eventindex
 
std::vector< const char * > m_input_node_names
 
std::vector< int64_t > m_input_node_dims
 
std::vector< const char * > m_output_node_names
 
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 36 of file FPGATrackSimNNTrackTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FPGATrackSimNNTrackTool()

FPGATrackSimNNTrackTool::FPGATrackSimNNTrackTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 21 of file FPGATrackSimNNTrackTool.cxx.

23  : AthAlgTool(algname, name, ifc) {}

Member Function Documentation

◆ compute_truth()

void FPGATrackSimNNTrackTool::compute_truth ( FPGATrackSimTrack newtrk) const
private

Definition at line 189 of file FPGATrackSimNNTrackTool.cxx.

189  {
190  std::vector<FPGATrackSimMultiTruth> mtv;
191  const FPGATrackSimPlaneMap *planeMap = m_FPGATrackSimMapping->PlaneMap_1st();
192 
193  for (unsigned layer = 0; layer < planeMap->getNLogiLayers(); layer++) {
194  if (t.getHitMap() & (1 << planeMap->getCoordOffset(layer)))
195  continue; // no hit in this plane
196  // Sanity check that we have enough hits.
197  if (layer < t.getFPGATrackSimHits().size())
198  mtv.push_back(t.getFPGATrackSimHits().at(layer).getTruth());
199 
200  // adjust weight for hits without (and also with) a truth match, so that
201  // each is counted with the same weight.
202  mtv.back().assign_equal_normalization();
203  }
204 
207  // frac is then the fraction of the total number of hits on the track
208  // attributed to the barcode.
209 
212  const bool ok = mt.best(tbarcode, tfrac);
213  if (ok) {
214  t.setEventIndex(tbarcode.first);
215  t.setBarcode(tbarcode.second);
216  t.setBarcodeFrac(tfrac);
217  }
218 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

◆ extraDeps_update_handler()

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

◆ getTracks()

StatusCode FPGATrackSimNNTrackTool::getTracks ( std::vector< FPGATrackSimRoad * > &  roads,
std::vector< FPGATrackSimTrack > &  tracks,
const FPGATrackSimNNMap nnMap 
)

Definition at line 33 of file FPGATrackSimNNTrackTool.cxx.

35  {
36 
37  int n_track = 0;
38 
39  // Loop over roads
40  for (auto iroad : roads) {
41 
42  double y = iroad->getY();
43 
44  // Error checking
45  int sector = iroad->getSector();
46  if (sector < 0) {
47  ATH_MSG_DEBUG("Bad sector " << sector);
48  return StatusCode::SUCCESS;
49  }
50 
51  // Get info on layers with missing hits
52  int nMissing = 0;
53  layer_bitmask_t missing_mask = 0;
54 
55  // Just used to get number of layers considered
56  const FPGATrackSimPlaneMap *planeMap = m_FPGATrackSimMapping->PlaneMap_1st();
57 
58  // Create a template track with common parameters filled already for
59  // initializing below
60  FPGATrackSimTrack temp;
62  temp.setNLayers(planeMap->getNLogiLayers());
63  temp.setBankID(-1);
64  temp.setPatternID(iroad->getPID());
65  temp.setFirstSectorID(iroad->getSector());
66  temp.setHitMap(missing_mask);
67  temp.setNMissing(nMissing);
68  temp.setQOverPt(y);
69 
71  // Get a list of indices for all possible combinations given a certain
72  // number of layers
73  std::vector<std::vector<int>> combs =
74  getComboIndices(iroad->getNHits_layer());
75 
76  // Loop over possible combinations for this road
77  for (size_t icomb = 0; icomb < combs.size(); icomb++) {
78 
79  // list of indices for this particular combination
80  std::vector<int> const &hit_indices = combs[icomb];
81  std::vector<const FPGATrackSimHit *> hit_list;
82 
83  // Loop over all layers
84  for (unsigned layer = 0; layer < planeMap->getNLogiLayers(); layer++) {
85 
86  // Check to see if this is a valid hit
87  if (hit_indices[layer] >= 0) {
88 
89  const FPGATrackSimHit *hit = iroad->getHits(layer)[hit_indices[layer]];
90  // Add this hit to the road
91  hit_list.push_back(hit);
92  }
93  }
94 
95  // Sort the list by radial distance
96  std::sort(hit_list.begin(), hit_list.end(),
97  [](const FPGATrackSimHit *hit1, const FPGATrackSimHit *hit2) {
98  double rho1 = std::hypot(hit1->getX(), hit1->getY());
99  double rho2 = std::hypot(hit2->getX(), hit2->getY());
100  return rho1 < rho2;
101  });
102 
103  // ECC - Input maps for lwtnn
104  std::map<std::string, std::map<std::string, double>> valMap;
105  std::map<std::string, std::map<std::string, std::vector<double>>>
106  vectorMap;
107 
108  // Initalize to default
109  for (int i = 1; i <= 8; i++) {
110  TString indexStr = Form("%d", i);
111  valMap["dNN"][("hitX" + indexStr).Data()] = 0;
112  valMap["dNN"][("hitY" + indexStr).Data()] = 0;
113  valMap["dNN"][("hitZ" + indexStr).Data()] = 0;
114  }
115 
116  int index = 1;
117  bool flipZ = false;
118  double rotateAngle = 0;
119 
120  // Loop over all hits
121  for (const auto &hit : hit_list) {
122 
123  // Need to rotate hits
124  double x0 = hit->getX();
125  double y0 = hit->getY();
126  double z0 = hit->getZ();
127  if (index == 1) {
128  if (z0 < 0)
129  flipZ = true;
130  rotateAngle = std::atan(x0 / y0);
131  if (y0 < 0)
132  rotateAngle += M_PI;
133  }
134 
135  double xf = x0 * std::cos(rotateAngle) - y0 * std::sin(rotateAngle);
136  double yf = x0 * std::sin(rotateAngle) + y0 * std::cos(rotateAngle);
137  double zf = z0;
138  if (flipZ)
139  zf = z0 * -1;
140 
141  // Fill map for lwtnn
142  TString indexStr = Form("%d", index);
143  valMap["dNN"][("hitX" + indexStr).Data()] = xf / getXScale();
144  valMap["dNN"][("hitY" + indexStr).Data()] = yf / getYScale();
145  valMap["dNN"][("hitZ" + indexStr).Data()] = zf / getZScale();
146  index++;
147  }
148 
149  // Use NN filter to see if these set of hits comprise a good track
150  std::shared_ptr<lwt::LightweightGraph> lwnn_map = nnMap->getNNMap();
151  auto scoreMap = lwnn_map->compute(valMap, vectorMap);
152  float nn_val = scoreMap.at("NNScore");
153 
154  // Save all hits on this road if it passes our "good" criteria
155  if (nn_val > m_NNCut) {
156 
157  // This is a track. Fill class and add to track list
158  n_track++;
159  FPGATrackSimTrack track_cand;
160  track_cand.setTrackID(n_track);
161  track_cand.setNLayers(planeMap->getNLogiLayers());
162  for (const auto &ihit : hit_list) {
163  unsigned int layer = ihit->getLayer();
164  track_cand.setFPGATrackSimHit(layer, *ihit);
165  }
166  // Nominal chi2ndof cut is 40 and we want to use NN>0.0075 (or
167  // NN<(1-0.0075) Nominal chi2ndof cut is 40 and we want to use NN>0.001
168  // (or NN<(1-0.1)
169  double scale = m_chi2_scalefactor *
170  (track_cand.getNCoords() - track_cand.getNMissing() - 5);
171  double chi2 = scale * (1 - nn_val);
172  track_cand.setOrigChi2(chi2);
173  track_cand.setChi2(chi2);
174  tracks.push_back(track_cand);
175  }
176  } // loop over combinations
177 
178  } // loop over roads
179 
180  // Add truth info
181  for (FPGATrackSimTrack &t : tracks)
182  compute_truth(t); // match the track to a geant particle using the
183  // channel-level geant info in the hit data.
184 
185  return StatusCode::SUCCESS;
186 }

◆ getXScale()

static float FPGATrackSimNNTrackTool::getXScale ( )
inlinestatic

Definition at line 49 of file FPGATrackSimNNTrackTool.h.

49 { return 1015;};

◆ getYScale()

static float FPGATrackSimNNTrackTool::getYScale ( )
inlinestatic

Definition at line 50 of file FPGATrackSimNNTrackTool.h.

50 { return 1015;};

◆ getZScale()

static float FPGATrackSimNNTrackTool::getZScale ( )
inlinestatic

Definition at line 51 of file FPGATrackSimNNTrackTool.h.

51 { return 3000;};

◆ initialize()

StatusCode FPGATrackSimNNTrackTool::initialize ( )
overridevirtual

Definition at line 26 of file FPGATrackSimNNTrackTool.cxx.

26  {
27  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
28  ATH_CHECK(m_tHistSvc.retrieve());
29 
30  return StatusCode::SUCCESS;
31 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::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< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_barcode

std::vector<int> FPGATrackSimNNTrackTool::m_barcode
private

Definition at line 68 of file FPGATrackSimNNTrackTool.h.

◆ m_barcodefrac

std::vector<float> FPGATrackSimNNTrackTool::m_barcodefrac
private

Definition at line 67 of file FPGATrackSimNNTrackTool.h.

◆ m_chi2_scalefactor

Gaudi::Property<double> FPGATrackSimNNTrackTool::m_chi2_scalefactor { this, "Chi2ScaleFactor", 40/(1-0.1), "Scale factor to use in converting to a chi2, Nominal chi2ndof cut is 40 and we want to use NN>0.0075 (or NN<(1-0.0075)"}

Definition at line 56 of file FPGATrackSimNNTrackTool.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etamodule

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_etamodule
private

Definition at line 75 of file FPGATrackSimNNTrackTool.h.

◆ m_etawidth

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_etawidth
private

Definition at line 73 of file FPGATrackSimNNTrackTool.h.

◆ m_eventindex

std::vector<int> FPGATrackSimNNTrackTool::m_eventindex
private

Definition at line 69 of file FPGATrackSimNNTrackTool.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_FPGATrackSimMapping

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

Definition at line 61 of file FPGATrackSimNNTrackTool.h.

◆ m_ID

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_ID
private

Definition at line 77 of file FPGATrackSimNNTrackTool.h.

◆ m_input_node_dims

std::vector<int64_t> FPGATrackSimNNTrackTool::m_input_node_dims
private

Definition at line 92 of file FPGATrackSimNNTrackTool.h.

◆ m_input_node_names

std::vector<const char*> FPGATrackSimNNTrackTool::m_input_node_names
private

Definition at line 91 of file FPGATrackSimNNTrackTool.h.

◆ m_isBarrel

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_isBarrel
private

Definition at line 72 of file FPGATrackSimNNTrackTool.h.

◆ m_isPixel

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_isPixel
private

Definition at line 70 of file FPGATrackSimNNTrackTool.h.

◆ m_layer

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_layer
private

Definition at line 71 of file FPGATrackSimNNTrackTool.h.

◆ m_NNCut

Gaudi::Property<double> FPGATrackSimNNTrackTool::m_NNCut { this, "NNCut", 0.0, " NN output value to cut on when selecting good tracks"}

Definition at line 55 of file FPGATrackSimNNTrackTool.h.

◆ m_output_node_names

std::vector<const char*> FPGATrackSimNNTrackTool::m_output_node_names
private

Definition at line 93 of file FPGATrackSimNNTrackTool.h.

◆ m_phimodule

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_phimodule
private

Definition at line 76 of file FPGATrackSimNNTrackTool.h.

◆ m_phiwidth

std::vector<unsigned int> FPGATrackSimNNTrackTool::m_phiwidth
private

Definition at line 74 of file FPGATrackSimNNTrackTool.h.

◆ m_tHistSvc

ServiceHandle<ITHistSvc> FPGATrackSimNNTrackTool::m_tHistSvc {this, "THistSvc","THistSvc"}
private

Definition at line 62 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_barcode

std::vector<int> FPGATrackSimNNTrackTool::m_truth_barcode
private

Definition at line 86 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_d0

std::vector<float> FPGATrackSimNNTrackTool::m_truth_d0
private

Definition at line 79 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_eta

std::vector<float> FPGATrackSimNNTrackTool::m_truth_eta
private

Definition at line 82 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_eventindex

std::vector<int> FPGATrackSimNNTrackTool::m_truth_eventindex
private

Definition at line 87 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_pdg

std::vector<float> FPGATrackSimNNTrackTool::m_truth_pdg
private

Definition at line 84 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_phi

std::vector<float> FPGATrackSimNNTrackTool::m_truth_phi
private

Definition at line 83 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_pt

std::vector<float> FPGATrackSimNNTrackTool::m_truth_pt
private

Definition at line 81 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_q

std::vector<int> FPGATrackSimNNTrackTool::m_truth_q
private

Definition at line 85 of file FPGATrackSimNNTrackTool.h.

◆ m_truth_z0

std::vector<float> FPGATrackSimNNTrackTool::m_truth_z0
private

Definition at line 80 of file FPGATrackSimNNTrackTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_x

std::vector<float> FPGATrackSimNNTrackTool::m_x
private

Definition at line 64 of file FPGATrackSimNNTrackTool.h.

◆ m_y

std::vector<float> FPGATrackSimNNTrackTool::m_y
private

Definition at line 65 of file FPGATrackSimNNTrackTool.h.

◆ m_z

std::vector<float> FPGATrackSimNNTrackTool::m_z
private

Definition at line 66 of file FPGATrackSimNNTrackTool.h.


The documentation for this class was generated from the following files:
FPGATrackSimTrack::setHitMap
void setHitMap(unsigned int v)
Definition: FPGATrackSimTrack.h:92
getMenu.algname
algname
Definition: getMenu.py:53
FPGATrackSimPlaneMap::getNLogiLayers
uint32_t getNLogiLayers() const
Definition: FPGATrackSimPlaneMap.h:78
FPGATrackSimTrack::setBankID
void setBankID(int v)
Definition: FPGATrackSimTrack.h:75
FPGATrackSimTrack::getNMissing
int getNMissing() const
Definition: FPGATrackSimTrack.h:44
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:16
FPGATrackSimTrack::setPatternID
void setPatternID(int v)
Definition: FPGATrackSimTrack.h:76
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
FPGATrackSimMultiTruth::Weight
float Weight
Definition: FPGATrackSimMultiTruth.h:50
Data
@ Data
Definition: BaseObject.h:11
FPGATrackSimHit::getX
float getX() const
Definition: FPGATrackSimHit.h:125
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
python.HLT.MinBias.MinBiasMenuSequences.zf
zf
Definition: MinBiasMenuSequences.py:187
FPGATrackSimTrack::setNMissing
void setNMissing(int v)
Definition: FPGATrackSimTrack.h:90
M_PI
#define M_PI
Definition: ActiveFraction.h:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
FPGATrackSimTrack::setFirstSectorID
void setFirstSectorID(int v)
Definition: FPGATrackSimTrack.h:77
FPGATrackSimTrack::getNCoords
int getNCoords() const
FPGATrackSimNNTrackTool::getXScale
static float getXScale()
Definition: FPGATrackSimNNTrackTool.h:49
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
FPGATrackSimTrack::setFPGATrackSimHit
void setFPGATrackSimHit(unsigned i, const FPGATrackSimHit &hit)
FPGATrackSimTrack::setOrigChi2
void setOrigChi2(float v)
Definition: FPGATrackSimTrack.h:89
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
FPGATrackSimNNTrackTool::m_tHistSvc
ServiceHandle< ITHistSvc > m_tHistSvc
Definition: FPGATrackSimNNTrackTool.h:62
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
FPGATrackSimHit
Definition: FPGATrackSimHit.h:38
FPGATrackSimPlaneMap::getCoordOffset
uint32_t getCoordOffset(size_t logiLayer) const
Definition: FPGATrackSimPlaneMap.h:95
FPGATrackSimNNTrackTool::m_chi2_scalefactor
Gaudi::Property< double > m_chi2_scalefactor
Definition: FPGATrackSimNNTrackTool.h:56
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TrackStage::FIRST
@ FIRST
FPGATrackSimMultiTruth::Barcode
std::pair< unsigned long, unsigned long > Barcode
Definition: FPGATrackSimMultiTruth.h:49
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimNNMap::getNNMap
std::shared_ptr< lwt::LightweightGraph > getNNMap() const
Definition: FPGATrackSimNNMap.cxx:45
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
FPGATrackSimHit::getY
float getY() const
Definition: FPGATrackSimHit.h:126
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
FPGATrackSimNNTrackTool::m_NNCut
Gaudi::Property< double > m_NNCut
Definition: FPGATrackSimNNTrackTool.h:55
FPGATrackSimHit::getZ
float getZ() const
Definition: FPGATrackSimHit.h:127
getComboIndices
std::vector< std::vector< int > > getComboIndices(std::vector< size_t > const &sizes)
Given a vector of sizes (of arrays), generates a vector of all combinations of indices to index one e...
Definition: FPGATrackSimFunctions.cxx:21
FPGATrackSimNNTrackTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimNNTrackTool.h:61
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
FPGATrackSimPlaneMap
Definition: FPGATrackSimPlaneMap.h:62
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
FPGATrackSimNNTrackTool::getZScale
static float getZScale()
Definition: FPGATrackSimNNTrackTool.h:51
FPGATrackSimTrack::setTrackStage
void setTrackStage(TrackStage v)
Definition: FPGATrackSimTrack.h:73
FPGATrackSimNNTrackTool::getYScale
static float getYScale()
Definition: FPGATrackSimNNTrackTool.h:50
FPGATrackSimMultiTruth
Definition: FPGATrackSimMultiTruth.h:46
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
FPGATrackSimMultiTruth::AddAccumulator
Definition: FPGATrackSimMultiTruth.h:57
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
FPGATrackSimTrack::setTrackID
void setTrackID(int v)
Definition: FPGATrackSimTrack.h:79
FPGATrackSimTrack::setQOverPt
void setQOverPt(float v)
Definition: FPGATrackSimTrack.h:83
FPGATrackSimNNTrackTool::compute_truth
void compute_truth(FPGATrackSimTrack &newtrk) const
Definition: FPGATrackSimNNTrackTool.cxx:189
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
FPGATrackSimTrack::setChi2
void setChi2(float v)
Definition: FPGATrackSimTrack.h:88
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
layer_bitmask_t
uint32_t layer_bitmask_t
Definition: FPGATrackSimTypes.h:22
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
FPGATrackSimTrack::setNLayers
void setNLayers(int)
set the number of layers in the track.
Definition: FPGATrackSimTrack.cxx:151
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528