Skip to content
Snippets Groups Projects
Commit 4389c932 authored by Walter Lampl's avatar Walter Lampl
Browse files

add FT preselection option to LArRawCalibDataReadingAlg

parent 5686e778
No related branches found
No related tags found
No related merge requests found
......@@ -71,6 +71,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;
}
......@@ -190,6 +208,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,"FTPreselection",{}, "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