|
DAS
3.0
Das Analysis System
|
#include <helper.h>
◆ Helper()
Constructor
Only giving parameters in reference
◆ GetGenJet() [1/2]
◆ GetGenJet() [2/2]
DAS::GenJet GetGenJet |
( |
const reco::JetFlavourInfoMatching & |
ijet | ) |
|
Helper to get DAS::GenJet
from MiniAOD with flavour.
32 const reco::Jet& Jet = *(ijet.first.get());
33 const reco::JetFlavourInfo& Info = ijet.second;
41 jjet.
nBHadrons = Info.getbHadrons().size();
42 jjet.
nCHadrons = Info.getcHadrons().size();
◆ GetGenMu()
◆ GetGenPhoton()
DAS::GenPhoton GetGenPhoton |
( |
const reco::GenParticle & |
photon, |
|
|
bool |
zAncestor |
|
) |
| |
◆ GetRecJet()
Helper to get DAS::RecJet
from MiniAOD.
General instructions DeepJet
57 jjet.
p4 = ijet.correctedP4(
"Uncorrected");
60 jjet.
area = ijet.jetArea();
61 jjet.
puID =
p.
PUjetID ? ijet.userFloat(
"pileupJetId:fullDiscriminant") : 1.;
68 jjet.
nBHadrons = ijet.jetFlavourInfo().getbHadrons().size();
69 jjet.
nCHadrons = ijet.jetFlavourInfo().getcHadrons().size();
72 jjet.
DeepJet.
probb = ijet.bDiscriminator(
"pfDeepFlavourJetTags:probb");
73 jjet.
DeepJet.
probbb = ijet.bDiscriminator(
"pfDeepFlavourJetTags:probbb");
74 jjet.
DeepJet.
problepb = ijet.bDiscriminator(
"pfDeepFlavourJetTags:problepb");
75 jjet.
DeepJet.
probc = ijet.bDiscriminator(
"pfDeepFlavourJetTags:probc");
77 jjet.
DeepJet.
probuds = ijet.bDiscriminator(
"pfDeepFlavourJetTags:probuds");
78 jjet.
DeepJet.
probg = ijet.bDiscriminator(
"pfDeepFlavourJetTags:probg");
80 static const auto eps = 10*numeric_limits<float>::epsilon();
85 jjet.
scales.resize(1, 1.0);
◆ GetRecMu()
Helper to get DAS::RecMuon
from MiniAOD.
177 Mu.
Dxy = mu.dB(pat::Muon::PV2D);
178 Mu.
Dz = mu.dB(pat::Muon::PVDZ);
179 if (mu.innerTrack().isNonnull())
180 Mu.
nTkHits = mu.innerTrack()->hitPattern().trackerLayersWithMeasurement();
◆ GetRecPhoton()
Helper to get DAS::RecLep
from MiniAOD.
206 dasPhoton.
p4 = photon.p4();
207 const auto raw_energy = dasPhoton.
p4.E();
209 photon.userFloat(
"ecalEnergyPostCorr") / raw_energy,
210 photon.userFloat(
"energyScaleUp") / raw_energy,
211 photon.userFloat(
"energyScaleDown") / raw_energy,
212 photon.userFloat(
"energySigmaPhiUp") / raw_energy,
213 photon.userFloat(
"energySigmaPhiDown") / raw_energy,
214 photon.userFloat(
"energySigmaRhoUp") / raw_energy,
215 photon.userFloat(
"energySigmaRhoDown") / raw_energy,
220 dasPhoton.
scEta = photon.superCluster()->eta();
224 dasPhoton.
hOverE = photon.hadronicOverEm();
226 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-loose"))
228 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-medium"))
230 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-tight"))
232 if (photon.photonID(
"mvaPhoID-RunIIFall17-v2-wp80"))
234 if (photon.photonID(
"mvaPhoID-RunIIFall17-v2-wp90"))
236 if (photon.passElectronVeto())
238 if (!photon.hasPixelSeed())
◆ JetID()
bool JetID |
( |
const pat::Jet & |
jet | ) |
|
Testing tight ID lepton veto definition for jets (official from JetMET)
The values for Run 2 correspond to UL and are not expected to change. Instead, the values for Run 3 are only preliminary and are subject to changes.
- Note
- The formulae in blue from the original TWiki have been copied and their format adapted.
101 const auto eta = jet.eta();
103 auto NHF = jet.neutralHadronEnergyFraction();
104 auto NEMF = jet.photonEnergyFraction();
105 auto MUF = jet.muonEnergyFraction();
106 auto NumConst = jet.neutralMultiplicity() + jet.chargedMultiplicity();
108 auto CHF = jet.chargedHadronEnergyFraction();
109 auto CHM = jet.chargedHadronMultiplicity();
110 auto CEMF = jet.chargedEmEnergyFraction();
112 auto NumNeutralParticle = jet.neutralMultiplicity();
116 return (abs(
eta)<=2.4 && CEMF<0.8 && CHM>0 && CHF>0 && NumConst>1 && NEMF<0.9 && MUF <0.8 && NHF < 0.9)
117 || (
p.
CHS && abs(
eta)>2.4 && abs(
eta)<=2.7 && NEMF<0.99 && NHF < 0.9)
118 || (
p.
CHS && NEMF>0.0 && NEMF<0.99 && NHF<0.9 && NumNeutralParticle>1 && abs(
eta)>2.7 && abs(
eta)<=3.0)
119 || (
p.
CHS && NEMF<0.90 && NHF>0.2 && NumNeutralParticle>10 && abs(
eta)>3.0)
120 || (
p.
PUPPI && abs(
eta)>2.4 && abs(
eta)<=2.7 && NEMF<0.99 && NHF < 0.98)
121 || (
p.
PUPPI && NumNeutralParticle>=1 && abs(
eta)>2.7 && abs(
eta)<=3.0)
122 || (
p.
PUPPI && NEMF<0.90 && NumNeutralParticle>2 && abs(
eta)>3.0);
126 return (abs(
eta)<=2.6 && CEMF<0.8 && CHM>0 && CHF>0 && NumConst>1 && NEMF<0.9 && MUF <0.8 && NHF < 0.9)
127 || (
p.
CHS && abs(
eta)>2.6 && abs(
eta)<=2.7 && CEMF<0.8 && CHM>0 && NEMF<0.99 && MUF <0.8 && NHF < 0.9)
128 || (
p.
CHS && NEMF>0.01 && NEMF<0.99 && NumNeutralParticle>1 && abs(
eta)>2.7 && abs(
eta)<=3.0)
129 || (
p.
CHS && NEMF<0.90 && NHF>0.2 && NumNeutralParticle>10 && abs(
eta)>3.0)
130 || (
p.
PUPPI && abs(
eta)>2.6 && abs(
eta)<=2.7 && CEMF<0.8 && NEMF<0.99 && MUF <0.8 && NHF < 0.9)
131 || (
p.
PUPPI && NHF<0.9999 && abs(
eta)>2.7 && abs(
eta)<=3.0)
132 || (
p.
PUPPI && NEMF<0.90 && NumNeutralParticle>2 && abs(
eta)>3.0);
136 return (abs(
eta)<=2.6 && CEMF<0.8 && CHM>0 && CHF>0.01 && NumConst>1 && NEMF<0.9 && MUF <0.8 && NHF < 0.99)
137 || (
p.
PUPPI && abs(
eta)>2.6 && abs(
eta)<=2.7 && CEMF<0.8 && NEMF<0.99 && MUF <0.8 && NHF < 0.9)
138 || (
p.
PUPPI && NHF<0.99 && abs(
eta)>2.7 && abs(
eta)<=3.0)
139 || (
p.
PUPPI &&NEMF<0.40 && NumNeutralParticle>=2 && abs(
eta)>3.0)
140 || (
p.
CHS && abs(
eta)>2.6 && abs(
eta)<=2.7 && CEMF<0.8 && CHM>0 && NEMF<0.99 && MUF <0.8 && NHF < 0.9)
141 || (
p.
CHS && NEMF<0.99 && NHF<0.99 && NumNeutralParticle>1 && abs(
eta)>2.7 && abs(
eta)<=3.0)
142 || (
p.
CHS && NEMF<0.40 && NumNeutralParticle>10 && abs(
eta)>3.0);
144 auto err_msg =
"\x1B[31m\x1B[1mThe JetID has not yet been imlemented in DAS for "s
145 + to_string(
p.
year) +
"\x1B[0m"s;
146 throw cms::Exception(
"Ntupliser") << err_msg;
The documentation for this struct was generated from the following files:
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/Ntupliser/plugins/helper.h
- /builds/cms-analysis/general/DasAnalysisSystem/Core/Installer/Core/Ntupliser/plugins/helper.cc
int partonFlavour
Parton flavour (PDG ID)
Definition: Jet.h:15
cerr
Definition: Ntupliser_cfg.py:98
static const auto eps
Definition: Step.h:38
@ PixelSeedVeto
Pixel seed veto.
Definition: Photon.h:55
DAS::GenJet GetGenJet(const reco::JetFlavourInfoMatching &ijet)
Helper to get DAS::GenJet from MiniAOD with flavour.
Definition: helper.cc:30
@ CutBasedMedium
Medium cut-based ID.
Definition: Photon.h:50
float scEta
Super cluster eta, used to veto the barrel/endcap transition region.
Definition: Photon.h:58
FourVector p4
raw four-momentum directly after reconstruction
Definition: PhysicsObject.h:50
float Dxy
transverse distance to PV
Definition: Lepton.h:31
float sigmaIEtaIEta
Width of the ECAL deposit along the eta axis.
Definition: Photon.h:59
DAS::Parameters & p
Definition: helper.h:28
int nBHadrons
Number of B hadrons (0, 1 or 2+)
Definition: Jet.h:13
float photonIsolation
Recomputed isolation from other photons.
Definition: Photon.h:63
@ CutBasedLoose
Loose cut-based ID.
Definition: Photon.h:49
float probc
Probability for the jet to contain at least one D hadron.
Definition: Jet.h:49
@ MVAWorkingPoint80
80% efficiency working point of the MVA ID
Definition: Photon.h:52
float probb
Probability for the jet to contain exactly one B hadron decaying hadronically.
Definition: Jet.h:50
int nTkHits
number of hits in tracker
Definition: Lepton.h:34
float Dz
longitudinal distance to PV
Definition: Lepton.h:32
std::vector< float > scales
energy scale corrections and variations
Definition: PhysicsObject.h:51
const int year
20xx
Definition: Parameters.h:57
std::uint32_t selectors
Identification cuts satisfied by the photon.
Definition: Photon.h:70
const bool PUPPI
Definition: Parameters.h:62
class RecMuon
Definition: Lepton.h:25
float probbb
Probability for the jet to contain at least two B hadrons.
Definition: Jet.h:51
class GenPhoton
Definition: Photon.h:13
struct DAS::RecJet::Tagger DeepJet
Reference
float problepb
Probability for the jet to contain exactly one B hadron decaying leptonically.
Definition: Jet.h:52
class GenMuon
Definition: Lepton.h:9
class GenJet
Definition: Jet.h:9
bool prompt
Originates directly from the matrix element.
Definition: Photon.h:18
const bool CHS
Definition: Parameters.h:62
int nCHadrons
Number of D hadrons (0, 1+ in 2017; 0, 1, 2+ in 2016)
Definition: Jet.h:14
float worstChargedIsolation
Recomputed charged isolation with the vertex chosen to maximize this value used for the ID.
Definition: Photon.h:64
float hOverE
Ratio of HCAL to ECAL energy.
Definition: Photon.h:60
unsigned int selectors
muon ID & PF isolation
Definition: Lepton.h:29
float area
Jet area (should be peaked at pi*R^2), used for the JES corrections.
Definition: Jet.h:42
float ecalEnergyErrPostCorr
Energy scale and smearing variations, indexed with the EnergyVariation enum.
Definition: Photon.h:68
float probuds
Probability for the jet to be a quark jet with no HF hadron.
Definition: Jet.h:53
@ CutBasedTight
Tight cut-based ID.
Definition: Photon.h:51
const bool flavour
Definition: Parameters.h:69
bool zAncestor
Z boson among the particle mothers.
Definition: Photon.h:17
const bool PUjetID
Definition: Parameters.h:69
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< float > > FourVector
Definition: PhysicsObject.h:15
float neutralHadronIsolation
Recomputed isolation from neutral hadrons.
Definition: Photon.h:62
int Q
+/- 1
Definition: Lepton.h:13
float probg
Probability for the jet to be a gluon jet with no HF hadron.
Definition: Jet.h:54
@ MVAWorkingPoint90
90% efficiency working point of the MVA ID
Definition: Photon.h:53
float chargedIsolation
Recomputed isolation from charged particles.
Definition: Photon.h:61
eta
DeepAK8/ParticleNet tagging.
Definition: jmarExample.py:19
class RecPhoton
Definition: Photon.h:27
@ ConversionSafeElectronVeto
Electron veto.
Definition: Photon.h:54
float puID
pile-up jet ID
Definition: Jet.h:43