Skip to content
Snippets Groups Projects
Commit 7efaaed8 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'LArRawCalibDataReadingAlgFTPresel' into 'master'

Add Feedthrough-preselecton to LArRawCalibDataReadingAlg

See merge request atlas/athena!39498
parents 95d2afb5 8c1e0f23
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "LArRawEvent/LArFebHeader.h"
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "ByteStreamData/RawEvent.h"
......
......@@ -73,6 +73,24 @@ LArRawCalibDataReadingAlg::LArRawCalibDataReadingAlg(const std::string& name, IS
ATH_CHECK(m_robDataProviderSvc.retrieve());
ATH_CHECK(detStore()->retrieve(m_onlineId,"LArOnlineID"));
//Build list of preselected Feedthroughs
if (m_vBEPreselection.size() && m_vPosNegPreselection.size() && m_vFTPreselection.size()) {
ATH_MSG_INFO("Building list of selected feedthroughs");
for (const unsigned iBE : m_vBEPreselection) {
for (const unsigned iPN: m_vPosNegPreselection) {
for (const unsigned iFT: m_vFTPreselection) {
HWIdentifier finalFTId=m_onlineId->feedthrough_Id(iBE,iPN,iFT);
unsigned int finalFTId32 = finalFTId.get_identifier32().get_compact();
ATH_MSG_INFO("Adding feedthrough Barrel/Endcap=" << iBE << " pos/neg=" << iPN << " FT=" << iFT
<< " (0x" << std::hex << finalFTId32 << std::dec << ")");
m_vFinalPreselection.insert(finalFTId32);
}
}
}
}//end if something set
return StatusCode::SUCCESS;
}
......@@ -192,6 +210,16 @@ StatusCode LArRawCalibDataReadingAlg::execute(const EventContext& ctx) const {
else
continue;
}
if (m_vFinalPreselection.size()) {
const unsigned int ftId=m_onlineId->feedthrough_Id(fId).get_identifier32().get_compact();
if (m_vFinalPreselection.find(ftId)==m_vFinalPreselection.end()) {
ATH_MSG_DEBUG("Feedthrough with id 0x" << MSG::hex << ftId << MSG::dec <<" not in preselection. Ignored.");
continue;
}
}
const int NthisFebChannel=m_onlineId->channelInSlotMax(fId);
//Decode LArCalibDigits (if requested)
......
......@@ -41,6 +41,12 @@ class LArRawCalibDataReadingAlg : public AthReentrantAlgorithm {
BooleanProperty m_verifyChecksum{this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"};
BooleanProperty m_failOnCorruption{this,"FailOnCorruption",true,"Return FAILURE if data corruption is found"};
Gaudi::Property<std::vector<unsigned> > m_vBEPreselection{this,"BEPreselection",{},"For channel-selection: Barrel=0, Endcap=1"};
Gaudi::Property<std::vector<unsigned> > m_vPosNegPreselection{this,"PosNegPreselection",{}, "For channel-selection: C-Side:0, A-Side: 1"};
Gaudi::Property<std::vector<unsigned> > m_vFTPreselection{this,"FTNumPreselection",{}, "For channel-selection: Feedthrough numbers (e.g. 0 - 31 for barrel)"};
std::set<unsigned> m_vFinalPreselection;
//Identifier helper
const LArOnlineID* m_onlineId=nullptr;
......
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