From 0ea5dfd217629e89c69818289d133e6b8ffc2ed0 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 29 Mar 2022 15:04:58 +0200 Subject: [PATCH 1/3] Try to resolve compilation warnings in RecoParticleFlow/Configuration --- .../Configuration/plugins/HepMCCopy.cc | 6 ++-- .../Configuration/test/BlockAnalyzer.cc | 21 ++++++++------ .../Configuration/test/BuildFile.xml | 3 ++ .../Configuration/test/PFCandidateAnalyzer.cc | 12 +++----- .../Configuration/test/PFCandidateAnalyzer.h | 13 ++++----- .../test/PFChargedHadronAnalyzer.cc | 28 +++++++++++-------- .../test/PFChargedHadronAnalyzer.h | 16 +++++------ .../test/analyzePFChargedHadrons_cfg.py | 4 +++ 8 files changed, 56 insertions(+), 47 deletions(-) diff --git a/RecoParticleFlow/Configuration/plugins/HepMCCopy.cc b/RecoParticleFlow/Configuration/plugins/HepMCCopy.cc index 67002d326c2e7..64f4ad679dea6 100644 --- a/RecoParticleFlow/Configuration/plugins/HepMCCopy.cc +++ b/RecoParticleFlow/Configuration/plugins/HepMCCopy.cc @@ -1,14 +1,14 @@ -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/one/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" #include "HepMC/GenEvent.h" -class HepMCCopy : public edm::EDProducer { +class HepMCCopy : public edm::one::EDProducer<> { public: explicit HepMCCopy(edm::ParameterSet const& p); - ~HepMCCopy() override {} + ~HepMCCopy() override = default; void produce(edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc b/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc index 830da2fbb1360..d5c6034dd78e2 100644 --- a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc @@ -19,7 +19,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -66,15 +66,16 @@ using namespace edm; using namespace reco; using namespace std; -class BlockAnalyzer : public edm::EDAnalyzer { +class BlockAnalyzer : public edm::one::EDAnalyzer { public: explicit BlockAnalyzer(const edm::ParameterSet&); - ~BlockAnalyzer(); + ~BlockAnalyzer() override; private: - virtual void beginRun(const edm::Run& run, const edm::EventSetup& iSetup); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override; + void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override {} + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; double InvMass(const vector& par); ParameterSet conf_; @@ -112,13 +113,16 @@ BlockAnalyzer::BlockAnalyzer(const edm::ParameterSet& iConfig) pfblocks_(iConfig.getParameter("blockCollection")), trackCollection_(iConfig.getParameter("trackCollection")), primVtxLabel_(iConfig.getParameter("PrimaryVertexLabel")) { + usesResource(TFileService::kSharedResource); + //now do what ever initialization is needed outputfile_ = conf_.getParameter("OutputFile"); // here a simple tree can be saved - tf1 = new TFile(outputfile_.c_str(), "RECREATE"); - s = new TTree("s", " Tree Shared"); + edm::Service fs; +//tf1 = new TFile(outputfile_.c_str(), "RECREATE"); + s = fs->make("s", " Tree Shared"); s->Branch("pt", &pt_, "pt/F"); s->Branch("eta", &eta_, "eta/F"); s->Branch("phi", &phi_, "phi/F"); @@ -127,7 +131,6 @@ BlockAnalyzer::BlockAnalyzer(const edm::ParameterSet& iConfig) // here histograms can be saved - edm::Service fs; // histograms // h_myhisto = fs->make("h_myhisto"," ",10,0.,10.); diff --git a/RecoParticleFlow/Configuration/test/BuildFile.xml b/RecoParticleFlow/Configuration/test/BuildFile.xml index 08f58d426b80d..44740feb8e772 100644 --- a/RecoParticleFlow/Configuration/test/BuildFile.xml +++ b/RecoParticleFlow/Configuration/test/BuildFile.xml @@ -1,4 +1,5 @@ + @@ -9,6 +10,7 @@ + @@ -20,6 +22,7 @@ + diff --git a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc index e92d36fc03b48..8580c4cd34f09 100644 --- a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc @@ -12,8 +12,9 @@ using namespace std; using namespace edm; using namespace reco; -PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) { - inputTagPFCandidates_ = iConfig.getParameter("PFCandidates"); +PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) : + inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), + tokenPFCandidates_(consumes(inputTagPFCandidates_)) { verbose_ = iConfig.getUntrackedParameter("verbose", false); @@ -24,17 +25,12 @@ PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) { LogDebug("PFCandidateAnalyzer") << " input collection : " << inputTagPFCandidates_; } -PFCandidateAnalyzer::~PFCandidateAnalyzer() {} - -void PFCandidateAnalyzer::beginRun(const edm::Run& run, const edm::EventSetup& es) {} - void PFCandidateAnalyzer::analyze(const Event& iEvent, const EventSetup& iSetup) { LogDebug("PFCandidateAnalyzer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl; // get PFCandidates - Handle pfCandidates; - iEvent.getByLabel(inputTagPFCandidates_, pfCandidates); + const edm::Handle& pfCandidates = iEvent.getHandle(tokenPFCandidates_); reco::PFCandidateCollection newcol; diff --git a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h index e79c267167662..9b91d09601392 100644 --- a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h +++ b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h @@ -8,7 +8,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" @@ -24,21 +24,20 @@ \date february 2008 */ -class PFCandidateAnalyzer : public edm::EDAnalyzer { +class PFCandidateAnalyzer : public edm::one::EDAnalyzer<> { public: explicit PFCandidateAnalyzer(const edm::ParameterSet&); - ~PFCandidateAnalyzer(); + ~PFCandidateAnalyzer() override = default; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - - virtual void beginRun(const edm::Run& r, const edm::EventSetup& c); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: void printElementsInBlocks(const reco::PFCandidate& cand, std::ostream& out = std::cout) const; /// PFCandidates in which we'll look for pile up particles - edm::InputTag inputTagPFCandidates_; + const edm::InputTag inputTagPFCandidates_; + const edm::EDGetTokenT tokenPFCandidates_; /// verbose ? bool verbose_; diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc index 5f95dab12da2c..0b00b46fae6e2 100644 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc @@ -5,22 +5,26 @@ #include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h" #include "FWCore/Framework/interface/ESHandle.h" - +#include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/Utilities/interface/Exception.h" -#include "FWCore/Framework/interface/EventSetup.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" using namespace std; using namespace edm; using namespace reco; -PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfig) { +PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfig) : + inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), + inputTagPFSimParticles_(iConfig.getParameter("PFSimParticles")), + tokenPFCandidates_(consumes(inputTagPFCandidates_)), + tokenPFSimParticles_(consumes(inputTagPFSimParticles_)) { + usesResource(TFileService::kSharedResource); + nCh = std::vector(10, static_cast(0)); nEv = std::vector(2, static_cast(0)); - inputTagPFCandidates_ = iConfig.getParameter("PFCandidates"); - - inputTagPFSimParticles_ = iConfig.getParameter("PFSimParticles"); // Smallest track pt ptMin_ = iConfig.getParameter("ptMin"); @@ -46,9 +50,10 @@ PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfi LogDebug("PFChargedHadronAnalyzer") << " input collection : " << inputTagPFCandidates_; // The root tuple - outputfile_ = iConfig.getParameter("rootOutputFile"); - tf1 = new TFile(outputfile_.c_str(), "RECREATE"); - s = new TTree("s", " PFCalibration"); + //outputfile_ = iConfig.getParameter("rootOutputFile"); + //tf1 = new TFile(outputfile_.c_str(), "RECREATE"); + edm::Service fs; + s = fs->make("s", " PFCalibration"); s->Branch("true", &true_, "true/F"); s->Branch("p", &p_, "p/F"); @@ -71,15 +76,14 @@ PFChargedHadronAnalyzer::~PFChargedHadronAnalyzer() { std::cout << " - With at least " << nPixMin_ << " pixel hits ....... " << nCh[6] << std::endl; std::cout << " - With more than " << nHitMin_[0] << " track hits ..... " << nCh[7] << std::endl; std::cout << " - With E_ECAL < " << ecalMax_ << " GeV ............ " << nCh[8] << std::endl; - + /* tf1->cd(); s->Write(); tf1->Write(); tf1->Close(); + */ } -void PFChargedHadronAnalyzer::beginRun(const edm::Run& run, const edm::EventSetup& es) {} - void PFChargedHadronAnalyzer::analyze(const Event& iEvent, const EventSetup& iSetup) { LogDebug("PFChargedHadronAnalyzer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl; diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h index 30cd354973f07..9b228b88b2df5 100644 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h +++ b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h @@ -8,7 +8,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" @@ -30,22 +30,22 @@ \date September 13, 2010 */ -class PFChargedHadronAnalyzer : public edm::EDAnalyzer { +class PFChargedHadronAnalyzer : public edm::one::EDAnalyzer { public: typedef reco::PFCandidateCollection::const_iterator CI; explicit PFChargedHadronAnalyzer(const edm::ParameterSet&); - ~PFChargedHadronAnalyzer(); + ~PFChargedHadronAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - - virtual void beginRun(const edm::Run& r, const edm::EventSetup& c); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: /// PFCandidates in which we'll look for pile up particles - edm::InputTag inputTagPFCandidates_; - edm::InputTag inputTagPFSimParticles_; + const edm::InputTag inputTagPFCandidates_; + const edm::InputTag inputTagPFSimParticles_; + const edm::EDGetTokenT tokenPFCandidates_; + const edm::EDGetTokenT tokenPFSimParticles_; /// Min pt for charged hadrons double ptMin_; diff --git a/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py b/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py index 53b8af952d1aa..fc44ebd8bfe9c 100644 --- a/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py +++ b/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py @@ -39,6 +39,10 @@ ) #process.outpath = cms.EndPath(process.aod ) +process.TFileService = cms.Service( + "TFileService", + fileName=cms.string('output.root') + ) process.p = cms.Path(process.pfChargedHadronAnalyzer) From 80721156f65ab640009b727384b274b241b35454 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Tue, 29 Mar 2022 15:21:54 +0200 Subject: [PATCH 2/3] Code check --- RecoParticleFlow/Configuration/test/BlockAnalyzer.cc | 3 +-- .../Configuration/test/PFCandidateAnalyzer.cc | 7 +++---- .../Configuration/test/PFChargedHadronAnalyzer.cc | 11 +++++------ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc b/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc index d5c6034dd78e2..049453c6c5921 100644 --- a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc @@ -121,7 +121,7 @@ BlockAnalyzer::BlockAnalyzer(const edm::ParameterSet& iConfig) // here a simple tree can be saved edm::Service fs; -//tf1 = new TFile(outputfile_.c_str(), "RECREATE"); + //tf1 = new TFile(outputfile_.c_str(), "RECREATE"); s = fs->make("s", " Tree Shared"); s->Branch("pt", &pt_, "pt/F"); s->Branch("eta", &eta_, "eta/F"); @@ -131,7 +131,6 @@ BlockAnalyzer::BlockAnalyzer(const edm::ParameterSet& iConfig) // here histograms can be saved - // histograms // h_myhisto = fs->make("h_myhisto"," ",10,0.,10.); } diff --git a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc index 8580c4cd34f09..2006a3d7e0d8a 100644 --- a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc @@ -12,10 +12,9 @@ using namespace std; using namespace edm; using namespace reco; -PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) : - inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), - tokenPFCandidates_(consumes(inputTagPFCandidates_)) { - +PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) + : inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), + tokenPFCandidates_(consumes(inputTagPFCandidates_)) { verbose_ = iConfig.getUntrackedParameter("verbose", false); printBlocks_ = iConfig.getUntrackedParameter("printBlocks", false); diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc index 0b00b46fae6e2..1a25b71108833 100644 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc +++ b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc @@ -15,17 +15,16 @@ using namespace std; using namespace edm; using namespace reco; -PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfig) : - inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), - inputTagPFSimParticles_(iConfig.getParameter("PFSimParticles")), - tokenPFCandidates_(consumes(inputTagPFCandidates_)), - tokenPFSimParticles_(consumes(inputTagPFSimParticles_)) { +PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfig) + : inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), + inputTagPFSimParticles_(iConfig.getParameter("PFSimParticles")), + tokenPFCandidates_(consumes(inputTagPFCandidates_)), + tokenPFSimParticles_(consumes(inputTagPFSimParticles_)) { usesResource(TFileService::kSharedResource); nCh = std::vector(10, static_cast(0)); nEv = std::vector(2, static_cast(0)); - // Smallest track pt ptMin_ = iConfig.getParameter("ptMin"); From d8dbca7b8ef7cc7c690a1c9b36ef585f01dea236 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Mon, 18 Apr 2022 15:44:37 +0200 Subject: [PATCH 3/3] Remove the unused files --- .../python/pfBlockAnalyzer_cff.py | 2 - .../python/pfBlockAnalyzer_cfi.py | 8 - .../Configuration/test/BlockAnalyzer.cc | 241 -------------- .../Configuration/test/BuildFile.xml | 33 -- .../Configuration/test/K0L_cfg.py | 312 ------------------ .../Configuration/test/PFCandidateAnalyzer.cc | 81 ----- .../Configuration/test/PFCandidateAnalyzer.h | 54 --- .../test/PFChargedHadronAnalyzer.cc | 277 ---------------- .../test/PFChargedHadronAnalyzer.h | 83 ----- .../Configuration/test/PiMinus_cfg.py | 312 ------------------ .../Configuration/test/PiPlus_cfg.py | 312 ------------------ .../test/analyzePFCandidates_cfg.py | 39 --- .../test/analyzePFChargedHadrons_cfg.py | 50 --- 13 files changed, 1804 deletions(-) delete mode 100644 RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cff.py delete mode 100644 RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cfi.py delete mode 100644 RecoParticleFlow/Configuration/test/BlockAnalyzer.cc delete mode 100644 RecoParticleFlow/Configuration/test/BuildFile.xml delete mode 100644 RecoParticleFlow/Configuration/test/K0L_cfg.py delete mode 100644 RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc delete mode 100644 RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h delete mode 100644 RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc delete mode 100644 RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h delete mode 100644 RecoParticleFlow/Configuration/test/PiMinus_cfg.py delete mode 100644 RecoParticleFlow/Configuration/test/PiPlus_cfg.py delete mode 100644 RecoParticleFlow/Configuration/test/analyzePFCandidates_cfg.py delete mode 100644 RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py diff --git a/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cff.py b/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cff.py deleted file mode 100644 index 71e6ff4f1584c..0000000000000 --- a/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cff.py +++ /dev/null @@ -1,2 +0,0 @@ -import FWCore.ParameterSet.Config as cms -from RecoParticleFlow.Configuration.pfBlockAnalyzer_cfi import * diff --git a/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cfi.py b/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cfi.py deleted file mode 100644 index d060a6d8bebcf..0000000000000 --- a/RecoParticleFlow/Configuration/python/pfBlockAnalyzer_cfi.py +++ /dev/null @@ -1,8 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -pfBlockAnalyzer = cms.EDAnalyzer("BlockAnalyzer", - blockCollection = cms.InputTag("particleFlowBlock"), - trackCollection = cms.InputTag("generalTracks"), - PrimaryVertexLabel = cms.InputTag("offlinePrimaryVertices"), - OutputFile = cms.string('dummy.root') - ) diff --git a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc b/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc deleted file mode 100644 index 049453c6c5921..0000000000000 --- a/RecoParticleFlow/Configuration/test/BlockAnalyzer.cc +++ /dev/null @@ -1,241 +0,0 @@ -// -*- C++ -*- -// -// Package: BlockAnalyzer -// Class: BlockAnalyzer -// -/**\class ElectronAnalyzer - - Description: - - Implementation: - -*/ -// -// Original Author: Daniele Benedetti - -// system include files -#include - -// 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 "FWCore/ServiceRegistry/interface/Service.h" -#include "CommonTools/UtilAlgos/interface/TFileService.h" -#include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrack.h" -#include "DataFormats/ParticleFlowReco/interface/GsfPFRecTrackFwd.h" -#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" -#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" -#include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h" -#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" -#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" -#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" -#include "DataFormats/Common/interface/ValueMap.h" -#include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" -#include "RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h" -#include "TrackingTools/Records/interface/TransientTrackRecord.h" -#include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockFwd.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlock.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockElementGsfTrack.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperCluster.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockElementBrem.h" -#include "DataFormats/ParticleFlowReco/interface/PFCluster.h" - -#include -#include -#include -#include -#include -#include -#include - -// -// class decleration -// - -using namespace edm; -using namespace reco; -using namespace std; -class BlockAnalyzer : public edm::one::EDAnalyzer { -public: - explicit BlockAnalyzer(const edm::ParameterSet&); - ~BlockAnalyzer() override; - -private: - void beginRun(const edm::Run& run, const edm::EventSetup& iSetup) override; - void endRun(const edm::Run& run, const edm::EventSetup& iSetup) override {} - void analyze(const edm::Event&, const edm::EventSetup&) override; - void endJob() override; - double InvMass(const vector& par); - - ParameterSet conf_; - - std::string outputfile_; - - TFile* tf1; - TTree* s; - - //TTree - float pt_, eta_, phi_; - - unsigned int ev; - bool debug_; - - // ----------member data --------------------------- - - edm::InputTag pfblocks_; - edm::InputTag trackCollection_; - edm::InputTag primVtxLabel_; -}; - -//, enums and typedefs -// - -// -// static data member definitions -// - -// -// constructors and destructor -// -BlockAnalyzer::BlockAnalyzer(const edm::ParameterSet& iConfig) - : conf_(iConfig), - pfblocks_(iConfig.getParameter("blockCollection")), - trackCollection_(iConfig.getParameter("trackCollection")), - primVtxLabel_(iConfig.getParameter("PrimaryVertexLabel")) { - usesResource(TFileService::kSharedResource); - - //now do what ever initialization is needed - outputfile_ = conf_.getParameter("OutputFile"); - - // here a simple tree can be saved - - edm::Service fs; - //tf1 = new TFile(outputfile_.c_str(), "RECREATE"); - s = fs->make("s", " Tree Shared"); - s->Branch("pt", &pt_, "pt/F"); - s->Branch("eta", &eta_, "eta/F"); - s->Branch("phi", &phi_, "phi/F"); - - // s->Branch("",&_,"/F"); - - // here histograms can be saved - - // histograms - // h_myhisto = fs->make("h_myhisto"," ",10,0.,10.); -} - -BlockAnalyzer::~BlockAnalyzer() { - // do anything here that needs to be done at desctruction time - // (e.g. close files, deallocate resources etc.) -} - -// -// member functions -// - -// ------------ method called to for each event ------------ -void BlockAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { - ev++; - // Just examples - // the track collection - // Handle theTracks; - //Primary Vertexes - // Handle thePrimaryVertexColl; - // PFBlocks - Handle thePFBlockCollection; - - // iEvent.getByLabel( trackCollection_, theTracks ); - // iEvent.getByLabel(primVtxLabel_,thePrimaryVertexColl); - iEvent.getByLabel(pfblocks_, thePFBlockCollection); - - vector theBlocks = *(thePFBlockCollection.product()); - - if (theBlocks.size() > 0) { - // loop over the pfblocks (for each event you have > 1 blocks) - for (PFBlockCollection::const_iterator iBlock = theBlocks.begin(); iBlock != theBlocks.end(); iBlock++) { - PFBlock::LinkData linkData = iBlock->linkData(); - const edm::OwnVector& elements = iBlock->elements(); - - // loop over the pfblock elements - for (unsigned int iEle = 0; iEle < elements.size(); iEle++) { - PFBlockElement::Type type = elements[iEle].type(); - // example access the element tracks: - if (type == reco::PFBlockElement::SC) { - cout << " Found a SuperCluster. Energy "; - const reco::PFBlockElementSuperCluster* sc = - dynamic_cast(&elements[iEle]); - std::cout << sc->superClusterRef()->energy() << " Track/Ecal/Hcal Iso " << sc->trackIso() << " " - << sc->ecalIso(); - std::cout << " " << sc->hcalIso() << std::endl; - // find the linked ECAL clusters - std::multimap ecalAssoPFClusters; - iBlock->associatedElements( - iEle, linkData, ecalAssoPFClusters, reco::PFBlockElement::ECAL, reco::PFBlock::LINKTEST_ALL); - - // loop over the ECAL clusters linked to the iEle - if (ecalAssoPFClusters.size() > 0) { - // this just to get the first element (the closest) - // unsigned int ecalTrack_index = ecalAssoPFClusters.begin()->second; - - // otherwise is possible to loop over all the elements associated - - for (std::multimap::iterator itecal = ecalAssoPFClusters.begin(); - itecal != ecalAssoPFClusters.end(); - ++itecal) { - // to get the reference to the PF clusters, this is needed. - reco::PFClusterRef clusterRef = elements[itecal->second].clusterRef(); - - // from the clusterRef get the energy, direction, etc - float ClustRawEnergy = clusterRef->energy(); - float ClustEta = clusterRef->position().eta(); - float ClustPhi = clusterRef->position().phi(); - - cout << " My cluster index " << itecal->second << " energy " << ClustRawEnergy << " eta " << ClustEta - << " phi " << ClustPhi << endl; - - // now retrieve the tracks associated to the PFClusters - std::multimap associatedTracks; - iBlock->associatedElements( - itecal->second, linkData, associatedTracks, reco::PFBlockElement::TRACK, reco::PFBlock::LINKTEST_ALL); - if (associatedTracks.size() > 0) { - for (std::multimap::iterator ittrack = associatedTracks.begin(); - ittrack != associatedTracks.end(); - ++ittrack) { - cout << " Found a track. Eenergy "; - // no need to dynamic_cast, the trackRef() methods exists for all PFBlockElements - std::cout << elements[ittrack->second].trackRef()->p() << std::endl; - - } // loop on elements - } // associated tracks - } // loop on ECAL PF Clusters - } // there are ECAL PF Clusters - } // there is a SuperCluster - } // loop on the PFBlock Elements - } // loop on the blocks - } // there are blocks -} - -// ------------ method called once each job just before starting event loop ------------ -void BlockAnalyzer::beginRun(const edm::Run& run, const edm::EventSetup& iSetup) { ev = 0; } - -// ------------ method called once each job just after ending the event loop ------------ -void BlockAnalyzer::endJob() { - tf1->cd(); - s->Write(); - tf1->Write(); - tf1->Close(); - cout << " endJob:: #events " << ev << endl; -} -//define this as a plug-in -DEFINE_FWK_MODULE(BlockAnalyzer); diff --git a/RecoParticleFlow/Configuration/test/BuildFile.xml b/RecoParticleFlow/Configuration/test/BuildFile.xml deleted file mode 100644 index 44740feb8e772..0000000000000 --- a/RecoParticleFlow/Configuration/test/BuildFile.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/RecoParticleFlow/Configuration/test/K0L_cfg.py b/RecoParticleFlow/Configuration/test/K0L_cfg.py deleted file mode 100644 index 172c19589aca4..0000000000000 --- a/RecoParticleFlow/Configuration/test/K0L_cfg.py +++ /dev/null @@ -1,312 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("REPROD") -process.load("Configuration.StandardSequences.Reconstruction_cff") -process.load("Configuration.StandardSequences.MagneticField_38T_cff") -#process.load("Configuration.StandardSequences.MagneticField_4T_cff") -process.load("Configuration.StandardSequences.Geometry_cff") -process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') -from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = autoCond['startup'] - -#process.Timing =cms.Service("Timing") -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) -) - -process.source = cms.Source( - "PoolSource", - fileNames = cms.untracked.vstring( - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_1.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_2.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_3.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_4.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_5.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_6.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_7.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_8.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_9.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_10.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_11.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_12.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_13.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_14.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_15.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_16.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_17.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_18.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_19.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_20.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_21.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_22.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_23.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_24.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_25.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_26.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_27.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_28.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_29.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_30.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_41.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_42.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_43.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_44.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_45.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_46.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_47.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_48.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_49.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_50.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_51.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_52.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_53.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_54.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_55.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_56.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_57.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_58.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_59.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_60.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_61.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_62.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_63.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_64.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_65.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_66.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_67.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_68.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_69.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_70.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_71.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_72.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_73.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_74.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_75.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_76.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_77.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_78.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_79.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_80.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_81.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_82.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_83.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_84.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_85.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_86.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_87.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_88.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_89.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_90.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_91.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_92.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_93.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_94.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_95.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_96.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_97.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_98.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_99.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_100.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_101.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_102.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_103.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_104.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_105.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_106.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_107.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_108.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_109.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_110.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_111.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_112.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_113.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_114.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_115.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_116.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_117.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_118.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_119.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_120.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_121.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_122.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_123.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_124.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_125.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_126.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_127.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_128.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_129.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_130.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_141.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_142.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_143.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_144.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_145.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_146.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_147.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_148.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_149.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_150.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_151.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_152.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_153.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_154.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_155.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_156.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_157.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_158.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_159.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_160.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_161.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_162.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_163.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_164.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_165.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_166.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_167.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_168.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_169.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_170.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_171.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_172.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_173.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_174.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_175.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_176.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_177.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_178.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_179.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_180.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_181.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_182.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_183.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_184.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_185.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_186.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_187.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_188.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_189.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_190.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_191.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_192.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_193.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_194.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_195.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_196.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_197.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_198.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_199.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/K0L/k0l_200.root", - ), - eventsToProcess = cms.untracked.VEventRange(), - #eventsToProcess = cms.untracked.VEventRange('1:1217421-1:1217421'), - # '1:1220344-1:1220344', - # '1:1655912-1:1655912', - # '1:415027-1:415027', - # '1:460640-1:460640', - # '1:2054772-1:2054772'), - secondaryFileNames = cms.untracked.vstring(), - noEventSort = cms.untracked.bool(True), - duplicateCheckMode = cms.untracked.string('noDuplicateCheck') -) - -process.pfChargedHadronAnalyzer = cms.EDAnalyzer( - "PFChargedHadronAnalyzer", - PFCandidates = cms.InputTag("particleFlow"), - PFSimParticles = cms.InputTag("particleFlowSimParticle"), - ptMin = cms.double(1.), # Minimum pt - pMin = cms.double(3.), # Minimum p - nPixMin = cms.int32(2), # Nb of pixel hits - nHitMin = cms.vint32(14,17,20,17,10), # Nb of track hits - nEtaMin = cms.vdouble(1.4,1.6,2.0,2.4,2.6), # in these eta ranges - hcalMin = cms.double(1.), # Minimum hcal energy - ecalMax = cms.double(1E9), # Maximum ecal energy - verbose = cms.untracked.bool(True), # not used. - rootOutputFile = cms.string("pfcalib_k0L.root"),# the root tree -) - -#from RecoParticleFlow.Configuration.reco_QCDForPF_cff import fileNames -#process.source.fileNames = fileNames - -process.dump = cms.EDAnalyzer("EventContentAnalyzer") - - -process.load("RecoParticleFlow.Configuration.ReDisplay_EventContent_NoTracking_cff") -process.display = cms.OutputModule("PoolOutputModule", - process.DisplayEventContent, - #outputCommands = cms.untracked.vstring('keep *'), - #process.RECOSIMEventContent, - fileName = cms.untracked.string('piplus_1.root'), - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('p')) -) - -# modify reconstruction sequence -#process.hbhereflag = process.hbhereco.clone() -#process.hbhereflag.hbheInput = 'hbhereco' -#process.towerMakerPF.hbheInput = 'hbhereflag' -#process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbhereflag") - -# Local re-reco: Produce tracker rechits, pf rechits and pf clusters -process.localReReco = cms.Sequence(process.particleFlowCluster) - - -# Particle Flow re-processing -process.pfReReco = cms.Sequence(process.particleFlowReco+ - process.recoPFJets+ - process.recoPFMET+ - process.PFTau) - -# Gen Info re-processing -process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi") -process.load("RecoJets.Configuration.GenJetParticles_cff") -process.load("RecoJets.Configuration.RecoGenJets_cff") -process.load("RecoMET.Configuration.GenMETParticles_cff") -process.load("RecoMET.Configuration.RecoGenMET_cff") -process.load("RecoParticleFlow.PFProducer.particleFlowSimParticle_cff") -process.load("RecoParticleFlow.Configuration.HepMCCopy_cfi") -process.genReReco = cms.Sequence(process.generator+ - process.genParticles+ - process.genJetParticles+ - process.recoGenJets+ - process.genMETParticles+ - process.recoGenMET+ - process.particleFlowSimParticle) - -# The complete reprocessing -process.p = cms.Path(#process.localReReco+ - #process.pfReReco+ - process.genReReco+ - process.pfChargedHadronAnalyzer - ) - -# And the output. -#process.outpath = cms.EndPath(process.display) - -# And the logger -process.load("FWCore.MessageLogger.MessageLogger_cfi") -process.options = cms.untracked.PSet( - makeTriggerResults = cms.untracked.bool(True), - wantSummary = cms.untracked.bool(True), - Rethrow = cms.untracked.vstring('Unknown', - 'ProductNotFound', - 'DictionaryNotFound', - 'InsertFailure', - 'Configuration', - 'LogicError', - 'UnimplementedFeature', - 'InvalidReference', - 'NullPointerError', - 'NoProductSpecified', - 'EventTimeout', - 'EventCorruption', - 'ModuleFailure', - 'ScheduleExecutionFailure', - 'EventProcessorFailure', - 'FileInPathError', - 'FatalRootError', - 'NotFound') -) - -process.MessageLogger.cerr.FwkReport.reportEvery = 1000 - - diff --git a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc deleted file mode 100644 index 2006a3d7e0d8a..0000000000000 --- a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.cc +++ /dev/null @@ -1,81 +0,0 @@ -#include "RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlock.h" - -#include "FWCore/Framework/interface/ESHandle.h" - -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/Utilities/interface/Exception.h" -#include "FWCore/Framework/interface/EventSetup.h" - -using namespace std; -using namespace edm; -using namespace reco; - -PFCandidateAnalyzer::PFCandidateAnalyzer(const edm::ParameterSet& iConfig) - : inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), - tokenPFCandidates_(consumes(inputTagPFCandidates_)) { - verbose_ = iConfig.getUntrackedParameter("verbose", false); - - printBlocks_ = iConfig.getUntrackedParameter("printBlocks", false); - - rankByPt_ = iConfig.getUntrackedParameter("rankByPt", false); - - LogDebug("PFCandidateAnalyzer") << " input collection : " << inputTagPFCandidates_; -} - -void PFCandidateAnalyzer::analyze(const Event& iEvent, const EventSetup& iSetup) { - LogDebug("PFCandidateAnalyzer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl; - - // get PFCandidates - - const edm::Handle& pfCandidates = iEvent.getHandle(tokenPFCandidates_); - - reco::PFCandidateCollection newcol; - - // to sort, one needs to copy - if (rankByPt_) { - newcol = *pfCandidates; - sort(newcol.begin(), newcol.end(), greaterPt); - } - - for (unsigned i = 0; i < pfCandidates->size(); i++) { - const reco::PFCandidate& cand = (rankByPt_) ? newcol[i] : (*pfCandidates)[i]; - - if (verbose_) { - cout << cand << endl; - if (printBlocks_) - printElementsInBlocks(cand); - } - } - - LogDebug("PFCandidateAnalyzer") << "STOP event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl; -} - -void PFCandidateAnalyzer::printElementsInBlocks(const PFCandidate& cand, ostream& out) const { - if (!out) - return; - - PFBlockRef firstRef; - - assert(!cand.elementsInBlocks().empty()); - for (unsigned i = 0; i < cand.elementsInBlocks().size(); i++) { - PFBlockRef blockRef = cand.elementsInBlocks()[i].first; - - if (blockRef.isNull()) { - cerr << "ERROR! no block ref!"; - continue; - } - - if (!i) { - out << (*blockRef); - firstRef = blockRef; - } else if (blockRef != firstRef) { - cerr << "WARNING! This PFCandidate is not made from a single block" << endl; - } - - out << "\t" << cand.elementsInBlocks()[i].second << endl; - } -} - -DEFINE_FWK_MODULE(PFCandidateAnalyzer); diff --git a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h b/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h deleted file mode 100644 index 9b91d09601392..0000000000000 --- a/RecoParticleFlow/Configuration/test/PFCandidateAnalyzer.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef RecoParticleFlow_PFPatProducer_PFCandidateAnalyzer_ -#define RecoParticleFlow_PFPatProducer_PFCandidateAnalyzer_ - -// system include files -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/one/EDAnalyzer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" - -/**\class PFCandidateAnalyzer -\brief produces IsolatedPFCandidates from PFCandidates - -\author Colin Bernet -\date february 2008 -*/ - -class PFCandidateAnalyzer : public edm::one::EDAnalyzer<> { -public: - explicit PFCandidateAnalyzer(const edm::ParameterSet&); - - ~PFCandidateAnalyzer() override = default; - - void analyze(const edm::Event&, const edm::EventSetup&) override; - -private: - void printElementsInBlocks(const reco::PFCandidate& cand, std::ostream& out = std::cout) const; - - /// PFCandidates in which we'll look for pile up particles - const edm::InputTag inputTagPFCandidates_; - const edm::EDGetTokenT tokenPFCandidates_; - - /// verbose ? - bool verbose_; - - /// print the blocks associated to a given candidate ? - bool printBlocks_; - - /// rank the candidates by Pt - bool rankByPt_; - - static bool greaterPt(const reco::PFCandidate& a, const reco::PFCandidate& b) { return (a.pt() > b.pt()); } -}; - -#endif diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc deleted file mode 100644 index 1a25b71108833..0000000000000 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.cc +++ /dev/null @@ -1,277 +0,0 @@ -#include "RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h" -#include "RecoParticleFlow/PFTracking/interface/PFTrackAlgoTools.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlock.h" -#include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h" - -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "FWCore/Utilities/interface/Exception.h" -#include "CommonTools/UtilAlgos/interface/TFileService.h" - -using namespace std; -using namespace edm; -using namespace reco; - -PFChargedHadronAnalyzer::PFChargedHadronAnalyzer(const edm::ParameterSet& iConfig) - : inputTagPFCandidates_(iConfig.getParameter("PFCandidates")), - inputTagPFSimParticles_(iConfig.getParameter("PFSimParticles")), - tokenPFCandidates_(consumes(inputTagPFCandidates_)), - tokenPFSimParticles_(consumes(inputTagPFSimParticles_)) { - usesResource(TFileService::kSharedResource); - - nCh = std::vector(10, static_cast(0)); - nEv = std::vector(2, static_cast(0)); - - // Smallest track pt - ptMin_ = iConfig.getParameter("ptMin"); - - // Smallest track p - pMin_ = iConfig.getParameter("pMin"); - - // Smallest raw HCAL energy linked to the track - hcalMin_ = iConfig.getParameter("hcalMin"); - - // Largest ECAL energy linked to the track to define a MIP - ecalMax_ = iConfig.getParameter("ecalMax"); - - // Smallest number of pixel hits - nPixMin_ = iConfig.getParameter("nPixMin"); - - // Smallest number of track hits in different eta ranges - nHitMin_ = iConfig.getParameter >("nHitMin"); - nEtaMin_ = iConfig.getParameter >("nEtaMin"); - - verbose_ = iConfig.getUntrackedParameter("verbose", false); - - LogDebug("PFChargedHadronAnalyzer") << " input collection : " << inputTagPFCandidates_; - - // The root tuple - //outputfile_ = iConfig.getParameter("rootOutputFile"); - //tf1 = new TFile(outputfile_.c_str(), "RECREATE"); - edm::Service fs; - s = fs->make("s", " PFCalibration"); - - s->Branch("true", &true_, "true/F"); - s->Branch("p", &p_, "p/F"); - s->Branch("ecal", &ecal_, "ecal/F"); - s->Branch("hcal", &hcal_, "hcal/F"); - s->Branch("eta", &eta_, "eta/F"); - s->Branch("phi", &phi_, "phi/F"); -} - -PFChargedHadronAnalyzer::~PFChargedHadronAnalyzer() { - std::cout << "Total number of events .............. " << nEv[0] << std::endl; - std::cout << "Number of events with 1 Sim Particle " << nEv[1] << std::endl; - - std::cout << "Number of PF candidates ............. " << nCh[0] << std::endl; - std::cout << "Number of PF Charged Hadrons......... " << nCh[1] << std::endl; - std::cout << " - With pt > " << ptMin_ << " GeV/c ................ " << nCh[2] << std::endl; - std::cout << " - With E_HCAL > " << hcalMin_ << " GeV .............. " << nCh[3] << std::endl; - std::cout << " - With only 1 track in the block ... " << nCh[4] << std::endl; - std::cout << " - With p > " << pMin_ << " GeV/c ................. " << nCh[5] << std::endl; - std::cout << " - With at least " << nPixMin_ << " pixel hits ....... " << nCh[6] << std::endl; - std::cout << " - With more than " << nHitMin_[0] << " track hits ..... " << nCh[7] << std::endl; - std::cout << " - With E_ECAL < " << ecalMax_ << " GeV ............ " << nCh[8] << std::endl; - /* - tf1->cd(); - s->Write(); - tf1->Write(); - tf1->Close(); - */ -} - -void PFChargedHadronAnalyzer::analyze(const Event& iEvent, const EventSetup& iSetup) { - LogDebug("PFChargedHadronAnalyzer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run() - << endl; - - // get PFCandidates - Handle pfCandidates; - iEvent.getByLabel(inputTagPFCandidates_, pfCandidates); - - Handle trueParticles; - bool isSimu = iEvent.getByLabel(inputTagPFSimParticles_, trueParticles); - - if (isSimu) { - nEv[0]++; - if ((*trueParticles).size() != 1) - return; - nEv[1]++; - - // Check if there is a reconstructed track - bool isCharged = false; - for (CI ci = pfCandidates->begin(); ci != pfCandidates->end(); ++ci) { - const reco::PFCandidate& pfc = *ci; - // std::cout << "Id = " << pfc.particleId() << std::endl; - if (pfc.particleId() < 4) { - isCharged = true; - break; - } - } - //std::cout << "isCharged ? " << isCharged << std::endl; - - // Case of no reconstructed tracks (and neutral single particles) - if (!isCharged || fabs((*trueParticles)[0].charge()) < 1E-10) { - reco::PFTrajectoryPoint::LayerType ecalEntrance = reco::PFTrajectoryPoint::ECALEntrance; - const reco::PFTrajectoryPoint& tpatecal = ((*trueParticles)[0]).extrapolatedPoint(ecalEntrance); - eta_ = tpatecal.positionREP().Eta(); - if (fabs(eta_) < 1E-10) - return; - phi_ = tpatecal.positionREP().Phi(); - true_ = std::sqrt(tpatecal.momentum().Vect().Mag2()); - p_ = 0.; - - ecal_ = 0.; - hcal_ = 0.; - for (CI ci = pfCandidates->begin(); ci != pfCandidates->end(); ++ci) { - const reco::PFCandidate& pfc = *ci; - double deta = eta_ - pfc.eta(); - double dphi = phi_ - pfc.phi(); - double dR = std::sqrt(deta * deta + dphi * dphi); - if (pfc.particleId() == 4 && dR < 0.04) - ecal_ += pfc.rawEcalEnergy(); - if (pfc.particleId() == 5 && dR < 0.2) - hcal_ += pfc.rawHcalEnergy(); - } - - s->Fill(); - - return; - } - } - - // Case of a reconstructed track. - // Loop on pfCandidates - for (CI ci = pfCandidates->begin(); ci != pfCandidates->end(); ++ci) { - // The pf candidate - const reco::PFCandidate& pfc = *ci; - nCh[0]++; - - // Only charged hadrons (no PF muons, no PF electrons) - if (pfc.particleId() != 1) - continue; - nCh[1]++; - - // Charged hadron minimum pt (the track pt, to an excellent approximation) - if (pfc.pt() < ptMin_) - continue; - nCh[2]++; - - // At least 1 GeV in HCAL - double ecalRaw = pfc.rawEcalEnergy(); - double hcalRaw = pfc.rawHcalEnergy(); - if (ecalRaw + hcalRaw < hcalMin_) - continue; - nCh[3]++; - - // Find the corresponding PF block elements - const PFCandidate::ElementsInBlocks& theElements = pfc.elementsInBlocks(); - if (theElements.empty()) - continue; - const reco::PFBlockRef blockRef = theElements[0].first; - PFBlock::LinkData linkData = blockRef->linkData(); - const edm::OwnVector& elements = blockRef->elements(); - // Check that there is only one track in the block. - unsigned int nTracks = 0; - unsigned iTrack = 999; - for (unsigned iEle = 0; iEle < elements.size(); iEle++) { - // Find the tracks in the block - PFBlockElement::Type type = elements[iEle].type(); - switch (type) { - case PFBlockElement::TRACK: - iTrack = iEle; - nTracks++; - break; - default: - continue; - } - } - if (nTracks != 1) - continue; - nCh[4]++; - - // Characteristics of the track - const reco::PFBlockElementTrack& et = dynamic_cast(elements[iTrack]); - double p = et.trackRef()->p(); - double pt = et.trackRef()->pt(); - double eta = et.trackRef()->eta(); - // double phi = et.trackRef()->phi(); - - // A minimum p and pt - if (p < pMin_ || pt < ptMin_) - continue; - nCh[5]++; - - // Count the number of valid hits (first three iteration only) - //unsigned int nHits = et.trackRef()->found(); - unsigned int tobN = 0; - unsigned int tecN = 0; - unsigned int tibN = 0; - unsigned int tidN = 0; - unsigned int pxbN = 0; - unsigned int pxdN = 0; - const reco::HitPattern& hp = et.trackRef()->hitPattern(); - - if (PFTrackAlgoTools::highQuality(et.trackRef()->algo())) { - tobN += hp.numberOfValidStripTOBHits(); - tecN += hp.numberOfValidStripTECHits(); - tibN += hp.numberOfValidStripTIBHits(); - tidN += hp.numberOfValidStripTIDHits(); - pxbN += hp.numberOfValidPixelBarrelHits(); - pxdN += hp.numberOfValidPixelEndcapHits(); - } - int inner = pxbN + pxdN; - int outer = tibN + tobN + tidN + tecN; - - // Number of pixel hits - if (inner < nPixMin_) - continue; - nCh[6]++; - - // Number of tracker hits (eta-dependent cut) - bool trackerHitOK = false; - double etaMin = 0.; - for (unsigned int ieta = 0; ieta < nEtaMin_.size(); ++ieta) { - if (fabs(eta) < etaMin) - break; - double etaMax = nEtaMin_[ieta]; - trackerHitOK = fabs(eta) > etaMin && fabs(eta) < etaMax && inner + outer > nHitMin_[ieta]; - if (trackerHitOK) - break; - etaMin = etaMax; - } - if (!trackerHitOK) - continue; - nCh[7]++; - - // Selects only ECAL MIPs - if (ecalRaw > ecalMax_) - continue; - nCh[8]++; - - /* - std::cout << "Selected track : p = " << p << "; pt = " << pt - << "; eta/phi = " << eta << " " << phi << std::endl - << "PF Ch. hadron : p = " << pfc.p() << "; pt = " << pfc.pt() - << "; eta/phi = " << pfc.eta() << " " << pfc.phi() << std::endl - << "Nb of hits (pix/tot) " << inner << " " << inner+outer << std::endl; - std::cout << "Raw Ecal and HCAL energies : ECAL = " << ecalRaw - << "; HCAL = " << hcalRaw << std::endl; - */ - - // Fill the root-tuple - p_ = p; - ecal_ = ecalRaw; - hcal_ = hcalRaw; - reco::PFTrajectoryPoint::LayerType ecalEntrance = reco::PFTrajectoryPoint::ECALEntrance; - const reco::PFTrajectoryPoint& tpatecal = ((*trueParticles)[0]).extrapolatedPoint(ecalEntrance); - eta_ = tpatecal.positionREP().Eta(); - phi_ = tpatecal.positionREP().Phi(); - true_ = std::sqrt(tpatecal.momentum().Vect().Mag2()); - s->Fill(); - } -} - -DEFINE_FWK_MODULE(PFChargedHadronAnalyzer); diff --git a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h b/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h deleted file mode 100644 index 9b228b88b2df5..0000000000000 --- a/RecoParticleFlow/Configuration/test/PFChargedHadronAnalyzer.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef RecoParticleFlow_PFPatProducer_PFChargedHadronAnalyzer_ -#define RecoParticleFlow_PFPatProducer_PFChargedHadronAnalyzer_ - -// system include files -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/one/EDAnalyzer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" - -#include "DataFormats/ParticleFlowReco/interface/PFSimParticle.h" -#include "DataFormats/ParticleFlowReco/interface/PFSimParticleFwd.h" - -#include -#include - -/**\class PFChargedHadronAnalyzer -\brief selects isolated charged hadrons from PF Charged Hadrons - -\author Patrick Janot -\date September 13, 2010 -*/ - -class PFChargedHadronAnalyzer : public edm::one::EDAnalyzer { -public: - typedef reco::PFCandidateCollection::const_iterator CI; - - explicit PFChargedHadronAnalyzer(const edm::ParameterSet&); - - ~PFChargedHadronAnalyzer() override; - - void analyze(const edm::Event&, const edm::EventSetup&) override; - -private: - /// PFCandidates in which we'll look for pile up particles - const edm::InputTag inputTagPFCandidates_; - const edm::InputTag inputTagPFSimParticles_; - const edm::EDGetTokenT tokenPFCandidates_; - const edm::EDGetTokenT tokenPFSimParticles_; - - /// Min pt for charged hadrons - double ptMin_; - - /// Min p for charged hadrons - double pMin_; - - /// Min hcal raw energy for charged hadrons - double hcalMin_; - - /// Max ecal raw energy to define a MIP - double ecalMax_; - - /// Min number of pixel hits for charged hadrons - int nPixMin_; - - /// Min number of track hits for charged hadrons - std::vector nHitMin_; - std::vector nEtaMin_; - - // Number of tracks after cuts - std::vector nCh; - std::vector nEv; - - std::string outputfile_; - TFile* tf1; - TTree* s; - - float true_, p_, ecal_, hcal_, eta_, phi_; - - /// verbose ? - bool verbose_; -}; - -#endif diff --git a/RecoParticleFlow/Configuration/test/PiMinus_cfg.py b/RecoParticleFlow/Configuration/test/PiMinus_cfg.py deleted file mode 100644 index c0db5e52e6cb5..0000000000000 --- a/RecoParticleFlow/Configuration/test/PiMinus_cfg.py +++ /dev/null @@ -1,312 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("REPROD") -process.load("Configuration.StandardSequences.Reconstruction_cff") -process.load("Configuration.StandardSequences.MagneticField_38T_cff") -#process.load("Configuration.StandardSequences.MagneticField_4T_cff") -process.load("Configuration.StandardSequences.Geometry_cff") -process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') -from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = autoCond['startup'] - -#process.Timing =cms.Service("Timing") -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) -) - -process.source = cms.Source( - "PoolSource", - fileNames = cms.untracked.vstring( - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_1.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_2.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_3.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_4.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_5.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_6.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_7.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_8.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_9.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_10.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_11.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_12.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_13.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_14.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_15.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_16.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_17.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_18.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_19.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_20.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_21.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_22.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_23.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_24.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_25.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_26.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_27.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_28.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_29.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_30.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_41.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_42.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_43.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_44.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_45.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_46.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_47.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_48.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_49.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_50.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_51.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_52.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_53.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_54.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_55.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_56.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_57.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_58.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_59.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_60.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_61.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_62.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_63.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_64.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_65.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_66.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_67.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_68.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_69.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_70.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_71.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_72.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_73.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_74.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_75.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_76.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_77.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_78.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_79.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_80.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_81.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_82.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_83.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_84.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_85.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_86.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_87.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_88.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_89.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_90.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_91.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_92.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_93.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_94.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_95.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_96.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_97.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_98.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_99.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_100.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_101.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_102.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_103.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_104.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_105.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_106.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_107.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_108.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_109.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_110.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_111.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_112.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_113.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_114.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_115.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_116.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_117.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_118.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_119.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_120.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_121.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_122.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_123.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_124.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_125.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_126.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_127.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_128.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_129.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_130.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_141.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_142.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_143.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_144.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_145.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_146.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_147.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_148.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_149.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_150.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_151.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_152.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_153.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_154.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_155.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_156.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_157.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_158.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_159.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_160.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_161.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_162.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_163.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_164.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_165.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_166.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_167.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_168.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_169.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_170.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_171.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_172.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_173.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_174.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_175.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_176.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_177.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_178.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_179.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_180.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_181.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_182.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_183.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_184.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_185.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_186.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_187.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_188.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_189.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_190.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_191.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_192.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_193.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_194.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_195.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_196.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_197.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_198.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_199.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi-/pi-_200.root", - ), - eventsToProcess = cms.untracked.VEventRange(), - #eventsToProcess = cms.untracked.VEventRange('1:1217421-1:1217421'), - # '1:1220344-1:1220344', - # '1:1655912-1:1655912', - # '1:415027-1:415027', - # '1:460640-1:460640', - # '1:2054772-1:2054772'), - secondaryFileNames = cms.untracked.vstring(), - noEventSort = cms.untracked.bool(True), - duplicateCheckMode = cms.untracked.string('noDuplicateCheck') -) - -process.pfChargedHadronAnalyzer = cms.EDAnalyzer( - "PFChargedHadronAnalyzer", - PFCandidates = cms.InputTag("particleFlow"), - PFSimParticles = cms.InputTag("particleFlowSimParticle"), - ptMin = cms.double(1.), # Minimum pt - pMin = cms.double(3.), # Minimum p - nPixMin = cms.int32(2), # Nb of pixel hits - nHitMin = cms.vint32(14,17,20,17,10), # Nb of track hits - nEtaMin = cms.vdouble(1.4,1.6,2.0,2.4,2.6), # in these eta ranges - hcalMin = cms.double(1.), # Minimum hcal energy - ecalMax = cms.double(1E9), # Maximum ecal energy - verbose = cms.untracked.bool(True), # not used. - rootOutputFile = cms.string("pfcalib_piminus.root"),# the root tree -) - -#from RecoParticleFlow.Configuration.reco_QCDForPF_cff import fileNames -#process.source.fileNames = fileNames - -process.dump = cms.EDAnalyzer("EventContentAnalyzer") - - -process.load("RecoParticleFlow.Configuration.ReDisplay_EventContent_NoTracking_cff") -process.display = cms.OutputModule("PoolOutputModule", - process.DisplayEventContent, - #outputCommands = cms.untracked.vstring('keep *'), - #process.RECOSIMEventContent, - fileName = cms.untracked.string('piplus_1.root'), - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('p')) -) - -# modify reconstruction sequence -#process.hbhereflag = process.hbhereco.clone() -#process.hbhereflag.hbheInput = 'hbhereco' -#process.towerMakerPF.hbheInput = 'hbhereflag' -#process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbhereflag") - -# Local re-reco: Produce tracker rechits, pf rechits and pf clusters -process.localReReco = cms.Sequence(process.particleFlowCluster) - - -# Particle Flow re-processing -process.pfReReco = cms.Sequence(process.particleFlowReco+ - process.recoPFJets+ - process.recoPFMET+ - process.PFTau) - -# Gen Info re-processing -process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi") -process.load("RecoJets.Configuration.GenJetParticles_cff") -process.load("RecoJets.Configuration.RecoGenJets_cff") -process.load("RecoMET.Configuration.GenMETParticles_cff") -process.load("RecoMET.Configuration.RecoGenMET_cff") -process.load("RecoParticleFlow.PFProducer.particleFlowSimParticle_cff") -process.load("RecoParticleFlow.Configuration.HepMCCopy_cfi") -process.genReReco = cms.Sequence(process.generator+ - process.genParticles+ - process.genJetParticles+ - process.recoGenJets+ - process.genMETParticles+ - process.recoGenMET+ - process.particleFlowSimParticle) - -# The complete reprocessing -process.p = cms.Path(#process.localReReco+ - #process.pfReReco+ - process.genReReco+ - process.pfChargedHadronAnalyzer - ) - -# And the output. -#process.outpath = cms.EndPath(process.display) - -# And the logger -process.load("FWCore.MessageLogger.MessageLogger_cfi") -process.options = cms.untracked.PSet( - makeTriggerResults = cms.untracked.bool(True), - wantSummary = cms.untracked.bool(True), - Rethrow = cms.untracked.vstring('Unknown', - 'ProductNotFound', - 'DictionaryNotFound', - 'InsertFailure', - 'Configuration', - 'LogicError', - 'UnimplementedFeature', - 'InvalidReference', - 'NullPointerError', - 'NoProductSpecified', - 'EventTimeout', - 'EventCorruption', - 'ModuleFailure', - 'ScheduleExecutionFailure', - 'EventProcessorFailure', - 'FileInPathError', - 'FatalRootError', - 'NotFound') -) - -process.MessageLogger.cerr.FwkReport.reportEvery = 1000 - - diff --git a/RecoParticleFlow/Configuration/test/PiPlus_cfg.py b/RecoParticleFlow/Configuration/test/PiPlus_cfg.py deleted file mode 100644 index 069ed338f6b44..0000000000000 --- a/RecoParticleFlow/Configuration/test/PiPlus_cfg.py +++ /dev/null @@ -1,312 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("REPROD") -process.load("Configuration.StandardSequences.Reconstruction_cff") -process.load("Configuration.StandardSequences.MagneticField_38T_cff") -#process.load("Configuration.StandardSequences.MagneticField_4T_cff") -process.load("Configuration.StandardSequences.Geometry_cff") -process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') -from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = autoCond['startup'] - -#process.Timing =cms.Service("Timing") -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(-1) -) - -process.source = cms.Source( - "PoolSource", - fileNames = cms.untracked.vstring( - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_1.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_2.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_3.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_4.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_5.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_6.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_7.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_8.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_9.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_10.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_11.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_12.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_13.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_14.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_15.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_16.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_17.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_18.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_19.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_20.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_21.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_22.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_23.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_24.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_25.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_26.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_27.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_28.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_29.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_30.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_41.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_42.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_43.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_44.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_45.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_46.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_47.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_48.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_49.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_50.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_51.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_52.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_53.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_54.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_55.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_56.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_57.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_58.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_59.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_60.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_61.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_62.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_63.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_64.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_65.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_66.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_67.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_68.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_69.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_70.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_71.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_72.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_73.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_74.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_75.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_76.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_77.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_78.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_79.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_80.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_81.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_82.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_83.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_84.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_85.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_86.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_87.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_88.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_89.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_90.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_91.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_92.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_93.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_94.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_95.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_96.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_97.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_98.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_99.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_100.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_101.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_102.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_103.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_104.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_105.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_106.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_107.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_108.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_109.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_110.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_111.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_112.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_113.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_114.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_115.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_116.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_117.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_118.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_119.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_120.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_121.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_122.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_123.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_124.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_125.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_126.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_127.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_128.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_129.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_130.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_141.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_142.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_143.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_144.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_145.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_146.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_147.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_148.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_149.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_150.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_151.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_152.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_153.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_154.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_155.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_156.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_157.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_158.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_159.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_160.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_161.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_162.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_163.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_164.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_165.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_166.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_167.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_168.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_169.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_170.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_171.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_172.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_173.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_174.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_175.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_176.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_177.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_178.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_179.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_180.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_181.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_182.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_183.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_184.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_185.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_186.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_187.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_188.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_189.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_190.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_191.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_192.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_193.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_194.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_195.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_196.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_197.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_198.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_199.root", - "rfio:/castor/cern.ch/user/a/abdullin/single_hadrons_production_PF_3110+SF+C/pi+/pi+_200.root", - ), - eventsToProcess = cms.untracked.VEventRange(), - #eventsToProcess = cms.untracked.VEventRange('1:1217421-1:1217421'), - # '1:1220344-1:1220344', - # '1:1655912-1:1655912', - # '1:415027-1:415027', - # '1:460640-1:460640', - # '1:2054772-1:2054772'), - secondaryFileNames = cms.untracked.vstring(), - noEventSort = cms.untracked.bool(True), - duplicateCheckMode = cms.untracked.string('noDuplicateCheck') -) - -process.pfChargedHadronAnalyzer = cms.EDAnalyzer( - "PFChargedHadronAnalyzer", - PFCandidates = cms.InputTag("particleFlow"), - PFSimParticles = cms.InputTag("particleFlowSimParticle"), - ptMin = cms.double(1.), # Minimum pt - pMin = cms.double(3.), # Minimum p - nPixMin = cms.int32(2), # Nb of pixel hits - nHitMin = cms.vint32(14,17,20,17,10), # Nb of track hits - nEtaMin = cms.vdouble(1.4,1.6,2.0,2.4,2.6), # in these eta ranges - hcalMin = cms.double(1.), # Minimum hcal energy - ecalMax = cms.double(1E9), # Maximum ecal energy - verbose = cms.untracked.bool(True), # not used. - rootOutputFile = cms.string("pfcalib_piplus.root"),# the root tree -) - -#from RecoParticleFlow.Configuration.reco_QCDForPF_cff import fileNames -#process.source.fileNames = fileNames - -process.dump = cms.EDAnalyzer("EventContentAnalyzer") - - -process.load("RecoParticleFlow.Configuration.ReDisplay_EventContent_NoTracking_cff") -process.display = cms.OutputModule("PoolOutputModule", - process.DisplayEventContent, - #outputCommands = cms.untracked.vstring('keep *'), - #process.RECOSIMEventContent, - fileName = cms.untracked.string('piplus_1.root'), - SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('p')) -) - -# modify reconstruction sequence -#process.hbhereflag = process.hbhereco.clone() -#process.hbhereflag.hbheInput = 'hbhereco' -#process.towerMakerPF.hbheInput = 'hbhereflag' -#process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbhereflag") - -# Local re-reco: Produce tracker rechits, pf rechits and pf clusters -process.localReReco = cms.Sequence(process.particleFlowCluster) - - -# Particle Flow re-processing -process.pfReReco = cms.Sequence(process.particleFlowReco+ - process.recoPFJets+ - process.recoPFMET+ - process.PFTau) - -# Gen Info re-processing -process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi") -process.load("RecoJets.Configuration.GenJetParticles_cff") -process.load("RecoJets.Configuration.RecoGenJets_cff") -process.load("RecoMET.Configuration.GenMETParticles_cff") -process.load("RecoMET.Configuration.RecoGenMET_cff") -process.load("RecoParticleFlow.PFProducer.particleFlowSimParticle_cff") -process.load("RecoParticleFlow.Configuration.HepMCCopy_cfi") -process.genReReco = cms.Sequence(process.generator+ - process.genParticles+ - process.genJetParticles+ - process.recoGenJets+ - process.genMETParticles+ - process.recoGenMET+ - process.particleFlowSimParticle) - -# The complete reprocessing -process.p = cms.Path(#process.localReReco+ - #process.pfReReco+ - process.genReReco+ - process.pfChargedHadronAnalyzer - ) - -# And the output. -#process.outpath = cms.EndPath(process.display) - -# And the logger -process.load("FWCore.MessageLogger.MessageLogger_cfi") -process.options = cms.untracked.PSet( - makeTriggerResults = cms.untracked.bool(True), - wantSummary = cms.untracked.bool(True), - Rethrow = cms.untracked.vstring('Unknown', - 'ProductNotFound', - 'DictionaryNotFound', - 'InsertFailure', - 'Configuration', - 'LogicError', - 'UnimplementedFeature', - 'InvalidReference', - 'NullPointerError', - 'NoProductSpecified', - 'EventTimeout', - 'EventCorruption', - 'ModuleFailure', - 'ScheduleExecutionFailure', - 'EventProcessorFailure', - 'FileInPathError', - 'FatalRootError', - 'NotFound') -) - -process.MessageLogger.cerr.FwkReport.reportEvery = 1000 - - diff --git a/RecoParticleFlow/Configuration/test/analyzePFCandidates_cfg.py b/RecoParticleFlow/Configuration/test/analyzePFCandidates_cfg.py deleted file mode 100644 index 4cd8025f9b95b..0000000000000 --- a/RecoParticleFlow/Configuration/test/analyzePFCandidates_cfg.py +++ /dev/null @@ -1,39 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANALYSIS") -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(100) -) - - -process.source = cms.Source ( - "PoolSource", - fileNames = cms.untracked.vstring( - 'file:display.root' - ), - secondaryFileNames = cms.untracked.vstring(), - noEventSort = cms.untracked.bool(True), - duplicateCheckMode = cms.untracked.string('noDuplicateCheck') - ) - - - - -process.pfCandidateAnalyzer = cms.EDAnalyzer("PFCandidateAnalyzer", - PFCandidates = cms.InputTag("particleFlow"), - verbose = cms.untracked.bool(True), - printBlocks = cms.untracked.bool(False) -) - -process.load("FastSimulation.Configuration.EventContent_cff") -process.aod = cms.OutputModule("PoolOutputModule", - process.AODSIMEventContent, - fileName = cms.untracked.string('aod.root') -) - -process.outpath = cms.EndPath(process.aod ) - - -process.p = cms.Path(process.pfCandidateAnalyzer) - - diff --git a/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py b/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py deleted file mode 100644 index fc44ebd8bfe9c..0000000000000 --- a/RecoParticleFlow/Configuration/test/analyzePFChargedHadrons_cfg.py +++ /dev/null @@ -1,50 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANALYSIS") -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(100) -) - - -process.source = cms.Source ( - "PoolSource", - fileNames = cms.untracked.vstring( - 'rfio:/castor/cern.ch/user/p/pjanot/CMSSW390pre3/display_Matt_3.root' - ), - secondaryFileNames = cms.untracked.vstring(), - noEventSort = cms.untracked.bool(True), - duplicateCheckMode = cms.untracked.string('noDuplicateCheck') - ) - - - - -process.pfChargedHadronAnalyzer = cms.EDAnalyzer( - "PFChargedHadronAnalyzer", - PFCandidates = cms.InputTag("particleFlow"), - ptMin = cms.double(1.), # Minimum pt - pMin = cms.double(3.), # Minimum p - nPixMin = cms.int32(2), # Nb of pixel hits - nHitMin = cms.vint32(14,17,20,17), # Nb of track hits - nEtaMin = cms.vdouble(1.4, 1.6, 2.0, 2.4), # in these eta ranges - hcalMin = cms.double(1.), # Minimum hcal energy - ecalMax = cms.double(0.2), # Maximum ecal energy - verbose = cms.untracked.bool(True), # not used. -) - -process.load("FastSimulation.Configuration.EventContent_cff") -process.aod = cms.OutputModule("PoolOutputModule", - process.AODSIMEventContent, - fileName = cms.untracked.string('aod.root') -) - -#process.outpath = cms.EndPath(process.aod ) -process.TFileService = cms.Service( - "TFileService", - fileName=cms.string('output.root') - ) - - -process.p = cms.Path(process.pfChargedHadronAnalyzer) - -