diff --git a/MVAMET/bin/BuildFile.xml b/MVAMET/bin/BuildFile.xml index 6afd05e80a8..412c7ccd5a3 100644 --- a/MVAMET/bin/BuildFile.xml +++ b/MVAMET/bin/BuildFile.xml @@ -2,7 +2,6 @@ - @@ -12,7 +11,6 @@ - diff --git a/MetPhiCorrections/README.md b/MetPhiCorrections/README.md index 0e8cb274841..7b0d5cb7947 100644 --- a/MetPhiCorrections/README.md +++ b/MetPhiCorrections/README.md @@ -1,15 +1,29 @@ #### Met phi corrections - Tools for the derivation of MET phi corrections. The actual corrections are in cms-met/cmssw + Tools for the derivation of MET phi corrections. The actual corrections are in cms-met/cmssw\ + + The full recipe below is supposed to work on `CMSSW_10_2_11`. ###### How to derive MET phi corrections -1. (Skip this step if the binning in PF Candidate species and eta stays unchanged) Met-phi corrections are constructed separately in bins of PF Candidate species and eta, roughly corresponding to the subdetectors. These Categories are defined in `MetTools/MetPhiCorrections/python/tools/categories.py` +1. (Skip this step if the binning in PF Candidate species and eta stays unchanged) Met-phi corrections are constructed separately in bins of PF Candidate species and eta, roughly corresponding to the subdetectors. These Categories are defined in `MetTools/MetPhiCorrections/python/tools/categories.py`\ Once the species are defined (no/only small changes should be necessary in categories.py), the following command creates a cfg that will be used for obtaining the MEx,y profiles which later are parametrized. -`python MetTools/MetPhiCorrections/python/tools/writePythonCFG.py --postfix PHYS14` - This will create a file `phiCorr_PHYS14_cfi.py`. Change the postfix to something that identifies your usecase. - Move this file to `MetTools/MetPhiCorrections/python` and create a `_cff.py` that imports the cfi file. Start from the template `MetTools/MetPhiCorrections/python/phiCorr_PHYS14_cff.py` -2. Use the `_cff.py` file from the previous step to create the MEx,y profiles. If the previous steps were skipped, use `MetTools/MetPhiCorrections/python/phiCorr_PHYS14_cff.py` -Edit `MetTools/MetPhiCorrections/test/run_metPhiCorr.py` to make sure your `_cff.py` from the previous step is used. As a test, issue -`cmsRun run_metPhiCorr.py` -The output file(s) contain the histograms and MEx,y profiles. When the test job ran satisfactorily, check the output root file and if it looks good, run the cfg on crab on the data you want the produce the corrections for. Note: Output files are small and do not depend on the size of the dataset. Do a `hadd` of all output files. -3. Once you have the MEx,y go to `MetTools/MetPhiCorrections/python/tools/`. Look at the input parameters of `multiplicityFit.py` and change them in the calling script `fits.sh` according to your needs. The command `python multiplicityFit.py -h` should give you an idea. The script `fits.sh` performs the fits and writes the final cfi file. You can give it a prefix parameter, e.g. `./fits.sh myphys14` which then creates `multPhiCorr_myphys14_cfi.py` from the DY shifts that are stored in a root file in that directory. Check the parametrization in the plot and modify funtional form, fitrange etc., if needed. When you're done check the output `.py` file (e.g. the one from the repository, `multPhiCorr_phys14_cfi.py`, or the one you produced). Check that there is no overlap in eta for the same candidate species and that all categories are included. Finally, move the file to the `JetMETCorrections/Type1MET` module and apply the corrections using the `MultShiftMETcorrInputProducer` +`python MetTools/MetPhiCorrections/python/tools/writePythonCFG.py --postfix 102X`\ + This will create a file `phiCorrBins_102X_cfi.py`. Change the postfix to something that identifies your usecase.\ + Move this file to `MetTools/MetPhiCorrections/python` and use the following comment with the same postfix as before `python MetTools/MetPhiCorrections/python/write_cff.py --postfix 102X` to create a `_cff.py` that imports the cfi file. +2. Use the `_cff.py` file from the previous step to create the MEx,y profiles. If the previous steps were skipped, use `MetTools/MetPhiCorrections/python/phiCorr_102X_cff.py`.\ +Edit `MetTools/MetPhiCorrections/test/run_metPhiCorr.py` to make sure your `_cff.py` from the previous step is used. As a test, issue\ +`cmsRun run_metPhiCorr.py`.\ +`run_metPhiCorr.py` should be updated manually with the correct global tag for the year on which you want to run (different for data and MC).\ +The output file(s) contain the histograms and MEx,y profiles. When the test job ran satisfactorily, check the output root file and if it looks good, you can run the cfg on crab on the data you want to produce the corrections for. You may use the existing crab config files as an example.\ +Note: Output files are small and do not depend on the size of the dataset.\ +Do a `hadd` of all output files.\ +You need to do this separately for each era, and once for MC for each year (no automatization of this exists yet). In principle, different eras could be regrouped, but it has been showed that the corrections depend on the era.\ +3. Once you have the MEx,y go to `MetTools/MetPhiCorrections/python/tools/`. Look at the input parameters of `multiplicityFit.py` and change them in the calling script `fits.sh` according to your needs. The command `python multiplicityFit.py -h` should give you an idea. The script `fits.sh` performs the fits and writes the final cfi file. You can give it three parameters(a label for the production, input root file path, output plot directory path), e.g. `./fits.sh my102X plots` which then creates `multPhiCorr_my102X_cfi.py` from the DY shifts that are stored in a root file in that directory, as well as plots showing the fit results. Check the parametrization in the plot and modify funtional form, fitrange etc., if needed. When you're done check the output `.py` file (e.g. one of those from the repository, `multPhiCorr_XXX_cfi.py`, or the one you produced). Check that there is no overlap in eta for the same candidate species and that all categories are included. (One can also use `runfits.sh` to run fits.sh multiple times subsequently.)\ +There are 3 parametrizations possible for the corrections: as a function of multiplicity, of the (scalar) pT sum or of the number of vertices. The current recommendation is to use the number of vertices, which is found the be the most independant of the hard physics process. Later steps assume this choice is made.\ +The file `multPhiCorr_my102X_cfi.py` is the one that is meant to be put in the `JetMETCorrections/Type1MET/python` module of CMSSW (if you do so, don't forget to change the module name in `pfMETmultShiftCorrections_cfi.py`). By doing so, you ensure that your corrections will be applied, based on the fits (which are quadratic functions) you just created.\ +You can add different files together for different eras using the option `--combine` with `fits.sh`. See the script `runfits_combined.sh` for an example. This output should be the one to use in CMSSW.\ +From there, you might want to check the impact of your corrections by applying them, using a simple analyzer.\ +4. Once you have run on all the data, and on DY MC, for one given year, you can use the scripts in `MetTools/MetPhiCorrections/test/plotting`. Update the names of the input files to match the ones you obtained. There are 3 scripts you can use: + - (Optional) `root -l -q -b 'prepare_plots.cc++(YEAR)'` (where YEAR is 2016, 2017 or 2018) -> will produce plots for meaningful variables, superimposed for all eras + - `root -l -q -b 'combine_corrections.cc++(YEAR)'` -> will produce, for each era, a single combined plot for the total correction in MET X shift and another in MET Y shift, as a function of the number of vertices. It also performs a fit with a linear function (expected behavior is linear), and write the fit parameters in a text file. It is recommended to use this output if you want to apply corrections to your analysis, if you don't already have the corrected MET in your trees. + - (Optional) `root -l -q -b 'prepare_combined_plots.cc++(YEAR)'` -> will superimpose the plots produced by `combine_corrections.cc`, and compare them with the fits obtained by the alternative method, consisting in computing the corrections directly from the MET X/Y coordinates in the event. Additional options can be given to plot only several eras (to avoid overcrowded plots). diff --git a/MetPhiCorrections/plugins/BuildFile.xml b/MetPhiCorrections/plugins/BuildFile.xml index 81042213f02..72aacb6b872 100644 --- a/MetPhiCorrections/plugins/BuildFile.xml +++ b/MetPhiCorrections/plugins/BuildFile.xml @@ -14,6 +14,8 @@ + + diff --git a/MetPhiCorrections/plugins/metPhiCorrInfoWriter.cc b/MetPhiCorrections/plugins/metPhiCorrInfoWriter.cc index 8567904e53f..f45b91da78c 100644 --- a/MetPhiCorrections/plugins/metPhiCorrInfoWriter.cc +++ b/MetPhiCorrections/plugins/metPhiCorrInfoWriter.cc @@ -6,6 +6,7 @@ #include "DataFormats/Common/interface/View.h" #include "DataFormats/Common/interface/Association.h" #include +#include std::string namePostFix (int varType) { @@ -15,6 +16,15 @@ std::string namePostFix (int varType) { return std::string("unknown"); } +double delta_phi (float phi1, float phi2) +{ + double dPhi = phi1 - phi2; + if (dPhi > 3.1416) dPhi -= 2*3.1416; + if (dPhi <= -3.1416) dPhi += 2*3.1416; //So that dPhi is always between -pi and +pi. + return dPhi; +} + + int metPhiCorrInfoWriter::translateTypeToAbsPdgId( reco::PFCandidate::ParticleType type ) { switch( type ) { case reco::PFCandidate::ParticleType::h: return 211; // pi+ @@ -29,9 +39,19 @@ int metPhiCorrInfoWriter::translateTypeToAbsPdgId( reco::PFCandidate::ParticleTy } } +bool metPhiCorrInfoWriter::passSelection(TLorentzVector firstMuon, TLorentzVector secondMuon) { + if((firstMuon + secondMuon).Pt() > 20) return false; + if((firstMuon + secondMuon).M() > 110 or (firstMuon + secondMuon).M() < 70) return false; + if(firstMuon.Pt()/secondMuon.Pt() > 1.2 or firstMuon.Pt()/secondMuon.Pt() < 0.8) return false; + if(fabs(delta_phi(firstMuon.Phi(),secondMuon.Phi()))<2.8) return false; + return true; +} + metPhiCorrInfoWriter::metPhiCorrInfoWriter( const edm::ParameterSet & cfg ): vertices_ ( cfg.getUntrackedParameter< edm::InputTag >("vertexCollection") ), verticesToken_ ( consumes< reco::VertexCollection >(vertices_) ), + muons_ ( cfg.getUntrackedParameter< edm::InputTag >("muonsCollection") ), + muonsToken_(consumes< std::vector< pat::Muon> >(muons_)), pflow_ ( cfg.getUntrackedParameter< edm::InputTag >("srcPFlow") ), pflowToken_ ( consumes< edm::View >(pflow_) ), moduleLabel_(cfg.getParameter("@module_label")) @@ -84,69 +104,99 @@ metPhiCorrInfoWriter::metPhiCorrInfoWriter( const edm::ParameterSet & cfg ): void metPhiCorrInfoWriter::analyze( const edm::Event& evt, const edm::EventSetup& setup) { - //get primary vertices - edm::Handle< reco::VertexCollection > hpv; - try { -// evt.getByLabel( vertices_, hpv ); - evt.getByToken( verticesToken_, hpv ); - } catch ( cms::Exception & e ) { - std::cout <<"[metPhiCorrInfoWriter] error: " << e.what() << std::endl; + //Select muons compatible with a Z + edm::Handle< std::vector< pat::Muon> > theMuons; + evt.getByToken(muonsToken_,theMuons ); + + std::vector goodMuons; + std::vector muonCharges; + bool isGoodEvent = false; + for(std::vector::const_iterator muon = (*theMuons).begin(); muon != (*theMuons).end(); muon++) { + if(!(&*muon)->passed(reco::Muon::CutBasedIdMedium)) continue; + if(!(&*muon)->passed(reco::Muon::PFIsoMedium)) continue; + TLorentzVector thisMuon; + thisMuon.SetPtEtaPhiE((&*muon)->pt(),(&*muon)->eta(),(&*muon)->phi(),(&*muon)->energy()); + goodMuons.push_back(thisMuon); + muonCharges.push_back((&*muon)->charge()); } - std::vector goodVertices; - for (unsigned i = 0; i < hpv->size(); i++) { - if ( (*hpv)[i].ndof() > 4 && - ( fabs((*hpv)[i].z()) <= 24. ) && - ( fabs((*hpv)[i].position().rho()) <= 2.0 ) ) - goodVertices.push_back((*hpv)[i]); +// std::cout << "======================================================================================================" << std::endl; +// std::cout << "There are " << goodMuons.size() << " good muons." << std::endl; + if(goodMuons.size()>1){ +// std::cout << "First muon has Pt = " << goodMuons[0].Pt() << ", eta = " << goodMuons[0].Eta() << ", phi = " << goodMuons[0].Phi() << ", E = " << goodMuons[0].E() << ", charge = " << muonCharges[0] << std::endl; +// std::cout << "Second muon has Pt = " << goodMuons[1].Pt() << ", eta = " << goodMuons[1].Eta() << ", phi = " << goodMuons[1].Phi() << ", E = " << goodMuons[1].E() << ", charge = " << muonCharges[1] << std::endl; + for(unsigned int first = 0 ; first < goodMuons.size()-1 ; first++){ + for(unsigned int second = 1 ; second < goodMuons.size() ; second++){ + if(passSelection(goodMuons[first],goodMuons[second]) and (muonCharges[first]+muonCharges[second] == 0)) isGoodEvent = true; + } + } } - int ngoodVertices = goodVertices.size(); - - for (unsigned i=0;i > particleFlow; - evt.getByToken( pflowToken_, particleFlow ); - for (unsigned i = 0; i < particleFlow->size(); ++i) { - const reco::Candidate& c = particleFlow->at(i); - for (unsigned j=0; j hpv; + try { + // evt.getByLabel( vertices_, hpv ); + evt.getByToken( verticesToken_, hpv ); + } catch ( cms::Exception & e ) { + std::cout <<"[metPhiCorrInfoWriter] error: " << e.what() << std::endl; + } + std::vector goodVertices; + for (unsigned i = 0; i < hpv->size(); i++) { + if ( (*hpv)[i].ndof() > 4 && + ( fabs((*hpv)[i].z()) <= 24. ) && + ( fabs((*hpv)[i].position().rho()) <= 2.0 ) ) + goodVertices.push_back((*hpv)[i]); + } + int ngoodVertices = goodVertices.size(); + + for (unsigned i=0;i > particleFlow; + evt.getByToken( pflowToken_, particleFlow ); + for (unsigned i = 0; i < particleFlow->size(); ++i) { + const reco::Candidate& c = particleFlow->at(i); + for (unsigned j=0; jetaMin_[j]) and (c.eta()Fill(c.eta(), c.phi(), c.pt()); - energy_[j]->Fill(c.eta(), c.phi(), c.energy()); - occupancy_[j]->Fill(c.eta(), c.phi()); + if (abs(c.pdgId())== translateTypeToAbsPdgId(reco::PFCandidate::ParticleType(type_[j]))) { + if ((c.eta()>etaMin_[j]) and (c.eta()Fill(c.eta(), c.phi(), c.pt()); + energy_[j]->Fill(c.eta(), c.phi(), c.energy()); + occupancy_[j]->Fill(c.eta(), c.phi()); + } } } } - } - for (std::vector::const_iterator v = cfgCorrParameters_.begin(); v!=cfgCorrParameters_.end(); v++) { - unsigned j=v-cfgCorrParameters_.begin(); + for (std::vector::const_iterator v = cfgCorrParameters_.begin(); v!=cfgCorrParameters_.end(); v++) { + unsigned j=v-cfgCorrParameters_.begin(); // std::cout<<"j "<getParameter("name")<<" varType "<Fill(counts_[j], MEx_[j]); - profile_y_[j]->Fill(counts_[j], MEy_[j]); - variable_[j]->Fill(counts_[j]); - } - if (varType_[j]==1) { - profile_x_[j]->Fill(ngoodVertices, MEx_[j]); - profile_y_[j]->Fill(ngoodVertices, MEy_[j]); - variable_[j]->Fill(ngoodVertices); - } - if (varType_[j]==2) { - profile_x_[j]->Fill(sumPt_[j], MEx_[j]); - profile_y_[j]->Fill(sumPt_[j], MEy_[j]); - variable_[j]->Fill(sumPt_[j]); + if (varType_[j]==0) { + profile_x_[j]->Fill(counts_[j], MEx_[j]); + profile_y_[j]->Fill(counts_[j], MEy_[j]); + variable_[j]->Fill(counts_[j]); + } + if (varType_[j]==1) { + profile_x_[j]->Fill(ngoodVertices, MEx_[j]); + profile_y_[j]->Fill(ngoodVertices, MEy_[j]); + variable_[j]->Fill(ngoodVertices); + } + if (varType_[j]==2) { + profile_x_[j]->Fill(sumPt_[j], MEx_[j]); + profile_y_[j]->Fill(sumPt_[j], MEy_[j]); + variable_[j]->Fill(sumPt_[j]); + } } } } diff --git a/MetPhiCorrections/plugins/metPhiCorrInfoWriter.h b/MetPhiCorrections/plugins/metPhiCorrInfoWriter.h index 93084b3ffe8..9d967fde6a6 100644 --- a/MetPhiCorrections/plugins/metPhiCorrInfoWriter.h +++ b/MetPhiCorrections/plugins/metPhiCorrInfoWriter.h @@ -12,11 +12,13 @@ #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" #include "DataFormats/VertexReco/interface/Vertex.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/PatCandidates/interface/Muon.h" #include #include #include #include +#include class metPhiCorrInfoWriter : public edm::EDAnalyzer { public: @@ -25,6 +27,8 @@ class metPhiCorrInfoWriter : public edm::EDAnalyzer { private: edm::InputTag vertices_; edm::EDGetTokenT< std::vector > verticesToken_; + edm::InputTag muons_; + edm::EDGetTokenT > muonsToken_; edm::InputTag pflow_; edm::EDGetTokenT< edm::View > pflowToken_; @@ -40,6 +44,8 @@ class metPhiCorrInfoWriter : public edm::EDAnalyzer { static int translateTypeToAbsPdgId( reco::PFCandidate::ParticleType type ); + bool passSelection(TLorentzVector firstMuon, TLorentzVector secondMuon); + }; #endif diff --git a/MetPhiCorrections/python/phiCorrBins_102X_cff.py b/MetPhiCorrections/python/phiCorrBins_102X_cff.py new file mode 100644 index 00000000000..5aa02e77044 --- /dev/null +++ b/MetPhiCorrections/python/phiCorrBins_102X_cff.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +from MetTools.MetPhiCorrections.phiCorrBins_102X_cfi import phiCorrBins_102X as phiCorrBins + +metPhiCorrInfoWriter = cms.EDAnalyzer("metPhiCorrInfoWriter", + vertexCollection = cms.untracked.InputTag("offlinePrimaryVertices"), + srcPFlow = cms.untracked.InputTag("particleFlow", ""), + parameters = phiCorrBins +) + +metPhiCorrInfoWriterSequence = cms.Sequence( metPhiCorrInfoWriter ) + diff --git a/MetPhiCorrections/python/phiCorrBins_PHYS14_cfi.py b/MetPhiCorrections/python/phiCorrBins_102X_cfi.py similarity index 87% rename from MetPhiCorrections/python/phiCorrBins_PHYS14_cfi.py rename to MetPhiCorrections/python/phiCorrBins_102X_cfi.py index 74835cb62ce..616bb8b88d6 100644 --- a/MetPhiCorrections/python/phiCorrBins_PHYS14_cfi.py +++ b/MetPhiCorrections/python/phiCorrBins_102X_cfi.py @@ -1,19 +1,33 @@ import FWCore.ParameterSet.Config as cms -phiCorrBins_PHYS14 = cms.VPSet( +phiCorrBins_102X = cms.VPSet( cms.PSet( - name=cms.string("h"), + name=cms.string("hEtaPlus"), type=cms.int32(1), varType=cms.int32(0), nbins=cms.double(250), nMin=cms.int32(0), nMax=cms.int32(7500), - etaNBins=cms.int32(108), - etaMin=cms.double(-2.7), + etaNBins=cms.int32(54), + etaMin=cms.double(0), etaMax=cms.double(2.7), phiNBins=cms.int32(160), phiMin=cms.double(-3.14159265359), phiMax=cms.double(3.14159265359), ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(0), + nbins=cms.double(250), + nMin=cms.int32(0), + nMax=cms.int32(7500), + etaNBins=cms.int32(54), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + phiNBins=cms.int32(160), + phiMin=cms.double(-3.14159265359), + phiMax=cms.double(3.14159265359), + ), cms.PSet( name=cms.string("h0Barrel"), type=cms.int32(5), @@ -197,26 +211,40 @@ phiMax=cms.double(3.14159265359), ), cms.PSet( - name=cms.string("h"), + name=cms.string("hEtaPlus"), type=cms.int32(1), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), - etaNBins=cms.int32(108), - etaMin=cms.double(-2.7), + nMax=cms.int32(100), + etaNBins=cms.int32(54), + etaMin=cms.double(0), etaMax=cms.double(2.7), phiNBins=cms.int32(160), phiMin=cms.double(-3.14159265359), phiMax=cms.double(3.14159265359), ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + nbins=cms.double(100), + nMin=cms.int32(0), + nMax=cms.int32(100), + etaNBins=cms.int32(54), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + phiNBins=cms.int32(160), + phiMin=cms.double(-3.14159265359), + phiMax=cms.double(3.14159265359), + ), cms.PSet( name=cms.string("h0Barrel"), type=cms.int32(5), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(32), etaMin=cms.double(-1.392), etaMax=cms.double(1.392), @@ -228,9 +256,9 @@ name=cms.string("h0EndcapPlus"), type=cms.int32(5), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(12), etaMin=cms.double(1.392), etaMax=cms.double(3), @@ -242,9 +270,9 @@ name=cms.string("h0EndcapMinus"), type=cms.int32(5), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(12), etaMin=cms.double(-3.0), etaMax=cms.double(-1.392), @@ -256,9 +284,9 @@ name=cms.string("gammaBarrel"), type=cms.int32(4), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(170), etaMin=cms.double(-1.479), etaMax=cms.double(1.479), @@ -270,9 +298,9 @@ name=cms.string("gammaEndcapPlus"), type=cms.int32(4), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(20), etaMin=cms.double(1.479), etaMax=cms.double(3.0), @@ -284,9 +312,9 @@ name=cms.string("gammaEndcapMinus"), type=cms.int32(4), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(20), etaMin=cms.double(-3.0), etaMax=cms.double(-1.479), @@ -298,9 +326,9 @@ name=cms.string("gammaForwardPlus"), type=cms.int32(4), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(20), etaMin=cms.double(3.0), etaMax=cms.double(5.0), @@ -312,9 +340,9 @@ name=cms.string("gammaForwardMinus"), type=cms.int32(4), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(20), etaMin=cms.double(-5.0), etaMax=cms.double(-3.0), @@ -326,9 +354,9 @@ name=cms.string("e"), type=cms.int32(2), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(27), etaMin=cms.double(-2.7), etaMax=cms.double(2.7), @@ -340,9 +368,9 @@ name=cms.string("hHFMinus"), type=cms.int32(6), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(13), etaMin=cms.double(-5.2), etaMax=cms.double(-2.901376), @@ -354,9 +382,9 @@ name=cms.string("hHFPlus"), type=cms.int32(6), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(13), etaMin=cms.double(2.901376), etaMax=cms.double(5.2), @@ -368,9 +396,9 @@ name=cms.string("egammaHFMinus"), type=cms.int32(7), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(13), etaMin=cms.double(-5.2), etaMax=cms.double(-2.901376), @@ -382,9 +410,9 @@ name=cms.string("egammaHFPlus"), type=cms.int32(7), varType=cms.int32(1), - nbins=cms.double(50), + nbins=cms.double(100), nMin=cms.int32(0), - nMax=cms.int32(50), + nMax=cms.int32(100), etaNBins=cms.int32(13), etaMin=cms.double(2.901376), etaMax=cms.double(5.2), @@ -393,19 +421,33 @@ phiMax=cms.double(3.14159265359), ), cms.PSet( - name=cms.string("h"), + name=cms.string("hEtaPlus"), type=cms.int32(1), varType=cms.int32(2), nbins=cms.double(250), nMin=cms.int32(0), nMax=cms.int32(7500), - etaNBins=cms.int32(108), - etaMin=cms.double(-2.7), + etaNBins=cms.int32(54), + etaMin=cms.double(0), etaMax=cms.double(2.7), phiNBins=cms.int32(160), phiMin=cms.double(-3.14159265359), phiMax=cms.double(3.14159265359), ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(2), + nbins=cms.double(250), + nMin=cms.int32(0), + nMax=cms.int32(7500), + etaNBins=cms.int32(54), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + phiNBins=cms.int32(160), + phiMin=cms.double(-3.14159265359), + phiMax=cms.double(3.14159265359), + ), cms.PSet( name=cms.string("h0Barrel"), type=cms.int32(5), diff --git a/MetPhiCorrections/python/phiCorr_PHYS14_cff.py b/MetPhiCorrections/python/phiCorr_PHYS14_cff.py deleted file mode 100644 index 1c87819811b..00000000000 --- a/MetPhiCorrections/python/phiCorr_PHYS14_cff.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from MetTools.MetPhiCorrections.phiCorrBins_PHYS14_cfi import phiCorrBins_PHYS14 as phiCorrBins - -##____________________________________________________________________________|| - -metPhiCorrInfoWriter = cms.EDAnalyzer("metPhiCorrInfoWriter", - vertexCollection = cms.untracked.InputTag('offlinePrimaryVertices'), - srcPFlow = cms.untracked.InputTag('particleFlow', ''), - parameters = phiCorrBins -) -metPhiCorrInfoWriterSequence = cms.Sequence( metPhiCorrInfoWriter ) diff --git a/MetPhiCorrections/python/tools/DYJetsToLL_M-50_HT-100toInf_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root b/MetPhiCorrections/python/tools/DYJetsToLL_M-50_HT-100toInf_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root deleted file mode 100644 index c741b0d24a0..00000000000 Binary files a/MetPhiCorrections/python/tools/DYJetsToLL_M-50_HT-100toInf_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root and /dev/null differ diff --git a/MetPhiCorrections/python/tools/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root b/MetPhiCorrections/python/tools/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root deleted file mode 100644 index 5fa95466318..00000000000 Binary files a/MetPhiCorrections/python/tools/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root and /dev/null differ diff --git a/MetPhiCorrections/python/tools/categories.py b/MetPhiCorrections/python/tools/categories.py index 9572ac1486f..66c72431c5c 100644 --- a/MetPhiCorrections/python/tools/categories.py +++ b/MetPhiCorrections/python/tools/categories.py @@ -37,22 +37,22 @@ #variable 0 (candidate multiplicity): specify binning #h['binning'] = {'multiplicity':[5*50,0,5*1500] ,'sumPt': [5*50,0,5*1500],'ngoodVertices':[50, 0, 50]} -hEtaPlus['binning'] = {'multiplicity':[5*50,0,5*1500] ,'sumPt': [5*50,0,5*1500],'ngoodVertices':[50, 0, 50]} -hEtaMinus['binning'] = {'multiplicity':[5*50,0,5*1500] ,'sumPt': [5*50,0,5*1500],'ngoodVertices':[50, 0, 50]} -h0Barrel['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[50, 0, 50]} -h0EndcapPlus['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[50, 0, 50]} -h0EndcapMinus['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[50, 0, 50]} -gammaBarrel['binning'] = {'multiplicity':[5*25,0,5*500] ,'sumPt': [5*25,0,5*500] ,'ngoodVertices':[50, 0, 50]} -gammaEndcapPlus['binning'] = {'multiplicity':[5*25,0,5*150] ,'sumPt': [5*25,0,5*150] ,'ngoodVertices':[50, 0, 50]} -gammaEndcapMinus['binning'] = {'multiplicity':[5*25,0,5*150] ,'sumPt': [5*25,0,5*150] ,'ngoodVertices':[50, 0, 50]} -gammaForwardPlus['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[50, 0, 50]} -gammaForwardMinus['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[50, 0, 50]} -e['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[50, 0, 50]} -mu['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[50, 0, 50]} -hHFMinus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[50, 0, 50]} -hHFPlus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[50, 0, 50]} -egammaHFMinus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[50, 0, 50]} -egammaHFPlus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[50, 0, 50]} +hEtaPlus['binning'] = {'multiplicity':[5*50,0,5*1500] ,'sumPt': [5*50,0,5*1500],'ngoodVertices':[100, 0, 100]} +hEtaMinus['binning'] = {'multiplicity':[5*50,0,5*1500] ,'sumPt': [5*50,0,5*1500],'ngoodVertices':[100, 0, 100]} +h0Barrel['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[100, 0, 100]} +h0EndcapPlus['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[100, 0, 100]} +h0EndcapMinus['binning'] = {'multiplicity':[5*50,0,5*50] ,'sumPt': [5*50,0,5*50] ,'ngoodVertices':[100, 0, 100]} +gammaBarrel['binning'] = {'multiplicity':[5*25,0,5*500] ,'sumPt': [5*25,0,5*500] ,'ngoodVertices':[100, 0, 100]} +gammaEndcapPlus['binning'] = {'multiplicity':[5*25,0,5*150] ,'sumPt': [5*25,0,5*150] ,'ngoodVertices':[100, 0, 100]} +gammaEndcapMinus['binning'] = {'multiplicity':[5*25,0,5*150] ,'sumPt': [5*25,0,5*150] ,'ngoodVertices':[100, 0, 100]} +gammaForwardPlus['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[100, 0, 100]} +gammaForwardMinus['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[100, 0, 100]} +e['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[100, 0, 100]} +mu['binning'] = {'multiplicity':[5*10,0,5*10] ,'sumPt': [5*10,0,5*10] ,'ngoodVertices':[100, 0, 100]} +hHFMinus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[100, 0, 100]} +hHFPlus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[100, 0, 100]} +egammaHFMinus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[100, 0, 100]} +egammaHFPlus['binning'] = {'multiplicity':[5*25,0,5*250] ,'sumPt': [5*25,0,5*250] ,'ngoodVertices':[100, 0, 100]} allMaps = [hEtaPlus, hEtaMinus, h0Barrel, h0EndcapPlus, h0EndcapMinus, gammaBarrel, gammaEndcapPlus, gammaEndcapMinus, gammaForwardPlus, gammaForwardMinus, e, diff --git a/MetPhiCorrections/python/tools/fits.sh b/MetPhiCorrections/python/tools/fits.sh index ac8bd72905c..16d77c3e1d5 100755 --- a/MetPhiCorrections/python/tools/fits.sh +++ b/MetPhiCorrections/python/tools/fits.sh @@ -1,29 +1,41 @@ #!/bin/sh + if [ -n "$1" ]; then argum=$1 else argum="tmp" fi mood=$4 -outputTextFile="multPhiCorr_${argum}_${mood}_cfi.py" inputTextFile=$2 plotoutPutDirString=$3 +if [ "$5" = "--combine" ]; then + do_combine=1 + else + do_combine=0 +fi #inputTextFile="/data/easilar/METPhiCorr/RootFiles/DY_Fall15/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8_RunIIFall15MiniAODv2-PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1_V2.root" #plotoutPutDirString="/afs/hephy.at/user/e/easilar/www/METPhiCorr/WJets_Spring15/" -rm -rf $outputTextFile -echo "import FWCore.ParameterSet.Config as cms">>$outputTextFile -echo "multPhiCorr_${argum} = cms.VPSet(">>$outputTextFile -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hEtaPlus_sumPt.pdf" --map=hEtaPlus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=20,500 --rebin=0 --yZoomRange=-5,5 --xZoomRange=0,800 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hEtaMinus_sumPt.pdf" --map=hEtaMinus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=50,500 --rebin=0 --yZoomRange=-5,5 --xZoomRange=0,800 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0Barrel_sumPt.pdf" --map=h0Barrel --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=5,30 --rebin=5 --yZoomRange=-3,3 --xZoomRange=0,50 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0EndcapPlus_sumPt.pdf" --map=h0EndcapPlus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=5,55 --rebin=5 --yZoomRange=-3,3 --xZoomRange=0,50 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0EndcapMinus_sumPt.pdf" --map=h0EndcapMinus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=5,50 --rebin=5 --yZoomRange=-3,3 --xZoomRange=0,50 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaBarrel_sumPt.pdf" --map=gammaBarrel --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=0,250 --rebin=0 --yZoomRange=-2,2 --xZoomRange=0,500 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaEndcapPlus_sumPt.pdf" --map=gammaEndcapPlus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=5,80 --rebin=0 --yZoomRange=-3,3 --xZoomRange=0,100 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaEndcapMinus_sumPt.pdf" --map=gammaEndcapMinus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=5,70 --rebin=0 --yZoomRange=-3,3 --xZoomRange=0,100 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hHFPlus_sumPt.pdf" --map=hHFPlus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=20,250 --rebin=0 --yZoomRange=-4,20 --xZoomRange=0,300 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hHFMinus_sumPt.pdf" --map=hHFMinus --mode=$mood --func='(x*[0]+x**2*[1])' --fitRange=10,250 --rebin=0 --yZoomRange=-4,4 --xZoomRange=0,300 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="egammaHFPlus_sumPt.pdf" --map=egammaHFPlus --mode=$mood --func='( (x*(x<100)+100*(x>=100))*[0]+(x*(x<100)+100*(x>=100))**2*[1])' --fitRange=10,200 --rebin=0 --yZoomRange=-4,4 --xZoomRange=0,300 -python multiplicityFit.py --textFileName=$outputTextFile --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="egammaHFMinus_sumPt.pdf" --map=egammaHFMinus --mode=$mood --func='( (x*(x<100)+100*(x>=100))*[0]+(x*(x<100)+100*(x>=100))**2*[1])' --fitRange=0,180 --rebin=0 --yZoomRange=-4,4 --xZoomRange=0,300 -echo ")">>$outputTextFile +if [ $do_combine = 1 ]; then + outputTextFile="multPhiCorr_combined_${mood}_cfi.py" + else + outputTextFile="multPhiCorr_${argum}_${mood}_cfi.py" + rm -rf $outputTextFile + echo "import FWCore.ParameterSet.Config as cms">>$outputTextFile + echo "multPhiCorr_${argum} = cms.VPSet(">>$outputTextFile +fi +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hEtaPlus_ngoodVertices.pdf" --map=hEtaPlus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-20,20 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hEtaMinus_ngoodVertices.pdf" --map=hEtaMinus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=6,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0Barrel_ngoodVertices.pdf" --map=h0Barrel --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=2,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0EndcapPlus_ngoodVertices.pdf" --map=h0EndcapPlus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="h0EndcapMinus_ngoodVertices.pdf" --map=h0EndcapMinus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=6,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaBarrel_ngoodVertices.pdf" --map=gammaBarrel --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-2,2 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaEndcapPlus_ngoodVertices.pdf" --map=gammaEndcapPlus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-3,3 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="gammaEndcapMinus_ngoodVertices.pdf" --map=gammaEndcapMinus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-3,3 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hHFPlus_ngoodVertices.pdf" --map=hHFPlus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="hHFMinus_ngoodVertices.pdf" --map=hHFMinus --mode=$mood --func='([0] + x*[1]+x**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-10,10 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="egammaHFPlus_ngoodVertices.pdf" --map=egammaHFPlus --mode=$mood --func='([0] + (x*(x<100)+100*(x>=100))*[1]+(x*(x<100)+100*(x>=100))**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-2,2 --xZoomRange=0,100 +python multiplicityFit.py --textFileName=$outputTextFile --era=$argum --input=$inputTextFile --rootGDir=metPhiCorrInfoWriter --plotoutPutDir=$plotoutPutDirString --plotFileName="egammaHFMinus_ngoodVertices.pdf" --map=egammaHFMinus --mode=$mood --func='([0] + (x*(x<100)+100*(x>=100))*[1]+(x*(x<100)+100*(x>=100))**2*[2])' --fitRange=0,80 --rebin=0 --yZoomRange=-2,2 --xZoomRange=0,100 +if [ $do_combine = 0 ]; then + echo ")">>$outputTextFile +fi echo "Outputs written to: $outputTextFile" diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_A_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_A_ngoodVertices_cfi.py new file mode 100644 index 00000000000..23110e48fb6 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_A_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_102X_A = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.65250722769,0.207212862788,-0.000320671014862), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.254472894761,0.105551761245,-8.62199348905e-06), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.219337108493,0.0516447637387,0.000854112334445), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.816490266497,-0.100123921916,0.00124329193564), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.968441163727,-0.0179545940417,6.45016604641e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0230168119373,-0.000759151504159,4.48888829737e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0328411627452,0.00898073582265,-9.52682654863e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.039038196546,-0.00486136767678,3.47045217102e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.156054059244,0.00535996858453,-4.31206100086e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.291955363258,0.0195246338836,-0.000222699310532), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.108210897252,-0.00806929309271,-9.3702657354e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.150576143548,0.00929854311241,3.14220107242e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00855529132271,-0.00141205256317,1.69864032005e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0267778364452,-0.000849057231527,-8.92785959414e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00974305621887,0.00218711015644,-2.40666044736e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0822169667574,-0.000851246688443,-0.000103598930256), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0733376698207,0.0752983287293,5.06609496629e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00514413594979,0.0366349140182,-0.000166818109164), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.370928410081,0.128433452055,-0.000515289161223), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.224105603489,-0.0216705357181,7.72559779216e-05), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.237008294452,0.018745811725,-0.000174449111265), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.00130029394763,-0.0209576634331,0.0002454945505), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.320324860672,-0.0361729427021,0.000318796373231), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0340022261205,0.0273464186136,-0.000333851697683), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_B_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_B_ngoodVertices_cfi.py new file mode 100644 index 00000000000..4bfe8a4ca03 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_B_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_102X_B = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.354016103629,0.225445015299,0.00125630979914), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.199147542941,0.175458934964,6.20136439174e-05), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.4262272191,0.0813756468689,0.00091358490456), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.186901147786,-0.0251057435073,0.000809403352637), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.962700610145,-0.0145813835507,-7.37159623084e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0744424009786,0.00375283455067,-8.28528187942e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0309361869786,0.0060798115378,-0.000161400234433), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00971202392201,-0.0104341232193,0.000112429941179), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.100918203624,0.00806657909657,-0.000126185738276), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.316139663876,0.022322159641,-0.000317968321731), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.173371229289,-0.00929353133025,-7.27569667666e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.191286204574,0.00674042713346,3.70796260896e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0294076106242,0.00164995169243,-8.03958392487e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.060973051558,0.00147714421629,-0.000144165170241), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0687585113439,-0.00143764959606,6.30277445158e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0471306600302,-0.00230481891649,-8.02148100786e-05), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00766173848604,0.0837424924435,-5.8162937086e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0939011586709,0.0293137958125,-0.000131759618017), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.492877828246,0.135309506824,-0.000359853539255), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.336779506394,-0.0161358535147,0.000114192435504), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.195567326071,0.0211649807579,-0.000215076096402), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0766525408359,-0.0160523679868,0.000177095936043), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.321978098923,-0.0336656762512,0.000261121631384), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.101661478937,0.03201835854,-0.000402258253089), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_C_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_C_ngoodVertices_cfi.py new file mode 100644 index 00000000000..9d7e06b72f4 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_C_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_102X_C = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.319020192291,0.289753400074,0.000548844956799), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.237117800146,0.178884784641,0.000350082394684), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.324352655552,0.105707023818,0.00058379420455), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.128353079328,-0.00514201160596,0.000204277823589), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-1.03276695319,-0.0167837535375,-6.80979503446e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0917061230738,0.00971095834587,-0.000142082296047), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0364592635295,0.00561892959759,-0.000158441007711), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0436021561897,-0.00266238498662,-2.61496724047e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.310833533685,0.036817046609,-0.000250717068056), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.821181938796,-0.0598092986564,0.000322827946006), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.127914534468,-0.00823650653211,-0.000145951172552), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.212287573016,0.0104038346212,-7.17989435234e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00856473544528,0.00100682961959,-3.25261967175e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0478486436756,-2.99007796033e-05,-0.000128454435137), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0585459716022,-0.000514801377615,6.011034959e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0840557112222,0.00321144908421,-0.000187266067533), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.131786402486,0.073798239646,4.61935674977e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0145456096004,0.034273091761,-0.000206590356404), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.325928623356,0.131346148994,-0.000556002342306), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0237442690985,-0.0414069808048,0.000397737789883), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.234551721229,0.0179541919525,-0.000175787566765), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0687230894194,-0.0171942927497,0.000201689345652), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.380542547916,-0.0390333729263,0.000353007948753), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0331470425428,0.0265303671532,-0.000320405884949), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_D_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_D_ngoodVertices_cfi.py new file mode 100644 index 00000000000..6cccaa9e19f --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_102X_D_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_102X_D = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.580861355695,0.306416609658,0.000522884985618), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.360992188145,0.223693005703,-0.000619660037448), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.165264314984,0.0950679868248,0.000699291533447), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.10619020767,0.0236882663958,-0.000433180712929), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-1.01889030152,-0.0217288856762,-9.19023658343e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0779111555154,-0.00182164428403,7.63250977817e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00634451343754,0.01204925008,-0.0002333942397), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0508243432154,-0.00122430763611,-1.69129443975e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.259752718027,0.0426618353582,-0.000344527351704), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-1.04272093956,-0.0658772179397,0.000277892155325), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.190652680161,-0.00729114691039,-0.000157716865346), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.252726785033,0.00656512648779,2.87524963148e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0740124172773,0.00240391902913,-0.000128320608763), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.114006113846,0.00135420180904,-0.000340045245705), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.122675973832,0.00194220296049,0.000145969052051), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.107893014422,0.00259329309926,-0.00025955582163), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0660429764616,0.080350616232,-2.52074163831e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0351715734774,0.0341830938866,-0.00024706402852), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.328157379588,0.126817922521,-0.000388881375843), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.147978747871,-0.0264733850551,0.000142917810575), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.227277602584,0.0180205480608,-0.000155239910191), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.000654550072154,-0.0233663582837,0.000314306064671), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.328410294889,-0.0307785933372,0.000226132147726), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.105997802039,0.0300998582297,-0.000377610618904), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016B_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016B_ngoodVertices_cfi.py new file mode 100644 index 00000000000..3b6df17f59a --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016B_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016B = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0500719673704,0.00136541668682,-0.00116863465515), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.485936106159,0.0792669093022,-0.00227974121756), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0465940480897,-0.133117133634,-0.000983122869891), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.404403999986,0.0698900654015,-0.00126789806595), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.31235790715,-0.0126161926965,0.000154925761331), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0987298344143,-0.0145887052733,5.1746416952e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.087523873209,-0.00650755177983,0.000157225320678), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0702151132803,0.0238562903592,-0.000146443985813), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.353876889469,-0.0235449229643,0.00097966700863), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.463288911029,0.0570623756142,-0.00101870117366), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0679811816047,-0.00548215440852,-6.90859443906e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0769853609435,0.00973238962258,-0.00015446645685), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00773002116762,-0.00240115131015,4.02079154091e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.014335369058,0.00566055000142,0.000281616318477), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00985371528392,0.00616338883019,-0.000300542757247), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0157908401418,0.000156324766086,0.000129493873731), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0382864635176,0.0168578127635,-0.000870079799832), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0410946434436,0.0413304230729,-0.000113641832439), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.106555478475,0.188112231388,0.00051818295261), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0165586506296,-0.013181819686,-0.000279134379276), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.212544052401,0.0144441917225,0.000277919504356), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0126528676939,-0.0149668063319,0.000397693405228), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.307998630962,-0.0493838658568,-0.000192670915907), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0251240646696,0.0220079846922,-0.000133973784815), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016C_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016C_ngoodVertices_cfi.py new file mode 100644 index 00000000000..0a5289d70ed --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016C_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016C = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.14662574145,0.028261938875,-0.00245954478895), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.734167441389,0.136728681585,-0.00361587482199), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.139716668122,-0.151338250048,-0.000580330341301), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.805303548881,0.123060429223,-0.00210279766444), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0517703764624,-0.0247968296137,0.000694021269585), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0859535621278,-0.00471290006651,-7.49547038092e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0662187375401,-0.0134457575908,0.00028813187379), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0297456895312,0.0220204727726,-0.000142933541938), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.574146348353,0.053616725846,-0.00111503411459), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.14681216914,0.0563232480279,-0.00131685682892), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0249871659585,-0.0123635825578,0.000167325350688), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0316959268565,0.00901565639321,-0.000174100912831), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0316241330204,0.0010200931887,2.98294574925e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0435107921245,0.012124148181,5.85896795082e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00535891732915,0.00616067873312,-0.00032370619144), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.108500897847,0.0125498195619,-0.00028788957379), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0131021262456,-0.0124477143213,-0.00107433196191), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0676750156128,0.0436735461401,-0.000237151893656), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.129990475342,0.211754686303,-0.00050214424186), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.148854863412,-0.0512105288189,0.000923993222766), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(-0.0121871848871,0.0226464101812,9.38674907651e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0104415942748,-0.0107868316052,0.000358251996464), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.262412074758,-0.0701890601561,0.000329725552404), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0632901774208,0.0328856263407,-0.000391767851486), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016D_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016D_ngoodVertices_cfi.py new file mode 100644 index 00000000000..670400333a6 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016D_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016D = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.103391797079,0.0460136128434,-0.00281129503999), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.600845406834,0.122837113229,-0.00312249519917), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.168237222024,-0.105734322543,-0.0017452256499), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.403715855868,0.0884720231234,-0.00141069966249), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.253444315254,-0.0189427203885,0.000308199084153), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0513602554367,-0.0135547736127,0.000208167620398), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.159475033363,-0.00417182031702,-0.000122659685816), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.173938747978,0.0174590496528,0.000195301762741), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.284927753379,-0.0143074140152,0.000732883148176), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.470401257728,0.041266150249,-0.000554296758531), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00817518531922,-0.00806019308108,0.000144101336592), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0181975574105,0.00796659988566,-0.000133305594592), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00677860278966,-0.00389174013226,0.000214824782497), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0240570242482,0.01145404897,5.13052470119e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.187626742662,-0.0227129076504,0.000663222754397), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0132916227494,-0.00310423844824,0.000268464771457), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.192868103129,0.0443275030482,-0.00231215498265), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.10586435991,0.0553296194779,-0.000387522598093), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.142901021636,0.212428022933,8.05491288343e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.132772128344,-0.0389557432582,0.000141139426396), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.0933225091459,0.0211943644501,0.000132532291689), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0750499132578,-0.00184443556614,4.47786163684e-05), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.373578428494,-0.076386476815,0.000477404057826), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.077444106757,0.0339351101597,-0.000417313219434), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016E_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016E_ngoodVertices_cfi.py new file mode 100644 index 00000000000..815dc97a71d --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016E_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016E = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0936014268334,0.0494852665938,-0.00279115568782), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.216428327294,0.0203846913603,0.000825257003728), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.714926165307,-0.203188213579,0.000970329549026), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-1.11882869531,0.166655584718,-0.00256817253348), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00286767878054,-0.0507353653233,0.00131751259502), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0216622162586,-0.0106307810713,8.56678269285e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0993255841312,-0.00901837751166,-9.68828037421e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.179532726584,0.0225913653429,-1.59111484093e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.365945469891,-0.0119797377376,0.000603974240761), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0938242177976,0.117153326003,-0.00260422122152), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0291021761609,-0.00845532385071,0.000112259126226), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0207793034976,0.00741150535782,-0.000194085382425), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.11216448274,0.00884383908414,-0.000158748570311), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.014993276644,0.0101178796988,0.000215766816507), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0849480009557,-0.00852376472098,0.0001568310989), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0548662172477,-0.0122655282343,0.000479659183995), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.122908455428,0.00304538032001,-0.000626258564332), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0738972664053,0.0335348663525,1.33748103209e-05), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.389076701505,0.233720004646,-0.000728023120371), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00150566001961,-0.0149035993176,-5.49943948441e-05), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.026381662238,0.031687083123,-6.33900526245e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.13973089794,0.0080637599915,-0.00021254982164), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.517673211402,-0.0907889111062,0.000856580943689), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.145933887741,0.00691290594923,0.000215012243322), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016F_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016F_ngoodVertices_cfi.py new file mode 100644 index 00000000000..cdfd2ccc986 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016F_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016F = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00118633147589,0.0168731695724,-0.00132660355416), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0394296905399,0.0702684200515,-0.00151746270573), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0588890183569,-0.13513300755,-0.000517654205734), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.538999678869,0.109547027254,-0.00151038207746), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.449500073435,0.00830648886383,-0.000244296432882), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.147584168081,0.0062445235836,-0.000209843746591), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.125485780515,0.000587712577211,-0.000202469015139), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.113370415039,0.0319516886598,-0.000231052599388), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.695854548526,0.0276013355552,-0.000398327478535), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.189130102109,0.133438434704,-0.00337333804402), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.621086814794,-0.0900685987017,0.0025814149908), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.280967568992,0.0416899618764,-0.00120130813563), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.17622194291,0.0175556349663,-0.000396991192478), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00945715993834,0.0101201871357,0.000124153255868), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0936807137548,-0.00745103704259,8.42161315019e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0154429895288,-0.00178289729254,0.000132904445007), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.796569094222,0.128160824647,-0.00432314716224), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.19186259595,0.0187132577566,0.000485496519771), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.214282772128,0.236443753783,-0.000976379062553), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.470660996326,-0.07777128886,0.00192494703516), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.00476521868654,0.0377899764435,-0.000200081725189), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.499146476618,0.0511949613718,-0.00135598640465), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.606809133936,-0.098913107981,0.00116089309607), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0657526076488,0.0378231533338,-0.000636900615425), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016G_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016G_ngoodVertices_cfi.py new file mode 100644 index 00000000000..072bdced3dc --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016G_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016G = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.173740923464,0.0630379114994,-0.00058187854284), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.374592400295,0.0620051587468,-0.0018161537313), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0305103963564,-0.0857180406237,-0.000676720036046), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.239949000305,0.0484031468951,-0.00110800572916), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.359449729222,-0.0174957913691,0.000134798358353), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.172467561668,-0.00362831649908,4.73804556617e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.116697861905,-0.00994733151424,-8.08351621385e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0985130378255,0.0336516450246,-0.000220455303785), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.280736700072,-0.0247954521503,0.000824308595617), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.30665775932,0.0623690404294,-0.00111819923745), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0785498896845,-0.014193245912,0.000121045226647), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0670630859549,0.00958076947688,-7.38461436409e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0334897236128,0.00312149980357,-6.04038556445e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00346888802217,0.0101118538575,0.000123812293003), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0356240466992,-4.69462596328e-05,-6.33630129031e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0764405745474,0.00635287826691,-5.98964530578e-05), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.301456040732,-0.0392045862108,-8.50268199536e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0298828953095,0.0225383255645,-0.000217328745358), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.32679023833,0.228924755403,-0.000455054042813), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.14766062067,-0.0295932160372,0.000427947322572), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.063224801445,0.0264468718348,0.000180559440305), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0606015860889,-0.00820613410133,0.000293985519192), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.434481998621,-0.0746877194209,0.000435847183462), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0125211952249,0.0278832154648,-0.000361380146736), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2016H_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016H_ngoodVertices_cfi.py new file mode 100644 index 00000000000..b10d8cc4a90 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2016H_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2016H = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(1.20686247467,-0.111747762775,0.00473392684371), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.471535523884,0.101240159562,-0.00181659050996), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.072052848951,-0.102076710188,-7.44231818095e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.252722391019,0.0580070896031,-0.000761093077188), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.326540022256,-0.0189359123584,0.000122047861249), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.120086905534,-0.0037539010484,1.64261084318e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0624875132528,-0.0322243945081,0.000502141844612), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.134240045092,0.0302940269777,-0.000205563454344), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.290275424008,-0.0222392252646,0.000564736081512), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.397935403628,0.0523053133834,-0.000881199578678), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00799609105253,-0.00544530309651,-7.49541044093e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00535799472673,9.0308196551e-05,0.000163373140337), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(1.27445407024,-0.170686699234,0.00476548675136), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0518855487657,0.0133874583171,-0.000284073246344), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.144178768945,0.0242724682202,-0.000970098684076), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00305556639082,-0.00659140863531,0.000311060532441), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.297823523653,-0.0244698981704,-0.000169792222408), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00935071058481,0.045807984521,-0.000335865459374), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.308150034197,0.220970542123,-0.000550615089545), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0364876925023,-0.0168776125525,0.000197883900925), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.13676410256,0.0219817605169,0.00031371150384), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0728505322522,-0.00428497929946,0.000158699323965), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.417661101453,-0.0734429490445,0.000441112119183), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.235663568142,0.0591168949902,-0.00121879094253), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2017B_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017B_ngoodVertices_cfi.py new file mode 100644 index 00000000000..e0e7072c82f --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017B_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2017B = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.281249114131,-0.213729275278,-0.000570761374153), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.618215532454,0.254366842309,0.000720216178231), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.83624671858,-0.0652952186328,-0.000800857416981), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.311231486233,0.0389956639429,0.000801906579575), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0484091390078,-0.0100033537974,0.000432168280291), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0136953487703,-0.00883965926692,0.000156515988133), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.45092914992,0.00607119465604,2.89003950643e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.579291341752,0.000641724152125,-0.000314416562466), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.204574219161,0.0496557417315,-2.31472681396e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0736253557145,0.0137326615811,-0.000389138367037), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0586385088063,-0.00526415256445,0.000181328043507), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0421162530437,0.00840646857355,-0.000103643192342), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0341092953197,0.00182611844558,-0.000134844366988), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0187686447096,0.00277102541184,-0.000179236582536), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0293634853937,0.00198931509938,-5.36318306133e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0208098254995,0.00351248440624,-0.000111551563709), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.135124313642,-0.00120378161567,0.00014315794846), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.235219287088,0.0320243433311,0.000216004873749), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.537945781305,0.0982829644858,-0.000483500988429), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.020079436239,-0.0378031309243,0.000231740990574), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.0213749066644,0.0304929396277,-0.000297082632293), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0277331284307,-0.018687840485,0.000204233718189), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.214082398099,-0.0223215698502,0.000126757351401), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.332517192036,-0.013698227718,0.000666514667607), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2017C_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017C_ngoodVertices_cfi.py new file mode 100644 index 00000000000..c75070dfa04 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017C_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2017C = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.511533424469,-0.252575887229,-0.000170051326454), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.037513388451,0.177756808034,0.00182955763168), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.140495255347,-0.048832483311,0.000348727148456), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.215368354058,0.0366554675416,-0.000408731955873), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.20790343266,0.00593645741697,5.89576298851e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0295798864,-0.00842418092032,7.86846805826e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.416411608064,0.0119526389737,0.000140569911604), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.616941333818,0.000193690974622,-0.00027818908841), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.116581902313,0.0568965213825,-0.000215399222255), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0901706023508,0.00346422785655,5.4584893659e-05), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0402115587669,-0.00215227767202,9.83927666193e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0796442929682,0.00843438452468,-5.23175561204e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0712947916791,0.00815744608564,-0.000356382851739), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0278832721458,0.00404123868834,-0.000312350708555), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0323880308842,0.00279041667415,-6.50680084974e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0344942651691,0.00510176081483,-0.000167176325358), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.159504701489,-0.00531761993634,0.000266581043888), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00242672814258,0.0558843418675,-0.000365678486664), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.350140822362,0.0878020625577,-0.00035715937605), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0301815769153,-0.0367613347622,0.00020315716528), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.0479404265604,0.0273784320026,-0.000219189414884), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0140517882008,-0.0211028505362,0.000233922382889), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.286388679758,-0.0281052909227,0.000201120437806), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0451281047561,0.0286482608816,-0.000351933174186), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2017D_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017D_ngoodVertices_cfi.py new file mode 100644 index 00000000000..c7bc66c896b --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017D_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2017D = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.466700556444,-0.229230411723,-0.00150674919879), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.234774716094,0.209861649086,0.00100303589604), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.120904236383,-0.0394307716721,0.000254947483025), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.128432987393,0.0315227424272,-0.000247362821354), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.108360626977,-0.00594738507065,0.000404268462691), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.105442887468,-0.00094264372212,2.90241884732e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.266883956141,0.0355682183594,-2.7922891002e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.551107777747,-0.0283610471568,9.89392574255e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0157575657083,0.0726486518963,-0.000314535701405), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0804585236764,0.00856049929386,-0.000179577167262), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.312206533944,-0.0322977330557,0.000808498890961), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0486865840606,0.00367262214924,1.35001944981e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.034635385743,0.00229039910192,-0.000293820518525), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0280094051702,-0.000209019806098,-0.000276018842666), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0421041564661,-0.0045114738701,0.000123603749117), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0244271608159,0.00427864047166,-0.000222617755775), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0576319905833,0.00811731596881,2.79845038042e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.299929715108,0.0224566828198,0.000346405054206), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.473742015283,0.100729099878,-0.000676924390103), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.144943800484,-0.0519764911532,0.000485337222707), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.0544170111982,0.0267427723588,-0.000230071288447), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0528261370122,-0.0267736927785,0.000402289541661), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.289527687272,-0.0273754375148,0.000192802828968), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.109395740548,0.0320745881018,-0.00038893571283), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2017E_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017E_ngoodVertices_cfi.py new file mode 100644 index 00000000000..c9f3832dbab --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017E_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2017E = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.937706604931,-0.283418728251,4.35282646221e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.549562588302,0.236494794185,-0.000303494918196), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.291643837635,-0.0396002931587,0.000138281119283), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.465032935675,0.0468712480004,-0.000809015582266), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.196673795915,0.00365958178693,0.000143381345299), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0073250579035,-0.00559347220953,4.46397952803e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.260159370102,0.0369875489073,3.02246737918e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.714064603349,-0.02443937848,0.000422378733988), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.330137071438,0.059364176334,-0.000286200267177), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.149395294832,0.00732730437673,-0.000158001923058), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0659117926355,-0.00425933643339,0.000139281293955), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0813880041922,0.00612192993864,-5.74095441625e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.114905025319,0.013754428333,-0.000797472119492), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.133121469818,0.0112799596643,-0.000736470169521), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0158499801338,0.00349895405785,-0.000108929592991), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0608353217691,0.00813975328455,-0.000441093374747), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0507807696548,0.00645902591597,0.000119804534586), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0851414617471,0.0472294535448,-0.000242935505241), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.436500167386,0.0946086917447,-0.000225236320489), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0256350787847,-0.0400701974746,0.000229947271168), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.066896231485,0.024933132514,-0.00018100746992), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0155677106044,-0.0202627626228,0.00022171484017), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.326634494347,-0.0317600606844,0.000285958797385), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0748682669825,0.0313801818042,-0.000384619801126), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2017F_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017F_ngoodVertices_cfi.py new file mode 100644 index 00000000000..9656d7857bd --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2017F_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2017F = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.155105325291,-0.160590043445,-0.00130954416536), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0875587060888,0.355668804013,-0.000240119843519), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0706728216833,-0.0827497606054,-0.00061180622684), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.215869330555,0.0307445607719,-0.000959391229297), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.273230959299,0.00662930892946,0.000175106251724), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0524921871613,-0.0111132264952,9.61146729089e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.16893009668,0.00917550216809,0.000277774727924), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.831303025756,-0.0151066887053,0.000257583943907), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.602956252449,0.0347639909582,6.59756989914e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.537417054425,0.0236891173317,-0.000226299077249), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.14341526558,-0.00414442674559,0.0001732842895), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.17394725542,0.00653709288533,-7.08551427194e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0702900419128,0.000138117274895,-0.000860168081471), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0793140198863,0.00470129089035,-0.000956791847827), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0237530454367,0.00561400008366,-0.000190905307912), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0218032745229,-0.000223197291923,-0.00039509456918), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.161207853817,0.00270003429551,0.000221337850012), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0737106904539,0.0442647500198,-0.000194141358736), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.546998865708,0.110909699259,-0.000356349627007), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.17592992268,-0.0258203749775,2.45759575733e-05), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.0530405452768,0.0257397585757,-0.000187895206259), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0179035351957,-0.0217740598516,0.000252762658524), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.330139523257,-0.0316117396239,0.000280840031965), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0884902364829,0.0335636958175,-0.000423144799263), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2018A_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018A_ngoodVertices_cfi.py new file mode 100644 index 00000000000..104bc5d8fbc --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018A_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2018A = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.65250722769,0.207212862788,-0.000320671014862), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.254472894761,0.105551761245,-8.62199348905e-06), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.219337108493,0.0516447637387,0.000854112334445), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.816490266497,-0.100123921916,0.00124329193564), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.968441163727,-0.0179545940417,6.45016604641e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0230168119373,-0.000759151504159,4.48888829737e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0328411627452,0.00898073582265,-9.52682654863e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.039038196546,-0.00486136767678,3.47045217102e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.156054059244,0.00535996858453,-4.31206100086e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.291955363258,0.0195246338836,-0.000222699310532), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.108210897252,-0.00806929309271,-9.3702657354e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.150576143548,0.00929854311241,3.14220107242e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00855529132271,-0.00141205256317,1.69864032005e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0267778364452,-0.000849057231527,-8.92785959414e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00974305621887,0.00218711015644,-2.40666044736e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0822169667574,-0.000851246688443,-0.000103598930256), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0733376698207,0.0752983287293,5.06609496629e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00514413594979,0.0366349140182,-0.000166818109164), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.370928410081,0.128433452055,-0.000515289161223), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.224105603489,-0.0216705357181,7.72559779216e-05), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.237008294452,0.018745811725,-0.000174449111265), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.00130029394763,-0.0209576634331,0.0002454945505), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.320324860672,-0.0361729427021,0.000318796373231), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0340022261205,0.0273464186136,-0.000333851697683), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2018B_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018B_ngoodVertices_cfi.py new file mode 100644 index 00000000000..9f71bc83898 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018B_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2018B = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.354016103629,0.225445015299,0.00125630979914), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.199147542941,0.175458934964,6.20136439174e-05), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.4262272191,0.0813756468689,0.00091358490456), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.186901147786,-0.0251057435073,0.000809403352637), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.962700610145,-0.0145813835507,-7.37159623084e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0744424009786,0.00375283455067,-8.28528187942e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0309361869786,0.0060798115378,-0.000161400234433), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00971202392201,-0.0104341232193,0.000112429941179), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.100918203624,0.00806657909657,-0.000126185738276), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.316139663876,0.022322159641,-0.000317968321731), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.173371229289,-0.00929353133025,-7.27569667666e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.191286204574,0.00674042713346,3.70796260896e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0294076106242,0.00164995169243,-8.03958392487e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.060973051558,0.00147714421629,-0.000144165170241), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0687585113439,-0.00143764959606,6.30277445158e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0471306600302,-0.00230481891649,-8.02148100786e-05), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00766173848604,0.0837424924435,-5.8162937086e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0939011586709,0.0293137958125,-0.000131759618017), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.492877828246,0.135309506824,-0.000359853539255), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.336779506394,-0.0161358535147,0.000114192435504), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.195567326071,0.0211649807579,-0.000215076096402), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0766525408359,-0.0160523679868,0.000177095936043), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.321978098923,-0.0336656762512,0.000261121631384), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.101661478937,0.03201835854,-0.000402258253089), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2018C_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018C_ngoodVertices_cfi.py new file mode 100644 index 00000000000..4baf6da7358 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018C_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2018C = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.319020192291,0.289753400074,0.000548844956799), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.237117800146,0.178884784641,0.000350082394684), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.324352655552,0.105707023818,0.00058379420455), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.128353079328,-0.00514201160596,0.000204277823589), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-1.03276695319,-0.0167837535375,-6.80979503446e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0917061230738,0.00971095834587,-0.000142082296047), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0364592635295,0.00561892959759,-0.000158441007711), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0436021561897,-0.00266238498662,-2.61496724047e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.310833533685,0.036817046609,-0.000250717068056), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.821181938796,-0.0598092986564,0.000322827946006), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.127914534468,-0.00823650653211,-0.000145951172552), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.212287573016,0.0104038346212,-7.17989435234e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00856473544528,0.00100682961959,-3.25261967175e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0478486436756,-2.99007796033e-05,-0.000128454435137), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0585459716022,-0.000514801377615,6.011034959e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0840557112222,0.00321144908421,-0.000187266067533), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.131786402486,0.073798239646,4.61935674977e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0145456096004,0.034273091761,-0.000206590356404), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.325928623356,0.131346148994,-0.000556002342306), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0237442690985,-0.0414069808048,0.000397737789883), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.234551721229,0.0179541919525,-0.000175787566765), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0687230894194,-0.0171942927497,0.000201689345652), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.380542547916,-0.0390333729263,0.000353007948753), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0331470425428,0.0265303671532,-0.000320405884949), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_2018D_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018D_ngoodVertices_cfi.py new file mode 100644 index 00000000000..82779bd2732 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_Data_2018D_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_Data_2018D = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.580861355695,0.306416609658,0.000522884985618), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.360992188145,0.223693005703,-0.000619660037448), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.165264314984,0.0950679868248,0.000699291533447), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.10619020767,0.0236882663958,-0.000433180712929), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-1.01889030152,-0.0217288856762,-9.19023658343e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0779111555154,-0.00182164428403,7.63250977817e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00634451343754,0.01204925008,-0.0002333942397), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0508243432154,-0.00122430763611,-1.69129443975e-05), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.259752718027,0.0426618353582,-0.000344527351704), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-1.04272093956,-0.0658772179397,0.000277892155325), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.190652680161,-0.00729114691039,-0.000157716865346), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.252726785033,0.00656512648779,2.87524963148e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0740124172773,0.00240391902913,-0.000128320608763), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.114006113846,0.00135420180904,-0.000340045245705), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.122675973832,0.00194220296049,0.000145969052051), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.107893014422,0.00259329309926,-0.00025955582163), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0660429764616,0.080350616232,-2.52074163831e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0351715734774,0.0341830938866,-0.00024706402852), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.328157379588,0.126817922521,-0.000388881375843), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.147978747871,-0.0264733850551,0.000142917810575), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.227277602584,0.0180205480608,-0.000155239910191), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.000654550072154,-0.0233663582837,0.000314306064671), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.328410294889,-0.0307785933372,0.000226132147726), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.105997802039,0.0300998582297,-0.000377610618904), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_Combined_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_Combined_80X_sumPt_cfi.py deleted file mode 100644 index ba92194ed4e..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_Data_Combined_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_Data_B_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00150545054829,-1.99923027648e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00239287441234,-7.16080895287e-07), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0140625280635,1.07077516718e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00309719460811,6.7699921879e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00897223927,2.56039877387e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.0155720639545,-0.00015630405249), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0120797388022,0.000161676752081), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0215816029812,-6.46264742772e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0128014082515,0.000483303075521), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0385568784597,-0.000447260064249), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.000242881323187,-2.42908904086e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.000121824651449,-1.22301307888e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.000683314090411,0.000228275053961), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00216185425815,0.000721548877329), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0149744067197,0.00020729630914), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00136896892577,0.000116935702896), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0228150979035,-3.56513597781e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0038813069397,-1.02110046306e-05), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0175725433544,-1.03073441326e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00277299127038,-3.52294234702e-06), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(0.00641132637738,0.000284882936176), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00994783118381,9.16788547603e-05), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(0.00105777047449,-0.000211542026683), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(0.000144724409419,-2.89384164854e-05), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Data_G_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Data_G_80X_sumPt_cfi.py deleted file mode 100644 index 4cb8844ef45..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_Data_G_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_Data_G_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00392854289318,-8.85865967333e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00152453076311,-4.1582480199e-06), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00858564393718,4.7414820016e-08), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00277893330237,-6.18480496813e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0155633407674,0.000126891547396), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.010822444451,-0.000465684858077), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0208724884932,0.000116203773553), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0223022711136,-6.91451760451e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00925344218842,0.000603978077496), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0349558614173,-0.000481151540987), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.000104447203972,-1.04594157718e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(7.55201875447e-05,-7.56649453041e-06), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00184276296696,-0.00024369363316), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00966802421801,5.02669902731e-06), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00631551958846,-9.84287094307e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00165282140963,8.06855600175e-05), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0242485864131,-3.39714522154e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00137443339963,-4.01273222732e-06), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0230324709823,-7.71723235156e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.000976574453518,-2.38022699877e-06), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.00167068294455,0.0004459348738), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.0084261762869,5.35130057806e-05), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(0.00187412516968,-0.000374816614854), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.000518090826549,0.00010361581075), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_MC_2016_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_MC_2016_ngoodVertices_cfi.py new file mode 100644 index 00000000000..aca01bf771f --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_MC_2016_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_MC_2016 = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.132709302621,-0.00826278097133,0.000235219789793), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.270824950759,0.0521848752011,-0.00148552104142), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0419424082464,-0.136784308237,5.22659207168e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.153206652074,0.0215027672139,-0.00101963767757), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0491010394984,-0.00774166580315,4.22476136059e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0281988690771,-0.00352719424062,2.40042196885e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0229794482636,-0.00702834614265,0.000131419754911), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0398509705339,0.0172581398468,-0.000257735457841), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00979950362846,0.0066836560126,-2.61478527663e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.151066942651,0.0242702720229,-0.000442691704343), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0200936141662,-0.0183564881901,0.00014118982955), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0232370890552,0.015369287691,-5.07884850426e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00617762504646,-0.00299560587307,-0.000228360995386), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0365708881972,0.00613924207345,0.000100669344067), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0299309091602,-0.012233910588,-0.000216317483391), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0153371949948,-0.00258278592903,-3.66183856144e-07), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0911406763865,-0.0190670889024,-0.000234395789386), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0695964494544,-0.0385326027965,0.000182347794087), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0293585489024,0.00506613699166,0.000322063315269), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0911894836868,-0.0270377575093,0.000198659330327), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(-0.104991654417,0.00911086411646,9.19625393235e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.103924555375,0.0168323028525,-0.000209792216728), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(-0.00588754192752,-0.0143102090587,-0.000217559708468), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.105884578558,0.0102584731893,-0.000204999245638), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_MC_2017_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_MC_2017_ngoodVertices_cfi.py new file mode 100644 index 00000000000..8262be9b7ae --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_MC_2017_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_MC_2017 = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.162284620145,-0.182043562965,-0.000203537761326), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0498120236192,0.185135360966,0.000738107678767), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.185838055525,-0.038063692835,-8.74368639208e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.186229569848,0.0238892573637,-0.000446957744806), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0233698482343,-0.00450825810676,0.000131346981068), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0303865995317,0.00233680427233,-4.83529288508e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0780265529475,0.0130310191986,-0.000517545868233), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.034633003738,-0.0489060519107,0.000532137760364), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0295793586475,-0.00998879148536,0.000116385983934), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0954215300558,0.0224753227957,-0.000333109796855), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0731924936678,-0.00229546520147,6.01595959343e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.116901809722,0.000152632381017,7.62612645156e-06), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00495592143104,0.000197787912555,-2.37300936446e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00014120457708,-0.00206057909066,-1.61008656632e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.000295670021316,-0.000419869467432,-2.21696415843e-06), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.00746901829134,-0.00030319111376,-9.97816672604e-06), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.00232051008613,0.0119739925939,-0.000105154535407), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00854400808139,-0.0213303684079,0.000202455055685), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.00837629229048,0.00770790270304,-7.71467317913e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.00145250835038,-0.0147678377014,0.000122884614508), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.00847224189225,-0.00790505910274,8.04121893903e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.00250038310465,0.0105874586902,-0.00015650639469), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.00127129971893,-0.00423759877181,5.85958837065e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0332649001091,0.00868314610833,-0.000129806199221), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_MC_2018_ngoodVertices_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_MC_2018_ngoodVertices_cfi.py new file mode 100644 index 00000000000..37822729e07 --- /dev/null +++ b/MetPhiCorrections/python/tools/multPhiCorr_MC_2018_ngoodVertices_cfi.py @@ -0,0 +1,135 @@ +import FWCore.ParameterSet.Config as cms +multPhiCorr_MC_2018 = cms.VPSet( + cms.PSet( + name=cms.string("hEtaPlus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(0), + etaMax=cms.double(2.7), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.541766413721,0.268765947184,0.000306379714669), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.47546176509,0.204801392405,-0.000153438726145), + ), + cms.PSet( + name=cms.string("hEtaMinus"), + type=cms.int32(1), + varType=cms.int32(1), + etaMin=cms.double(-2.7), + etaMax=cms.double(0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.206335900469,0.115682086558,0.000302978683246), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.26340664441,0.024693999793,-0.00112017695654), + ), + cms.PSet( + name=cms.string("h0Barrel"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-1.392), + etaMax=cms.double(1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.180021635093,-0.00260565653721,-0.000164721987328), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0457581931094,0.00193650573266,-4.50066103716e-05), + ), + cms.PSet( + name=cms.string("h0EndcapPlus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(1.392), + etaMax=cms.double(3), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0231192973659,-0.0114656877826,8.75050482924e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0457848442406,0.0200731285417,-0.000157151455531), + ), + cms.PSet( + name=cms.string("h0EndcapMinus"), + type=cms.int32(5), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.392), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.149972679841,-0.0120768648326,2.36263840142e-07), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(0.0721290451304,0.0157600531447,1.09513860378e-05), + ), + cms.PSet( + name=cms.string("gammaBarrel"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-1.479), + etaMax=cms.double(1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0454896580688,-0.00342818941629,-0.000168715929911), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.100318298402,0.00512422846739,5.4698713763e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapPlus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(1.479), + etaMax=cms.double(3.0), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(-0.0698501398854,-0.00167530011209,-1.15976197549e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0905623221108,0.001301220073,1.77211111381e-05), + ), + cms.PSet( + name=cms.string("gammaEndcapMinus"), + type=cms.int32(4), + varType=cms.int32(1), + etaMin=cms.double(-3.0), + etaMax=cms.double(-1.479), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.040405221355,-0.000670866740536,-4.15929800582e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0371546842399,-0.00320011439949,1.05451971766e-05), + ), + cms.PSet( + name=cms.string("hHFPlus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.125161461918,-0.00816849764678,8.23554201958e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0298747956014,-0.00300141243224,-7.76661369455e-05), + ), + cms.PSet( + name=cms.string("hHFMinus"), + type=cms.int32(6), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + px=cms.vdouble(0.0542226292415,-0.00794446544104,6.86364524083e-05), + fy=cms.string("([p0]+x*[p1]+pow(x,2)*[p2])"), + py=cms.vdouble(-0.0879619564804,-0.0117471592954,8.09287932983e-05), + ), + cms.PSet( + name=cms.string("egammaHFPlus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(2.901376), + etaMax=cms.double(5.2), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(0.110670918249,0.000238934433967,-2.2963246755e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(0.0364111489483,0.00247654673206,-3.73122360203e-05), + ), + cms.PSet( + name=cms.string("egammaHFMinus"), + type=cms.int32(7), + varType=cms.int32(1), + etaMin=cms.double(-5.2), + etaMax=cms.double(-2.901376), + fx=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + px=cms.vdouble(-0.00929177657529,0.0032873974301,-3.36299940928e-05), + fy=cms.string("([p0]+(x*(x<100)+100*(x>=100))*[p1]+pow((x*(x<100)+100*(x>=100)),2)*[p2])"), + py=cms.vdouble(-0.0555684173438,0.0115378556259,-0.00016008563063), + ), +) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_MC_DY_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_MC_DY_80X_sumPt_cfi.py deleted file mode 100644 index ea7c350bac1..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_MC_DY_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_MC_DY_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00400057331908,2.47680219008e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00217115697144,-2.07024665769e-06), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0134442925479,2.33274568725e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00187028199748,-2.88857060422e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0069313240261,4.73789212497e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.000166679715,-3.91400402057e-05), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00556891891153,0.000100668501424), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00975132477255,-2.35379561602e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00285004155378,4.71826125363e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0186737491992,-0.000124428352497), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00623515275697,3.53715609426e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00785296300166,-4.63561342524e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00615185573354,4.21254502028e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00467233055908,6.79159586991e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0173076475945,0.000158667036921), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00219488065291,-5.54193473207e-05), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.000777943507103,-8.63566155857e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00383640115266,1.72862293643e-06), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00125730229373,2.86569542043e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00188554965324,-4.78978809735e-07), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.00704851144624,0.000215182880512), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00236319151202,0.000118154745266), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.0037556296941,-8.6578662186e-05), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00339217998023,8.11368195477e-05), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_BCDEF_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_BCDEF_80X_sumPt_cfi.py deleted file mode 100644 index 31d0a54e97b..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_BCDEF_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_Data_BCDEF_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.000466584335158,-8.87983682718e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00485382831777,-6.32074591066e-06), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0130675552257,-4.02983255379e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00433047541151,-1.8893098135e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00912552000082,-1.53567840716e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.0152186823254,-0.000292610286275), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0128478704978,7.83236236839e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0189041380952,-2.26186127957e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0147058493725,0.000534447561307), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0364991519031,-0.000426225684847), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(1.71710120746e-05,-1.70219612338e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.000175803881379,-1.76319929103e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00177255111236,-0.000123501975092), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00711770465852,0.000118335635474), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00287814230021,1.91167817279e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00429330813451,7.86794377865e-05), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0230420981641,-3.23945239595e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00334641490458,-1.16578859744e-05), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0223931921664,-9.87493024382e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.000948850378623,-5.01157401906e-06), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.000336505765347,0.000428488937716), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00937645127769,7.9124079824e-05), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(0.00176245823597,-0.00035248535251), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00048945766544,9.78947379601e-05), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_GH_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_GH_80X_sumPt_cfi.py deleted file mode 100644 index 822647821a7..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_ReMiniAOD_Data_GH_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_Data_GH_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00406017759162,8.65402394106e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00301531731877,-3.05451808871e-06), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00874321271746,2.51394911125e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00299703080168,-4.11362664938e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0133354040754,1.95015476544e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.013951315007,-0.000304003468257), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0209263807643,5.9383664387e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0214786645369,-2.66001734331e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0072742957063,0.000556163813615), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.035132626287,-0.000505183963631), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.000130392483615,-1.30458131004e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.000128163499127,-1.28777012232e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00285470790853,-0.000531129339155), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00993963874606,-1.24317447263e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00732783555612,-0.00013889676717), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00347107474773,0.000118360145923), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0233365292901,-3.59428204712e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00150834945073,-4.37964504661e-06), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.02265107877,-1.20673907695e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.000471550736442,-4.70140785007e-06), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.00151435372631,0.000440069438971), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00919977931813,6.5564146451e-05), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(0.00191636545578,-0.000383256720073), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.000538504358571,0.000107700310913), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_Summer16_MC_DY_80X_sumPt_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_Summer16_MC_DY_80X_sumPt_cfi.py deleted file mode 100644 index 80e41703bb9..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_Summer16_MC_DY_80X_sumPt_cfi.py +++ /dev/null @@ -1,135 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_MC_DY_sumPT_80X = cms.VPSet( - cms.PSet( - name=cms.string("hEtaPlus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(0), - etaMax=cms.double(2.7), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00183425422302,3.56620973799e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00181803586542,-5.56797529555e-06), - ), - cms.PSet( - name=cms.string("hEtaMinus"), - type=cms.int32(1), - varType=cms.int32(2), - etaMin=cms.double(-2.7), - etaMax=cms.double(0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0137478749718,2.43060144941e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.000180197735722,-4.41597570128e-06), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00610063576634,1.70185651144e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(7.14398634732e-05,-3.10694110678e-05), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00685844082647,9.72560609037e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0102816227553,-5.20143918364e-05), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.00340334030745,1.71218924869e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.0192245057591,-0.000165910833848), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00621008016608,2.78348334435e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00720420650639,-3.43136855106e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.00663860369846,-4.55558682144e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(0.00327883474245,0.000111791132747), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.0161395068876,6.0713684811e-05), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00161386973742,-6.99817101838e-05), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(-0.000986272632738,-6.75203793966e-06), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.00396507115245,2.16967862831e-06), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[p0]+pow(x,2)*[p1])"), - px=cms.vdouble(0.0011868818312,7.25898853779e-07), - fy=cms.string("(x*[p0]+pow(x,2)*[p1])"), - py=cms.vdouble(-0.0020935224105,2.22255001958e-07), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.00676196437884,0.000221650251937), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.0014732925116,0.000105974397071), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(2), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - px=cms.vdouble(-0.00698467190286,-4.55380113934e-05), - fy=cms.string("((x*(x<100)+100*(x>=100))*[p0]+pow((x*(x<100)+100*(x>=100)),2)*[p1])"), - py=cms.vdouble(-0.00327795332069,7.78770579161e-05), - ), -) diff --git a/MetPhiCorrections/python/tools/multPhiCorr_phys14_cfi.py b/MetPhiCorrections/python/tools/multPhiCorr_phys14_cfi.py deleted file mode 100644 index 9a74207bff0..00000000000 --- a/MetPhiCorrections/python/tools/multPhiCorr_phys14_cfi.py +++ /dev/null @@ -1,124 +0,0 @@ -import FWCore.ParameterSet.Config as cms -multPhiCorr_phys14 = cms.VPSet( - cms.PSet( - name=cms.string("h"), - type=cms.int32(1), - varType=cms.int32(0), - etaMin=cms.double(-2.7), - etaMax=cms.double(2.7), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.00100488080903,-2.52390571355e-07), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.00861386123702,4.62378996583e-07), - ), - cms.PSet( - name=cms.string("h0Barrel"), - type=cms.int32(5), - varType=cms.int32(0), - etaMin=cms.double(-1.392), - etaMax=cms.double(1.392), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.00934165318347,-0.000231264440872), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.00571103266272,-6.23866320566e-05), - ), - cms.PSet( - name=cms.string("h0EndcapPlus"), - type=cms.int32(5), - varType=cms.int32(0), - etaMin=cms.double(1.392), - etaMax=cms.double(3), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(0.0120553467578,0.000223494565384), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(0.0230337515784,0.000500746987632), - ), - cms.PSet( - name=cms.string("h0EndcapMinus"), - type=cms.int32(5), - varType=cms.int32(0), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.392), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(0.0150317804201,9.95330180319e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(0.0308198327343,-1.47375713164e-05), - ), - cms.PSet( - name=cms.string("gammaBarrel"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-1.479), - etaMax=cms.double(1.479), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.00183455254786,-4.36950442113e-06), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.00111148670267,4.48001318056e-06), - ), - cms.PSet( - name=cms.string("gammaEndcapPlus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(1.479), - etaMax=cms.double(3.0), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.000567748005415,2.81999488957e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(0.00415562062208,3.98784866726e-05), - ), - cms.PSet( - name=cms.string("gammaEndcapMinus"), - type=cms.int32(4), - varType=cms.int32(2), - etaMin=cms.double(-3.0), - etaMax=cms.double(-1.479), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(0.000776596089228,1.63661712992e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.00446841488218,1.28857828225e-05), - ), - cms.PSet( - name=cms.string("hHFPlus"), - type=cms.int32(6), - varType=cms.int32(0), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.000902843902424,-1.05368116476e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.000928116206712,-2.02159610368e-05), - ), - cms.PSet( - name=cms.string("hHFMinus"), - type=cms.int32(6), - varType=cms.int32(0), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.000797275948578,-1.05466329044e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.000679522388353,-2.16586402923e-05), - ), - cms.PSet( - name=cms.string("egammaHFPlus"), - type=cms.int32(7), - varType=cms.int32(0), - etaMin=cms.double(2.901376), - etaMax=cms.double(5.2), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.00107966151869,1.12289163272e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.0022998808914,1.79406614595e-05), - ), - cms.PSet( - name=cms.string("egammaHFMinus"), - type=cms.int32(7), - varType=cms.int32(0), - etaMin=cms.double(-5.2), - etaMax=cms.double(-2.901376), - fx=cms.string("(x*[0])+(sq(x)*[1])"), - px=cms.vdouble(-0.00135787955563,1.2190906775e-05), - fy=cms.string("(x*[0])+(sq(x)*[1])"), - py=cms.vdouble(-0.00224502303282,1.86304722922e-05), - ), -) diff --git a/MetPhiCorrections/python/tools/multiplicityFit.py b/MetPhiCorrections/python/tools/multiplicityFit.py index 950745bcdcf..4e21b68a7e1 100644 --- a/MetPhiCorrections/python/tools/multiplicityFit.py +++ b/MetPhiCorrections/python/tools/multiplicityFit.py @@ -6,18 +6,20 @@ parser.add_option("--fitRange", dest="fitRange", default='0,2000', type="string", action="store", help="Which fitRange. Default:0,2000") parser.add_option("--xZoomRange", dest="xZoomRange", default='', type="string", action="store", help="Which xZoomRange. Default:Max") parser.add_option("--yZoomRange", dest="yZoomRange", default='-40,40', type="string", action="store", help="Which zoom range in y Axis. Default:-40,40") -parser.add_option("--mode", dest="mode", default='sumPt', type="string", action="store", help="Which mode [ngoodVertices/sumPt/multiplicity]") +parser.add_option("--mode", dest="mode", default='multiplicity', type="string", action="store", help="Which mode [ngoodVertices/sumPt/multiplicity]") parser.add_option("--input", dest="input", default='DYJetsToLL_M-50_HT-100toInf_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root', type="string", action="store", help="input file.Default:DYJetsToLL_M-50_HT-100toInf_Tune4C_13TeV-madgraph-tauola_Phys14DR-PU20bx25_PHYS14_25_V1-v1_AODSIM.root") parser.add_option("--rootGDir", dest="rootGDir", default='metPhiCorrInfoWriter', type="string", action="store", help="Which gDir was used in the production of the MEx,y profile [metPhiCorrInfoWriter/pfMEtMultCorrInfoWriter].") parser.add_option("--plotFileName", dest="plotFileName", default="plot.pdf", type="string", action="store", help="Filename the plot. Default:test.pdf") parser.add_option("--plotoutPutDir", dest="plotoutPutDir", default="/", type="string", action="store", help="dir name Default:/") parser.add_option("--textFileName", dest="textFileName", default="metPhiCorrections_cfi.py", type="string", action="store", help="Text file name that the corrections are appended to. Default:metPhiCorrections_cfi.py.") +parser.add_option("--era", dest="era", default="Data_default", type="string", action="store", help="Era (or year, for MC) for which the corrections were produced. Default:Data_default. (Will intentionally not work with this default parameter!)") (options, args) = parser.parse_args() import ROOT import pickle, os from math import pi, cos, sin, sqrt, atan2 +ROOT.gROOT.SetBatch(True) ROOT.gROOT.ProcessLine(".L $CMSSW_BASE/src/MetTools/Commons/scripts/tdrstyle.C") ROOT.setTDRStyle() from MetTools.MetPhiCorrections.tools.categories import * @@ -86,12 +88,14 @@ l.SetShadowColor(ROOT.kWhite) l.SetBorderSize(1) l.Draw() +os.system("mkdir -p "+options.plotoutPutDir) c1.Print(options.plotoutPutDir+options.plotFileName) c1.Print(options.plotoutPutDir+options.plotFileName.replace('.pdf', '.root')) c1.Print(options.plotoutPutDir+options.plotFileName.replace('.pdf', '.png')) with open(options.textFileName, "a") as ofile: ofile.write(' cms.PSet(\n') + ofile.write(' era=cms.string("'+str(options.era)+'"),\n') ofile.write(' name=cms.string("'+map['name'].replace('_','')+'"),\n') ofile.write(' type=cms.int32('+str(label[map['type']])+'),\n') ofile.write(' varType=cms.int32('+str(varType[options.mode])+'),\n') diff --git a/MetPhiCorrections/python/tools/runfits.sh b/MetPhiCorrections/python/tools/runfits.sh old mode 100644 new mode 100755 index 83f4bd3be4c..15f55d30cc4 --- a/MetPhiCorrections/python/tools/runfits.sh +++ b/MetPhiCorrections/python/tools/runfits.sh @@ -1 +1,21 @@ -./fits.sh Data_G_80X "/input/file/path/inputFile.root" "/output/file/path/" sumPt +#!/bin/sh + +./fits.sh MC_2018 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2018.root" "/user/npostiau/public_html/MetPhi/MC_2018/" ngoodVertices +./fits.sh MC_2017 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2017.root" "/user/npostiau/public_html/MetPhi/MC_2017/" ngoodVertices +./fits.sh MC_2016 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2016.root" "/user/npostiau/public_html/MetPhi/MC_2016/" ngoodVertices +./fits.sh Data_2018A "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018A.root" "/user/npostiau/public_html/MetPhi/Data2018A/" ngoodVertices +./fits.sh Data_2018B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018B.root" "/user/npostiau/public_html/MetPhi/Data2018B/" ngoodVertices +./fits.sh Data_2018C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018C.root" "/user/npostiau/public_html/MetPhi/Data2018C/" ngoodVertices +./fits.sh Data_2018D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018D.root" "/user/npostiau/public_html/MetPhi/Data2018D/" ngoodVertices +./fits.sh Data_2017B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017B.root" "/user/npostiau/public_html/MetPhi/Data2017B/" ngoodVertices +./fits.sh Data_2017C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017C.root" "/user/npostiau/public_html/MetPhi/Data2017C/" ngoodVertices +./fits.sh Data_2017D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017D.root" "/user/npostiau/public_html/MetPhi/Data2017D/" ngoodVertices +./fits.sh Data_2017E "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017E.root" "/user/npostiau/public_html/MetPhi/Data2017E/" ngoodVertices +./fits.sh Data_2017F "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017F.root" "/user/npostiau/public_html/MetPhi/Data2017F/" ngoodVertices +./fits.sh Data_2016B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016B.root" "/user/npostiau/public_html/MetPhi/Data2016B/" ngoodVertices +./fits.sh Data_2016C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016C.root" "/user/npostiau/public_html/MetPhi/Data2016C/" ngoodVertices +./fits.sh Data_2016D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016D.root" "/user/npostiau/public_html/MetPhi/Data2016D/" ngoodVertices +./fits.sh Data_2016E "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016E.root" "/user/npostiau/public_html/MetPhi/Data2016E/" ngoodVertices +./fits.sh Data_2016F "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016F.root" "/user/npostiau/public_html/MetPhi/Data2016F/" ngoodVertices +./fits.sh Data_2016G "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016G.root" "/user/npostiau/public_html/MetPhi/Data2016G/" ngoodVertices +./fits.sh Data_2016H "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016H.root" "/user/npostiau/public_html/MetPhi/Data2016H/" ngoodVertices diff --git a/MetPhiCorrections/python/tools/runfits_combined.sh b/MetPhiCorrections/python/tools/runfits_combined.sh new file mode 100755 index 00000000000..be96788111e --- /dev/null +++ b/MetPhiCorrections/python/tools/runfits_combined.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +mainOutput="multPhiCorr_combined_ngoodVertices_cfi.py" + +rm multPhiCorr_combined_ngoodVertices_cfi.py +echo "import FWCore.ParameterSet.Config as cms">>$mainOutput +echo "multPhiCorr_combined = cms.VPSet(">>$mainOutput + +./fits.sh MC_2018 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2018.root" "/user/npostiau/public_html/MetPhi/MC_2018/" ngoodVertices --combine +./fits.sh MC_2017 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2017.root" "/user/npostiau/public_html/MetPhi/MC_2017/" ngoodVertices --combine +./fits.sh MC_2016 "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_MC2016.root" "/user/npostiau/public_html/MetPhi/MC_2016/" ngoodVertices --combine +./fits.sh Data_2018A "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018A.root" "/user/npostiau/public_html/MetPhi/Data2018A/" ngoodVertices --combine +./fits.sh Data_2018B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018B.root" "/user/npostiau/public_html/MetPhi/Data2018B/" ngoodVertices --combine +./fits.sh Data_2018C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018C.root" "/user/npostiau/public_html/MetPhi/Data2018C/" ngoodVertices --combine +./fits.sh Data_2018D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2018D.root" "/user/npostiau/public_html/MetPhi/Data2018D/" ngoodVertices --combine +./fits.sh Data_2017B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017B.root" "/user/npostiau/public_html/MetPhi/Data2017B/" ngoodVertices --combine +./fits.sh Data_2017C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017C.root" "/user/npostiau/public_html/MetPhi/Data2017C/" ngoodVertices --combine +./fits.sh Data_2017D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017D.root" "/user/npostiau/public_html/MetPhi/Data2017D/" ngoodVertices --combine +./fits.sh Data_2017E "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017E.root" "/user/npostiau/public_html/MetPhi/Data2017E/" ngoodVertices --combine +./fits.sh Data_2017F "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2017F.root" "/user/npostiau/public_html/MetPhi/Data2017F/" ngoodVertices --combine +./fits.sh Data_2016B "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016B.root" "/user/npostiau/public_html/MetPhi/Data2016B/" ngoodVertices --combine +./fits.sh Data_2016C "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016C.root" "/user/npostiau/public_html/MetPhi/Data2016C/" ngoodVertices --combine +./fits.sh Data_2016D "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016D.root" "/user/npostiau/public_html/MetPhi/Data2016D/" ngoodVertices --combine +./fits.sh Data_2016E "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016E.root" "/user/npostiau/public_html/MetPhi/Data2016E/" ngoodVertices --combine +./fits.sh Data_2016F "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016F.root" "/user/npostiau/public_html/MetPhi/Data2016F/" ngoodVertices --combine +./fits.sh Data_2016G "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016G.root" "/user/npostiau/public_html/MetPhi/Data2016G/" ngoodVertices --combine +./fits.sh Data_2016H "/user/npostiau/CMSSW_10_2_11_MetTools/src/MetTools/MetPhiCorrections/test/fullProd/histo_merged_DataDoubleMu2016H.root" "/user/npostiau/public_html/MetPhi/Data2016H/" ngoodVertices --combine + +echo ")">>$mainOutput diff --git a/MetPhiCorrections/python/tools/writePythonCFG.py b/MetPhiCorrections/python/tools/writePythonCFG.py index dfd3427a6b4..fbc69409ac1 100644 --- a/MetPhiCorrections/python/tools/writePythonCFG.py +++ b/MetPhiCorrections/python/tools/writePythonCFG.py @@ -7,7 +7,7 @@ from optparse import OptionParser parser = OptionParser() parser.add_option("--in", dest="infile", default="", type="string", action="store", help="Inputfile. If none is given, will write output file for multMETCorrInfoWriter") -parser.add_option("--postfix", dest="postfix", default="PHYS14", type="string", action="store", help="identifier (e.g. PHYS14)") +parser.add_option("--postfix", dest="postfix", default="76X", type="string", action="store", help="identifier (e.g. 76X)") (options, args) = parser.parse_args() if options.infile=="": diff --git a/MetPhiCorrections/python/write_cff.py b/MetPhiCorrections/python/write_cff.py new file mode 100644 index 00000000000..ed40e0793c4 --- /dev/null +++ b/MetPhiCorrections/python/write_cff.py @@ -0,0 +1,22 @@ +from optparse import OptionParser +parser = OptionParser() +parser.add_option("--postfix", dest="postfix", default="76X", type="string", action="store", help="identifier (e.g. 76X)") +(options, args) = parser.parse_args() + +fileName = "phiCorrBins_"+options.postfix+"_cff.py" +ofile = file(fileName, 'w') +ofile.write('import FWCore.ParameterSet.Config as cms\n') +ofile.write('\n') +ofile.write('from MetTools.MetPhiCorrections.phiCorrBins_'+options.postfix+'_cfi import phiCorrBins_'+options.postfix+' as phiCorrBins\n') +ofile.write('\n') +ofile.write('metPhiCorrInfoWriter = cms.EDAnalyzer("metPhiCorrInfoWriter",\n') +ofile.write('\tvertexCollection = cms.untracked.InputTag("offlinePrimaryVertices"),\n') +ofile.write('\tsrcPFlow = cms.untracked.InputTag("particleFlow", ""),\n') +ofile.write('\tparameters = phiCorrBins\n') +ofile.write(')\n') +ofile.write('\n') +ofile.write('metPhiCorrInfoWriterSequence = cms.Sequence( metPhiCorrInfoWriter )\n') +ofile.write('\n') +ofile.close() +print "Written", fileName + diff --git a/MetPhiCorrections/test/crab_config_2018A.py b/MetPhiCorrections/test/crab_config_2018A.py new file mode 100644 index 00000000000..b2215de8743 --- /dev/null +++ b/MetPhiCorrections/test/crab_config_2018A.py @@ -0,0 +1,21 @@ +from CRABClient.UserUtilities import config , getUsernameFromSiteDB +config = config() + +config.General.requestName = 'METPhiCorr_analysis_Data2018A_102_v3' +config.General.workArea = 'crab_projects_2018' +config.General.transferOutputs = True +config.General.transferLogs = True + +config.JobType.pluginName = 'Analysis' +config.JobType.psetName = 'run_metPhiCorr_2018.py' + +config.Data.inputDataset = '/DoubleMuon/Run2018A-17Sep2018-v2/MINIAOD' +config.Data.inputDBS = 'global' +config.Data.splitting = 'LumiBased' +config.Data.unitsPerJob = 80 +config.Data.lumiMask = '/pnfs/iihe/cms/store/user/npostiau/json_2018.json' +config.Data.outLFNDirBase = '/store/user/npostiau/METPhi_2018' +config.Data.publication = True +config.Data.outputDatasetTag = 'CRAB3_Data2018A_102X_v3' + +config.Site.storageSite = 'T2_BE_IIHE' diff --git a/MetPhiCorrections/test/crab_config_2018B.py b/MetPhiCorrections/test/crab_config_2018B.py new file mode 100644 index 00000000000..8d9ba8623d1 --- /dev/null +++ b/MetPhiCorrections/test/crab_config_2018B.py @@ -0,0 +1,21 @@ +from CRABClient.UserUtilities import config , getUsernameFromSiteDB +config = config() + +config.General.requestName = 'METPhiCorr_analysis_Data2018B_102_v3' +config.General.workArea = 'crab_projects_2018' +config.General.transferOutputs = True +config.General.transferLogs = True + +config.JobType.pluginName = 'Analysis' +config.JobType.psetName = 'run_metPhiCorr_2018.py' + +config.Data.inputDataset = '/DoubleMuon/Run2018B-17Sep2018-v1/MINIAOD' +config.Data.inputDBS = 'global' +config.Data.splitting = 'LumiBased' +config.Data.unitsPerJob = 80 +config.Data.lumiMask = '/pnfs/iihe/cms/store/user/npostiau/json_2018.json' +config.Data.outLFNDirBase = '/store/user/npostiau/METPhi_2018' +config.Data.publication = True +config.Data.outputDatasetTag = 'CRAB3_Data2018B_102X_v3' + +config.Site.storageSite = 'T2_BE_IIHE' diff --git a/MetPhiCorrections/test/crab_config_2018C.py b/MetPhiCorrections/test/crab_config_2018C.py new file mode 100644 index 00000000000..21b7893b7ed --- /dev/null +++ b/MetPhiCorrections/test/crab_config_2018C.py @@ -0,0 +1,21 @@ +from CRABClient.UserUtilities import config , getUsernameFromSiteDB +config = config() + +config.General.requestName = 'METPhiCorr_analysis_Data2018C_102_v3' +config.General.workArea = 'crab_projects_2018' +config.General.transferOutputs = True +config.General.transferLogs = True + +config.JobType.pluginName = 'Analysis' +config.JobType.psetName = 'run_metPhiCorr_2018.py' + +config.Data.inputDataset = '/DoubleMuon/Run2018C-17Sep2018-v1/MINIAOD' +config.Data.inputDBS = 'global' +config.Data.splitting = 'LumiBased' +config.Data.unitsPerJob = 80 +config.Data.lumiMask = '/pnfs/iihe/cms/store/user/npostiau/json_2018.json' +config.Data.outLFNDirBase = '/store/user/npostiau/METPhi_2018' +config.Data.publication = True +config.Data.outputDatasetTag = 'CRAB3_Data2018C_102X_v3' + +config.Site.storageSite = 'T2_BE_IIHE' diff --git a/MetPhiCorrections/test/crab_config_2018D.py b/MetPhiCorrections/test/crab_config_2018D.py new file mode 100644 index 00000000000..d3b6f3cf820 --- /dev/null +++ b/MetPhiCorrections/test/crab_config_2018D.py @@ -0,0 +1,21 @@ +from CRABClient.UserUtilities import config , getUsernameFromSiteDB +config = config() + +config.General.requestName = 'METPhiCorr_analysis_Data2018D_102_v3' +config.General.workArea = 'crab_projects_2018' +config.General.transferOutputs = True +config.General.transferLogs = True + +config.JobType.pluginName = 'Analysis' +config.JobType.psetName = 'run_metPhiCorr_2018.py' + +config.Data.inputDataset = '/DoubleMuon/Run2018D-PromptReco-v2/MINIAOD' +config.Data.inputDBS = 'global' +config.Data.splitting = 'LumiBased' +config.Data.unitsPerJob = 80 +config.Data.lumiMask = '/pnfs/iihe/cms/store/user/npostiau/json_2018.json' +config.Data.outLFNDirBase = '/store/user/npostiau/METPhi_2018' +config.Data.publication = True +config.Data.outputDatasetTag = 'CRAB3_Data2018D_102X_v3' + +config.Site.storageSite = 'T2_BE_IIHE' diff --git a/MetPhiCorrections/test/plotting/combine_corrections.cc b/MetPhiCorrections/test/plotting/combine_corrections.cc new file mode 100644 index 00000000000..1c6ced8c82c --- /dev/null +++ b/MetPhiCorrections/test/plotting/combine_corrections.cc @@ -0,0 +1,165 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//Combines the corrections (as a function of nvtx) for all particle types, to have the final plots of MET corrections (in X and Y) to be applied on a given era. +//Also fits a linear function to these plots. These functions are stored in a txt file. + +double fitFunction(double *x, double *par) +{ + double result = -1.; + result = par[0]+par[1]*x[0]; + return result; +} + +int combine_corrections(int year=2016){ + + //Modify file names and paths if needed. + ofstream outfile; + outfile.open("fits_"+std::to_string(year)+".txt"); + std::vector files; + if(year==2018){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018A.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2018.root")); + } + else if(year==2017){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017E.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017F.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2017.root")); + } + else if(year==2016){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016E.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016F.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016G.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016H.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2016.root")); + } + + std::vector outFiles; + if(year==2018){ + outFiles.push_back(new TFile("plots_2018/outFile_combined_DataDoubleMu2018A.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2018/outFile_combined_DataDoubleMu2018B.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2018/outFile_combined_DataDoubleMu2018C.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2018/outFile_combined_DataDoubleMu2018D.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2018/outFile_combined_MC2018.root", "RECREATE")); + } + else if(year==2017){ + outFiles.push_back(new TFile("plots_2017/outFile_combined_DataDoubleMu2017B.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2017/outFile_combined_DataDoubleMu2017C.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2017/outFile_combined_DataDoubleMu2017D.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2017/outFile_combined_DataDoubleMu2017E.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2017/outFile_combined_DataDoubleMu2017F.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2017/outFile_combined_MC2017.root", "RECREATE")); + } + else if(year==2016){ + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016B.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016C.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016D.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016E.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016F.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016G.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_DataDoubleMu2016H.root", "RECREATE")); + outFiles.push_back(new TFile("plots_2016/outFile_combined_MC2016.root", "RECREATE")); + } + + + for(unsigned int iFiles = 0 ; iFiles < files.size() ; iFiles++){ + files[iFiles]->cd(); + + std::vector histos_x; + std::vector histos_y; + + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hEtaPlus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hEtaMinus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hHFPlus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hHFMinus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0Barrel_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0EndcapPlus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0EndcapMinus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaBarrel_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaEndcapPlus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaEndcapMinus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_egammaHFPlus_Px")); + histos_x.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_egammaHFMinus_Px")); + + + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hEtaPlus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hEtaMinus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hHFPlus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_hHFMinus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0Barrel_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0EndcapPlus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_h0EndcapMinus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaBarrel_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaEndcapPlus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_gammaEndcapMinus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_egammaHFPlus_Py")); + histos_y.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/metPhiCorrInfoWriter_ngoodVertices_egammaHFMinus_Py")); + + + TH1D* histo_combined_x = new TH1D("histo_combined_x",";ngoodVertices;p_{x}(GeV)",100,0,100); + TH1D* histo_combined_y = new TH1D("histo_combined_y",";ngoodVertices;p_{y}(GeV)",100,0,100); + std::vector binValues_x (101,0); + std::vector squaredBinErrors_x (101,0); + std::vector binValues_y (101,0); + std::vector squaredBinErrors_y (101,0); + + for (unsigned int iHist = 0 ; iHist < histos_x.size() ; iHist++){ + for (int iBin = 0 ; iBin <= histos_x[iHist]->GetNbinsX() ; iBin++){ + binValues_x[iBin] += histos_x[iHist]->GetBinContent(iBin); + binValues_y[iBin] += histos_y[iHist]->GetBinContent(iBin); + squaredBinErrors_x[iBin] += histos_x[iHist]->GetBinError(iBin)*histos_x[iHist]->GetBinError(iBin); + squaredBinErrors_y[iBin] += histos_y[iHist]->GetBinError(iBin)*histos_y[iHist]->GetBinError(iBin); + } + } + for (int iBin = 0 ; iBin <= histo_combined_x->GetNbinsX() ; iBin++){ + histo_combined_x->SetBinContent(iBin, binValues_x[iBin]); + histo_combined_x->SetBinError(iBin, sqrt(squaredBinErrors_x[iBin])); + histo_combined_y->SetBinContent(iBin, binValues_y[iBin]); + histo_combined_y->SetBinError(iBin, sqrt(squaredBinErrors_y[iBin])); + } + + outFiles[iFiles]->cd(); + histo_combined_x->Write(); + histo_combined_y->Write(); + outfile << outFiles[iFiles]->GetName() << " : fit in x is "; + TF1* fit_x = new TF1("fit_x", fitFunction, 0, histo_combined_x->GetNbinsX()+1,2); + histo_combined_x->Fit("fit_x"); + double par0_x = fit_x->GetParameter(0); + double par1_x = fit_x->GetParameter(1); + if(par1_x >= 0.) outfile << par0_x << "+" << par1_x << "*x\n"; + else outfile << par0_x << par1_x << "*x\n"; + outfile << outFiles[iFiles]->GetName() << " : fit in y is "; + TF1* fit_y = new TF1("fit_y", fitFunction, 0, histo_combined_y->GetNbinsX()+1,2); + histo_combined_y->Fit("fit_y"); + double par0_y = fit_y->GetParameter(0); + double par1_y = fit_y->GetParameter(1); + if(par1_y >= 0.) outfile << par0_y << "+" << par1_y << "*x\n"; + else outfile << par0_y << par1_y << "*x\n"; + + } + + outfile.close(); + return 0; +} + diff --git a/MetPhiCorrections/test/plotting/fits_2016.txt b/MetPhiCorrections/test/plotting/fits_2016.txt new file mode 100644 index 00000000000..a63a0946d76 --- /dev/null +++ b/MetPhiCorrections/test/plotting/fits_2016.txt @@ -0,0 +1,16 @@ +plots_2016/outFile_combined_DataDoubleMu2016B.root : fit in x is -0.125174-0.047576*x +plots_2016/outFile_combined_DataDoubleMu2016B.root : fit in y is 0.398678+0.134724*x +plots_2016/outFile_combined_DataDoubleMu2016C.root : fit in x is 0.381167-0.0982318*x +plots_2016/outFile_combined_DataDoubleMu2016C.root : fit in y is 0.216768+0.161233*x +plots_2016/outFile_combined_DataDoubleMu2016D.root : fit in x is 0.52478-0.0599483*x +plots_2016/outFile_combined_DataDoubleMu2016D.root : fit in y is 0.437976+0.159499*x +plots_2016/outFile_combined_DataDoubleMu2016E.root : fit in x is 0.539429-0.0710905*x +plots_2016/outFile_combined_DataDoubleMu2016E.root : fit in y is 0.520856+0.207195*x +plots_2016/outFile_combined_DataDoubleMu2016F.root : fit in x is 0.193307-0.0214956*x +plots_2016/outFile_combined_DataDoubleMu2016F.root : fit in y is 1.08994+0.169809*x +plots_2016/outFile_combined_DataDoubleMu2016G.root : fit in x is -0.265897+0.0449082*x +plots_2016/outFile_combined_DataDoubleMu2016G.root : fit in y is 0.71402+0.0991733*x +plots_2016/outFile_combined_DataDoubleMu2016H.root : fit in x is -0.243752+0.0442548*x +plots_2016/outFile_combined_DataDoubleMu2016H.root : fit in y is 0.815582+0.155282*x +plots_2016/outFile_combined_MC2016.root : fit in x is -0.22097-0.201953*x +plots_2016/outFile_combined_MC2016.root : fit in y is 0.775789-0.0311127*x diff --git a/MetPhiCorrections/test/plotting/fits_2017.txt b/MetPhiCorrections/test/plotting/fits_2017.txt new file mode 100644 index 00000000000..dfbfa80735e --- /dev/null +++ b/MetPhiCorrections/test/plotting/fits_2017.txt @@ -0,0 +1,12 @@ +plots_2017/outFile_combined_DataDoubleMu2017B.root : fit in x is 1.74961-0.192266*x +plots_2017/outFile_combined_DataDoubleMu2017B.root : fit in y is -1.77794+0.355999*x +plots_2017/outFile_combined_DataDoubleMu2017C.root : fit in x is 0.927341-0.147249*x +plots_2017/outFile_combined_DataDoubleMu2017C.root : fit in y is -1.14252+0.273589*x +plots_2017/outFile_combined_DataDoubleMu2017D.root : fit in x is 1.55561-0.146475*x +plots_2017/outFile_combined_DataDoubleMu2017D.root : fit in y is -1.2123+0.247262*x +plots_2017/outFile_combined_DataDoubleMu2017E.root : fit in x is 2.00513-0.153154*x +plots_2017/outFile_combined_DataDoubleMu2017E.root : fit in y is -0.632113+0.181838*x +plots_2017/outFile_combined_DataDoubleMu2017F.root : fit in x is 2.21044-0.206766*x +plots_2017/outFile_combined_DataDoubleMu2017F.root : fit in y is 0.397701+0.267896*x +plots_2017/outFile_combined_MC2017.root : fit in x is 0.547989-0.236452*x +plots_2017/outFile_combined_MC2017.root : fit in y is -0.457084+0.184493*x diff --git a/MetPhiCorrections/test/plotting/fits_2018.txt b/MetPhiCorrections/test/plotting/fits_2018.txt new file mode 100644 index 00000000000..887275d9fd5 --- /dev/null +++ b/MetPhiCorrections/test/plotting/fits_2018.txt @@ -0,0 +1,10 @@ +plots_2018/outFile_combined_DataDoubleMu2018A.root : fit in x is -1.6147+0.436754*x +plots_2018/outFile_combined_DataDoubleMu2018A.root : fit in y is -0.208991+0.0876111*x +plots_2018/outFile_combined_DataDoubleMu2018B.root : fit in x is -2.46619+0.574856*x +plots_2018/outFile_combined_DataDoubleMu2018B.root : fit in y is -0.624164+0.20996*x +plots_2018/outFile_combined_DataDoubleMu2018C.root : fit in x is -0.851097+0.607926*x +plots_2018/outFile_combined_DataDoubleMu2018C.root : fit in y is -1.74918+0.15679*x +plots_2018/outFile_combined_DataDoubleMu2018D.root : fit in x is -1.11108+0.636604*x +plots_2018/outFile_combined_DataDoubleMu2018D.root : fit in y is -1.4753+0.134308*x +plots_2018/outFile_combined_MC2018.root : fit in x is -0.979964+0.360148*x +plots_2018/outFile_combined_MC2018.root : fit in y is -0.120875+0.189281*x diff --git a/MetPhiCorrections/test/plotting/prepare_combined_plots.cc b/MetPhiCorrections/test/plotting/prepare_combined_plots.cc new file mode 100644 index 00000000000..b3424810d27 --- /dev/null +++ b/MetPhiCorrections/test/plotting/prepare_combined_plots.cc @@ -0,0 +1,226 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//Very dirty function, used to prepare combined plots superimposing XY corrections for different eras and comparing with the results of the other method (taking directly the MET value to compute the correction). + +int prepare_combined_plots(int year = 2018, int partial=0){ + + std::vector files; + if(year==2018){ + if(partial==0 or partial==1 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2018/outFile_combined_DataDoubleMu2018A.root")); + if(partial==0 or partial==2 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2018/outFile_combined_DataDoubleMu2018B.root")); + if(partial==0 or partial==3 or partial==34 or partial==123) files.push_back(TFile::Open("plots_2018/outFile_combined_DataDoubleMu2018C.root")); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2018/outFile_combined_DataDoubleMu2018D.root")); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2018/outFile_combined_MC2018.root")); + } + else if(year==2017){ + if(partial==0 or partial==1 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2017/outFile_combined_DataDoubleMu2017B.root")); + if(partial==0 or partial==2 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2017/outFile_combined_DataDoubleMu2017C.root")); + if(partial==0 or partial==3 or partial==34 or partial==123) files.push_back(TFile::Open("plots_2017/outFile_combined_DataDoubleMu2017D.root")); + if(partial==0 or partial==4 or partial==34 or partial==45 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2017/outFile_combined_DataDoubleMu2017E.root")); + if(partial==0 or partial==5 or partial==56 or partial==45 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2017/outFile_combined_DataDoubleMu2017F.root")); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2017/outFile_combined_MC2017.root")); + } + else if(year==2016){ + if(partial==0 or partial==1 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016B.root")); + if(partial==0 or partial==2 or partial==12 or partial==123) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016C.root")); + if(partial==0 or partial==3 or partial==34 or partial==123) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016D.root")); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016E.root")); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016F.root")); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016G.root")); + if(partial==0 or partial==7 or partial==78 or partial==789 or partial==4567) files.push_back(TFile::Open("plots_2016/outFile_combined_DataDoubleMu2016H.root")); + if(partial==0 or partial==8 or partial==78 or partial==789) files.push_back(TFile::Open("plots_2016/outFile_combined_MC2016.root")); + } + + std::vector laurentFunctionsX; + std::vector laurentFunctionsY; + if(year==2018){ + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2018A_x","0.363*x-1.945",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2018B_x","0.492*x-2.936",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2018C_x","0.521*x-1.445",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2018D_x","0.531*x-1.376",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2018MC_x","0.297*x-0.142",0,100)); + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2018A_y","0.071*x-0.307",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2018B_y","0.179*x-0.787",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2018C_y","0.119*x-1.964",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2018D_y","0.088*x-1.571",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2018MC_y","0.116*x+0.013",0,100)); + } + else if(year==2017){ + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2017B_x","-0.259*x+1.954",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2017C_x","-0.233*x+1.083",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2017D_x","-0.238*x+1.805",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==45 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2017E_x","-0.212*x+1.851",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==45 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2017F_x","-0.233*x+2.241",0,100)); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2017MC_x","-0.218*x+0.493",0,100)); + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2017B_y","0.354*x-2.467",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2017C_y","0.258*x-1.174",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2017D_y","0.236*x-1.444",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==45 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2017E_y","0.158*x-0.478",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==45 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2017F_y","0.213*x+0.685",0,100)); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2017MC_y","0.177*x-0.337",0,100)); + } + else if(year==2016){ + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2016B_x","-0.048*x-0.108",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2016C_x","-0.092*x+0.393",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsX.push_back(new TF1("laurentFunctions2016D_x","-0.058*x+0.567",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2016E_x","-0.066*x+0.537",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2016F_x","-0.031*x+0.399",0,100)); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2016G_x","0.041*x-0.290",0,100)); + if(partial==0 or partial==7 or partial==78 or partial==789 or partial==4567) laurentFunctionsX.push_back(new TF1("laurentFunctions2016H_x","0.033*x-0.210",0,100)); + if(partial==0 or partial==8 or partial==78 or partial==789) laurentFunctionsX.push_back(new TF1("laurentFunctions2016MC_x","-0.195*x-0.171",0,100)); + if(partial==0 or partial==1 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2016B_y","0.125*x+0.356",0,100)); + if(partial==0 or partial==2 or partial==12 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2016C_y","0.151*x+0.114",0,100)); + if(partial==0 or partial==3 or partial==34 or partial==123) laurentFunctionsY.push_back(new TF1("laurentFunctions2016D_y","0.148*x+0.403",0,100)); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2016E_y","0.189*x-0.495",0,100)); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2016F_y","0.161*x+0.960",0,100)); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2016G_y","0.096*x+0.666",0,100)); + if(partial==0 or partial==7 or partial==78 or partial==789 or partial==4567) laurentFunctionsY.push_back(new TF1("laurentFunctions2016H_y","0.142*x+0.817",0,100)); + if(partial==0 or partial==8 or partial==78 or partial==789) laurentFunctionsY.push_back(new TF1("laurentFunctions2016MC_y","-0.031*x+0.788",0,100)); + } + + std::vector legendNames; + if(year==2018){ + if(partial==0 or partial==1 or partial==12 or partial==123) legendNames.push_back("2018A"); + if(partial==0 or partial==2 or partial==12 or partial==123) legendNames.push_back("2018B"); + if(partial==0 or partial==3 or partial==34 or partial==123) legendNames.push_back("2018C"); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) legendNames.push_back("2018D"); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) legendNames.push_back("MC2018 (DY)"); + } + else if(year==2017){ + if(partial==0 or partial==1 or partial==12 or partial==123) legendNames.push_back("2017B"); + if(partial==0 or partial==2 or partial==12 or partial==123) legendNames.push_back("2017C"); + if(partial==0 or partial==3 or partial==34 or partial==123) legendNames.push_back("2017D"); + if(partial==0 or partial==4 or partial==34 or partial==45 or partial==456 or partial==4567) legendNames.push_back("2017E"); + if(partial==0 or partial==5 or partial==56 or partial==45 or partial==456 or partial==4567) legendNames.push_back("2017F"); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) legendNames.push_back("MC2017 (DY)"); + } + else if(year==2016){ + if(partial==0 or partial==1 or partial==12 or partial==123) legendNames.push_back("2016B"); + if(partial==0 or partial==2 or partial==12 or partial==123) legendNames.push_back("2016C"); + if(partial==0 or partial==3 or partial==34 or partial==123) legendNames.push_back("2016D"); + if(partial==0 or partial==4 or partial==34 or partial==456 or partial==4567) legendNames.push_back("2016E"); + if(partial==0 or partial==5 or partial==56 or partial==456 or partial==4567) legendNames.push_back("2016F"); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) legendNames.push_back("2016G"); + if(partial==0 or partial==7 or partial==78 or partial==789 or partial==4567) legendNames.push_back("2016H"); + if(partial==0 or partial==8 or partial==78 or partial==789) legendNames.push_back("MC2016 (DY)"); + } + + std::vector colors; + if(partial==0 or partial==1 or partial==12 or partial==123) colors.push_back(4); + if(partial==0 or partial==2 or partial==12 or partial==123) colors.push_back(2); + if(partial==0 or partial==3 or partial==34 or partial==123) colors.push_back(3); + if(partial==0 or partial==4 or partial==45 or partial==34 or partial==456 or partial==4567) colors.push_back(6); + if(partial==0 or partial==5 or partial==45 or partial==56 or partial==456 or partial==4567) colors.push_back(7); + if(partial==0 or partial==6 or partial==56 or partial==456 or partial==4567) colors.push_back(8); + if(partial==0 or partial==7 or partial==78 or partial==789 or partial==4567) colors.push_back(42); + if(partial==0 or partial==8 or partial==78 or partial==789) colors.push_back(28); + + std::cout << "Files are open." << std::endl; + + int maxNvtx = 100; + if(year==2016) maxNvtx = 50; + if(year==2017) maxNvtx = 75; + + std::vector names, shortNames, xAxis, yAxis; + std::vector range; + names.push_back("histo_combined_x"); + shortNames.push_back("combined_x"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("histo_combined_y"); + shortNames.push_back("combined_y"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + for(unsigned iHist = 0; iHist < names.size(); iHist++){ + std::vector histos; + TLegend theLegend(0.7,0.7,0.9,0.9); + double minValue = 0; + double maxValue = 0; + for(unsigned iFiles = 0 ; iFiles < files.size() ; iFiles++){ + files[iFiles]->cd(); + histos.push_back((TH1D*)gDirectory->Get(names[iHist])); + histos[iFiles]->SetLineColor(colors[iFiles]); + laurentFunctionsX[iFiles]->SetLineColor(colors[iFiles]); + laurentFunctionsY[iFiles]->SetLineColor(colors[iFiles]); + histos[iFiles]->SetTitle(shortNames[iHist]); + histos[iFiles]->GetXaxis()->SetTitle(xAxis[iHist]); + histos[iFiles]->GetXaxis()->SetLabelSize(0.05); + histos[iFiles]->GetXaxis()->SetTitleSize(0.05); + histos[iFiles]->GetXaxis()->SetTitleOffset(0.98); + histos[iFiles]->GetYaxis()->SetTitle(yAxis[iHist]); + histos[iFiles]->GetYaxis()->SetLabelSize(0.05); + histos[iFiles]->GetYaxis()->SetTitleSize(0.05); + histos[iFiles]->GetYaxis()->SetTitleOffset(0.8); + histos[iFiles]->SetAxisRange(0.,range[iHist],"X"); + histos[iFiles]->SetAxisRange(-20.,20.,"Y"); + if(minValue > histos[iFiles]->GetMinimum()) minValue = histos[iFiles]->GetMinimum(); + if(maxValue < histos[iFiles]->GetMaximum()) maxValue = histos[iFiles]->GetMaximum(); + + theLegend.AddEntry(histos[iFiles],legendNames[iFiles],"lpfe"); + } + TCanvas myCan("can","Output canvas",700,500); + myCan.cd(); + gStyle->SetOptStat(0); + for(unsigned i = 0 ; i < files.size() ; i++){ + if(minValue > 0) histos[i]->SetMinimum(minValue*0.9); + else histos[i]->SetMinimum(minValue*1.1); + if(maxValue > 0) histos[i]->SetMaximum(maxValue*1.1); + else histos[i]->SetMaximum(maxValue*0.9); + histos[i]->Draw("e0same"); + if(iHist == 0) laurentFunctionsX[i]->Draw("same"); + if(iHist == 1) laurentFunctionsY[i]->Draw("same"); + } + theLegend.Draw(); + if(year==2018 and partial==0) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_all2018.pdf"); + else if(year==2018 and partial==1) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018A.pdf"); + else if(year==2018 and partial==2) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018B.pdf"); + else if(year==2018 and partial==3) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018C.pdf"); + else if(year==2018 and partial==4) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018D.pdf"); + else if(year==2018 and partial==5) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018MC.pdf"); + else if(year==2018 and partial==12) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018AB.pdf"); + else if(year==2018 and partial==34) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+"_2018CD.pdf"); + + else if(year==2017 and partial==0) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_all2017.pdf"); + else if(year==2017 and partial==1) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017B.pdf"); + else if(year==2017 and partial==2) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017C.pdf"); + else if(year==2017 and partial==3) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017D.pdf"); + else if(year==2017 and partial==4) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017E.pdf"); + else if(year==2017 and partial==5) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017F.pdf"); + else if(year==2017 and partial==6) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017MC.pdf"); + else if(year==2017 and partial==12) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017BC.pdf"); + else if(year==2017 and partial==34) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017DE.pdf"); + else if(year==2017 and partial==45) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017EF.pdf"); + else if(year==2017 and partial==123) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+"_2017BCD.pdf"); + + else if(year==2016 and partial==0) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_all2016.pdf"); + else if(year==2016 and partial==1) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016B.pdf"); + else if(year==2016 and partial==2) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016C.pdf"); + else if(year==2016 and partial==3) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016D.pdf"); + else if(year==2016 and partial==4) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016E.pdf"); + else if(year==2016 and partial==5) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016F.pdf"); + else if(year==2016 and partial==6) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016G.pdf"); + else if(year==2016 and partial==7) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016H.pdf"); + else if(year==2016 and partial==8) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016MC.pdf"); + else if(year==2016 and partial==12) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016BC.pdf"); + else if(year==2016 and partial==34) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016DE.pdf"); + else if(year==2016 and partial==56) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016FG.pdf"); + else if(year==2016 and partial==123) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016BCD.pdf"); + else if(year==2016 and partial==456) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016EFG.pdf"); + else if(year==2016 and partial==4567) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+"_2016EFGH.pdf"); + } + + return 0; +} diff --git a/MetPhiCorrections/test/plotting/prepare_plots.cc b/MetPhiCorrections/test/plotting/prepare_plots.cc new file mode 100644 index 00000000000..6f331f10f8a --- /dev/null +++ b/MetPhiCorrections/test/plotting/prepare_plots.cc @@ -0,0 +1,382 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//Prepares plots for the X and Y MET corrections as a function of different variables and of different particle types. Superimposes them for different eras within the same year. + +int prepare_plots(int year=2018){ + + //Update file names and paths if needed. + std::vector files; + if(year==2018){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018A.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2018D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2018.root")); + } + else if (year==2017){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017E.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2017F.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2017.root")); + } + else if (year==2016){ + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016B.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016C.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016D.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016E.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016F.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016G.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_DataDoubleMu2016H.root")); + files.push_back(TFile::Open("../fullProd/histo_merged_MC2016.root")); + } + + std::vector legendNames; + if(year==2018){ + legendNames.push_back("2018A"); + legendNames.push_back("2018B"); + legendNames.push_back("2018C"); + legendNames.push_back("2018D"); + legendNames.push_back("MC2018 (DY)"); + } + else if (year==2017){ + legendNames.push_back("2017B"); + legendNames.push_back("2017C"); + legendNames.push_back("2017D"); + legendNames.push_back("2017E"); + legendNames.push_back("2017F"); + legendNames.push_back("MC2017 (DY)"); + } + else if (year==2016){ + legendNames.push_back("2016B"); + legendNames.push_back("2016C"); + legendNames.push_back("2016D"); + legendNames.push_back("2016E"); + legendNames.push_back("2016F"); + legendNames.push_back("2016G"); + legendNames.push_back("2016H"); + legendNames.push_back("MC2016 (DY)"); + } + + std::vector colors{4,2,3,6,7,8,42,28}; + + std::cout << "Files are open." << std::endl; + + int maxNvtx = 50; + + std::vector names, shortNames, xAxis, yAxis; + std::vector range; + names.push_back("metPhiCorrInfoWriter_multiplicity_hEtaPlus_Px"); + shortNames.push_back("mult_hEtaPlus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_multiplicity_hEtaPlus_Py"); + shortNames.push_back("mult_hEtaPlus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_multiplicity_hEtaMinus_Px"); + shortNames.push_back("mult_hEtaMinus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_multiplicity_hEtaMinus_Py"); + shortNames.push_back("mult_hEtaMinus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hEtaPlus_Px"); + shortNames.push_back("vert_hEtaPlus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hEtaPlus_Py"); + shortNames.push_back("vert_hEtaPlus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hEtaMinus_Px"); + shortNames.push_back("vert_hEtaMinus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hEtaMinus_Py"); + shortNames.push_back("vert_hEtaMinus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_sumPt_hEtaPlus_Px"); + shortNames.push_back("pt_hEtaPlus_Px"); + xAxis.push_back("sumPt (GeV)"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_sumPt_hEtaPlus_Py"); + shortNames.push_back("pt_hEtaPlus_Py"); + xAxis.push_back("sumPt (GeV)"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_sumPt_hEtaMinus_Px"); + shortNames.push_back("pt_hEtaMinus_Px"); + xAxis.push_back("sumPt (GeV)"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_sumPt_hEtaMinus_Py"); + shortNames.push_back("pt_hEtaMinus_Py"); + xAxis.push_back("sumPt (GeV)"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(1000); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0Barrel_Px"); + shortNames.push_back("mult_h0Barrel_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0Barrel_Py"); + shortNames.push_back("mult_h0Barrel_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0EndcapPlus_Px"); + shortNames.push_back("mult_h0EndcapPlus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0EndcapPlus_Py"); + shortNames.push_back("mult_h0EndcapPlus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0EndcapMinus_Px"); + shortNames.push_back("mult_h0EndcapMinus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_h0EndcapMinus_Py"); + shortNames.push_back("mult_h0EndcapMinus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(50); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaBarrel_Px"); + shortNames.push_back("mult_gammaBarrel_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(500); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaBarrel_Py"); + shortNames.push_back("mult_gammaBarrel_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(500); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaEndcapPlus_Px"); + shortNames.push_back("mult_gammaEndcapPlus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaEndcapPlus_Py"); + shortNames.push_back("mult_gammaEndcapPlus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaEndcapMinus_Px"); + shortNames.push_back("mult_gammaEndcapMinus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_multiplicity_gammaEndcapMinus_Py"); + shortNames.push_back("mult_gammaEndcapMinus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_multiplicity_egammaHFPlus_Px"); + shortNames.push_back("mult_egammaHFPlus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_egammaHFPlus_Py"); + shortNames.push_back("mult_egammaHFPlus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_egammaHFMinus_Px"); + shortNames.push_back("mult_egammaHFMinus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_egammaHFMinus_Py"); + shortNames.push_back("mult_egammaHFMinus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_hHFMinus_Px"); + shortNames.push_back("mult_hHFMinus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_hHFMinus_Py"); + shortNames.push_back("mult_hHFMinus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_hHFPlus_Px"); + shortNames.push_back("mult_hHFPlus_Px"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_multiplicity_hHFPlus_Py"); + shortNames.push_back("mult_hHFPlus_Py"); + xAxis.push_back("multiplicity"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(300); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hHFMinus_Px"); + shortNames.push_back("vert_hHFMinus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hHFMinus_Py"); + shortNames.push_back("vert_hHFMinus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hHFPlus_Px"); + shortNames.push_back("vert_hHFPlus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_hHFPlus_Py"); + shortNames.push_back("vert_hHFPlus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0Barrel_Px"); + shortNames.push_back("vert_h0Barrel_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0Barrel_Py"); + shortNames.push_back("vert_h0Barrel_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0EndcapPlus_Px"); + shortNames.push_back("vert_h0EndcapPlus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0EndcapPlus_Py"); + shortNames.push_back("vert_h0EndcapPlus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0EndcapMinus_Px"); + shortNames.push_back("vert_h0EndcapMinus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_h0EndcapMinus_Py"); + shortNames.push_back("vert_h0EndcapMinus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaBarrel_Px"); + shortNames.push_back("vert_gammaBarrel_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaBarrel_Py"); + shortNames.push_back("vert_gammaBarrel_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaEndcapPlus_Px"); + shortNames.push_back("vert_gammaEndcapPlus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaEndcapPlus_Py"); + shortNames.push_back("vert_gammaEndcapPlus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaEndcapMinus_Px"); + shortNames.push_back("vert_gammaEndcapMinus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_gammaEndcapMinus_Py"); + shortNames.push_back("vert_gammaEndcapMinus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(100); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_egammaHFPlus_Px"); + shortNames.push_back("vert_egammaHFPlus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_egammaHFPlus_Py"); + shortNames.push_back("vert_egammaHFPlus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_egammaHFMinus_Px"); + shortNames.push_back("vert_egammaHFMinus_Px"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{x}(GeV)"); + range.push_back(maxNvtx); + names.push_back("metPhiCorrInfoWriter_ngoodVertices_egammaHFMinus_Py"); + shortNames.push_back("vert_egammaHFMinus_Py"); + xAxis.push_back("ngoodVertices"); + yAxis.push_back("p_{y}(GeV)"); + range.push_back(maxNvtx); + + for(unsigned iHist = 0; iHist < names.size(); iHist++){ + std::vector histos; + TLegend theLegend(0.7,0.7,0.9,0.9); + double minValue = 0; + double maxValue = 0; + for(unsigned iFiles = 0 ; iFiles < files.size() ; iFiles++){ + files[iFiles]->cd(); + histos.push_back((TH1D*)gDirectory->Get("metPhiCorrInfoWriter/"+names[iHist])); + histos[iFiles]->SetLineColor(colors[iFiles]); + histos[iFiles]->SetTitle(shortNames[iHist]); + histos[iFiles]->GetXaxis()->SetTitle(xAxis[iHist]); + histos[iFiles]->GetXaxis()->SetLabelSize(0.05); + histos[iFiles]->GetXaxis()->SetTitleSize(0.05); + histos[iFiles]->GetXaxis()->SetTitleOffset(0.98); + histos[iFiles]->GetYaxis()->SetTitle(yAxis[iHist]); + histos[iFiles]->GetYaxis()->SetLabelSize(0.05); + histos[iFiles]->GetYaxis()->SetTitleSize(0.05); + histos[iFiles]->GetYaxis()->SetTitleOffset(0.8); + histos[iFiles]->SetAxisRange(0.,range[iHist],"X"); + if(minValue > histos[iFiles]->GetMinimum()) minValue = histos[iFiles]->GetMinimum(); + if(maxValue < histos[iFiles]->GetMaximum()) maxValue = histos[iFiles]->GetMaximum(); + + theLegend.AddEntry(histos[iFiles],legendNames[iFiles],"lpfe"); + } + TCanvas myCan("can","Output canvas",700,500); + myCan.cd(); + gStyle->SetOptStat(0); + for(unsigned i = 0 ; i < files.size() ; i++){ + if(minValue > 0) histos[i]->SetMinimum(minValue*0.9); + else histos[i]->SetMinimum(minValue*1.1); + if(maxValue > 0) histos[i]->SetMaximum(maxValue*1.1); + else histos[i]->SetMaximum(maxValue*0.9); + histos[i]->Draw("e0same"); + } + theLegend.Draw(); + if(year==2018) myCan.SaveAs("plots_2018/plot_"+shortNames[iHist]+".pdf"); + else if(year==2017) myCan.SaveAs("plots_2017/plot_"+shortNames[iHist]+".pdf"); + else if(year==2016) myCan.SaveAs("plots_2016/plot_"+shortNames[iHist]+".pdf"); + } + + return 0; +} diff --git a/MetPhiCorrections/test/run_metPhiCorr.py b/MetPhiCorrections/test/run_metPhiCorr.py index 78b57f4f318..154a90a4e3a 100644 --- a/MetPhiCorrections/test/run_metPhiCorr.py +++ b/MetPhiCorrections/test/run_metPhiCorr.py @@ -1,31 +1,29 @@ import FWCore.ParameterSet.Config as cms process = cms.Process("phiCorr") -process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) ) +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) ) process.source = cms.Source( 'PoolSource', -# CSA14 RECO -# fileNames = cms.untracked.vstring('root://eoscms.cern.ch//eos/cms/store/relval/CMSSW_7_0_5/RelValTTbar_13/GEN-SIM-RECO/POSTLS170_V6-v3/00000/0423767B-B5DD-E311-A1E0-02163E00E5B5.root') -# 720 RECO -# fileNames = cms.untracked.vstring('root://eoscms.cern.ch//eos/cms/store/relval/CMSSW_7_2_0/RelValTTbar/GEN-SIM-DIGI-RECO/PU_PRE_STA72_V6_FastSim-v2/00000/FE55222C-7359-E411-A563-0025905A60CE.root') -# PHYS14 mAOD -# fileNames = cms.untracked.vstring('root://xrootd.unl.edu//store/mc/Phys14DR/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola/MINIAODSIM/PU30bx50_PHYS14_25_V1-v1/00000/003B6371-8D81-E411-8467-003048F0E826.root') -# PHYS14 mAOD local -# fileNames = cms.untracked.vstring('file:/data/schoef/local/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola_MINIAODSIM_PU20bx25_PHYS14_25_V1-v1.root') -# 76X mAODv2 - fileNames = cms.untracked.vstring('root://xrootd.unl.edu//store/mc/RunIIFall15MiniAODv2/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/PU25nsData2015v1_HCALDebug_76X_mcRun2_asymptotic_v12-v1/00000/006C9F73-3FB9-E511-9AFE-001E67E95C52.root') +# fileNames = cms.untracked.vstring('root://cms-xrd-global.cern.ch//store/mc/RunIIAutumn18MiniAOD/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/102X_upgrade2018_realistic_v15_ext2-v1/50000/CFD5125B-9F57-C440-A34F-BE0018D7F594.root') + fileNames = cms.untracked.vstring('root://cms-xrd-global.cern.ch//store/data/Run2016B/DoubleMuon/MINIAOD/17Jul2018_ver2-v1/00000/6CDED1D1-AA8B-E811-864A-003048FFD71C.root') ) -process.TFileService = cms.Service("TFileService", fileName = cms.string("histo.root") , +process.TFileService = cms.Service("TFileService", fileName = cms.string("histo_MC2016.root") , closeFileFast = cms.untracked.bool(True)) process.load('Configuration.StandardSequences.Services_cff') process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') -process.GlobalTag.globaltag = '76X_mcRun2_asymptotic_v12' +#process.GlobalTag.globaltag = '102X_dataRun2_v10' #2018 data +#process.GlobalTag.globaltag = '102X_upgrade2018_realistic_v18' #2018 MC +#process.GlobalTag.globaltag = '102X_dataRun2_v8' #2017 data +#process.GlobalTag.globaltag = '102X_upgrade2018_realistic_v16' #2017 MC +process.GlobalTag.globaltag = '94X_dataRun2_v10' #2016 data +#process.GlobalTag.globaltag = '94X_mcRun2_asymptotic_v3' #2016 MC -process.load('MetTools.MetPhiCorrections.phiCorr_PHYS14_cff') +process.load('MetTools.MetPhiCorrections.phiCorrBins_102X_cff') #Replacements for mAOD process.metPhiCorrInfoWriter.vertexCollection = cms.untracked.InputTag("offlineSlimmedPrimaryVertices") +process.metPhiCorrInfoWriter.muonsCollection = cms.untracked.InputTag("slimmedMuons") process.metPhiCorrInfoWriter.srcPFlow = cms.untracked.InputTag("packedPFCandidates") # RUN! diff --git a/README.md b/README.md index eb832b9a34b..aa458befedf 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ cd $CMSSW_BASE/src -Install: Get your favourite 72X CMSSW and then just do +Install: Get your favourite 76X CMSSW and then just do to get the first version: `git clone https://github.com/cms-met/MetTools.git`