Skip to content
Snippets Groups Projects
Commit a606f398 authored by Steven Schramm's avatar Steven Schramm Committed by Graeme Stewart
Browse files

Minor change to StoreGate access conditions in the trigger to support HI needs (JetRec-03-00-39-29)

parent 3531d3ae
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "xAODJet/JetContainer.h" #include "xAODJet/JetContainer.h"
class JetFromPseudojet class JetFromPseudojet
: virtual public asg::AsgTool, : public asg::AsgTool,
virtual public IJetFromPseudojet { virtual public IJetFromPseudojet {
ASG_TOOL_CLASS(JetFromPseudojet, IJetFromPseudojet) ASG_TOOL_CLASS(JetFromPseudojet, IJetFromPseudojet)
...@@ -50,7 +50,8 @@ public: ...@@ -50,7 +50,8 @@ public:
// Dump to log. // Dump to log.
void print() const; void print() const;
private:
protected:
// Method use by the above add(...) to do most of the work. // Method use by the above add(...) to do most of the work.
xAOD::Jet* addjet(const fastjet::PseudoJet& pj, xAOD::JetContainer& jets, xAOD::Jet* addjet(const fastjet::PseudoJet& pj, xAOD::JetContainer& jets,
......
// JetRecTool.h. This file is -*- C++ -*-
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/ */
// JetRecTool.h
#ifndef JetRecTool_H #ifndef JetRecTool_H
#define JetRecTool_H #define JetRecTool_H
...@@ -98,6 +99,9 @@ public: ...@@ -98,6 +99,9 @@ public:
/// Default returns 0 and adds no names. /// Default returns 0 and adds no names.
int outputContainerNames(std::vector<std::string>& connames); int outputContainerNames(std::vector<std::string>& connames);
/// For trigger usage in grooming mode only : give the input ungroomed jet container.
void setInputJetContainer(const xAOD::JetContainer* cont) ;
private: private:
/// Record the container and Aux container in the event store. /// Record the container and Aux container in the event store.
...@@ -134,6 +138,10 @@ private: ...@@ -134,6 +138,10 @@ private:
std::vector<std::string> m_outcolls; std::vector<std::string> m_outcolls;
const IJetPseudojetRetriever* m_ppjr; const IJetPseudojetRetriever* m_ppjr;
// trigger hacks
const xAOD::JetContainer* m_trigInputJetsForGrooming; // used in trigger context only
// Clocks. // Clocks.
mutable unsigned int m_nevt; mutable unsigned int m_nevt;
mutable TStopwatch m_totclock; mutable TStopwatch m_totclock;
......
...@@ -407,16 +407,22 @@ const JetContainer* JetRecTool::build() const { ...@@ -407,16 +407,22 @@ const JetContainer* JetRecTool::build() const {
const JetContainer* pjetsin = 0; const JetContainer* pjetsin = 0;
if ( m_groom || m_copy ) { if ( m_groom || m_copy ) {
m_inpclock.Start(false); m_inpclock.Start(false);
if ( m_incoll.size() && evtStore()->contains<JetContainer>(m_incoll)) {
pjetsin = evtStore()->retrieve<const JetContainer>(m_incoll); if(!m_trigger || m_copy) { // reco case : get input from evt store
} if ( m_incoll.size() && evtStore()->contains<JetContainer>(m_incoll)) {
if ( pjetsin==0 && !m_intool.empty() ) { pjetsin = evtStore()->retrieve<const JetContainer>(m_incoll);
ATH_MSG_DEBUG("Excuting input tool.");
if ( m_intool->execute() ) {
ATH_MSG_WARNING("Input tool execution failed.");
} }
pjetsin = evtStore()->retrieve<const JetContainer>(m_incoll); if ( pjetsin==0 && !m_intool.empty() ) {
ATH_MSG_DEBUG("Excuting input tool.");
if ( m_intool->execute() ) {
ATH_MSG_WARNING("Input tool execution failed.");
}
pjetsin = evtStore()->retrieve<const JetContainer>(m_incoll);
}
} else { // trigger case : assume setInputJetContainer was called, use m_trigInputJetsForGrooming
pjetsin = m_trigInputJetsForGrooming;
} }
if ( pjetsin == 0 ) { if ( pjetsin == 0 ) {
ATH_MSG_ERROR("Unable to retrieve input jet container: " << m_incoll); ATH_MSG_ERROR("Unable to retrieve input jet container: " << m_incoll);
m_totclock.Stop(); m_totclock.Stop();
...@@ -684,3 +690,9 @@ int JetRecTool::outputContainerNames(std::vector<std::string>& connames) { ...@@ -684,3 +690,9 @@ int JetRecTool::outputContainerNames(std::vector<std::string>& connames) {
} }
//********************************************************************** //**********************************************************************
void JetRecTool::setInputJetContainer(const xAOD::JetContainer* cont) {
m_trigInputJetsForGrooming = cont;
}
...@@ -36,6 +36,7 @@ class JetRecCalibrationFinder: ...@@ -36,6 +36,7 @@ class JetRecCalibrationFinder:
"r":"Residual", "r":"Residual",
"o":"Origin", "o":"Origin",
"j":"AbsoluteEtaJES", "j":"AbsoluteEtaJES",
"m":"JMS",
"g":"GSC", "g":"GSC",
"i":"Insitu" "i":"Insitu"
} }
...@@ -45,7 +46,8 @@ class JetRecCalibrationFinder: ...@@ -45,7 +46,8 @@ class JetRecCalibrationFinder:
"reco" : "JES_Full2012dataset_Preliminary_Jan13.config", "reco" : "JES_Full2012dataset_Preliminary_Jan13.config",
"trigger" : "JES_Full2012dataset_Preliminary_Trigger.config", "trigger" : "JES_Full2012dataset_Preliminary_Trigger.config",
"triggerNoPileup" : "JES_Full2012dataset_Preliminary_Trigger_NoPileup.config", "triggerNoPileup" : "JES_Full2012dataset_Preliminary_Trigger_NoPileup.config",
"trigger2016" : "JES_2015dataset_recommendation_Feb2016_Trigger.config", "trigger2016" : "JES_MC15cRecommendation_May2016_Trigger.config",
"triggerTrim" : "JES_MC15recommendation_FatJet_June2015.config",
"pflow" : "PFlowJES_September2014.config" "pflow" : "PFlowJES_September2014.config"
} }
...@@ -93,6 +95,8 @@ class JetRecCalibrationFinder: ...@@ -93,6 +95,8 @@ class JetRecCalibrationFinder:
evssuf="EMTopoEventShape" evssuf="EMTopoEventShape"
elif inpin == "LCTopo": elif inpin == "LCTopo":
evssuf="LCTopoEventShape" evssuf="LCTopoEventShape"
elif inpin.startswith("LCTopoTrimmed"):
evssuf="LCTopoEventShape"
elif inpin == "EMPFlow": elif inpin == "EMPFlow":
evssuf="EMPFlowEventShape" evssuf="EMPFlowEventShape"
elif inpin == "EMCPFlow": elif inpin == "EMCPFlow":
......
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