Skip to content
Snippets Groups Projects
Commit b59f12dd authored by Peter Onyisi's avatar Peter Onyisi
Browse files

Fix MET monitoring; add MET monitoring hook to global config

parent 88c2de3c
No related branches found
No related tags found
No related merge requests found
...@@ -53,6 +53,11 @@ def AthenaMonitoringCfg(flags): ...@@ -53,6 +53,11 @@ def AthenaMonitoringCfg(flags):
from JetMonitoring.JetMonitoringStandard import standardJetMonitoring from JetMonitoring.JetMonitoringStandard import standardJetMonitoring
result.merge(standardJetMonitoring(flags)) result.merge(standardJetMonitoring(flags))
if flags.DQ.Steering.doMissingEtMon:
info("Set up MET monitoring")
from MissingETMonitoring.METMonitorAlgorithm import METMonitoringConfig
result.merge(METMonitoringConfig(flags))
if flags.DQ.Steering.doGlobalMon: if flags.DQ.Steering.doGlobalMon:
info('Set up Global monitoring') info('Set up Global monitoring')
from DataQualityTools.DataQualityToolsConfig import DataQualityToolsConfig from DataQualityTools.DataQualityToolsConfig import DataQualityToolsConfig
......
...@@ -27,42 +27,27 @@ public: ...@@ -27,42 +27,27 @@ public:
virtual StatusCode fillHistograms( const EventContext& ctx ) const override; virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
private: private:
SG::ReadHandleKey<xAOD::MissingETContainer> m_metTrackKey { this, "METTrack_AOD_Name", "MET_Track", "Name of MET Track container" }; SG::ReadHandleKey<xAOD::MissingETContainer> m_metContainerKey { this, "METContainer", "MET_Reference_AntiKt4EMTopo", "Name of MET container" };
SG::ReadHandleKey<xAOD::MissingETContainer> m_metAntiKtEMTopoKey { this, "METAntiKtEMTopo_AOD_Name", "MET_Reference_AntiKt4EMTopo", "Name of MET AntiKt EM Topo container" };
// SG::ReadHandleKey<xAOD::MissingETContainer> m_metAntiKtEMTopoKey ;
SG::ReadHandleKey<xAOD::MissingETContainer> m_metCaloContainerKey{ this, "METCalo_AOD_Name", "MET_Calo", "Name of MET Calo container" }; Gaudi::Property<std::string> m_metTotalKey { this, "metTotalKey", "FinalTrk", "Subkey for total MET" };
// SG::ReadHandleKey<xAOD::JetContainer> m_jetContainerKey; SG::ReadHandleKey<xAOD::JetContainer> m_jetContainerKey {this,"JetContainerName","AntiKt4EMTopoJets","jet container name"};
Gaudi::Property<std::string> m_jetContainerName {this,"JetContainerName","AntiKt4EMTopoJets","jet container name"};
const std::vector<std::string> m_calStrings { "PEMB", "EMB", "PEME", "EME", "TILE", "HEC", "FCAL" }; Gaudi::Property<std::vector<std::string>> m_calStrings {this, "METCaloKeys", {}, "MET calo components to plot" };
// std::vector<std::string> m_metKeys;
std::string m_metFinKey = "MET_RefFinal";
std::string m_metCalKey = "MET_LocHadTopo";
std::string m_metRegKey = "";
std::string m_jetColKey = "AntiKt4EMTopoJets";
std::string m_eleColKey = "Electrons";
std::string m_muoColKey = "Muons";
// Gaudi::Property<std::vector<std::string>> m_metKeys {this,"metKeys",{"MET_RefEle", "MET_RefGamma" }}; Gaudi::Property<std::vector<std::string>> m_metKeys {this,"metKeys",{ }, "MET components to plot"};
// Gaudi::Property<std::vector<std::string>> m_metKeys {this,"metKeys",{"MET_RefEle", "MET_RefGamma" }, "explain this property"};
Gaudi::Property<std::vector<std::string>> m_metKeys {this,"metKeys",{ }, "explain this property"};
Gaudi::Property<bool> m_alltrigger {this,"alltrigger",false}; Gaudi::Property<bool> m_alltrigger {this,"alltrigger",false};
Gaudi::Property<bool> m_dometcut {this,"dometcut",false}; Gaudi::Property<bool> m_dometcut {this,"dometcut",false};
Gaudi::Property<bool> m_doBadJets {this,"DoBadJets",false}; Gaudi::Property<bool> m_doBadJets {this,"DoBadJets",false};
Gaudi::Property<double> m_metcut {this,"metcut",80.}; Gaudi::Property<double> m_metcut {this,"metcut", 80.};
// Gaudi::Property<std::vector<float>> m_cellEnergyUpperLimitsHG{this, "CellEnergyUpperLimitsHG", {}, "Energy upper limits of the HG cell-time histograms"};
// Gaudi::Property<std::vector<std::string>> m_metKeys{this, "CellEnergyUpperLimitsHG", {}, "Energy upper limits of the HG cell-time histograms"};
// Gaudi::Property< std::string > m_metKeys {this,"metKeys","MET_RefFinal"}; Gaudi::Property<bool> m_doJetCleaning{this, "DoJetCleaning", false, ""};
Gaudi::Property<bool> m_doJetCleaning{this, "DoJetCleaning", false, ""};
ToolHandle<IJetSelector> m_jetCleaningTool{this, "JetCleaningTool", "", ""}; ToolHandle<IJetSelector> m_jetCleaningTool{this, "JetCleaningTool", "", ""};
// bool isGoodEvent(const EventContext& ctx ) const; // bool isGoodEvent(const EventContext& ctx ) const;
bool isGoodEvent( ) const; bool isGoodEvent( const EventContext& ctx ) const;
}; };
#endif #endif
...@@ -20,7 +20,7 @@ def defineHistograms(monAlg, group,helper,histoNameSuffix=""): ...@@ -20,7 +20,7 @@ def defineHistograms(monAlg, group,helper,histoNameSuffix=""):
if kinesuffix == '_sumet': if kinesuffix == '_sumet':
xmin = 0 xmin = 0
xmax = 5000 xmax = 5000
group.defineHistogram(name,title=title,path='ToRuleThemAll',xbins=100,xmin=xmin,xmax=xmax) group.defineHistogram(name,title=title,xbins=100,xmin=xmin,xmax=xmax)
def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""): def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""):
# name = histoNameSuffix + 'x' # name = histoNameSuffix + 'x'
...@@ -42,7 +42,7 @@ def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""): ...@@ -42,7 +42,7 @@ def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""):
if kinesuffix == '_sumet': if kinesuffix == '_sumet':
xmin = 0 xmin = 0
xmax = 5000 xmax = 5000
group.defineHistogram(name,title=title,path='ToRuleThemAll',xbins=100,xmin=xmin,xmax=xmax) group.defineHistogram(name,title=title,xbins=100,xmin=xmin,xmax=xmax)
...@@ -62,10 +62,11 @@ def METMonitoringConfig(inputFlags): ...@@ -62,10 +62,11 @@ def METMonitoringConfig(inputFlags):
# anotherExampleMonAlg = helper.addAlgorithm(METMonitoringExampleAlg,'AnotherExampleMonAlg') # anotherExampleMonAlg = helper.addAlgorithm(METMonitoringExampleAlg,'AnotherExampleMonAlg')
# met_types = ["MET_RefEle", "MET_RefGamma"] # met_types = ["MET_RefEle", "MET_RefGamma"]
# met_types = ["MET_RefFinal"] # met_types = ["MET_RefFinal"]
met_types = ["MET_RefFinal","MET_RefJet","MET_Muons","MET_RefEle","MET_RefGamma","MET_RefTau","MET_PVSoftTrk"] met_types = ["MET_RefFinal","MET_RefJet","MET_Muon","MET_RefEle","MET_RefGamma","MET_RefTau","MET_PVSoftTrk"]
# met_types = ["MET_RefFinal","MET_RefJet","MET_PFlow_PVSoftTrk","MET_PFlow_RefJet","MET_Track"] # met_types = ["MET_RefFinal","MET_RefJet","MET_PFlow_PVSoftTrk","MET_PFlow_RefJet","MET_Track"]
# exampleMonAlg.JetContainerName = "AntiKt4EMTopoJets" # exampleMonAlg.JetContainerName = "AntiKt4EMTopoJets"
# jet_types = ["AntiKt4EMTopoJets","AntiKt4EMPFlowJets","AntiKt4EMTopoJets"] # jet_types = ["AntiKt4EMTopoJets","AntiKt4EMPFlowJets","AntiKt4EMTopoJets"]
METRefFinal_MonAlg.METContainer="MET_Reference_AntiKt4EMTopo"
METRefFinal_MonAlg.metKeys = met_types METRefFinal_MonAlg.metKeys = met_types
METRefFinal_MonAlg.alltrigger = True METRefFinal_MonAlg.alltrigger = True
group = helper.addGroup(METRefFinal_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_AntiKt4EMTopo/") group = helper.addGroup(METRefFinal_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_AntiKt4EMTopo/")
...@@ -75,7 +76,8 @@ def METMonitoringConfig(inputFlags): ...@@ -75,7 +76,8 @@ def METMonitoringConfig(inputFlags):
METPflow_MonAlg = helper.addAlgorithm(METMonitoringAlg,'METPflow_MonAlg') METPflow_MonAlg = helper.addAlgorithm(METMonitoringAlg,'METPflow_MonAlg')
pfmet_types = ["MET_PFlow","MET_PFlow_RefJet","MET_Fflow_Muons","MET_PFlow_RefEle","MET_PFlow_RefGamma","MET_PFlow_RefTau","MET_PFlow_PVSoftTrk"] pfmet_types = ["MET_PFlow","MET_PFlow_RefJet","MET_PFlow_Muon","MET_PFlow_RefEle","MET_PFlow_RefGamma","MET_PFlow_RefTau","MET_PFlow_PVSoftTrk"]
METPflow_MonAlg.METContainer="MET_Reference_AntiKt4EMPFlow"
METPflow_MonAlg.metKeys = pfmet_types METPflow_MonAlg.metKeys = pfmet_types
METPflow_MonAlg.alltrigger = True METPflow_MonAlg.alltrigger = True
...@@ -87,6 +89,8 @@ def METMonitoringConfig(inputFlags): ...@@ -87,6 +89,8 @@ def METMonitoringConfig(inputFlags):
METCalo_MonAlg = helper.addAlgorithm(METMonitoringAlg,'METCalo_MonAlg') METCalo_MonAlg = helper.addAlgorithm(METMonitoringAlg,'METCalo_MonAlg')
metcalo_types = [ "PEMB", "EMB", "PEME", "EME", "TILE", "HEC", "FCAL" ] metcalo_types = [ "PEMB", "EMB", "PEME", "EME", "TILE", "HEC", "FCAL" ]
METCalo_MonAlg.METContainer="MET_Calo"
METCalo_MonAlg.METCaloKeys = metcalo_types
METCalo_MonAlg.alltrigger = True METCalo_MonAlg.alltrigger = True
group = helper.addGroup(METCalo_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_Calo/") group = helper.addGroup(METCalo_MonAlg, "METMonitor", "MissingEt/AllTriggers/MET_Calo/")
...@@ -94,16 +98,15 @@ def METMonitoringConfig(inputFlags): ...@@ -94,16 +98,15 @@ def METMonitoringConfig(inputFlags):
defineHistogramsCalo(METCalo_MonAlg, group,helper,mets) defineHistogramsCalo(METCalo_MonAlg, group,helper,mets)
# return helper.result(),exampleMonAlg METRefFinal_METCut_MonAlg = helper.addAlgorithm(METMonitoringAlg,'METRefFinal_METCut_MonAlg')
METRefFinal_METCut_MonAlg.METContainer="MET_Reference_AntiKt4EMTopo"
# anotherExampleMonAlg = helper.addAlgorithm(exampleMonAlg,'AnotherExampleMonAlg') METRefFinal_METCut_MonAlg.metTotalKey="FinalTrk"
anotherMonAlg = helper.addAlgorithm(METMonitoringAlg,'AnotherMonAlg') METRefFinal_METCut_MonAlg.metKeys = met_types
anotherMonAlg.metKeys = met_types METRefFinal_METCut_MonAlg.dometcut = True
anotherMonAlg.dometcut = True METRefFinal_METCut_MonAlg.metcut = 80
anotherMonAlg.metcut = 80 group = helper.addGroup(METRefFinal_METCut_MonAlg,"METMonitor","MissingEt/CutMet80/")
anotherGroup = helper.addGroup(anotherMonAlg,"METMonitor","MissingEt/CutMet80/")
for mets in met_types: for mets in met_types:
defineHistograms(anotherMonAlg, anotherGroup,helper,mets) defineHistograms(METRefFinal_METCut_MonAlg, group,helper,mets)
# Jet cleaning # Jet cleaning
...@@ -120,7 +123,6 @@ def METMonitoringConfig(inputFlags): ...@@ -120,7 +123,6 @@ def METMonitoringConfig(inputFlags):
JetCleaningGroup = helper.addGroup(JetCleaning_METMonAlg,"METMonitor","MissingEt/Jetcleaning/") JetCleaningGroup = helper.addGroup(JetCleaning_METMonAlg,"METMonitor","MissingEt/Jetcleaning/")
JetCleaning_METMonAlg.JetContainerName = "AntiKt4EMTopoJets" JetCleaning_METMonAlg.JetContainerName = "AntiKt4EMTopoJets"
for mets in met_types: for mets in met_types:
print mets
if mets == 'MET_PFlow_PVSoftTrk': if mets == 'MET_PFlow_PVSoftTrk':
JetCleaning_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets" JetCleaning_METMonAlg.JetContainerName = "AntiKt4EMPFlowJets"
defineHistograms(JetCleaning_METMonAlg, JetCleaningGroup,helper,mets) defineHistograms(JetCleaning_METMonAlg, JetCleaningGroup,helper,mets)
......
...@@ -34,17 +34,7 @@ static const std::map<std::string, std::pair<std::string, std::string> > key2Sub ...@@ -34,17 +34,7 @@ static const std::map<std::string, std::pair<std::string, std::string> > key2Sub
{ "MET_PFlow", { "MET_Reference_AntiKt4EMPFlow", "FinalClus" } } } ); { "MET_PFlow", { "MET_Reference_AntiKt4EMPFlow", "FinalClus" } } } );
METMonitoringAlg::METMonitoringAlg( const std::string& name, ISvcLocator* pSvcLocator ) :AthMonitorAlgorithm(name,pSvcLocator) ,m_metTrackKey("MET_Track") { METMonitoringAlg::METMonitoringAlg( const std::string& name, ISvcLocator* pSvcLocator ) :AthMonitorAlgorithm(name,pSvcLocator) {
declareProperty("MET_EMTopoContainerName",m_metAntiKtEMTopoKey);
declareProperty("MET_TrackContainerName",m_metTrackKey);
declareProperty("metFinKey", m_metFinKey);
declareProperty("metCalKey", m_metCalKey);
declareProperty("metRegKey", m_metRegKey);
declareProperty("jetColKey", m_jetColKey);
declareProperty("eleColKey", m_eleColKey);
declareProperty("muoColKey", m_muoColKey);
} }
...@@ -52,10 +42,22 @@ METMonitoringAlg::METMonitoringAlg( const std::string& name, ISvcLocator* pSvcLo ...@@ -52,10 +42,22 @@ METMonitoringAlg::METMonitoringAlg( const std::string& name, ISvcLocator* pSvcLo
METMonitoringAlg::~METMonitoringAlg() {} METMonitoringAlg::~METMonitoringAlg() {}
StatusCode METMonitoringAlg::initialize() { StatusCode METMonitoringAlg::initialize() {
ATH_CHECK(m_metTrackKey.initialize()); for (const auto& key : m_metKeys) {
ATH_CHECK(m_metAntiKtEMTopoKey.initialize()); auto foundIterator = key2SubSkeyMap.find( key );
ATH_CHECK(m_metCaloContainerKey.initialize()); if ( foundIterator == key2SubSkeyMap.end() ) {
// ATH_CHECK( m_jetContainerKey.initialize() ); ATH_MSG_FATAL("Unable to find MET key " << key << " in lookup table; quit");
return StatusCode::FAILURE;
}
if (foundIterator->second.first != m_metContainerKey.key()) {
ATH_MSG_FATAL("Mismatch of requested MET key " << key << ", which comes from "
<< foundIterator->second.first
<< ", with configured container key " << m_metContainerKey
<< "; quit");
return StatusCode::FAILURE;
}
}
ATH_CHECK(m_metContainerKey.initialize());
ATH_CHECK(m_jetContainerKey.initialize());
if (m_doJetCleaning) { if (m_doJetCleaning) {
ATH_MSG_DEBUG("::initializing JetCleaningTool"); ATH_MSG_DEBUG("::initializing JetCleaningTool");
ATH_CHECK(m_jetCleaningTool.retrieve()); ATH_CHECK(m_jetCleaningTool.retrieve());
...@@ -70,104 +72,72 @@ StatusCode METMonitoringAlg::initialize() { ...@@ -70,104 +72,72 @@ StatusCode METMonitoringAlg::initialize() {
StatusCode METMonitoringAlg::fillHistograms( const EventContext& ctx ) const { StatusCode METMonitoringAlg::fillHistograms( const EventContext& ctx ) const {
using namespace Monitored; using namespace Monitored;
SG::ReadHandle<xAOD::MissingETContainer> metTrackContainer(m_metTrackKey,ctx); using Gaudi::Units::GeV;
if (!metTrackContainer.isValid() ) {
ATH_MSG_ERROR("evtStore() does not contain metTrack Collection with name "<< m_metTrackKey);
return StatusCode::FAILURE;
}
SG::ReadHandle<xAOD::MissingETContainer> metAntiKtEMTopoContainer(m_metAntiKtEMTopoKey,ctx); SG::ReadHandle<xAOD::MissingETContainer> metContainer(m_metContainerKey,ctx);
if (!metAntiKtEMTopoContainer.isValid() ) { if (!metContainer.isValid() ) {
ATH_MSG_ERROR("evtStore() does not contain metAntiKtEMTopoContainer Collection with name "<< m_metAntiKtEMTopoKey); ATH_MSG_ERROR("evtStore() does not contain MET Collection with name "<< m_metContainerKey);
return StatusCode::FAILURE;
}
SG::ReadHandle<xAOD::MissingETContainer> metCaloContainer(m_metCaloContainerKey,ctx);
if (!metCaloContainer.isValid() ) {
ATH_MSG_ERROR("evtStore() does not contain metAntiKtEMTopoContainer Collection with name "<< m_metCaloContainerKey);
return StatusCode::FAILURE; return StatusCode::FAILURE;
} }
if (m_dometcut && (*metContainer)[m_metTotalKey]->met() < m_metcut*GeV) return StatusCode::SUCCESS;
for (const auto& metKey : m_metKeys)
for (unsigned int i = 0; i < m_metKeys.size(); i++)
{ {
// std::cout<<"met keys "<<m_metKeys[i]<<std::endl; const std::string& xaod_subkey = key2SubSkeyMap.at(metKey).second;
auto foundIterator = key2SubSkeyMap.find( m_metKeys[i] ); const xAOD::MissingET* xMissEt = (*metContainer)[xaod_subkey];
if ( foundIterator == key2SubSkeyMap.end() ) continue; if (xMissEt) {
std::string xaod_key = foundIterator->second.first; std::string name = metKey + "_et";
std::string xaod_subkey = foundIterator->second.second; // std::cout<<"name "<<name<<std::endl;
// const xAOD::MissingETContainer* xMissEt = 0; auto et = Monitored::Scalar<double>(name,-1.0);
name = metKey + "_ex";
SG::ReadHandle<xAOD::MissingETContainer> metContainer(xaod_key,ctx); auto ex = Monitored::Scalar<double>(name,-1.0);
// std::cout<<"XAOD "<<xaod_key<<" "<<xaod_subkey<<std::endl; name = metKey + "_ey";
if (!metContainer.isValid() ) { auto ey = Monitored::Scalar<double>(name,-1.0);
ATH_MSG_ERROR("evtStore() does not contain metTrack Collection with name "<< xaod_key); name = metKey + "_phi";
return StatusCode::FAILURE; auto phi = Monitored::Scalar<double>(name,-1.0);
} name = metKey + "_sumet";
const xAOD::MissingET* xMissEt = (*metContainer.cptr())[xaod_subkey]; auto sumet = Monitored::Scalar<double>(name,-1.0);
if (xMissEt) { ex = xMissEt->mpx() / GeV;
ey = xMissEt->mpy() / GeV;
std::string name = m_metKeys[i] + "_et"; et = xMissEt->met() / GeV;
// std::cout<<"name "<<name<<std::endl; phi = xMissEt->phi();
auto et = Monitored::Scalar<double>(name,-1.0); sumet = xMissEt->sumet() / GeV;
name = m_metKeys[i] + "_ex";
auto ex = Monitored::Scalar<double>(name,-1.0);
name = m_metKeys[i] + "_ey";
auto ey = Monitored::Scalar<double>(name,-1.0);
name = m_metKeys[i] + "_phi";
auto phi = Monitored::Scalar<double>(name,-1.0);
name = m_metKeys[i] + "_sumet";
auto sumet = Monitored::Scalar<double>(name,-1.0);
ex = xMissEt->mpx() / 1000.;
ey = xMissEt->mpy() / 1000.;
et = xMissEt->met() / 1000.;
phi = xMissEt->phi();
sumet = xMissEt->sumet() /1000.;
if (m_alltrigger && m_doBadJets == false)
fill("METMonitor",ex,ey,et,phi,sumet);
if (m_doBadJets) {
if (!isGoodEvent()) {
// std::cout<<"met keys "<<m_metKeys[i]<<std::endl;
fill("METMonitor",ex,ey,et,phi,sumet);
}
}
if (m_alltrigger && m_doBadJets == false) {
if (m_dometcut) { fill("METMonitor",ex,ey,et,phi,sumet);
if (et > m_metcut) fill("METMonitor",ex,ey,et,phi,sumet); } else if (m_doBadJets) {
if (!isGoodEvent(ctx)) {
fill("METMonitor",ex,ey,et,phi,sumet);
} }
if (m_doJetCleaning && m_doBadJets == false) { } else if (m_doJetCleaning && m_doBadJets == false) {
if (isGoodEvent()) { if (isGoodEvent(ctx)) {
// std::cout<<"met keys "<<m_metKeys[i]<<" "<<m_jetContainerName <<std::endl; fill("METMonitor",ex,ey,et,phi,sumet);
fill("METMonitor",ex,ey,et,phi,sumet);
}
} }
} else {
fill("METMonitor",ex,ey,et,phi,sumet);
} }
}
} }
for (unsigned int i = 0; i < m_calStrings.size(); i++) { for (const auto& calString : m_calStrings) {
const xAOD::MissingET* xmetCal = (*metCaloContainer.cptr())[m_calStrings[i]]; const xAOD::MissingET* xmetCal = (*metContainer)[calString];
if (xmetCal){ if (xmetCal){
std::string name = "MET_"+m_calStrings[i] + "_et"; std::string name = "MET_"+calString + "_et";
auto et = Monitored::Scalar<double>(name,-1.0); auto et = Monitored::Scalar<double>(name,-1.0);
name = "MET_" + m_calStrings[i] + "_ex"; name = "MET_" + calString + "_ex";
auto ex = Monitored::Scalar<double>(name,-1.0); auto ex = Monitored::Scalar<double>(name,-1.0);
name = "MET_" +m_calStrings[i] + "_ey"; name = "MET_" +calString + "_ey";
auto ey = Monitored::Scalar<double>(name,-1.0); auto ey = Monitored::Scalar<double>(name,-1.0);
name = "MET_" +m_calStrings[i] + "_phi"; name = "MET_" +calString + "_phi";
auto phi = Monitored::Scalar<double>(name,-1.0); auto phi = Monitored::Scalar<double>(name,-1.0);
name = "MET_" +m_calStrings[i] + "_sumet"; name = "MET_" +calString + "_sumet";
auto sumet = Monitored::Scalar<double>(name,-1.0); auto sumet = Monitored::Scalar<double>(name,-1.0);
ex = xmetCal->mpx() / 1000.; ex = xmetCal->mpx() / GeV;
ey = xmetCal->mpy() / 1000.; ey = xmetCal->mpy() / GeV;
et = xmetCal->met() / 1000.; et = xmetCal->met() / GeV;
phi = xmetCal->phi(); phi = xmetCal->phi();
sumet = xmetCal->sumet() / 1000.; sumet = xmetCal->sumet() / GeV;
if (m_alltrigger)fill("METMonitor",ex,ey,et,phi,sumet); if (m_alltrigger)fill("METMonitor",ex,ey,et,phi,sumet);
} }
} }
...@@ -175,13 +145,12 @@ StatusCode METMonitoringAlg::fillHistograms( const EventContext& ctx ) const { ...@@ -175,13 +145,12 @@ StatusCode METMonitoringAlg::fillHistograms( const EventContext& ctx ) const {
} }
bool METMonitoringAlg::isGoodEvent() const { bool METMonitoringAlg::isGoodEvent( const EventContext& ctx ) const {
if (! m_doJetCleaning) return true; if (! m_doJetCleaning) return true;
SG::ReadHandle<xAOD::JetContainer> jetContainer(m_jetContainerName); SG::ReadHandle<xAOD::JetContainer> jetContainer(m_jetContainerKey, ctx);
if (! jetContainer.isValid() ) { if (! jetContainer.isValid() ) {
// ATH_MSG_ERROR("evtStore() does not contain jet Collection with name "<< m_jetContainerKey); ATH_MSG_ERROR("evtStore() does not contain jet Collection with name "<< m_jetContainerKey);
ATH_MSG_ERROR("evtStore() does not contain jet Collection with name "<< m_jetContainerName);
return false;;///StatusCode::FAILURE; return false;;///StatusCode::FAILURE;
} }
......
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