|
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.
268 Mu.
Dxy = mu.dB(pat::Muon::PV2D);
269 Mu.
Dz = mu.dB(pat::Muon::PVDZ);
270 if (mu.innerTrack().isNonnull())
271 Mu.
nTkHits = mu.innerTrack()->hitPattern().trackerLayersWithMeasurement();
◆ GetRecPhoton()
Helper to get DAS::RecLep
from MiniAOD.
297 dasPhoton.
p4 = photon.p4();
298 const auto raw_energy = dasPhoton.
p4.E();
300 photon.userFloat(
"ecalEnergyPostCorr") / raw_energy,
301 photon.userFloat(
"energyScaleUp") / raw_energy,
302 photon.userFloat(
"energyScaleDown") / raw_energy,
303 photon.userFloat(
"energySigmaPhiUp") / raw_energy,
304 photon.userFloat(
"energySigmaPhiDown") / raw_energy,
305 photon.userFloat(
"energySigmaRhoUp") / raw_energy,
306 photon.userFloat(
"energySigmaRhoDown") / raw_energy,
311 dasPhoton.
scEta = photon.superCluster()->eta();
315 dasPhoton.
hOverE = photon.hadronicOverEm();
317 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-loose"))
319 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-medium"))
321 if (photon.photonID(
"cutBasedPhotonID-Fall17-94X-V2-tight"))
323 if (photon.photonID(
"mvaPhoID-RunIIFall17-v2-wp80"))
325 if (photon.photonID(
"mvaPhoID-RunIIFall17-v2-wp90"))
327 if (photon.passElectronVeto())
329 if (!photon.hasPixelSeed())
◆ LooseID()
bool LooseID |
( |
const pat::Jet & |
jet | ) |
|
Testing loose ID definition for jets (official from JetMET)
see https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetID
/!\ these values are intended for 2016 only!!
98 assert(
p.
year == 2016);
100 const auto abseta = abs(jet.eta());
102 auto NHF = jet.neutralHadronEnergyFraction();
103 auto NEMF = jet.photonEnergyFraction();
104 auto NumConst = jet.neutralMultiplicity() + jet.chargedMultiplicity();
106 auto CHF = jet.chargedHadronEnergyFraction();
107 auto CHM = jet.chargedHadronMultiplicity();
108 auto CEMF = jet.chargedEmEnergyFraction();
111 return (NHF<0.99 && NEMF<0.99 && NumConst>1)
112 && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4);
114 auto NumNeutralParticle = jet.neutralMultiplicity();
117 return NHF<0.98 && NEMF>0.01 && NumNeutralParticle>2;
119 return NEMF<0.90 && NumNeutralParticle>10;
◆ TightID()
bool TightID |
( |
const pat::Jet & |
jet | ) |
|
Testing tight ID definition for jets (official from JetMET)
see https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetID
128 const auto abseta = abs(jet.eta());
130 auto NHF = jet.neutralHadronEnergyFraction();
131 auto NEMF = jet.photonEnergyFraction();
132 auto NumConst = jet.neutralMultiplicity() + jet.chargedMultiplicity();
134 auto CHF = jet.chargedHadronEnergyFraction();
135 auto CHM = jet.chargedHadronMultiplicity();
136 auto CEMF = jet.chargedEmEnergyFraction();
141 return (NHF<0.90 && NEMF<0.90 && NumConst>1)
142 && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.99) || abseta>2.4);
144 return (NHF<0.90 && NEMF<0.90 && NumConst>1)
145 && ((abseta<=2.4 && CHF>0 && CHM>0 ) || abseta>2.4);
147 return (abseta<=2.6 && CHM>0 && CHF>0 && NumConst>1 && NEMF<0.9 && NHF < 0.9 )
148 || (CHM>0 && NEMF<0.99 && NHF < 0.9);
150 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
154 auto NumNeutralParticle = jet.neutralMultiplicity();
159 return NHF<0.98 && NEMF>0.01 && NumNeutralParticle>2;
162 return NEMF>0.02 && NEMF<0.99 && NumNeutralParticle>2;
164 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
170 return NEMF<0.90 && NumNeutralParticle>10;
172 return NEMF<0.90 && NHF>0.02 && NumNeutralParticle>10;
174 return NEMF<0.90 && NHF>0.2 && NumNeutralParticle>10;
176 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
◆ TightLepVetoID()
bool TightLepVetoID |
( |
const pat::Jet & |
jet | ) |
|
Testing tight ID definition for jets (official from JetMET)
see https://twiki.cern.ch/twiki/bin/viewauth/CMS/JetID
187 const auto abseta = abs(jet.eta());
189 auto NHF = jet.neutralHadronEnergyFraction();
190 auto NEMF = jet.photonEnergyFraction();
191 auto NumConst = jet.neutralMultiplicity() + jet.chargedMultiplicity();
193 auto CHF = jet.chargedHadronEnergyFraction();
194 auto CHM = jet.chargedHadronMultiplicity();
195 auto CEMF = jet.chargedEmEnergyFraction();
196 auto MUF = jet.muonEnergyFraction();
201 return (NHF<0.90 && NEMF<0.90 && NumConst>1 && MUF<0.80)
202 && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.90) || abseta>2.4);
204 return (NHF<0.90 && NEMF<0.90 && NumConst>1 && MUF<0.80)
205 && ((abseta<=2.4 && CHF>0 && CHM>0 && CEMF<0.80) || abseta>2.4);
207 return (abseta<=2.6 && MUF<0.80 && CEMF<0.80 && CHM>0 && NHF<0.9 && NEMF<0.90 && CHF>0 && NumConst>1)
208 || (MUF<0.80 && CEMF<0.80 && CHM>0 && NHF<0.9 && NEMF<0.99);
210 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
214 auto NumNeutralParticle = jet.neutralMultiplicity();
219 return NHF<0.98 && NEMF>0.01 && NumNeutralParticle>2;
222 return NEMF>0.02 && NEMF<0.99 && NumNeutralParticle>2;
224 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
230 return NEMF<0.90 && NumNeutralParticle>10;
232 return NEMF<0.90 && NHF>0.02 && NumNeutralParticle>10;
234 return NEMF<0.90 && NHF>0.2 && NumNeutralParticle>10;
236 cerr <<
"Only 2016, 2017 or 2018 is possible\n";
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:93
FourVector p4
four-momentum
Definition: Photon.h:62
static const auto eps
Definition: Step.h:38
@ PixelSeedVeto
Pixel seed veto.
Definition: Photon.h:59
std::array< float, VariationsCount > scales
Energy scale and smearing variations, indexed with the EnergyVariation enum.
Definition: Photon.h:75
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:54
float scEta
Super cluster eta, used to veto the barrel/endcap transition region.
Definition: Photon.h:65
FourVector p4
raw four-momentum directly after reconstruction
Definition: PhysicsObject.h:47
float Dxy
transverse distance to PV
Definition: Lepton.h:31
float sigmaIEtaIEta
Width of the ECAL deposit along the eta axis.
Definition: Photon.h:66
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:70
@ CutBasedLoose
Loose cut-based ID.
Definition: Photon.h:53
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:56
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:48
const int year
20xx
Definition: Parameters.h:57
std::uint32_t selectors
Identification cuts satisfied by the photon.
Definition: Photon.h:78
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:14
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:19
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:71
float hOverE
Ratio of HCAL to ECAL energy.
Definition: Photon.h:67
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
resolution estimate on the ecalEnergy after scale & smearing corrections
Definition: Photon.h:76
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:55
const bool flavour
Definition: Parameters.h:68
bool zAncestor
Z boson among the particle mothers.
Definition: Photon.h:18
const bool PUjetID
Definition: Parameters.h:68
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< float > > FourVector
Definition: PhysicsObject.h:15
float neutralHadronIsolation
Recomputed isolation from neutral hadrons.
Definition: Photon.h:69
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:57
float chargedIsolation
Recomputed isolation from charged particles.
Definition: Photon.h:68
class RecPhoton
Definition: Photon.h:30
@ ConversionSafeElectronVeto
Electron veto.
Definition: Photon.h:58
float puID
pile-up jet ID
Definition: Jet.h:43