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

modifying filters to use with higgs samples #27791

Merged
merged 3 commits into from Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion GeneratorInterface/Core/interface/EmbeddingHepMCFilter.h
Expand Up @@ -14,7 +14,7 @@ class EmbeddingHepMCFilter : public BaseHepMCFilter {
const int muonPDGID_ = 13;
const int electron_neutrino_PDGID_ = 12;
const int electronPDGID_ = 11;
const int ZPDGID_ = 23;
int ZPDGID_ = 23;

enum class TauDecayMode : int { Unfilled = -1, Muon = 0, Electron = 1, Hadronic = 2 };

Expand Down
10 changes: 7 additions & 3 deletions GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc
Expand Up @@ -3,7 +3,8 @@
#include "boost/algorithm/string.hpp"
#include "boost/algorithm/string/trim_all.hpp"

EmbeddingHepMCFilter::EmbeddingHepMCFilter(const edm::ParameterSet &iConfig) {
EmbeddingHepMCFilter::EmbeddingHepMCFilter(const edm::ParameterSet &iConfig)
: ZPDGID_(iConfig.getParameter<int>("BosonPDGID")) {
// Defining standard decay channels
ee.fill(TauDecayMode::Electron);
ee.fill(TauDecayMode::Electron);
Expand Down Expand Up @@ -118,13 +119,16 @@ void EmbeddingHepMCFilter::decay_and_sump4Vis(HepMC::GenParticle *particle, reco
// Asuming, that there are only the two tauons from the Z-boson.
// This is the case for the simulated Z->tautau event constructed by EmbeddingLHEProducer.
if (std::abs(particle->pdg_id()) == tauonPDGID_ && !decaymode_known) {
// use these bools to protect againt taus that aren't the last copy (which "decay" to a tau and a gamma)
bool isGamma = std::abs((*daughter)->pdg_id()) == 22;
bool isTau = std::abs((*daughter)->pdg_id()) == 15;
if (std::abs((*daughter)->pdg_id()) == muonPDGID_) {
DecayChannel_.fill(TauDecayMode::Muon);
decaymode_known = true;
} else if (std::abs((*daughter)->pdg_id()) == electronPDGID_) {
DecayChannel_.fill(TauDecayMode::Electron);
decaymode_known = true;
} else if (!neutrino) {
} else if (!neutrino && !isGamma && !isTau) {
DecayChannel_.fill(TauDecayMode::Hadronic);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielwinterbottom , if it is not tau, why it has tau hadronic decay mode?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bools are related to the tau daughters not the particle itself. L 121 already requires the particle to be a tau. This condition is used to ensure that we ignore taus that aren't the last copy in the chain which is the case when there is FSR and the tau "decays" to a tau and a gamma

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this ok should I hit "resolve conversation" ?

decaymode_known = true;
}
Expand Down Expand Up @@ -229,4 +233,4 @@ void EmbeddingHepMCFilter::fill_cut(std::string cut_string,
cut.eta2 = std::stod(single_cuts[i]);
}
}
}
}
Expand Up @@ -19,7 +19,8 @@
MuHadCut = cms.string('Mu.Pt > 18 && Had.Pt > 25 && Mu.Eta < 2.1'),
MuMuCut = cms.string('Mu1.Pt > 17 && Mu2.Pt > 8'),
Final_States = cms.vstring('ElEl','ElHad','ElMu','HadHad','MuHad','MuMu')
)
),
BosonPDGID = cms.int32(23)
),
pythiaPylistVerbosity = cms.untracked.int32(0),
filterEfficiency = cms.untracked.double(1.0),
Expand Down