diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h index d50951b758cba17345ddc5788a51fb4389b7b7e0..7c89a2cf2b4cac9c50c36fe52b998774329c5f49 100755 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/TrigMETMonitoring/HLTMETMonTool.h @@ -23,6 +23,8 @@ #include "xAODEgamma/ElectronContainer.h" #include "xAODEgamma/Electron.h" +#include "xAODCaloEvent/CaloClusterContainer.h" + #include "TLorentzVector.h" #include <string> @@ -60,6 +62,7 @@ private: void addHLTvsOffHistograms(); void addL1vsOffHistograms(); void addElMuHistograms(); + void addClusterHistograms(); // methods to make filling easier void fillL1BasicHistograms(float l1_mex,float l1_mex_log,float l1_mey,float l1_mey_log,float l1_met,float l1_met_log,float l1_sumet,float l1_sumet_log,float l1_phi,float saturated); void fillL1JetHistograms(float l1_jet_pt,float l1_jet_eta); @@ -152,6 +155,8 @@ private: std::string m_electron_key; std::string m_electron_run3_key; std::string m_electron_base_trigger; + std::string m_cluster_key; + std::string m_cluster_run3_key; double m_muon_pt_thresh; double m_electron_pt_thresh; diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx index fa1d839fe9f6156360417b1985ddcc5185b059d3..9a97660d0a176ae89fe4bbf1ddcc1e582fb2feaf 100644 --- a/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx +++ b/Trigger/TrigMonitoring/TrigMETMonitoring/src/HLTMETMonTool.cxx @@ -88,6 +88,11 @@ HLTMETMonTool::HLTMETMonTool(const std::string & type, const std::string & name, declareProperty("electron_base", m_electron_base_trigger="HLT_e5_lhloose"); declareProperty("electron_pt_thresh", m_electron_pt_thresh=20.0); + // topocluster keys + declareProperty("cluster_key", m_cluster_key="HLT_xAOD__CaloClusterContainer_TrigCaloClusterMaker"); + declareProperty("cluster_run3_key", m_cluster_run3_key="HLT_TopoCaloClustersLCFS"); + + // declareProperty("comp_names", m_compNames); declareProperty("bit_names", m_bitNames); @@ -426,6 +431,14 @@ StatusCode HLTMETMonTool::book() { setCurrentMonGroup(monFolderName); addElMuHistograms(); + + // Book HLT Cluster histograms ********** + monFolderName = monGroupName + "/Cluster"; + addMonGroup(new MonGroup(this, monFolderName.c_str(), run)); + setCurrentMonGroup(monFolderName); + addClusterHistograms(); + + return StatusCode::SUCCESS; } @@ -711,6 +724,19 @@ StatusCode HLTMETMonTool::fillMETHist() { } + // retrieve Cluster container + const xAOD::CaloClusterContainer *hlt_clusterEFcontainer = 0; + sc = evtStore()->retrieve(hlt_clusterEFcontainer, m_cluster_key); + if (sc.isFailure() || !hlt_clusterEFcontainer) { + sc = evtStore()->retrieve(hlt_clusterEFcontainer, m_cluster_run3_key); + if (sc.isFailure() || !hlt_clusterEFcontainer) { + ATH_MSG_WARNING("Could not retrieve cluster container with key " << m_cluster_key << " from TDS"); + } + } else { + ATH_MSG_DEBUG("Accessing EF cluster container with " << hlt_clusterEFcontainer->size() << " elements"); + } + + // Check if signal-like muon exists ATH_MSG_DEBUG("Going to iterate through muon container"); bool METMuonFilled = false; // flag is set to true if event satisfies signal-like requirement @@ -1758,6 +1784,23 @@ StatusCode HLTMETMonTool::fillMETHist() { ATH_MSG_DEBUG("Electron multiciplicity: " << electronMult); if((h = hist("HLT_electronmult") )) h->Fill(electronMult); } + + ////////////////////////// + // Clusters + monFolderName = monGroupName + "/Cluster"; + setCurrentMonGroup(monFolderName); + + if (hlt_clusterEFcontainer) { + if ((h = hist("HLT_nClusters"))) h->Fill(hlt_clusterEFcontainer->size()); + for (auto cluster : *hlt_clusterEFcontainer) { + if ((h = hist("HLT_cluster_E"))) h->Fill(cluster->calE()/CLHEP::GeV); + if ((h = hist("HLT_cluster_Eta"))) h->Fill(cluster->calEta()); + if ((h = hist("HLT_cluster_Phi"))) h->Fill(cluster->calPhi()); + if ((h = hist("HLT_cluster_M"))) h->Fill(cluster->calM()/CLHEP::GeV); + } + } + + return sc; } @@ -2131,6 +2174,14 @@ void HLTMETMonTool::addElMuHistograms() { } +//___________________________________________________________________________________________________________ +void HLTMETMonTool::addClusterHistograms() { + addHistogram(new TH1F("HLT_nClusters", "HLT Number of Clusters", 100, 0, 2000)); + addHistogram(new TH1F("HLT_cluster_E", "HLT Cluster E (GeV)", 100, 0, 50)); + addHistogram(new TH1F("HLT_cluster_Eta", "HLT Cluster Eta", 100, -5, 5)); + addHistogram(new TH1F("HLT_cluster_Phi", "HLT Cluster Phi", 100, -3.5, 3.5)); + addHistogram(new TH1F("HLT_cluster_M", "HLT Cluster M (GeV)", 100, 0, 50)); +} //___________________________________________________________________________________________________________ void HLTMETMonTool::trigger_decision() {