Commit 3154eaf0 authored by Rachid Mazini's avatar Rachid Mazini
Browse files

Merge branch '21.0-TRT_HT_middlebit_option' into '21.0'

21.0 trt ht middlebit option

See merge request !43874
parents b241d581 6e133660
......@@ -1263,6 +1263,12 @@ class checkDeadElementsOnTrack(InDetFlagsJobProperty):
allowedTypes = ['bool']
StoredValue = True
class maskTRToutOfTimeBits(InDetFlagsJobProperty):
"""Masks out of time bits in TRT raw data similar to supression in data"""
statusOn = False
allowedTypes = ['bool']
StoredValue = False
##-----------------------------------------------------------------------------
## 2nd step
......@@ -2903,7 +2909,8 @@ _list_InDetJobProperties = [Enabled,
doStoreTrackSeeds,
doStoreTrackCandidates,
doHIP300,
checkDeadElementsOnTrack
checkDeadElementsOnTrack,
maskTRToutOfTimeBits
]
for j in _list_InDetJobProperties:
jobproperties.InDetJobProperties.add_JobProperty(j)
......
......@@ -108,6 +108,7 @@ class ConfiguredInDetPreProcessingTRT:
MaskFirstHTBitArgon = False,
MaskMiddleHTBitArgon = False,
MaskLastHTBitArgon = False,
MaskOutOfTimeBits = InDetFlags.maskTRToutOfTimeBits(),
useDriftTimeHTCorrection = True,
useDriftTimeToTCorrection = True) # reenable ToT
......
......@@ -106,6 +106,7 @@ public:
bool m_mask_middle_HT_bit_argon; // mask off ht bit in middle 25 ns time bin
bool m_mask_last_HT_bit; // mask off ht bit in last (latest) 25 ns time bin
bool m_mask_last_HT_bit_argon; // mask off ht bit in last (latest) 25 ns time bin
bool m_mask_out_of_time_bits; // removes out of time bits from raw data word
};
......
......@@ -69,7 +69,8 @@ InDet::TRT_DriftCircleTool::TRT_DriftCircleTool(const std::string& t,
m_mask_middle_HT_bit(false),
m_mask_middle_HT_bit_argon(false),
m_mask_last_HT_bit(false),
m_mask_last_HT_bit_argon(false)
m_mask_last_HT_bit_argon(false),
m_mask_out_of_time_bits(false)
{
declareInterface<ITRT_DriftCircleTool>(this);
declareProperty("TrtDescrManageLocation",m_trt_mgr_location);
......@@ -99,6 +100,7 @@ InDet::TRT_DriftCircleTool::TRT_DriftCircleTool(const std::string& t,
declareProperty("MaskMiddleHTBitArgon",m_mask_middle_HT_bit_argon);
declareProperty("MaskLastHTBit",m_mask_last_HT_bit);
declareProperty("MaskLastHTBitArgon",m_mask_last_HT_bit_argon);
declareProperty("MaskOutOfTimeBits",m_mask_out_of_time_bits);
}
///////////////////////////////////////////////////////////////////
......@@ -286,7 +288,11 @@ InDet::TRT_DriftCircleCollection* InDet::TRT_DriftCircleTool::convert(int Mode,c
bool isOK=true;
double t0=0.;
double rawTime = m_driftFunctionTool->rawTime(newtdcvalue);
unsigned int word = (*r)->getWord();
unsigned int word = (*r)->getWord();
if (m_mask_out_of_time_bits) {
word = word & 0x03FFFEF0; // zero first 5 unused bits, first and third HT bits, last 4 LT bits
}
if (m_useToTCorrection && !isArgonStraw) {
rawTime -= m_driftFunctionTool->driftTimeToTCorrection((*r)->timeOverThreshold(), id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment