Skip to content
Snippets Groups Projects
Commit f883d360 authored by Jahred Adelman's avatar Jahred Adelman Committed by Frank Winklmeier
Browse files

FPGATrackSim NN PathFinder adding missed hit scaling

FPGATrackSim NN PathFinder adding missed hit scaling
parent 2216a50e
No related branches found
No related tags found
2 merge requests!78549FPGATrackSim NN PathFinder adding missed hit scaling,!76343Draft: MooTrackBuilder: Recalibrate NSW hits in refine method
......@@ -67,7 +67,8 @@ class FPGATrackSimNNPathfinderExtensionTool : public extends <AthAlgTool, IFPG
Gaudi::Property <float> m_lowPtWindowRScaling {this, "lowPtRScaling", 1.0, "Scaling factor for low pt in R"};
Gaudi::Property <float> m_lowPtValueForWindowZScaling { this, "lowPtValueWindowZ", -1, "Value in MeV below which we scale the r window size"};
Gaudi::Property <float> m_lowPtWindowZScaling {this, "lowPtZScaling", 1.0, "Scaling factor for low pt in Z"};
Gaudi::Property <float> m_missedHitRScaling {this, "missedHitRScaling", -1, "Amount to scale R window if previous hit was missed. Negative means this is disabled"};
Gaudi::Property <float> m_missedHitZScaling {this, "missedHitZScaling", -1, "Amount to scale Z window if previous hit was missed. Negative means this is disabled"};
Gaudi::Property <int> m_maxBranches { this, "maxBranches", -1, "Max number of branches before we stop, if negative this is disabled"};
Gaudi::Property <bool> m_doOutsideIn { this, "doOutsideIn", true, "Setup the tool so it's doing outside in extrap"};
Gaudi::Property <int> m_predictionWindowLength { this, "predictionWindowLength", 3, "Length of hits needed for prediction"};
......
......@@ -308,6 +308,8 @@ StatusCode FPGATrackSimNNPathfinderExtensionTool::extendTracks(const std::vector
continue;
}
bool lastHitWasReal = lastHit->isReal();
// if the last layer is m_nLayers_1stStage + m_nLayers_2ndStage, then we have hit the end already
if((lastLayerInRoad + 1) >= m_nLayers_1stStage + m_nLayers_2ndStage)
{
......@@ -357,6 +359,11 @@ StatusCode FPGATrackSimNNPathfinderExtensionTool::extendTracks(const std::vector
if (m_windowZ.size() > 1) {
windowZ = m_windowZ[layer-m_nLayers_1stStage]; // offset by n1st stage
}
// If last hit was not real and we want to, scale the window
if (m_missedHitRScaling > 0 && !lastHitWasReal) windowR *= m_missedHitRScaling;
if (m_missedHitZScaling > 0 && !lastHitWasReal) windowZ *= m_missedHitZScaling;
// now scale windows for low pt, if desired
if (pt < m_lowPtValueForWindowRScaling.value()) windowR *= m_lowPtWindowRScaling.value();
if (pt < m_lowPtValueForWindowZScaling.value()) windowZ *= m_lowPtWindowZScaling.value();
......
......@@ -55,7 +55,8 @@ def createFPGATrackSimConfigFlags():
cf.addFlag('lowPtvalueZ', -1)
cf.addFlag('lowPtWindowRScaling', 1.0)
cf.addFlag('lowPtWindowZScaling', 1.0)
cf.addFlag('missedHitRScaling', -1.0)
cf.addFlag('missedHitZScaling', -1.0)
cf.addFlag('maxBranches', -1)
cf.addFlag('hitThreshold', 10)
......
......@@ -54,6 +54,8 @@ def FPGATrackSimNNPathfinderExtensionToolCfg(flags):
FPGATrackSimNNPathfinderExtensionTool.lowPtRScaling = flags.Trigger.FPGATrackSim.lowPtWindowRScaling
FPGATrackSimNNPathfinderExtensionTool.lowPtValueWindowZ = flags.Trigger.FPGATrackSim.lowPtvalueZ
FPGATrackSimNNPathfinderExtensionTool.lowPtZScaling = flags.Trigger.FPGATrackSim.lowPtWindowZScaling
FPGATrackSimNNPathfinderExtensionTool.missedHitRScaling = flags.Trigger.FPGATrackSim.missedHitRScaling
FPGATrackSimNNPathfinderExtensionTool.missedHitZScaling = flags.Trigger.FPGATrackSim.missedHitZScaling
FPGATrackSimNNPathfinderExtensionTool.maxBranches = flags.Trigger.FPGATrackSim.maxBranches
FPGATrackSimNNPathfinderExtensionTool.doOutsideIn = True
if (flags.Trigger.FPGATrackSim.ActiveConfig.genScan):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment