diff --git a/interface/MEMClassifier.h b/interface/MEMClassifier.h index 4b2c5076c6ad3d0cfce7adaab35be52a7339a53f..883eec4a9a290d7900cb019192557d8e2e23ac52 100644 --- a/interface/MEMClassifier.h +++ b/interface/MEMClassifier.h @@ -41,7 +41,7 @@ public: // Hypothesis enum Hypothesis { - DEBUG, // Don't run the MEM. Print debug info + HYPO_DEBUG, // Don't run the MEM. Print debug info SL_0W2H2T, // Default SL MEM: Integrate over light jets SL_1W2H2T, // Default SL MEM: Integrate over light jets SL_2W2H2T, // Fully reconstructed hypothesis diff --git a/plugins/BuildFile.xml b/plugins/BuildFile.xml new file mode 100644 index 0000000000000000000000000000000000000000..ab2e0cb56bde98eb8ea7dcc4d0855ef6843e0fe0 --- /dev/null +++ b/plugins/BuildFile.xml @@ -0,0 +1,6 @@ +<use name="gsl"/> +<use name="FWCore/Framework"/> +<use name="FWCore/PluginManager"/> +<use name="FWCore/ParameterSet"/> +<use name="TTH/MEIntegratorStandalone"/> +<flags EDM_PLUGIN="1"/> diff --git a/plugins/TestAnalyzer.cc b/plugins/TestAnalyzer.cc new file mode 100644 index 0000000000000000000000000000000000000000..315b99a78d84f816726371e42a755b6ff33b8d11 --- /dev/null +++ b/plugins/TestAnalyzer.cc @@ -0,0 +1,107 @@ +// system include files +#include <memory> + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "TTH/CommonClassifier/interface/MEMClassifier.h" + +class TestAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> { + public: + explicit TestAnalyzer(const edm::ParameterSet&); + ~TestAnalyzer(); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + + + private: + virtual void beginJob() override; + virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + virtual void endJob() override; + + // ----------member data --------------------------- +}; + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +TestAnalyzer::TestAnalyzer(const edm::ParameterSet& iConfig) + +{ + //now do what ever initialization is needed + usesResource("TFileService"); + +} + + +TestAnalyzer::~TestAnalyzer() +{ + + // do anything here that needs to be done at desctruction time + // (e.g. close files, deallocate resources etc.) + +} + + +// +// member functions +// + +// ------------ method called for each event ------------ +void +TestAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + using namespace edm; + + + +#ifdef THIS_IS_AN_EVENT_EXAMPLE + Handle<ExampleData> pIn; + iEvent.getByLabel("example",pIn); +#endif + +#ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE + ESHandle<SetupData> pSetup; + iSetup.get<SetupRecord>().get(pSetup); +#endif +} + + +// ------------ method called once each job just before starting event loop ------------ +void +TestAnalyzer::beginJob() +{ +} + +// ------------ method called once each job just after ending the event loop ------------ +void +TestAnalyzer::endJob() +{ +} + +// ------------ method fills 'descriptions' with the allowed parameters for the module ------------ +void +TestAnalyzer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + //The following says we do not know what parameters are allowed so do no validation + // Please change this to state exactly what you do use, even if it is no parameters + edm::ParameterSetDescription desc; + desc.setUnknown(); + descriptions.addDefault(desc); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(TestAnalyzer); diff --git a/setup/install_mem.sh b/setup/install_mem.sh index 99daf95ebab8a9f31a475ad88f5509232fb0c2f2..650fddfdb6dc04a5810070a16b85ba9973ae6237 100644 --- a/setup/install_mem.sh +++ b/setup/install_mem.sh @@ -10,7 +10,7 @@ action() { cd src/TTH # get the MEM code - git clone https://gitlab.cern.ch/jpata/MEIntegratorStandalone.git MEIntegratorStandalone --branch master + git clone https://gitlab.cern.ch/jpata/MEIntegratorStandalone.git MEIntegratorStandalone --branch v0.4 # copy the OpenLoops ME libraries cp -R MEIntegratorStandalone/libs/* ../../lib/$SCRAM_ARCH/ diff --git a/src/MEMClassifier.cc b/src/MEMClassifier.cc index 17b02fce0fb6ffc0e64d5db01f152ab26d86cc5d..3656119f1345219814635fb21e64b047d4211012 100644 --- a/src/MEMClassifier.cc +++ b/src/MEMClassifier.cc @@ -22,7 +22,7 @@ void MEMClassifier::setup_mem( switch (hypo) { - case DEBUG: { + case HYPO_DEBUG: { break; }