![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <FPGATrackSimNNTrackTool.h>
|
| 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 |
|
|
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)"} |
|
Definition at line 36 of file FPGATrackSimNNTrackTool.h.
◆ StoreGateSvc_t
◆ FPGATrackSimNNTrackTool()
FPGATrackSimNNTrackTool::FPGATrackSimNNTrackTool |
( |
const std::string & |
algname, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
ifc |
|
) |
| |
◆ compute_truth()
Definition at line 189 of file FPGATrackSimNNTrackTool.cxx.
190 std::vector<FPGATrackSimMultiTruth> mtv;
197 if (
layer <
t.getFPGATrackSimHits().size())
198 mtv.push_back(
t.getFPGATrackSimHits().at(
layer).getTruth());
202 mtv.back().assign_equal_normalization();
212 const bool ok = mt.best(tbarcode, tfrac);
214 t.setEventIndex(tbarcode.first);
215 t.setBarcode(tbarcode.second);
216 t.setBarcodeFrac(tfrac);
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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()
Definition at line 33 of file FPGATrackSimNNTrackTool.cxx.
40 for (
auto iroad : roads) {
42 double y = iroad->getY();
45 int sector = iroad->getSector();
48 return StatusCode::SUCCESS;
73 std::vector<std::vector<int>> combs =
77 for (
size_t icomb = 0; icomb < combs.size(); icomb++) {
80 std::vector<int>
const &hit_indices = combs[icomb];
81 std::vector<const FPGATrackSimHit *> hit_list;
87 if (hit_indices[
layer] >= 0) {
91 hit_list.push_back(hit);
96 std::sort(hit_list.begin(), hit_list.end(),
98 double rho1 = std::hypot(hit1->getX(), hit1->getY());
99 double rho2 = std::hypot(hit2->getX(), hit2->getY());
104 std::map<std::string, std::map<std::string, double>> valMap;
105 std::map<std::string, std::map<std::string, std::vector<double>>>
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;
118 double rotateAngle = 0;
121 for (
const auto &hit : hit_list) {
124 double x0 = hit->
getX();
125 double y0 = hit->
getY();
142 TString indexStr = Form(
"%d",
index);
143 valMap[
"dNN"][(
"hitX" + indexStr).
Data()] = xf /
getXScale();
144 valMap[
"dNN"][(
"hitY" + indexStr).
Data()] = yf /
getYScale();
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");
162 for (
const auto &ihit : hit_list) {
163 unsigned int layer = ihit->getLayer();
174 tracks.push_back(track_cand);
185 return StatusCode::SUCCESS;
◆ getXScale()
static float FPGATrackSimNNTrackTool::getXScale |
( |
| ) |
|
|
inlinestatic |
◆ getYScale()
static float FPGATrackSimNNTrackTool::getYScale |
( |
| ) |
|
|
inlinestatic |
◆ getZScale()
static float FPGATrackSimNNTrackTool::getZScale |
( |
| ) |
|
|
inlinestatic |
◆ initialize()
StatusCode FPGATrackSimNNTrackTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_barcode
std::vector<int> FPGATrackSimNNTrackTool::m_barcode |
|
private |
◆ m_barcodefrac
std::vector<float> FPGATrackSimNNTrackTool::m_barcodefrac |
|
private |
◆ 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)"} |
◆ m_detStore
◆ m_etamodule
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_etamodule |
|
private |
◆ m_etawidth
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_etawidth |
|
private |
◆ m_eventindex
std::vector<int> FPGATrackSimNNTrackTool::m_eventindex |
|
private |
◆ m_evtStore
◆ m_FPGATrackSimMapping
◆ m_ID
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_ID |
|
private |
◆ m_input_node_dims
std::vector<int64_t> FPGATrackSimNNTrackTool::m_input_node_dims |
|
private |
◆ m_input_node_names
std::vector<const char*> FPGATrackSimNNTrackTool::m_input_node_names |
|
private |
◆ m_isBarrel
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_isBarrel |
|
private |
◆ m_isPixel
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_isPixel |
|
private |
◆ m_layer
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_layer |
|
private |
◆ m_NNCut
Gaudi::Property<double> FPGATrackSimNNTrackTool::m_NNCut { this, "NNCut", 0.0, " NN output value to cut on when selecting good tracks"} |
◆ m_output_node_names
std::vector<const char*> FPGATrackSimNNTrackTool::m_output_node_names |
|
private |
◆ m_phimodule
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_phimodule |
|
private |
◆ m_phiwidth
std::vector<unsigned int> FPGATrackSimNNTrackTool::m_phiwidth |
|
private |
◆ m_tHistSvc
ServiceHandle<ITHistSvc> FPGATrackSimNNTrackTool::m_tHistSvc {this, "THistSvc","THistSvc"} |
|
private |
◆ m_truth_barcode
std::vector<int> FPGATrackSimNNTrackTool::m_truth_barcode |
|
private |
◆ m_truth_d0
std::vector<float> FPGATrackSimNNTrackTool::m_truth_d0 |
|
private |
◆ m_truth_eta
std::vector<float> FPGATrackSimNNTrackTool::m_truth_eta |
|
private |
◆ m_truth_eventindex
std::vector<int> FPGATrackSimNNTrackTool::m_truth_eventindex |
|
private |
◆ m_truth_pdg
std::vector<float> FPGATrackSimNNTrackTool::m_truth_pdg |
|
private |
◆ m_truth_phi
std::vector<float> FPGATrackSimNNTrackTool::m_truth_phi |
|
private |
◆ m_truth_pt
std::vector<float> FPGATrackSimNNTrackTool::m_truth_pt |
|
private |
◆ m_truth_q
std::vector<int> FPGATrackSimNNTrackTool::m_truth_q |
|
private |
◆ m_truth_z0
std::vector<float> FPGATrackSimNNTrackTool::m_truth_z0 |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_x
std::vector<float> FPGATrackSimNNTrackTool::m_x |
|
private |
◆ m_y
std::vector<float> FPGATrackSimNNTrackTool::m_y |
|
private |
◆ m_z
std::vector<float> FPGATrackSimNNTrackTool::m_z |
|
private |
The documentation for this class was generated from the following files:
void setHitMap(unsigned int v)
uint32_t getNLogiLayers() const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void setFirstSectorID(int v)
void setFPGATrackSimHit(unsigned i, const FPGATrackSimHit &hit)
void setOrigChi2(float v)
virtual void setOwner(IDataHandleHolder *o)=0
uint32_t getCoordOffset(size_t logiLayer) const
std::pair< unsigned long, unsigned long > Barcode
double chi2(TH1 *h0, TH1 *h1)
std::shared_ptr< lwt::LightweightGraph > getNNMap() const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
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...
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void setTrackStage(TrackStage v)
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.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void setNLayers(int)
set the number of layers in the track.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>