Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TauSpinner weight table producer for HTT #45828

Merged
merged 4 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove irrelevant configuration parameters
  • Loading branch information
mbluj committed Aug 29, 2024
commit 73e7e05ad9da7326a773fe0489e137ab163bd2c1
12 changes: 7 additions & 5 deletions PhysicsTools/NanoAOD/plugins/TauSpinnerTableProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/allowedValues.h"
#include "DataFormats/Common/interface/View.h"
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include "DataFormats/NanoAOD/interface/FlatTable.h"
Expand All @@ -34,9 +35,8 @@ class TauSpinnerTableProducer : public edm::one::EDProducer<edm::one::SharedReso
desc.add<edm::InputTag>("src")->setComment("input genParticle collection");
desc.add<std::string>("name")->setComment("name of the TauSpinner weights table");
desc.add<std::vector<double>>("theta")->setComment("values of CP-even and CP-odd tau Yukawa mixing angle");
desc.add<std::string>("pdfSet", "NNPDF31_nnlo_hessian_pdfas")->setComment("PDF set for TauSpinner");
desc.add<double>("cmsE", 13600)->setComment("cms energy for TauSpinner in GeV");
desc.add<int>("bosonPdgId", 25)->setComment("boson pdgId");
desc.ifValue(edm::ParameterDescription<int>("bosonPdgId", 25, true), edm::allowedValues<int>(25, 35, 36))
->setComment("boson pdgId, default: 25"); // Allow only neutral Higgs bosons
desc.add<double>("defaultWeight", 1)
->setComment("default weight stored in case of presence of a tau decay unsupported by TauSpinner");
descriptions.addWithDefaultLabel(desc);
Expand Down Expand Up @@ -99,12 +99,14 @@ TauSpinnerTableProducer::TauSpinnerTableProducer(const edm::ParameterSet &config
name_(config.getParameter<std::string>("name")),
theta_vec_(nameAndValue(config.getParameter<std::vector<double>>("theta"))),
bosonPdgId_(config.getParameter<int>("bosonPdgId")),
tauSpinnerPDF_(config.getParameter<std::string>("pdfSet")),
tauSpinnerPDF_(
"NNPDF31_nnlo_hessian_pdfas"), // PDF set for TauSpinner, relevant only in case of Z/gamma* polarization weights (set "sensible" default)
ipp_(true), // pp collisions
ipol_(0),
nonSM2_(0),
nonSMN_(0),
cmsE_(config.getParameter<double>("cmsE")), // cms energy in GeV
cmsE_(
13600), // collision energy in GeV, relevant only in case of Z/gamma* polarization weights (set "sensible" default)
default_weight_(config.getParameter<double>(
"defaultWeight")) // default weight stored in case of presence of a tau decay unsupported by TauSpinner
{
Expand Down
6 changes: 0 additions & 6 deletions PhysicsTools/NanoAOD/python/tauSpinnerTable_cfi.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import FWCore.ParameterSet.Config as cms
from PhysicsTools.NanoAOD.nano_eras_cff import *
from PhysicsTools.NanoAOD.tauSpinnerTableProducer_cfi import tauSpinnerTableProducer

tauSpinnerTable = tauSpinnerTableProducer.clone(
src = 'prunedGenParticles',
name = 'TauSpinner',
theta = [0, 0.25, 0.5, -0.25, 0.375],
pdfSet = 'NNPDF31_nnlo_hessian_pdfas',
cmsE = 13600,
defaultWeight = 1
)
(~run3_common).toModify(
tauSpinnerTable, cmsE = 13000
)

tauSpinnerTableTask = cms.Task(tauSpinnerTable)