forked from CMSSNU/SKFlatAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NvtxProfile.C
48 lines (29 loc) · 1.09 KB
/
NvtxProfile.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "NvtxProfile.h"
void NvtxProfile::initializeAnalyzer(){
}
void NvtxProfile::executeEvent(){
AnalyzerParameter param;
executeEventFromParameter(param);
}
void NvtxProfile::executeEventFromParameter(AnalyzerParameter param){
if(!PassMETFilter()) return;
//cout << "[executeEventFromParameter] MCSample : " << MCSample << endl;
Event ev = GetEvent();
TString trig_mu50 = "HLT_Mu50_v";
bool Pass_mu50 = ev.PassTrigger(trig_mu50);
int n_true_vertex = nPileUp;
int nPV = ev.nPV();
//double pileup_reweight = mcCorr.GetPileUpWeightAsSampleName(0, nPV);
//cout << "[executeEventFromParameter] pileup_reweight : " << pileup_reweight << endl;
FillHist("Nvtx", nPV, 1., 100, 0., 100.);
FillHist("n_true_vertex", n_true_vertex, 1., 100, 0., 100.);
if(Pass_mu50) FillHist("Nvtx_HLT_Mu50", nPV, 1., 100, 0., 100.);
for(int i_Nvtx = 0; i_Nvtx < 100; i_Nvtx++){
TString current_true_Nvtx = TString::Itoa(n_true_vertex, 10);
FillHist("Nvtx_N_true_vtx_" + current_true_Nvtx, nPV, 1., 100, 0., 100.);
}
}
NvtxProfile::NvtxProfile(){
}
NvtxProfile::~NvtxProfile(){
}