ATLAS Offline Software
Loading...
Searching...
No Matches
IFPGATrackSimBinDesc.h
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3#ifndef IFPGATrackSimBinDesc_H
4#define IFPGATrackSimBinDesc_H
5
24#include "GaudiKernel/IAlgTool.h"
25
28
30
31#include <functional>
32#include <string>
33
35
36//-------------------------------------------------------------------------------------------------------
37// BinnedHits
38// Nomenclature:
39// parameter = parameter of track e.g. (pT,eta,phi,d0,z0) but could be
40// in different coordinates
41// such at in the keylayer format where its
42// (z_in,z_out,phi_in,phi_out,x_m)
43// bin = a bin in the full parameters space (upto 5-d)
44// subbin = a binning used as part of the total binning e.g. only in
45// (pT,phi) or only in (z_in,z_out)
46//-------------------------------------------------------------------------------------------------------
47class IFPGATrackSimBinDesc : virtual public IAlgTool {
48public:
50
51 //--------------------------------------------------------------------------------------------------
52 //
53 // Virtual methods that are overloaded to define the binning
54 //
55 //--------------------------------------------------------------------------------------------------
56
57 // Specification of parameters
58 virtual const std::string &parNames(unsigned i) const = 0;
59
60 // convert back and forth from pT, eta, phi, d0, z0 and internal paramater set
63
64 // calculate the distance in phi or eta from a track defined by parset to a hit
65 // these can be implemented as any variable in the r-phi or r-eta plane (not necessarily eta and phi).
66 virtual double phiResidual(const FPGATrackSimBinUtil::ParSet &parset, FPGATrackSimHit const *hit) const = 0;
67 virtual double etaResidual(const FPGATrackSimBinUtil::ParSet &parset, FPGATrackSimHit const *hit) const = 0;
68
69 // idx should be with the definition specifed in the step
70 // NOTE: the stored hit may be modified!
71 virtual bool hitInBin(const FPGATrackSimBinStep &step,
73 FPGATrackSimBinUtil::StoredHit &storedhit) const = 0;
74
75 // Write the relevant LUT tables for firmware
76 // Implementation is optional. This is not needed for operation,
77 // but to generate constants for the firmware
78 virtual void writeLUTs([[maybe_unused]] const FPGATrackSimBinStep &step) const {}
79
80 // Set truthbin for debugging
81 // This does not need to be set but can be useful for debuging
82 void setTruthBin(const std::vector<FPGATrackSimBinUtil::IdxSet>& truthbin){ m_truthbin=truthbin;}
83
84protected:
85 std::vector<FPGATrackSimBinUtil::IdxSet> m_truthbin{};
86
87};
88
89#endif // IFPGATrackSimBinDesc_H
Binning Utilities for GenScanTool.
: FPGATrackSim-specific class to represent an hit in the detector.
Structs that store the 5 track parameters.
std::vector< FPGATrackSimBinUtil::IdxSet > m_truthbin
virtual double phiResidual(const FPGATrackSimBinUtil::ParSet &parset, FPGATrackSimHit const *hit) const =0
virtual double etaResidual(const FPGATrackSimBinUtil::ParSet &parset, FPGATrackSimHit const *hit) const =0
virtual const std::string & parNames(unsigned i) const =0
virtual const FPGATrackSimTrackPars parSetToTrackPars(const FPGATrackSimBinUtil::ParSet &parset) const =0
DeclareInterfaceID(IFPGATrackSimBinDesc, 1, 0)
void setTruthBin(const std::vector< FPGATrackSimBinUtil::IdxSet > &truthbin)
virtual const FPGATrackSimBinUtil::ParSet trackParsToParSet(const FPGATrackSimTrackPars &pars) const =0
virtual void writeLUTs(const FPGATrackSimBinStep &step) const
virtual bool hitInBin(const FPGATrackSimBinStep &step, const FPGATrackSimBinUtil::IdxSet &idx, FPGATrackSimBinUtil::StoredHit &storedhit) const =0