diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/CMakeLists.txt b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c79c2eeeafc863e3b5a97fd5e6f8004d37cf981d --- /dev/null +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/CMakeLists.txt @@ -0,0 +1,21 @@ +# The name of the package: +atlas_subdir( JetAnalysisInterfaces ) + +# The dependencies of the package: +atlas_depends_on_subdirs( + PUBLIC + Control/AthToolSupport/AsgTools + Event/xAOD/xAODJet + PhysicsAnalysis/AnalysisCommon/PATCore ) + +# Component(s) in the package: +atlas_add_library( JetAnalysisInterfacesLib + JetAnalysisInterfaces/*.h + INTERFACE + PUBLIC_HEADERS JetAnalysisInterfaces + LINK_LIBRARIES AsgTools xAODJet PATCoreLib PATInterfaces ) + +atlas_add_dictionary( JetAnalysisInterfacesDict + JetAnalysisInterfaces/JetAnalysisInterfacesDict.h + JetAnalysisInterfaces/selection.xml + LINK_LIBRARIES JetAnalysisInterfacesLib ) diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h new file mode 100644 index 0000000000000000000000000000000000000000..cc12cce119faacc7e6eba9d3b39abcd97e023570 --- /dev/null +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetJvtEfficiency.h @@ -0,0 +1,75 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef JETANALYSISINTERFACES_IJETJVTEFFICIENCY_H_ +#define JETANALYSISINTERFACES_IJETJVTEFFICIENCY_H_ + +// EDM include(s): +#include "xAODJet/JetContainer.h" + +// Local include(s): +#include "PATInterfaces/CorrectionCode.h" +#include "PATInterfaces/ISystematicsTool.h" + +// STL include(s): +#include <string> +#include <vector> +#include <map> + +namespace CP { + +const static SystematicVariation JvtEfficiencyUp("JET_JvtEfficiency__1up"); +const static SystematicVariation JvtEfficiencyDown("JET_JvtEfficiency__1down"); +const static SystematicVariation fJvtEfficiencyUp("JET_fJvtEfficiency__1up"); +const static SystematicVariation fJvtEfficiencyDown("JET_fJvtEfficiency__1down"); +const static SystematicVariation MVfJvtEfficiencyUp("JET_MVfJvtEfficiency__1up"); +const static SystematicVariation MVfJvtEfficiencyDown("JET_MVfJvtEfficiency__1down"); + +class IJetJvtEfficiency : public virtual CP::ISystematicsTool { + + //Declare the interface that the class provides + ASG_TOOL_INTERFACE( CP::IJetJvtEfficiency ) + +public: + + virtual ~IJetJvtEfficiency() {} + + //Fills sf with the Jvt efficiency scale factor. If the jet is out of the defined jet pt + //range, or if the jet fails passesJvtCut, a value of 1 is returned. + virtual CorrectionCode getEfficiencyScaleFactor(const xAOD::Jet& jet,float& sf ) = 0; + + //Fills sf with the Jvt inefficiency scale factor. If the jet is out of the defined jet pt + //range, or if the jet fails passesJvtCut, a value of 1 is returned. + virtual CorrectionCode getInefficiencyScaleFactor(const xAOD::Jet& jet,float& sf ) = 0; + + //Returns the Jvt scale factor as a decoration on the jet. + virtual CorrectionCode applyEfficiencyScaleFactor( const xAOD::Jet& jet ) = 0; + + //Returns the Jvt scale factor as a decoration on the jet. + virtual CorrectionCode applyInefficiencyScaleFactor( const xAOD::Jet& jet ) = 0; + + //Returns the jvt scale factors as decorations on the input jets and fills in the combined scale factor into sf + virtual CorrectionCode applyAllEfficiencyScaleFactor(const xAOD::IParticleContainer *jets,float& sf) = 0; + + //Checks if the jet passes the jvt cut threshold. + //Uses maximum validity range by default, but there is a configurable parameter + virtual bool passesJvtCut(const xAOD::Jet& jet) = 0; + + //Checks if the jet lies in the pt and eta range where Jvt is valid. + virtual bool isInRange(const xAOD::Jet& jet) = 0; + + //returns actual jvtthreshold + virtual float getJvtThresh() const = 0; + + //returns user-defined max pt if applicable (by default is the same as the max pt range of the histograms) + virtual float getUserPtMax() const = 0; + + //Applies truth matching decoration to determine appropriate scale factor type -- call before extracting SFs + virtual StatusCode tagTruth(const xAOD::IParticleContainer *jets,const xAOD::IParticleContainer *truthJets) = 0; + +}; // class IJetJvtEfficiencyTool + +} // namespace CP + +#endif /* JETANALYSISINTERFACES_IJETJVTEFFICIENCY_H_ */ diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetSelectorTool.h b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetSelectorTool.h new file mode 100644 index 0000000000000000000000000000000000000000..139f0bf2f2d557a4af7ab840feaad5f4a87987de --- /dev/null +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/IJetSelectorTool.h @@ -0,0 +1,27 @@ +// for editors : this file is -*- C++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef JetAnalysisInterfaces_IJetSelectorTool_H_ +#define JetAnalysisInterfaces_IJetSelectorTool_H_ + +#include "AsgTools/IAsgTool.h" + +#include "xAODJet/Jet.h" + +#include "PATCore/AcceptData.h" + + +class IJetSelectorTool : virtual public asg::IAsgTool { + ASG_TOOL_INTERFACE(IJetSelectorTool) + + public: + + virtual asg::AcceptData& tag(const xAOD::Jet& jet) const = 0; + + +}; + +#endif diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/JetAnalysisInterfacesDict.h b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/JetAnalysisInterfacesDict.h new file mode 100644 index 0000000000000000000000000000000000000000..5bd4acf1a7653ea2707ad3c22acc88379d8abb28 --- /dev/null +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/JetAnalysisInterfacesDict.h @@ -0,0 +1,16 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef JETANALYSISINTERFACES_JETANALYSISINTERFACESDICT_H +#define JETANALYSISINTERFACES_JETANALYSISINTERFACESDICT_H + +#if defined(__GCCXML__) and not defined(EIGEN_DONT_VECTORIZE) +#define EIGEN_DONT_VECTORIZE +#endif // __GCCXML__ + +// Includes for the dictionary generation: +#include "JetAnalysisInterfaces/IJetSelectorTool.h" +#include "JetAnalysisInterfaces/IJetJvtEfficiency.h" + +#endif // JETANALYSISINTERFACES_JETANALYSISINTERFACESDICT_H diff --git a/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/selection.xml b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..0a98caef59b578a1c65329b83c1d6c35e3993f75 --- /dev/null +++ b/PhysicsAnalysis/Interfaces/JetAnalysisInterfaces/JetAnalysisInterfaces/selection.xml @@ -0,0 +1,14 @@ +<lcgdict> + <!-- Requested dictionary generation --> + <class name="IJetSelectorTool" /> + <class name="IJetJvtEfficiency" /> + + <!-- Suppress unwanted dictionaries generated by ROOT 6 --> + <exclusion> + <class name="SG::IConstAuxStore"/> + <class name="DataLink<SG::IConstAuxStore>"/> + <class name="xAOD::IParticle"/> + <class name="DataVector<xAOD::IParticle>"/> + <class name="ElementLink<DataVector<xAOD::IParticle> >"/> + </exclusion> +</lcgdict>