Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <SeedingToolBase.h>
|
| SeedingToolBase (const std::string &t, const std::string &n, const IInterface *p) |
|
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 |
|
|
ToolHandle< ITrigL2LayerNumberTool > | m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberToolITk"} |
|
const AtlasDetectorID * | m_atlasId = nullptr |
|
const SCT_ID * | m_sctId = nullptr |
|
const PixelID * | m_pixelId = nullptr |
|
BooleanProperty | m_filter_phi {this, "DoPhiFiltering", true} |
|
BooleanProperty | m_useBeamTilt {this, "UseBeamTilt", false} |
|
BooleanProperty | m_LRTmode {this, "LRTMode",false} |
|
BooleanProperty | m_useML {this, "useML", true} |
|
UnsignedIntegerProperty | m_nMaxPhiSlice {this, "nMaxPhiSlice", 53} |
|
BooleanProperty | m_doubletFilterRZ {this, "Doublet_FilterRZ", true} |
|
BooleanProperty | m_useEtaBinning {this, "UseEtaBinning", true} |
|
BooleanProperty | m_matchBeforeCreate {this, "MatchBeforeCreate", false} |
|
FloatProperty | m_minPt {this, "pTmin", 1000.0} |
|
IntegerProperty | m_nMaxEdges {this, "MaxGraphEdges", 2000000} |
|
StringProperty | m_connectionFile {this, "ConnectionFileName", "binTables_ITK_RUN4_UPD_10_APR_2025.txt"} |
|
float | m_phiSliceWidth = 0. |
|
std::unique_ptr< GNN_FasTrackConnector > | m_connector = nullptr |
|
std::vector< TrigInDetSiLayer > | m_layerGeometry |
|
std::unique_ptr< const TrigFTF_GNN_Geometry > | m_geo = nullptr |
|
Definition at line 26 of file SeedingToolBase.h.
◆ GNN_DataStorage
◆ GNN_Edge
◆ GNN_Node
◆ StoreGateSvc_t
◆ SeedingToolBase()
SeedingToolBase::SeedingToolBase |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
|
inline |
◆ buildTheGraph()
Definition at line 68 of file SeedingToolBase.cxx.
72 const float cut_dphi_max =
m_LRTmode ? 0.07 : 0.012;
73 const float cut_dcurv_max =
m_LRTmode ? 0.015 : 0.001;
74 const float cut_tau_ratio_max =
m_LRTmode ? 0.015 : 0.007;
77 const float min_deltaPhi =
m_LRTmode ? 0.01f : 0.001f;
79 const float maxOuterRadius =
m_LRTmode ? 1050.0 : 550.0;
81 const float cut_zMinU = min_z0 + maxOuterRadius*roi.
dzdrMinus();
82 const float cut_zMaxU = max_z0 + maxOuterRadius*roi.
dzdrPlus();
84 const float ptCoeff = 0.29997*1.9972/2.0;
86 float tripletPtMin = 0.8*
m_minPt;
88 float maxCurv = ptCoeff/tripletPtMin;
90 const float maxKappa_high_eta =
m_LRTmode ? 1.0*maxCurv : std::sqrt(0.8)*maxCurv;
91 const float maxKappa_low_eta =
m_LRTmode ? 1.0*maxCurv : std::sqrt(0.6)*maxCurv;
92 const float dphi_coeff =
m_LRTmode ? 1.0*maxCurv : 0.68*maxCurv;
94 const float minDeltaRadius = 2.0;
98 unsigned int nConnections = 0;
104 for(
const auto&
bg :
m_geo->bin_groups()) {
108 if(B1.
empty())
continue;
112 for(
const auto& b2_idx :
bg.second) {
116 if(B2.
empty())
continue;
121 deltaPhi = min_deltaPhi + dphi_coeff*std::fabs(rb2-rb1);
124 unsigned int first_it = 0;
126 for(
unsigned int n1Idx = 0;n1Idx<B1.
m_vn.size();n1Idx++) {
128 std::vector<unsigned int>& v1In = B1.
m_in[n1Idx];
132 const std::array<float, 5>& n1pars = B1.
m_params[n1Idx];
134 float phi1 = n1pars[2];
135 float r1 = n1pars[3];
136 float z1 = n1pars[4];
143 for(
unsigned int n2PhiIdx = first_it; n2PhiIdx<B2.
m_vPhiNodes.size();n2PhiIdx++) {
151 if(phi2 > maxPhi)
break;
153 unsigned int n2Idx = B2.
m_vPhiNodes[n2PhiIdx].second;
155 const std::vector<unsigned int>& v2In = B2.
m_in[n2Idx];
159 const std::array<float, 5>& n2pars = B2.
m_params[n2Idx];
161 float r2 = n2pars[3];
165 if(
dr < minDeltaRadius) {
169 float z2 = n2pars[4];
173 float ftau = std::fabs(tau);
178 if(ftau < n1pars[0])
continue;
179 if(ftau > n1pars[1])
continue;
181 if(ftau < n2pars[0])
continue;
182 if(ftau > n2pars[1])
continue;
186 float z0 = z1 -
r1*tau;
188 if(z0 < min_z0 || z0 > max_z0)
continue;
190 float zouter =
z0 + maxOuterRadius*tau;
192 if(zouter < cut_zMinU || zouter > cut_zMaxU)
continue;
195 float curv = (phi2-phi1)/
dr;
196 float abs_curv = std::abs(curv);
199 if(abs_curv > maxKappa_low_eta) {
204 if(abs_curv > maxKappa_high_eta) {
209 float exp_eta = std::sqrt(1+tau*tau)-tau;
213 bool isGood = v2In.size() <= 2;
217 float uat_1 = 1.0f/exp_eta;
219 for(
const auto& n2_in_idx : v2In) {
221 float tau2 = edgeStorage.at(n2_in_idx).m_p[0];
222 float tau_ratio = tau2*uat_1 - 1.0f;
224 if(std::fabs(tau_ratio) > cut_tau_ratio_max){
237 float dPhi2 = curv*
r2;
238 float dPhi1 = curv*
r1;
242 edgeStorage.emplace_back(B1.
m_vn[n1Idx], B2.
m_vn[n2Idx], exp_eta, curv, phi1 + dPhi1);
246 int outEdgeIdx = nEdges;
248 float uat_2 = 1/exp_eta;
249 float Phi2 = phi2 + dPhi2;
252 for(
const auto& inEdgeIdx : v2In) {
258 float tau_ratio = pS->
m_p[0]*uat_2 - 1.0f;
260 if(std::abs(tau_ratio) > cut_tau_ratio_max){
264 float dPhi = Phi2 - pS->
m_p[2];
269 if(dPhi < -cut_dphi_max || dPhi > cut_dphi_max) {
273 float dcurv = curv2 - pS->
m_p[1];
275 if(dcurv < -cut_dcurv_max || dcurv > cut_dcurv_max) {
291 return std::make_pair(nEdges, nConnections);
◆ 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);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ 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
◆ finalize()
StatusCode SeedingToolBase::finalize |
( |
| ) |
|
|
protectedvirtual |
◆ initialize()
StatusCode SeedingToolBase::initialize |
( |
| ) |
|
|
protectedvirtual |
◆ 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()
◆ runCCA()
int SeedingToolBase::runCCA |
( |
int |
nEdges, |
|
|
std::vector< GNN_Edge > & |
edgeStorage |
|
) |
| const |
|
protected |
Definition at line 294 of file SeedingToolBase.cxx.
296 const int maxIter = 15;
302 std::vector<TrigFTF_GNN_Edge*> v_old;
304 for(
int edgeIndex=0;edgeIndex<nEdges;edgeIndex++) {
307 if(pS->
m_nNei == 0)
continue;
312 for(;iter<maxIter;iter++) {
315 std::vector<TrigFTF_GNN_Edge*> v_new;
317 v_new.reserve(v_old.size());
319 for(
auto pS : v_old) {
323 for(
int nIdx=0;nIdx<pS->
m_nNei;nIdx++) {
325 unsigned int nextEdgeIdx = pS->
m_vNei[nIdx];
343 for(
auto pS : v_new) {
347 if(maxLevel < pS->m_level) maxLevel = pS->
m_level;
351 if(nChanges == 0)
break;
354 v_old = std::move(v_new);
◆ 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_atlasId
◆ m_connectionFile
StringProperty SeedingToolBase::m_connectionFile {this, "ConnectionFileName", "binTables_ITK_RUN4_UPD_10_APR_2025.txt"} |
|
protected |
◆ m_connector
◆ m_detStore
◆ m_doubletFilterRZ
BooleanProperty SeedingToolBase::m_doubletFilterRZ {this, "Doublet_FilterRZ", true} |
|
protected |
◆ m_evtStore
◆ m_filter_phi
BooleanProperty SeedingToolBase::m_filter_phi {this, "DoPhiFiltering", true} |
|
protected |
◆ m_geo
◆ m_layerGeometry
◆ m_layerNumberTool
◆ m_LRTmode
BooleanProperty SeedingToolBase::m_LRTmode {this, "LRTMode",false} |
|
protected |
◆ m_matchBeforeCreate
BooleanProperty SeedingToolBase::m_matchBeforeCreate {this, "MatchBeforeCreate", false} |
|
protected |
◆ m_minPt
FloatProperty SeedingToolBase::m_minPt {this, "pTmin", 1000.0} |
|
protected |
◆ m_nMaxEdges
IntegerProperty SeedingToolBase::m_nMaxEdges {this, "MaxGraphEdges", 2000000} |
|
protected |
◆ m_nMaxPhiSlice
UnsignedIntegerProperty SeedingToolBase::m_nMaxPhiSlice {this, "nMaxPhiSlice", 53} |
|
protected |
◆ m_phiSliceWidth
float SeedingToolBase::m_phiSliceWidth = 0. |
|
protected |
◆ m_pixelId
◆ m_sctId
◆ m_useBeamTilt
BooleanProperty SeedingToolBase::m_useBeamTilt {this, "UseBeamTilt", false} |
|
protected |
◆ m_useEtaBinning
BooleanProperty SeedingToolBase::m_useEtaBinning {this, "UseEtaBinning", true} |
|
protected |
◆ m_useML
BooleanProperty SeedingToolBase::m_useML {this, "useML", true} |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
std::vector< std::vector< unsigned int > > m_in
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
unsigned int m_vNei[N_SEG_CONNS]
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double dzdrMinus() const =0
return the gradients
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual double dzdrPlus() const =0
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< std::pair< float, unsigned int > > m_vPhiNodes
::StatusCode StatusCode
StatusCode definition for legacy code.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
TrigFTF_GNN_EtaBin & getEtaBin(int idx)
float getMaxBinRadius() const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double zedMinus() const =0
std::vector< const TrigFTF_GNN_Node * > m_vn
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float getMinBinRadius() const
std::vector< std::array< float, 5 > > m_params