Commit ff53cbe2 authored by John Derek Chapman's avatar John Derek Chapman
Browse files

Merge branch 'data-overlay' into '21.3'

add an option to skip the transient bytestream in the pixel clusterization algorithm

See merge request atlas/athena!22853
parents ff1dbd5b 1abd7685
......@@ -14,9 +14,15 @@
#EF_SCTRDOKey="SCT_RDOs"
#EF_TRTRDOKey="TRT_RDOs"
EF_PixRDOKey="PixelRDOs_EF"
EF_SCTRDOKey="SCT_RDOs_EF"
EF_TRTRDOKey="TRT_RDOs_EF"
from TriggerJobOpts.TriggerFlags import TriggerFlags
if not TriggerFlags.doTransientByteStream():
EF_PixRDOKey="PixelRDOs"
from AthenaCommon.Logging import logging
log = logging.getLogger("EFID")
......@@ -45,6 +51,7 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
Decoder = InDetTrigPixelRodDecoder)
ToolSvc += InDetTrigPixelRawDataProviderTool
from InDetTrigRawDataProvider.InDetTrigRawDataProviderConf import InDet__TrigPixRawDataProvider
InDetTrigPixRawDataProvider = \
......@@ -82,7 +89,8 @@ class PixelClustering_EF( InDet__Pixel_TrgClusterization ):
self.clusteringTool = InDetTrigMergedPixelsTool
self.gangedAmbiguitiesFinder = InDetTrigPixelGangedAmbiguitiesFinder
self.Pixel_RDOContainerName = EF_PixRDOKey
self.skipBSDecoding = not TriggerFlags.doTransientByteStream()
from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
self.EtaHalfWidth = InDetTrigSliceSettings[('etaHalfWidth',type)]
self.PhiHalfWidth = InDetTrigSliceSettings[('phiHalfWidth',type)]
......
......@@ -133,7 +133,7 @@ namespace InDet {
ServiceHandle<IPixelByteStreamErrorsSvc> m_bsErrorSvc;
ServiceHandle<IROBDataProviderSvc> m_robDataProvider; //!< ROB Data Provide Service
bool m_doTimeOutChecks; //check global timer
bool m_skipBSDecoding; //option to skip BS decoding in MC
// Timing
TrigTimer *m_timerRegSel;
......
......@@ -69,7 +69,8 @@ namespace InDet{
m_phiHalfWidth(0.1),
m_bsErrorSvc("PixelByteStreamErrorsSvc",name),
m_robDataProvider("ROBDataProviderSvc", name),
m_doTimeOutChecks(true)
m_doTimeOutChecks(true),
m_skipBSDecoding(false)
{
// Get parameter values from jobOptions file
declareProperty("DetectorManagerName", m_managerName);
......@@ -85,6 +86,7 @@ namespace InDet{
declareProperty("Pixel_RDOContainerName", m_pixelRDOContainerName);
declareProperty("RawDataProvider", m_rawDataProvider);
declareProperty("doTimeOutChecks", m_doTimeOutChecks);
declareProperty("skipBSDecoding", m_skipBSDecoding);
declareMonitoredVariable("numPixClusters", m_numPixClusters );
declareMonitoredVariable("numPixIds", m_numPixIds );
......@@ -348,7 +350,6 @@ namespace InDet{
//-------------------------------------------------------------------------
//handling of decoding problems
StatusCode scdec = StatusCode::SUCCESS;
m_bsErrorSvc->resetCounts();
......@@ -390,21 +391,6 @@ namespace InDet{
ATH_MSG_DEBUG( "REGTEST:" << *roi );
if(doTiming()) m_timerDecoder->start();
scdec = m_rawDataProvider->decode(roi);
if(doTiming()) m_timerDecoder->stop();
// Get the Pixel RDO's:
// - First get the Pixel ID's using the RegionSelector
// - Retrieve from SG the RDOContainer:
// Identifiable Container that contains pointers to all the RDO
// collections (one collection per detector)
// - Retrieve from StoreGate the RDO collections.
// (the ByteStreamConvertors are called here).
if (!(roi->isFullscan())){
if(doTiming()) m_timerRegSel->start();
m_regionSelector->DetHashIDList( PIXEL, *roi, m_listOfPixIds);
......@@ -414,42 +400,55 @@ namespace InDet{
if(doTiming()) m_timerRegSel->stop();
}
if (scdec.isSuccess()){
//check for recoverable errors
int n_err_total = 0;
int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1];
if (!m_skipBSDecoding){
StatusCode scdec = StatusCode::SUCCESS;
if(doTiming()) m_timerDecoder->start();
scdec = m_rawDataProvider->decode(roi);
if(doTiming()) m_timerDecoder->stop();
// Get the Pixel RDO's:
// - First get the Pixel ID's using the RegionSelector
// - Retrieve from SG the RDOContainer:
// Identifiable Container that contains pointers to all the RDO
// collections (one collection per detector)
// - Retrieve from StoreGate the RDO collections.
// (the ByteStreamConvertors are called here).
for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){
int n_errors = m_bsErrorSvc->getNumberOfErrors(idx);
n_err_total += n_errors;
bsErrors[idx] = n_errors;
}
ATH_MSG_DEBUG( "decoding errors: " << n_err_total );
if (n_err_total){
for (size_t idx = 0; idx<=size_t(IPixelByteStreamErrorsSvc::lastErrType); idx++){
// m_PixBSErr.push_back(bsErrors[idx]);
if (bsErrors[idx])
m_PixBSErr.push_back(idx);
if(msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) << " " << bsErrors[idx];
if (scdec.isSuccess()){
//check for recoverable errors
int n_err_total = 0;
int bsErrors[IPixelByteStreamErrorsSvc::lastErrType+1];
for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){
int n_errors = m_bsErrorSvc->getNumberOfErrors(idx);
n_err_total += n_errors;
bsErrors[idx] = n_errors;
}
}
ATH_MSG_DEBUG( "" );
} else {
ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" );
ATH_MSG_DEBUG( "decoding errors: " << n_err_total );
if (n_err_total){
for (const auto idx : { IPixelByteStreamErrorsSvc::firstErrType , IPixelByteStreamErrorsSvc::lastErrType } ){
if (bsErrors[idx])
m_PixBSErr.push_back(idx);
if(msgLvl(MSG::DEBUG))
msg(MSG::DEBUG) << " " << bsErrors[idx];
}
}
ATH_MSG_DEBUG( "" );
} else {
ATH_MSG_DEBUG( " m_rawDataProvider->decode failed" );
}
}
if(doTiming()) m_timerSGate->resume();
PixelRDO_Container* p_pixelRDOContainer;
const PixelRDO_Container* p_pixelRDOContainer = nullptr;
if (store()->retrieve(p_pixelRDOContainer, m_pixelRDOContainerName).isFailure() ) {
ATH_MSG_WARNING( "Could not find the PixelRDO_Container "
<< m_pixelRDOContainerName );
......@@ -466,6 +465,7 @@ namespace InDet{
}
if(doTiming()) m_timerSGate->pause();
ATH_MSG_VERBOSE("Size of " << m_pixelRDOContainerName << ":" << p_pixelRDOContainer->size());
if (!(roi->isFullscan())){
......@@ -542,8 +542,6 @@ namespace InDet{
PixelRDO_Container::const_iterator rdoCollections = p_pixelRDOContainer->begin();
PixelRDO_Container::const_iterator rdoCollectionsEnd = p_pixelRDOContainer->end();
AtlasDetectorID detType;
if(doTiming()) m_timerCluster->resume();
for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){
......
......@@ -10,12 +10,13 @@ from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigL2ResidualCalculator
from TrigInDetRecoTools.TrigInDetRecoTools_Config import TrigL2PattRecoStrategyFactory
from TriggerJobOpts.TriggerFlags import TriggerFlags
strFactory = TrigL2PattRecoStrategyFactory()
from AthenaCommon.AppMgr import ToolSvc
ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=True)
ospTool = ConfiguredOnlineSpacePointProviderTool(doBS=TriggerFlags.doTransientByteStream())
trtTool = TrigTRT_TrackExtensionTool(OfflineClusters=False, PtCut=2500.0)
trackFitter = TrigInDetTrackFitter(OfflineClusters=False)
resCalc = TrigL2ResidualCalculator(OfflineClusters=False)
......
......@@ -328,6 +328,16 @@ class useOfflineSpacePoints(JobProperty):
_flags.append(useOfflineSpacePoints)
class doTransientByteStream(JobProperty):
""" switch off usage of the transient bytestream
and access RDO objects directly. Partial implementation.
"""
statusOn=True
allowedType=['bool']
StoredValue=True
_flags.append(doTransientByteStream)
class doNtuple(JobProperty):
""" """
statusOn=True
......
Supports Markdown
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