Skip to content
Snippets Groups Projects

Add UT hit error scaling factor as a condition

Merged Hangyi Wu requested to merge ut/add-hit-error-condition into 2024-patches
@@ -58,7 +58,7 @@ namespace UT {
HitHandler( allocator_type alloc = {} ) : m_allhits{alloc} {}
UT::Hit& emplace_back( const DeUTSector& aSector, unsigned int fullChanIdx, unsigned int strip, float fracStrip,
LHCb::Detector::UT::ChannelID chanID, unsigned int size, bool highThreshold,
LHCb::Detector::UT::ChannelID chanID, unsigned int clusterSize, bool highThreshold,
unsigned int clusterCharge ) {
double dxDy{0};
double dzDy{0};
@@ -68,8 +68,9 @@ namespace UT {
double yEnd{0};
//--- this method allow to set the values
aSector.trajectory( strip, fracStrip, dxDy, dzDy, xAtYEq0, zAtYEq0, yBegin, yEnd );
const auto cos = aSector.cosAngle();
const auto error = aSector.pitch() / std::sqrt( 12.0 );
const auto cos = aSector.cosAngle();
const auto hitErrorFactor = aSector.hitErrorFactor( clusterSize );
const auto error = aSector.pitch() * hitErrorFactor / std::sqrt( 12.0 );
// NB : The way the indices are setup here assumes all hits for a given
// station, layer, region and sector come in order, which appears
@@ -93,8 +94,8 @@ namespace UT {
}
// add a new hit
auto& hit = m_allhits.emplace_back( chanID, size, highThreshold, dxDy, xAtYEq0, zAtYEq0, yBegin, yEnd, cos, error,
strip, fracStrip, clusterCharge );
auto& hit = m_allhits.emplace_back( chanID, clusterSize, highThreshold, dxDy, xAtYEq0, zAtYEq0, yBegin, yEnd, cos,
error, strip, fracStrip, clusterCharge );
// increment the end index for current range
++indices.second;
return hit;
Loading