|
DAS
3.0
Das Analysis System
|
Go to the documentation of this file.
17 static const std::vector<double>
pthat_edges = {0, 1e-6, 15, 30, 50, 80, 120, 170, 300, 470, 600, 800, 1000, 1400, 1800, 2400, 3200, 6500};
47 float gW =
event.weights.front();
50 float maxpthat =
event.hard_scale;
53 maxpthat = std::max(maxpthat, pthat);
60 template<
typename Jet>
void FillObsWgt (std::unique_ptr<TH2F>& ptLogw,
61 std::unique_ptr<TH2F>& mjjLogw,
62 std::unique_ptr<TH2F>& htLogw,
63 std::unique_ptr<TH1F>& ht,
64 const std::vector<Jet>&
jets,
float evW)
68 for (
const auto& jet:
jets) {
69 auto jW = log(jet.weights.front());
70 weight_sum = weight_sum + jW;
71 ptLogw->Fill(jet.p4.Pt(), evW + jW);
72 pt_sum += jet.p4.Pt();
76 htLogw->Fill(pt_sum, evW + weight_sum);
78 if (
jets.size() < 2)
return;
79 const auto& j0 =
jets.at(0),
82 if (j0.p4.Pt() < 100. || j1.p4.Pt() < 50.)
return;
83 if (std::max(j0.AbsRap(), j1.AbsRap()) >= 3.0)
return;
85 auto djW = log(j0.weights.front()) + log(j1.weights.front());
86 mjjLogw->Fill(dijet.CorrP4().M(), evW + djW);
92 const std::vector<RecJet>&
recjets,
99 float logw = log(genEvt.
weights.front());
103 logw += log(recEvt.
weights.front());
111 TDirectory * dd = d->mkdir(
name);
121 for (
auto h: hists) {
123 TString hname = h->GetName();
124 hname.ReplaceAll(
name,
"");
Plots(const char *Name)
Definition: Plots.h:27
static const std::vector< double > pthat_edges
Definition: Plots.h:17
float FillPtHat(const GenEvent &event, const PileUp &pileup)
Definition: Plots.h:45
std::unique_ptr< TH1F > pthatPU
Definition: Plots.h:24
std::unique_ptr< TH2F > pthatLogw
Definition: Plots.h:25
static const std::vector< double > pt_edges
Definition: binnings.h:33
std::unique_ptr< TH1F > pthatMax
Definition: Plots.h:24
static const int nMjjBins
Definition: binnings.h:40
Weights weights
e.g. cross section normalisation
Definition: Event.h:23
std::unique_ptr< TH1F > genht
Definition: Plots.h:24
void Write(TDirectory *d)
Definition: Plots.h:108
std::unique_ptr< TH2F > genptLogw
Definition: Plots.h:25
data
Definition: btvExample_106X.py:10
std::unique_ptr< TH2F > rechtLogw
Definition: Plots.h:25
genjets
Definition: Ntupliser_cfg.py:272
string jets
Definition: Ntupliser_cfg.py:41
void FillObsWgt(std::unique_ptr< TH2F > &ptLogw, std::unique_ptr< TH2F > &mjjLogw, std::unique_ptr< TH2F > &htLogw, std::unique_ptr< TH1F > &ht, const std::vector< Jet > &jets, float evW)
Definition: Plots.h:60
std::unique_ptr< TH2F > genhtLogw
Definition: Plots.h:25
void operator()(const std::vector< GenJet > &genjets, const std::vector< RecJet > &recjets, const GenEvent &genEvt, const RecEvent &recEvt, const PileUp &pileup)
Definition: Plots.h:91
Definition: applyPUcleaning.cc:36
static const int nPtHatBins
Definition: Plots.h:18
recjets
Definition: Ntupliser_cfg.py:273
static const std::vector< double > Mjj_edges
Definition: binnings.h:34
std::unique_ptr< TH1F > recht
Definition: Plots.h:24
static const int nPtBins
Definition: binnings.h:39
DAS::PileUp pileup
Definition: classes.h:27
std::unique_ptr< TH1F > pthatME
Definition: Plots.h:24
std::unique_ptr< TH2F > recptLogw
Definition: Plots.h:25
std::vector< float > pthats
all hard scales found in PU
Definition: Event.h:106
float hard_scale
hard scale, corresponding to pthat in Pythia 8
Definition: Event.h:41
TString name
Definition: Plots.h:22
std::unique_ptr< TH2F > genmjjLogw
Definition: Plots.h:25
std::unique_ptr< TH2F > recmjjLogw
Definition: Plots.h:25