diff --git a/CommonTools/CandAlgos/BuildFile.xml b/CommonTools/CandAlgos/BuildFile.xml
index 05ec37c249f78..a66b6c8421f4d 100644
--- a/CommonTools/CandAlgos/BuildFile.xml
+++ b/CommonTools/CandAlgos/BuildFile.xml
@@ -1,6 +1,7 @@
+
diff --git a/CommonTools/CandAlgos/interface/ModifyObjectValueBase.h b/CommonTools/CandAlgos/interface/ModifyObjectValueBase.h
new file mode 100644
index 0000000000000..f3e4fe65973c9
--- /dev/null
+++ b/CommonTools/CandAlgos/interface/ModifyObjectValueBase.h
@@ -0,0 +1,61 @@
+#ifndef __CommonTools_CandAlgos_ModifyObjectValueBase_h__
+#define __CommonTools_CandAlgos_ModifyObjectValueBase_h__
+
+#include "DataFormats/PatCandidates/interface/Electron.h"
+#include "DataFormats/PatCandidates/interface/Photon.h"
+#include "DataFormats/PatCandidates/interface/Muon.h"
+#include "DataFormats/PatCandidates/interface/Tau.h"
+#include "DataFormats/PatCandidates/interface/Jet.h"
+
+#include "FWCore/Utilities/interface/Exception.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/ConsumesCollector.h"
+
+#include
+
+class ModifyObjectValueBase {
+ public:
+ ModifyObjectValueBase(const edm::ParameterSet& conf) :
+ name_( conf.getParameter("modifierName") ) {}
+
+ virtual ~ModifyObjectValueBase() {}
+
+ virtual void setEvent(const edm::Event&) {}
+ virtual void setEventContent(const edm::EventSetup&) {}
+ virtual void setConsumes(edm::ConsumesCollector&) {}
+
+ virtual void modifyObject(pat::Electron&) const {
+ throw cms::Exception("InvalidConfiguration")
+ << name_ << " is not configured to handle electrons!";
+ }
+ virtual void modifyObject(pat::Photon&) const {
+ throw cms::Exception("InvalidConfiguration")
+ << name_ << " is not configured to handle photons!";
+ }
+ virtual void modifyObject(pat::Muon&) const {
+ throw cms::Exception("InvalidConfiguration")
+ << name_ << " is not configured to handle muons!";
+ }
+ virtual void modifyObject(pat::Tau&) const {
+ throw cms::Exception("InvalidConfiguration")
+ << name_ << " is not configured to handle taus!";
+ }
+ virtual void modifyObject(pat::Jet&) const {
+ throw cms::Exception("InvalidConfiguration")
+ << name_ << " is not configured to handle jets!";
+ }
+
+ const std::string& name() const { return name_; }
+
+ private:
+ const std::string name_;
+};
+
+#if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__)
+#include "FWCore/PluginManager/interface/PluginFactory.h"
+typedef edmplugin::PluginFactory< ModifyObjectValueBase* (const edm::ParameterSet&) > ModifyObjectValueFactory;
+#endif
+
+#endif
diff --git a/CommonTools/CandAlgos/src/ModifyObjectValueBase.cc b/CommonTools/CandAlgos/src/ModifyObjectValueBase.cc
new file mode 100644
index 0000000000000..61b5fbf0bc40c
--- /dev/null
+++ b/CommonTools/CandAlgos/src/ModifyObjectValueBase.cc
@@ -0,0 +1,4 @@
+#include "CommonTools/CandAlgos/interface/ModifyObjectValueBase.h"
+
+EDM_REGISTER_PLUGINFACTORY(ModifyObjectValueFactory,"ModifyObjectValueFactory");
+
diff --git a/CommonTools/Utils/interface/ExpressionEvaluator.h b/CommonTools/Utils/interface/ExpressionEvaluator.h
index 6b7260c4ef340..e8a1b7dc8f937 100644
--- a/CommonTools/Utils/interface/ExpressionEvaluator.h
+++ b/CommonTools/Utils/interface/ExpressionEvaluator.h
@@ -11,7 +11,7 @@ class ExpressionEvaluator {
ExpressionEvaluator(const char * pkg, const char * iname, const std::string & iexpr);
~ExpressionEvaluator();
- template< typename EXPR>
+ template
EXPR * expr() const {
typedef EXPR * factoryP();
return reinterpret_cast(m_expr)();
diff --git a/CommonTools/Utils/src/ExpressionEvaluator.cc b/CommonTools/Utils/src/ExpressionEvaluator.cc
index 6e75c3f9f743b..27f59e7412f54 100644
--- a/CommonTools/Utils/src/ExpressionEvaluator.cc
+++ b/CommonTools/Utils/src/ExpressionEvaluator.cc
@@ -10,7 +10,7 @@
#include
#include
-#define VI_DEBUG
+// #define VI_DEBUG
#ifdef VI_DEBUG
#include
@@ -40,7 +40,7 @@ namespace {
}
std::string patchArea() {
- auto n1 = execSysCommand("scram tool tag cmssw CMSSW_BASE");
+ auto n1 = execSysCommand("pushd $CMSSW_BASE > /dev/null;scram tool tag cmssw CMSSW_BASE; popd > /dev/null");
n1.pop_back();
COUT << "base area " << n1 << std::endl;
return n1[0]=='/' ? n1 : std::string();
@@ -89,7 +89,7 @@ ExpressionEvaluator::ExpressionEvaluator(const char * pkg, const char * iname, s
} else {
// look in release is a patch area
auto paDir = patchArea();
- if (paDir.empty()) throw cms::Exception("ExpressionEvaluator", pch + " file not found neither in " + baseDir + " nor in " + relDir);
+ if (paDir.empty()) throw cms::Exception("ExpressionEvaluator", "error in opening patch area for "+ baseDir);
std::string file = paDir + incDir + pch + ".cxxflags";
COUT << "file in base release area: " << file << std::endl;
std::ifstream ss(file.c_str());
diff --git a/Configuration/StandardSequences/python/EventInterpretation.py b/Configuration/StandardSequences/python/EventInterpretation.py
index 7dc85b6fbf3db..f0f79d35e5f73 100644
--- a/Configuration/StandardSequences/python/EventInterpretation.py
+++ b/Configuration/StandardSequences/python/EventInterpretation.py
@@ -1,3 +1,4 @@
EventInterpretation = {
- 'top' : 'CommonTools.ParticleFlow.EITopPAG_cff'
+ 'top' : 'CommonTools.ParticleFlow.EITopPAG_cff',
+ 'MiniAODfromMiniAOD' : 'PhysicsTools.PatAlgos.slimming.MiniAODfromMiniAOD_cff'
}
diff --git a/DataFormats/EgammaCandidates/interface/Photon.h b/DataFormats/EgammaCandidates/interface/Photon.h
index 7245e97c8bd7c..5e9c16458e1e1 100644
--- a/DataFormats/EgammaCandidates/interface/Photon.h
+++ b/DataFormats/EgammaCandidates/interface/Photon.h
@@ -164,6 +164,9 @@ namespace reco {
{}
} ;
+ const ShowerShape& showerShapeVariables() const { return showerShapeBlock_; }
+ const ShowerShape& full5x5_showerShapeVariables() const { return full5x5_showerShapeBlock_; }
+
void setShowerShapeVariables ( const ShowerShape& a ) { showerShapeBlock_ = a ;}
void full5x5_setShowerShapeVariables ( const ShowerShape& a ) { full5x5_showerShapeBlock_ = a ;}
diff --git a/DataFormats/FWLite/python/__init__.py b/DataFormats/FWLite/python/__init__.py
index abff1fc6fbd0a..35d18457f78cc 100644
--- a/DataFormats/FWLite/python/__init__.py
+++ b/DataFormats/FWLite/python/__init__.py
@@ -222,13 +222,18 @@ def getByLabel (self, *args):
# handle is always the last argument
argsList = list (args)
handle = argsList.pop()
- if len(argsList)==1 and \
- ( isinstance (argsList[0], tuple) or
- isinstance (argsList[0], list) ) :
- if len (argsList) > 3:
- raise RuntimeError, "getByLabel Error: label tuple has too " \
- "many arguments '%s'" % argsList[0]
- argsList = list(argsList[0])
+ if len(argsList)==1 :
+ if( isinstance (argsList[0], tuple) or
+ isinstance (argsList[0], list) ) :
+ if len (argsList[0]) > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0]
+ argsList = list(*argsList[0])
+ if( type(argsList[0]) is str and ":" in argsList[0] ):
+ if argsList[0].count(":") > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0].split(":")
+ argsList = argsList[0].split(":")
while len(argsList) < 3:
argsList.append ('')
(moduleLabel, productInstanceLabel, processLabel) = argsList
@@ -375,13 +380,18 @@ def getByLabel (self, *args):
# handle is always the last argument
argsList = list (args)
handle = argsList.pop()
- if len(argsList)==1 and \
- ( isinstance (argsList[0], tuple) or
- isinstance (argsList[0], list) ) :
- if len (argsList) > 3:
- raise RuntimeError, "getByLabel Error: label tuple has too " \
- "many arguments '%s'" % argsList[0]
- argsList = list(argsList[0])
+ if len(argsList)==1 :
+ if( isinstance (argsList[0], tuple) or
+ isinstance (argsList[0], list) ) :
+ if len (argsList[0]) > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0]
+ argsList = list(*argsList[0])
+ if( type(argsList[0]) is str and ":" in argsList[0] ):
+ if argsList[0].count(":") > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0].split(":")
+ argsList = argsList[0].split(":")
while len(argsList) < 3:
argsList.append ('')
(moduleLabel, productInstanceLabel, processLabel) = argsList
@@ -546,13 +556,18 @@ def getByLabel (self, *args):
# handle is always the last argument
argsList = list (args)
handle = argsList.pop()
- if len(argsList)==1 and \
- ( isinstance (argsList[0], tuple) or
- isinstance (argsList[0], list) ) :
- if len (argsList) > 3:
- raise RuntimeError, "getByLabel Error: label tuple has too " \
- "many arguments '%s'" % argsList[0]
- argsList = list(argsList[0])
+ if len(argsList)==1 :
+ if( isinstance (argsList[0], tuple) or
+ isinstance (argsList[0], list) ) :
+ if len (argsList[0]) > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0]
+ argsList = list(*argsList[0])
+ if( type(argsList[0]) is str and ":" in argsList[0] ):
+ if argsList[0].count(":") > 3:
+ raise RuntimeError, "getByLabel Error: label tuple has too " \
+ "many arguments '%s'" % argsList[0].split(":")
+ argsList = argsList[0].split(":")
while len(argsList) < 3:
argsList.append ('')
(moduleLabel, productInstanceLabel, processLabel) = argsList
diff --git a/DataFormats/PatCandidates/interface/VIDCutFlowResult.h b/DataFormats/PatCandidates/interface/VIDCutFlowResult.h
new file mode 100644
index 0000000000000..fbc4d61df4fbf
--- /dev/null
+++ b/DataFormats/PatCandidates/interface/VIDCutFlowResult.h
@@ -0,0 +1,112 @@
+#ifndef __DataFormats_PatCandidates_VIDResult_H__
+#define __DataFormats_PatCandidates_VIDResult_H__
+
+#include