Skip to content
Snippets Groups Projects
Commit 04f71479 authored by Sergi Rodriguez Bosca's avatar Sergi Rodriguez Bosca Committed by Tomasz Bold
Browse files

ATR-27964 Support removed TriggerTowers with zero energy in MC L1Calo sim

ATR-27964 Support removed TriggerTowers with zero energy in MC L1Calo sim
parent 9f0c1583
No related branches found
No related tags found
2 merge requests!64541Daily merge of 23.0 into main,!64455ATR-27964 Support removed TriggerTowers with zero energy in MC L1Calo sim
......@@ -6,7 +6,7 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.Enums import Format
def jFexEmulatedTowersCfg(flags, name, writeKey="L1_jFexEmulatedTowers"):
def jFexEmulatedTowersCfg(flags, name="jFexEmulatedTowerMaker", writeKey="L1_jFexEmulatedTowers"):
"""
Config for emulating jFex input data from LATOME readout
"""
......@@ -14,6 +14,7 @@ def jFexEmulatedTowersCfg(flags, name, writeKey="L1_jFexEmulatedTowers"):
emulator = CompFactory.LVL1.jFexEmulatedTowers(name)
emulator.jTowersWriteKey = writeKey
emulator.isDATA = not flags.Input.isMC
acc.addEventAlgo(emulator)
return acc
......
......@@ -92,6 +92,7 @@ StatusCode jFexEmulatedTowers::execute(const EventContext& ctx) const {
// keeping just tile information
if(std::abs(tower->eta())>1.5 || tower->sampling()!=1) continue;
map_TileID2ptr[tower->coolId()]=tower;
}
......@@ -141,7 +142,7 @@ StatusCode jFexEmulatedTowers::execute(const EventContext& ctx) const {
//check that the SCell Identifier exists in the map
auto it_ScellID2ptr = map_ScellID2ptr.find(SCellID);
if(it_ScellID2ptr == map_ScellID2ptr.end()) {
ATH_MSG_DEBUG("Scell ID: 0x"<<std::hex<< (SCellID >> 32) <<std::dec<< " not found in the CaloCell Container, skipping");
if(m_isDATA) ATH_MSG_DEBUG("Scell ID: 0x"<<std::hex<< (SCellID >> 32) <<std::dec<< " not found in the CaloCell Container, skipping");
continue;
}
......@@ -179,7 +180,7 @@ StatusCode jFexEmulatedTowers::execute(const EventContext& ctx) const {
//check that the Tile Identifier exists in the map
auto it_TileID2ptr = map_TileID2ptr.find(TileID);
if(it_TileID2ptr == map_TileID2ptr.end()) {
ATH_MSG_WARNING("Tile cool ID: "<<TileID<< " not found in the xAOD::TriggerTower, skipping");
if(m_isDATA) ATH_MSG_WARNING("Tile cool ID: "<<TileID<< " not found in the xAOD::TriggerTower, skipping");
continue;
}
else{
......@@ -342,8 +343,6 @@ bool jFexEmulatedTowers::isBadSCellID(const std::string& ID) const{
StatusCode jFexEmulatedTowers::ReadTilefromFile(const std::string& fileName){
//openning file with ifstream
std::ifstream file(fileName);
......
......@@ -55,6 +55,7 @@ class jFexEmulatedTowers : public AthReentrantAlgorithm{
//property for jFEX mapping
Gaudi::Property<bool> m_apply_masking {this, "SCellMasking", true, "Applies masking. Only use for data"};
Gaudi::Property<bool> m_isDATA {this, "isDATA" , true, "Tells the algorithm if it is data. Used for xAOD::TriggerTower WARNING due to the 0 supresion"};
Gaudi::Property<bool> m_doThinning {this, "DoThinning" , true, "Remove overlapped towers. Only FPGA Core region is saved"};
//property for jFEX mapping
......
......@@ -163,7 +163,7 @@ def L1CaloFEXSimCfg(flags, eFexTowerInputs = ["L1_eFexDataTowers","L1_eFexEmulat
acc.addEventAlgo(decoderAlg)
from L1CaloFEXAlgos.FexEmulatedTowersConfig import jFexEmulatedTowersCfg
acc.merge(jFexEmulatedTowersCfg(flags,"jFexEmulatedTowerMaker"))
acc.merge(jFexEmulatedTowersCfg(flags))
jFEXInputs = CompFactory.LVL1.jTowerMakerFromJfexTowers('jTowerMakerFromJfexTowers')
jFEXInputs.IsMC = flags.Input.isMC
......
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