-
Notifications
You must be signed in to change notification settings - Fork 4
/
63blrLong_PSOConfig.txt
115 lines (98 loc) · 4.79 KB
/
63blrLong_PSOConfig.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
##Parameters for the Particle Swarm Optimization
##RunOn = EKPSL5 | EKPSL5 | NAFSL5 | NAFSL6
RunOn=NAFSL6
## Swarm Parameters
NParticles=20
NIterations=100
wIneratia=0.729
wMemory=1.49445
wSwarm=1.49445
##FOM = ROCIntegral | Separation | rejB_vs_effS_0.1 | rejB_vs_effS_0.3 |rejB_vs_effS_0.5 | Chi2_B_muSB
FOM=ROCIntegral
KSThreshold=0.1
MaxVariablesInCombination=10
##only add variable if new FOM > ImprovementThreshold*FOM
ImprovementThreshold=1.0002
##Following not implemented Yet->experimentally
##repeat each training n times with different random seeds, Resulting
##NOTYET FOM=HarmonicMean(FOM)????
RepeatTrainingNTimes=2
DrawNRandomAsStartingVars=8
##NOTYET SaveTrainingsToTrees=False
##TMVA Options
FactoryString=!V:Silent:Color:!DrawProgressBar:Transformations=I:AnalysisType=Classification
PreparationString=SplitMode=Random:SplitSeed=0:NormMode=EqualNumEvents:!V
##if you want to limit the number of events do it eiter PreparationString or here
nTrain_Signal=18000
nTrain_Background=20000
nTest_Signal=18000
nTest_Background=20000
##Weight expression, might need to be declared in WeightVariables furhter down
## probably same syntax as in TTree::Draw
SignalWeightExpression=Weight_CSV*Weight_XS*Weight_PU
BackgroundWeightExpression=Weight_BKG
##Method to train and test
##only tested with BDT so far
## you might want to think abount you handle NEGATIVE WEIGHTS
##Parameters in MethodParams will be overwritten if they span the search space
MethodType=TMVA::Types::kBDT
MethodParams=!H:!V:NTrees=100:BoostType=Grad:Shrinkage=0.01:UseBaggedBoost:GradBaggingFraction=0.5:nCuts=10:MaxDepth=2:NegWeightTreatment=IgnoreNegWeightsInTraining
## search space
##coord=["Name",minValue,maxValue,maxVelocity,"int|float"]
##if min and max value are the same the value is not varied
coord=["NTrees",300,1500,50,"int"]
coord=["Shrinkage",0.001,0.05,0.002,"float"]
coord=["GradBaggingFraction",0.1,0.9,0.05,"float"]
coord=["nCuts",10,80,4,"int"]
##coord=["MaxDepth",2,3,1,"int"]
##--------------------------------------------------
##Source Trees:
## if UseEvenOddSplitting=1, the input trees will be split in training/testsample with Variable "Evt_Odd"
## maybe change the variable in PSO/PrepareTrees.C
## else TMVA will use built in splitting
UseEvenOddSplitting=0
SelectionString=
SourceSignalFile=/nfs/dust/cms/user/kelmorab/SplitTrees04102017/Category_63/Odd/ttHbb_*_nominal.root
SourceSignalTree=MVATree
SourceBackgroundFile=/nfs/dust/cms/user/kelmorab/SplitTrees04102017/Category_63/Odd/ttbar_*_nominal.root
SourceBackgroundTree=MVATree
##------------------------------------------------
##Variables in Format ["NAME","TYPE","LENGTH","VarExpression"]
##IMPORTANT dont leave a blank line between the last variable and the end variables line
##variables the optimization starts with
InitialVariables:
["Evt_Deta_TaggedJetsAverage","F","","Evt_Deta_TaggedJetsAverage"]
["BDT_common5_input_Mlb","F","","BDT_common5_input_Mlb"]
["BDT_common5_input_HT","F","","BDT_common5_input_HT"]
["BDT_common5_input_all_sum_pt_with_met","F","","BDT_common5_input_all_sum_pt_with_met"]
["BDT_common5_input_avg_btag_disc_btags","F","","BDT_common5_input_avg_btag_disc_btags"]
["BDT_common5_input_aplanarity","F","","BDT_common5_input_aplanarity"]
["BDT_common5_input_closest_tagged_dijet_mass","F","","BDT_common5_input_closest_tagged_dijet_mass"]
["BDT_common5_input_fourth_highest_btag","F","","BDT_common5_input_fourth_highest_btag"]
["BDT_common5_input_h0","F","","BDT_common5_input_h0"]
["BDT_common5_input_h1","F","","BDT_common5_input_h1"]
["BDT_common5_input_maxeta_tag_tag","F","","BDT_common5_input_maxeta_tag_tag"]
EndVariables
##---------------------------------------------------
## variables the swarm can try
AdditionalVariables:
["BDT_common5_input_maxeta_jet_jet","F","","BDT_common5_input_maxeta_jet_jet"]
["BDT_common5_input_pt_all_jets_over_E_all_jets","F","","BDT_common5_input_pt_all_jets_over_E_all_jets"]
["BDT_common5_input_sphericity","F","","BDT_common5_input_sphericity"]
["BDT_common5_input_tagged_dijet_mass_closest_to_125","F","","BDT_common5_input_tagged_dijet_mass_closest_to_125"]
["Evt_blr_ETH_transformed","F","","Evt_blr_ETH_transformed"]
["Evt_Dr_MinDeltaRLeptonTaggedJet","F","","Evt_Dr_MinDeltaRLeptonTaggedJet"]
["Evt_Dr_MinDeltaRTaggedJets","F","","Evt_Dr_MinDeltaRTaggedJets"]
EndVariables
##---------------------------------------------------
## variables used for reweighting and stuff
WeightVariables:
["Weight_XS","F","","Weight_XS"]
["Weight_CSV","F","","Weight_CSV"]
["Evt_Odd","F","","Evt_Odd"]
["Weight_PU","F","","Weight_PU"]
["N_GenTopHad","F","","N_GenTopHad"]
["N_GenTopLep","F","","N_GenTopLep"]
["Weight_BKG","F","","Weight_CSV*Weight_PU*(0.001958064*(N_GenTopHad==1 && N_GenTopLep==1)+0.001001529*(N_GenTopLep==2 && N_GenTopHad==0)+0.01077*(N_GenTopHad==2 && N_GenTopLep==0))"]
EndVariables
##---------------------------------------------------