Skip to content

Commit

Permalink
Merge pull request cms-sw#43 from amarini/topic_improvements
Browse files Browse the repository at this point in the history
Topic improvements
  • Loading branch information
amarini committed Jan 27, 2016
2 parents 3d9b2e6 + ccbc3e3 commit 3fcdecd
Show file tree
Hide file tree
Showing 64 changed files with 3,011 additions and 937 deletions.
264 changes: 264 additions & 0 deletions aux/bdt_mH200_QCDData.xml

Large diffs are not rendered by default.

928 changes: 509 additions & 419 deletions aux/bdt_mH200_TTJets.xml

Large diffs are not rendered by default.

Binary file modified aux/pileup.root
Binary file not shown.
2 changes: 2 additions & 0 deletions dat/branches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ jetP4
jetUnc
jetBdiscr
jetSelBits
jetQGL
### Leptons
lepP4
lepIso
Expand Down Expand Up @@ -32,5 +33,6 @@ mcWeight
triggerFired
triggerTaus
triggerLeps
triggerNoneTaus
## GEN
metP4_GEN
12 changes: 12 additions & 0 deletions dat/branches_pho.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
photonP4
photonSelBits
photonChIso
### EVENT
isRealData
rho
npv
puTrueInt
runNum
lumiNum
eventNum
mcWeight
8 changes: 4 additions & 4 deletions dat/config.dat
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ Analysis=JsonAnalysis,Preselection,ChargedHiggsTauNu,ChargedHiggsHW,ChargedHiggs
MCDB=dat/mc_database.txt
SFDB=dat/sf_database.txt
Branches=dat/branches.txt
###
#pileup=aux/pileup.root
pileup=aux/pileup.root
#pileup=root://eoscms///store/user/amarini/Nero/pileup/aux/pileup.root
#pileup=root://eoscms///store/user/amarini/Nero/pileup/aux/pileup_JSON_1p2_PRE_10-09-2015.root
#pileup=file,fileup,filedn TODO
#pileup=aux/pileup_JSON_1p2_PRE_10-09-2015.root
pileup=
##pileup=
pileupRun=
pileupLumi=
Lumi=1
Expand Down Expand Up @@ -109,7 +108,8 @@ config=JsonAnalysis|@applyJson($OBJ!'aux/Cert_246908-260627_13TeV_PromptReco_Col
############

#config=TmvaAnalysis|weights.push_back(" aux/bdt_mH200_QCD.xml"),weights.push_back("aux/bdt_mH200_TTJets.xml"),weights.push_back(" aux/bdt_mH400_QCD.xml"),weights.push_back("aux/bdt_mH400_TTJets.xml")
config=TmvaAnalysis|weights.push_back("aux/bdt_mH200_QCD.xml"),weights.push_back("aux/bdt_mH200_TTJets.xml"),weights.push_back(" aux/bdt_mH400_QCD.xml"),weights.push_back("aux/bdt_mH400_TTJets.xml")
#config=TmvaAnalysis|weights.push_back("aux/bdt_mH200_QCD.xml"),weights.push_back("aux/bdt_mH200_TTJets.xml"),weights.push_back(" aux/bdt_mH400_QCD.xml"),weights.push_back("aux/bdt_mH400_TTJets.xml")
config=TmvaAnalysis|weights.push_back("aux/bdt_mH200_QCDData.xml"),weights.push_back("aux/bdt_mH200_TTJets.xml"),weights.push_back(" aux/bdt_mH400_QCD.xml"),weights.push_back("aux/bdt_mH400_TTJets.xml")
addConfig=TmvaAnalysis|AddLabel('HplusToTauNu_M-180_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-200_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-220_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-250_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-300_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-400_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-350_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-500_13TeV_amcatnlo')
addConfig=TmvaAnalysis|AddLabel("HplusToTauNu-M200"),AddLabel("HplusToTauNu-M250"),AddLabel("HplusToTauNu-M500"),AddLabel("HplusToTauNu-M900")
addConfig=TmvaAnalysis|AddLabel('WW'),AddLabel('WZ'),AddLabel('ZZ'),AddLabel('TTJets'),AddLabel('QCD'),AddLabel('WJets'),AddLabel("DY")
Expand Down
6 changes: 4 additions & 2 deletions dat/configDY.dat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#### BKG ###
Files=/store/user/amarini/Nero/v1.2/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8
addfiles=/store/user/amarini/Nero/v1.2/WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8
addfiles=/store/user/amarini/Nero/v1.2/TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8
#addfiles=/store/user/amarini/Nero/v1.2/TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8
addfiles=/store/user/amarini/Nero/v1.2.1/TT_TuneCUETP8M1_13TeV-powheg-pythia8
### WW/WZ/ZZ###
addfiles=/store/user/amarini/Nero/v1.2/WW_TuneCUETP8M1_13TeV-pythia8
addfiles=/store/user/amarini/Nero/v1.2/WZ_TuneCUETP8M1_13TeV-pythia8
Expand Down Expand Up @@ -52,6 +53,7 @@ SFDB=dat/sf_database.txt
Branches=dat/branches.txt
###
pileup=aux/pileup.root
#pileup=
#pileup=root://eoscms///store/user/amarini/Nero/pileup/aux/pileup.root
#pileup=root://eoscms///store/user/amarini/Nero/pileup/aux/pileup_JSON_1p2_PRE_10-09-2015.root
#pileup=file,fileup,filedn TODO
Expand Down Expand Up @@ -82,7 +84,7 @@ config=MitPhiCorrector|fileName="aux/MetPhi.root"
#############

config=DYAnalysis|AddLabel('DY')
addConfig=DYAnalysis|AddLabel('WW'),AddLabel('WZ'),AddLabel('ZZ'),AddLabel('TTJets'),AddLabel('QCD'),AddLabel('WJets')
addConfig=DYAnalysis|AddLabel('WW'),AddLabel('WZ'),AddLabel('ZZ'),AddLabel('TT'),AddLabel('QCD'),AddLabel('WJets')

############
### JSON ###
Expand Down
22 changes: 22 additions & 0 deletions dat/configGG.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#Files=/store/user/amarini/Nero/v1.2/DoubleEG_0T
Files=/store/user/amarini/Nero/v1.2.1/DoubleEG

MCDB=dat/mc_database.txt
SFDB=dat/sf_database.txt
Branches=dat/branches_pho.txt

Output=GG.root
#Analysis=JsonAnalysis,GGAnalysis
Analysis=GGAnalysis
pileup=aux/pileup.root

Smear=NONE
Correct=NONE

############
### JSON ###
############

#config=JsonAnalysis|@applyJson($OBJ!'aux/Cert_246908-260627_13TeV_PromptReco_Collisions15_25ns_JSON.txt')


7 changes: 6 additions & 1 deletion dat/configQCDPurity.dat
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,10 @@ Smear=NONE
config=ChargedHiggsQCDPurity|AddLabel("HplusToTauNu-M200"),AddLabel("HplusToTauNu-M250"),AddLabel("HplusToTauNu-M500"),AddLabel("HplusToTauNu-M900")
addConfig=ChargedHiggsQCDPurity|AddLabel('WW'),AddLabel('WZ'),AddLabel('ZZ'),AddLabel('TTJets'),AddLabel('DY'),AddLabel('QCD'),AddLabel('WJets')
addConfig=ChargedHiggsQCDPurity|AddLabel('HplusToTauNu_M-180_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-200_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-220_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-250_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-300_13TeV_amcatnlo'),AddLabel('HplusToTauNu_M-400_13TeV_amcatnlo')
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(50),PtBins.push_back(70),PtBins.push_back(100),PtBins.push_back(150),PtBins.push_back(8000)
#addConfig=ChargedHiggsQCDPurity|PtBins.push_back(50),PtBins.push_back(70),PtBins.push_back(100),PtBins.push_back(150),PtBins.push_back(8000)
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(50),PtBins.push_back(55),PtBins.push_back(60),PtBins.push_back(65)
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(70),PtBins.push_back(80),PtBins.push_back(90),PtBins.push_back(100)
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(125),PtBins.push_back(150),PtBins.push_back(175),PtBins.push_back(200)
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(250),PtBins.push_back(500),PtBins.push_back(750),PtBins.push_back(1000)
addConfig=ChargedHiggsQCDPurity|PtBins.push_back(8000)

66 changes: 9 additions & 57 deletions dat/configTagAndProbe.dat
Original file line number Diff line number Diff line change
@@ -1,60 +1,17 @@
##configure Looper
##### This file store the configuratino to run all the analysis
##### if you want to make a config file that overwrite some changes just create a new one with the line
##### include=dat/config.txt
##### Files=....,....,...
#
#### BKG ###
##Files=/store/user/amarini/Nero/v1.1/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8
##addfiles=/store/user/amarini/Nero/v1.1/WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8
##addfiles=/store/user/amarini/Nero/v1.1/TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8
##### WW/WZ/ZZ###
##addfiles=/store/user/amarini/Nero/v1.1/WW_TuneCUETP8M1_13TeV-pythia8
##addfiles=/store/user/amarini/Nero/v1.1/WZ_TuneCUETP8M1_13TeV-pythia8
##addfiles=/store/user/amarini/Nero/v1.1/ZZ_TuneCUETP8M1_13TeV-pythia8
### SIGNAL ###
#Signal Tau Nu ; Private production
#Files=/store/user/amarini/Nero/v1.1/HplusToTauNu-M200
#addfiles=/store/user/amarini/Nero/v1.1/HplusToTauNu-M250
#addfiles=/store/user/amarini/Nero/v1.1/HplusToTauNu-M500
#addfiles=/store/user/amarini/Nero/v1.1/HplusToTauNu-M900
### QCD
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_15to30_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_30to50_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_50to80_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_80to120_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_120to170_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_170to300_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_300to470_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_470to600_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_600to800_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_800to1000_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_1000to1400_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_1400to1800_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_1800to2400_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_2400to3200_TuneCUETP8M1_13TeV_pythia8
##addfiles=/store/user/amarini/Nero/v1.1/QCD_Pt_3200toInf_TuneCUETP8M1_13TeV_pythia8
############# DATA 50ns###########
#Files=/store/user/amarini/Nero/v1.1/Tau
Files=/store/user/amarini/Nero/v1.1/TauNoId
include=dat/config.dat

Files=/store/user/amarini/Nero/v1.2.Trigger/Run2015D/SingleMuon
addfiles=/store/user/amarini/Nero/v1.2.Trigger/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8
#Files=/store/user/amarini/Nero/v1.2/SingleMuon
#addfiles=/store/user/amarini/Nero/v1.2/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8

####

#Output=TagAndProbe.root
Output=TagAndProbeNoId.root
Output=TagAndProbe.root
## Preselection:1,Preselection:2
Analysis=JsonAnalysis,Preselection,TagAndProbe
Analysis=JsonAnalysis,TagAndProbe

MCDB=dat/mc_database_v1.1.txt
SFDB=dat/sf_database.txt
Branches=dat/branches.txt
###
#pileup=aux/pileup.root
#pileup=root://eoscms///store/user/amarini/Nero/pileup/aux/pileup.root
pileup=
pileupRun=
pileupLumi=
Lumi=1
###
# additional JSON FILE for Data selection

Expand All @@ -65,9 +22,4 @@ Smear=NONE
Correct=MetPhiCorrector
config=MitPhiCorrector|fileName="aux/MetPhi.root"

config=TagAndProbe|AddLabel("HplusToTauNu-M200"),AddLabel("HplusToTauNu-M250"),AddLabel("HplusToTauNu-M500"),AddLabel("HplusToTauNu-M900")
#config=JsonAnalysis|@applyJson($OBJ!'aux/Cert_246908-251252_13TeV_PromptReco_Collisions15_JSON.txt')
#config=JsonAnalysis|@applyJson($OBJ!'aux/Cert_246908-254879_13TeV_PromptReco_Collisions15_JSON.txt')
#configure Analysis
#config=AnalysisBase|Init()
#config=Preselection|
config=TagAndProbe|AddLabel("DY"),AddLabel("HplusToTauNu")
1 change: 1 addition & 0 deletions dat/configTmvaTrainer.dat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include=dat/config.dat
# --small set for test
#Files=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/HplusToTauNu-M200
#addfiles=/store/user/amarini/Nero/v0.8/RunIISpring15DR74/WZ_TuneCUETP8M1_13TeV-pythia8
addfiles=/store/user/amarini/Nero/v1.2/Tau

Output=TmvaOutput.root
Analysis=TmvaTrainer
Expand Down
11 changes: 8 additions & 3 deletions dat/mc_database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ TTJets_TuneCUETP8M1_13TeV-madgraphMLM-pythia8 /store/user/amarini/Nero/v1.2/TTJe
TTZToQQ_TuneCUETP8M1_13TeV-amcatnlo-pythia8 /store/user/amarini/Nero/v1.2/TTZToQQ_TuneCUETP8M1_13TeV-amcatnlo-pythia8/TTZToQQ-25ns/151115_184113/0000 396605.04191 0.496605610259
VBFHToGG_M-125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/VBFHToGG_M-125_13TeV_powheg_pythia8 7097174.60418 3.70722627057
WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8 /store/user/amarini/Nero/v1.2/WJetsToLNu_TuneCUETP8M1_13TeV-amcatnloFXFX-pythia8/WJets-25ns/151115_184045/0000 3.73654308847e+12 42376.9146369
WW_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WW_TuneCUETP8M1_13TeV-pythia8/WW-25ns/151115_184102/0000 993655.641385 64.9141738205
WZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WZ_TuneCUETP8M1_13TeV-pythia8/WZ-25ns/151115_183958/0000 978512.0 23.4113123492
##WW_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WW_TuneCUETP8M1_13TeV-pythia8/WW-25ns/151115_184102/0000 993655.641385 64.9141738205
WW_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WW_TuneCUETP8M1_13TeV-pythia8/WW-25ns/151115_184102/0000 993655.641385 118.7
##WZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WZ_TuneCUETP8M1_13TeV-pythia8/WZ-25ns/151115_183958/0000 978512.0 23.4113123492
WZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/WZ_TuneCUETP8M1_13TeV-pythia8/WZ-25ns/151115_183958/0000 978512.0 48.66
WminusH_HToGG_WToAll_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/WminusH_HToGG_WToAll_M125_13TeV_powheg_pythia8 312310.750058 0.536223438449
WplusH_HToGG_WToAll_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/WplusH_HToGG_WToAll_M125_13TeV_powheg_pythia8 499691.916958 0.861150467697
ZH_HToGG_ZToAll_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/ZH_HToGG_ZToAll_M125_13TeV_powheg_pythia8 429642.635464 0.757807392355
ZZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/ZZ_TuneCUETP8M1_13TeV-pythia8/ZZ-25ns/151115_184010/0000 996944.0 10.1273319302
#ZZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/ZZ_TuneCUETP8M1_13TeV-pythia8/ZZ-25ns/151115_184010/0000 996944.0 10.1273319302
## Guillelmo
ZZ_TuneCUETP8M1_13TeV-pythia8 /store/user/amarini/Nero/v1.2/ZZ_TuneCUETP8M1_13TeV-pythia8/ZZ-25ns/151115_184010/0000 996944.0 19.3
ttHToGG_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/ttHToGG_M125_13TeV_powheg_pythia8 799600.0 0.540099093789
ttHToNonbb_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/ttHToNonbb_M125_13TeV_powheg_pythia8/ttHToNonbb-25ns/151115_184137/0000 1893625.0 0.540099024773
ttHTobb_M125_13TeV_powheg_pythia8 /store/user/amarini/Nero/v1.2/ttHTobb_M125_13TeV_powheg_pythia8/ttHTobb-25ns/151115_184125/0000 3933404.0 0.540099024773
TT_TuneCUETP8M1_13TeV-powheg-pythia8 /store/user/amarini/Nero/v1.2.1/TT_TuneCUETP8M1_13TeV-powheg-pythia8 38046829.0 831 ## 729.987347147
1 change: 1 addition & 0 deletions dat/sf_database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ muon pteta 20 30 0 2 1 0
## LABEL type sf err
kfac base 1 0
#
## include file
#############
# https://indico.cern.ch/event/369239/contribution/1/attachments/1134778/1623291/EGM_July31.pdf slide 11
# 1.5 -> -1.566,1.4442, this is eta, not sceta (not in the ntuple for now)
Expand Down
18 changes: 17 additions & 1 deletion interface/AnalysisBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,26 @@

class AnalysisBase
{
Output *output_;
private:
Output *output_; // set automatically

protected:
// --- this are the default values. override these functions
virtual inline void SetLeptonCuts(Lepton *l){ l->SetIsoCut(10); l->SetPtCut(15);l->SetIsoRelCut(-1);l->SetEtaCut(2.4);}
virtual inline void SetPhotonCuts(Photon *p){p->SetIsoCut(-1); p->SetPtCut(30);}
virtual inline void SetTauCuts(Tau *t){ t->SetIsoCut(1.5); t->SetEtaCut(2.1); t->SetPtCut(20); t->SetMuRej(true); t->SetEleRej(true);}
virtual inline void SetJetCuts(Jet *j){j->SetBCut(0.5);j->SetEtaCut(4.7); j->SetEtaCutCentral(2.4);j->SetPtCut(30);};
virtual void SetGenCuts(GenParticle *g){};

void SetCuts(Event *e);

public:
AnalysisBase(){ labels.push_back("Data"); labels.push_back("Other");};
virtual ~AnalysisBase(){};
//--
void doInit() {Init();}
void doEnd() { End();}
int doAnalyze(Event*e,string systname){ SetCuts(e); return analyze(e,systname);}
//
virtual void inline SetOutput( Output *o ) { output_ = o ;}
virtual int analyze(Event*,string systname){return EVENT_NOT_USED;}
Expand Down
4 changes: 4 additions & 0 deletions interface/AnalysisChargedHiggsTauNu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ChargedHiggsTauNu: virtual public AnalysisBase
NoLep ,
ThreeJets ,
OneBjet ,
Trigger ,
Met ,
AngColl ,
AngRbb ,
Expand All @@ -22,6 +23,9 @@ class ChargedHiggsTauNu: virtual public AnalysisBase

void Init() override;
int analyze(Event*,string systname) override;
// *return the cut flow
// direct tau or inv tau
static unsigned Selection(Event*, bool direct=true) ;
const string name() override {return "ChargedHiggsTauNu";}
};

Expand Down
5 changes: 5 additions & 0 deletions interface/AnalysisDY.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ class DYAnalysis: virtual public AnalysisBase

void Init() override;
int analyze(Event*,string systname) override;
int analyzeMM(Event*,string systname);
int analyzeEE(Event*,string systname);
int analyzeEM(Event*,string systname);
int analyzeLLL(Event*,string systname);
const string name() override {return "DYAnalysis";}
void SetLeptonCuts(Lepton *l) override ;

private:
CutSelector cut;
Expand Down
3 changes: 3 additions & 0 deletions interface/CutSelector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ class CutSelector{
CutSelector(uint32_t cut, size_t maxn) { SetCut(cut); SetMask(maxn);}
~CutSelector(){}
// ---
uint32_t raw() const { return cut_;}
uint32_t mask() const { return mask_;}
// ---
void SetMask(size_t maxn) {mask_ = (1<<(maxn+1)) -1 ;}//{ mask_=0; for(size_t i=0; i<maxn ;++i) mask_ |= (1<<i) ; }
void SetCut(uint32_t cut) {cut_= cut;}
void SetCutBit(size_t i) { cut_ |= (1<<i) ;}
Expand Down
25 changes: 19 additions & 6 deletions interface/Event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ using namespace std;
#include "interface/Lepton.hpp"
#include "interface/Tau.hpp"
#include "interface/Met.hpp"
#include "interface/Photon.hpp"
#include "interface/GenParticle.hpp"

// ----
Expand All @@ -33,24 +34,28 @@ class Event{
vector<Lepton*> leps_;
vector<Jet*> jets_;
vector<Tau*> taus_;
vector<Photon*> phos_;
vector<GenParticle*> genparticles_; // gen particles
Met met_;
vector<bool> triggerFired_;
int isRealData_;
int runNum_;
int lumiNum_;
int eventNum_;
unsigned eventNum_;
float rho_;
int npv_;

vector<string> triggerNames_;

string fName_;

public:
Weight weight_;

inline int runNum(){return runNum_; }
inline int lumiNum(){return lumiNum_; }
inline int eventNum(){return eventNum_; }
inline unsigned eventNum(){return eventNum_; }
inline string GetName()const{ return fName_;}

// This functions should check if the objects are valid
// Get NULL in case of failure
Expand All @@ -62,6 +67,7 @@ class Event{
Lepton * GetLepton( int iLep );
Lepton * GetElectron( int iEle );
Lepton * GetMuon( int iMu );
Photon * GetPhoton( int iPho );

//
inline Met GetMet( ) { return met_;} // should be const, but noCorrPt is not set correctly without &
Expand Down Expand Up @@ -89,9 +95,16 @@ class Event{
float Mt(MtType type=MtTau ) ; // 0 tau, 1 muon ,...

// --------- Angular variables
float RbbMin(int iMax=3) ;
float RCollMin(int iMax=3) ;
float RsrMax(int iMax=3) ;
inline float RbbMin(int iMax=3) { return RbbMin(iMax,GetTau(0) ) ; }
inline float RCollMin(int iMax=3) { return RCollMin(iMax, GetTau(0)); }
inline float RsrMax(int iMax=3) { return RsrMax(iMax, GetTau(0)); }

float RbbMin(int iMax,Tau *t) ;
float RCollMin(int iMax,Tau *t) ;
float RsrMax(int iMax,Tau *t) ;

inline float DPhiEtMissJet(int iJet=0){ Jet*j= GetJet(iJet) ; if( j == NULL) return -1; return fabs(GetMet().DeltaPhi(j) );}
inline float DPhiTauJet(Tau*t,int iJet=0){Jet*j=GetJet(iJet) ; if (j==NULL) return -1 ;if(t==NULL) return -1; return fabs(j->DeltaPhi(*t));}

//-----------------------------
virtual void ClearEvent();
Expand All @@ -100,7 +113,7 @@ class Event{
double weight();
// update objects that can be invalid (jets)
virtual void validate();
bool IsTriggered(string name, Trigger *trigger = NULL);
bool IsTriggered(string name, Trigger *trigger = NULL, bool isNone=false); // the None do not check if it is the L3 or LF -- only for taus and matching

// SF utils
void SetPtEtaSF(string label, float pt, float eta){
Expand Down
6 changes: 4 additions & 2 deletions interface/JSON.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ class JsonAnalysis : virtual public AnalysisBase

public:

virtual int analyze(Event*,string systname);
virtual const string name(){return "JsonAnalysis";}
int analyze(Event*,string systname) override;
const string name() override {return "JsonAnalysis";}
void Init() override ;


void addGoodLumi(long run, int lumi1, int lumi2);

Expand Down
Loading

0 comments on commit 3fcdecd

Please sign in to comment.