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

Merge branch 'MonitoringEgammaPrecisionCaloContainers' into 'master'

Handle new PrecisionCalo keys within TrigEgammaMonitoring and TrigEgammaMatchingTool

See merge request atlas/athena!49811
parents 860463ce 111de72c
No related branches found
No related tags found
No related merge requests found
......@@ -38,20 +38,23 @@ StatusCode TrigEgammaMatchingToolMT::initialize()
ATH_CHECK( m_ringerKey.initialize() );
m_keys[ "Electrons"] = "HLT_egamma_Electrons" ;
m_keys[ "Electrons_GSF"] = "HLT_egamma_Electrons_GSF" ; // gsf
m_keys[ "Electrons_LRT"] = "HLT_egamma_Electrons_LRT" ; // lrt
m_keys[ "Photons"] = "HLT_egamma_Photons" ;
m_keys[ "Electrons"] = "HLT_egamma_Electrons" ;
m_keys[ "Electrons_GSF"] = "HLT_egamma_Electrons_GSF" ; // gsf
m_keys[ "Electrons_LRT"] = "HLT_egamma_Electrons_LRT" ; // lrt
m_keys[ "Photons"] = "HLT_egamma_Photons" ;
// intermediate steps
m_keys[ "PrecisionCalo"] = "HLT_CaloEMClusters" ;
m_keys[ "PrecisionCalo_LRT"] = "HLT_CaloEMClusters_LRT" ; // lrt
m_keys[ "PrecisionCalo_Electron"] = "HLT_CaloEMClusters_Electron";
m_keys[ "PrecisionCalo_Photon"] = "HLT_CaloEMClusters_Photon";
m_keys[ "PrecisionCalo_LRT"] = "HLT_CaloEMClusters_LRT" ; // lrt
// Fast steps
m_keys[ "FastElectrons"] = "HLT_FastElectrons" ;
m_keys[ "FastElectrons_LRT"] = "HLT_FastElectrons_LRT" ; // lrt
m_keys[ "FastPhotons"] = "HLT_FastPhotons" ;
m_keys[ "FastCalo"] = "HLT_FastCaloEMClusters" ;
m_keys[ "FastElectrons"] = "HLT_FastElectrons" ;
m_keys[ "FastElectrons_LRT"] = "HLT_FastElectrons_LRT" ; // lrt
m_keys[ "FastPhotons"] = "HLT_FastPhotons" ;
m_keys[ "FastCalo"] = "HLT_FastCaloEMClusters" ;
// L1
m_keys[ "L1Calo"] = "LVL1EmTauRoIs" ;
m_keys[ "L1Calo"] = "LVL1EmTauRoIs" ;
return StatusCode::SUCCESS;
}
......@@ -149,11 +152,19 @@ bool TrigEgammaMatchingToolMT::matchHLTElectron(const xAOD::Electron *eg,const s
bool TrigEgammaMatchingToolMT::matchHLTCalo(const xAOD::Egamma *eg,const std::string &trigger, const TrigCompositeUtils::Decision *&dec, unsigned int condition ) const
{
ATH_MSG_DEBUG("Match HLT Calo");
ATH_MSG_DEBUG("Match HLT PrecisionCalo");
if(boost::contains(trigger,"lrt")){
ATH_MSG_DEBUG("Matched HLT PrecisionCalo LRT");
return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_LRT"), condition );
}else if(xAOD::EgammaHelpers::isElectron(eg)){
ATH_MSG_DEBUG("Matched HLT PrecisionCalo Electron");
return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Electron"), condition );
}else if(xAOD::EgammaHelpers::isPhoton(eg)){
ATH_MSG_DEBUG("Matched HLT PrecisionCalo Photon");
return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Photon"), condition );
}else{
return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo"), condition );
ATH_MSG_DEBUG("Match HLT PrecisionCalo failed!");
return false;
}
}
......
......@@ -171,14 +171,21 @@ inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::CaloClusterContainer>> Tri
const TrigCompositeUtils::Decision *dec , std::string trigger, unsigned int condition)
const
{
std::vector<std::string> parts;
boost::split(parts,trigger,boost::is_any_of("_"));
if(boost::contains(trigger,"lrt")){
return getFeatures<xAOD::CaloClusterContainer>(dec, trigger, key("PrecisionCalo_LRT"), condition );
}else if(boost::contains(parts.at(0),"g")){
return getFeatures<xAOD::CaloClusterContainer>(dec, trigger, key("PrecisionCalo_Photon"), condition );
}else{
return getFeatures<xAOD::CaloClusterContainer>(dec, trigger, key("PrecisionCalo"), condition );
return getFeatures<xAOD::CaloClusterContainer>(dec, trigger, key("PrecisionCalo_Electron"), condition );
}
}
// Electron
template<>
inline std::vector<TrigCompositeUtils::LinkInfo<xAOD::ElectronContainer>> TrigEgammaMatchingToolMT::getFeatures<xAOD::ElectronContainer>(
......
......@@ -380,7 +380,9 @@ void TrigEgammaMonitorAnalysisAlgorithm::fillDistributions( const std::vector< s
}
// EFCalo
{
std::string key = info.lrt? match()->key("PrecisionCalo_LRT") : match()->key("PrecisionCalo");
std::string key = match()->key("PrecisionCalo_Electron");
if(info.signature == "Photon") key = match()->key("PrecisionCalo_Photon");
if(info.lrt) key = match()->key("PrecisionCalo_LRT");
std::vector<const xAOD::CaloCluster* > clus_vec;
auto vec = tdt()->features<xAOD::CaloClusterContainer>(trigger,condition,key);
......
......@@ -209,10 +209,11 @@ asg::AcceptData TrigEgammaMonitorBaseAlgorithm::setAccept( const TrigCompositeUt
if(passedL2){
// Step 4
std::string key = match()->key("PrecisionCalo");
if(info.lrt) key = match()->key("PrecisionCalo_LRT");
std::string key = match()->key("PrecisionCalo_Electron");
if(info.signature == "Photon") key = match()->key("PrecisionCalo_Photon");
if(info.lrt) key = match()->key("PrecisionCalo_LRT");
passedEFCalo = match()->ancestorPassed<xAOD::CaloClusterContainer>(dec, trigger, key, condition);
if(passedEFCalo){
......
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