ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/AnalysisFramework/Plotting/Modules/ActiveSamples.C
Revision: 1.46
Committed: Tue Nov 8 09:20:00 2011 UTC (13 years, 6 months ago) by buchmann
Content type: text/plain
Branch: MAIN
Changes since 1.45: +16 -10 lines
Log Message:
Have separate ee/mm/tautau DY samples in backup for studies

File Contents

# Content
1 /****
2
3 Off peak status (RestrictToMassPeak) :
4
5 x Necessary adaptations identified
6 x Started working on necessary adaptations
7 x Necessary adaptations implemented
8 x Necessary adaptations tested
9
10 DONE!
11
12
13 ****/
14
15 #include <iostream>
16 #include <vector>
17 #include <sys/stat.h>
18 #include <unistd.h>
19
20 #include <TMath.h>
21 #include <TColor.h>
22 #include <TPaveText.h>
23 #include <TRandom.h>
24 #include <TF1.h>
25
26 #ifndef SampleClassLoaded
27 #include "ActiveSamples.C"
28 #endif
29
30 #ifndef Verbosity
31 #define Verbosity 0
32 #endif
33 #ifndef HUSH
34 #define HUSH 1
35 #endif
36
37 void define_SMS_sample(bool showList, samplecollection &allsamples, samplecollection &signalsamples, samplecollection &scansample, bool loadall=false)
38 {
39 char hostname[1023];
40 gethostname(hostname,1023);
41
42 /*
43
44 CRUCIAL: The NAME needs to contain either "SMS" or "mSUGRA" for the SUSY scan algorithm (to be able to distinguish the two)
45
46 */
47
48 string prefix="/shome/";
49 if((int)((string)hostname).find("falda")>-1) prefix="/scratch/";
50
51 /// NEW: Only indicate the very first file - please place scans in ntuples/SMS/ and adapt the name here and in SUSYScan.C (the files are loaded when needed avoiding high memory usage and startup times)
52 /// If you have different scans (e.g. you have a T5zzl one as well) you can create an additional directory such as SMS_T5zzl, but you need to change that below and in SUSYScan.C as well (where the files are loaded)
53 // scansample.AddSample(prefix+"buchmann/ntuples/mSUGRA/mSUGRA_clean_splitup_0_0.root","mSUGRA",1,1,false,true,0,kRed); // there is only one sample in the scan; we give each event weight "1"
54 scansample.AddSample(prefix+"buchmann/ntuples/SMS_T5zzl/SMS_clean_splitup_0_0.root","SMS",1,1,false,true,0,kRed); // there is only one sample in the scan; we give each event weight "1"
55
56 if(loadall) {
57 for(int ix=0;ix<PlottingSetup::ScanXzones;ix++) {
58 for(int iy=1;iy<PlottingSetup::ScanYzones;iy++) {//note: the "zero-zero" sample is already loaded above!
59 scansample.AddSample((prefix+"buchmann/ntuples/SMS/SMS_clean_splitup_"+any2string(ix)+"_"+any2string(iy)+".root"),"SMS",1,1,false,true,ix*PlottingSetup::ScanXzones+iy,kRed); // there is only one sample in the scan; we give each event weight "1"
60 }
61 }
62 }
63
64
65 flag_this_change(__FUNCTION__,__LINE__,true);//PlottingSetup::RestrictToMassPeak
66 if(!PlottingSetup::RestrictToMassPeak) {
67 PlottingSetup::cutmass=PlottingSetup::openmasscut;
68 // PlottingSetup::sidebandcut=TCut("mll<2&&mll>3");//impossible cut - because we don't want any sidebands!
69 PlottingSetup::sidebandcut=TCut("SideBandsHaveBeenCalledForOffPeakAnalysis__ERROR==1");//this will trigger errors whenever sidebands are called - perfect for checking any remaining uses (checked, and no uses were found).
70 PlottingSetup::genMassCut=PlottingSetup::openGenmasscut;//impossible cut - because we don't want any sidebands!
71 }
72 }
73
74
75 void define_samples(bool showList, samplecollection &allsamples, samplecollection &signalsamples, samplecollection &scansample, samplecollection &raresample)
76 {
77 flag_this_change(__FUNCTION__,__LINE__,true);//PlottingSetup::RestrictToMassPeak
78 if(!PlottingSetup::RestrictToMassPeak) {
79 PlottingSetup::cutmass=PlottingSetup::openmasscut;
80 PlottingSetup::sidebandcut=TCut("mll<2&&mll>3");//impossible cut - because we don't want any sidebands!
81 PlottingSetup::genMassCut=PlottingSetup::openGenmasscut;//impossible cut - because we don't want any sidebands!
82 }
83
84 float ZJetsCrossSection = 3048.0; //NNLO----------------------------------
85 // float ZJetsCrossSectionM20 = 4998.0;//summer11
86 // float ZJetsCrossSectionD6Tlow = 400.0;//summer11
87 float TTbarCrossSection = 165.0;//(NLO) ---- 165.0; // approx. NNLO-----
88 float WJetsCrossSection = 31314.0;//NNLO-------3.131e4; //NNLO------------
89 float ZnunuCrossSection = 5760.0;//NNLO -------4.5e+3; //(LO);------------
90 //Single top x-sections from here:
91 //https://twiki.cern.ch/twiki/bin/view/CMS/SingleTopSigma
92 float SingleTopSCrossSection = 4.63; // NLO;----------------------------------
93 float SingleTopTCrossSection = 64.57; // NLO;--------------------------------
94 float SingleTopUCrossSection = 15.74; // NLO;----------------------------------
95 float VVJetsCrossSection = 4.8; // LO;-------------------------------------
96 float LM4CrossSection = 1.879*1.35; // k*LO
97 float LM8CrossSection = 0.7300*1.41 ; // k*LO
98 //the following numbers are from the MadGraphStandardModel210Summary as linked on the GeneratorProduction2011 page
99 // float QCD50to100CrossSection=30000000; // not used
100 float QCD100to250CrossSection=7000000;
101 float QCD250to500CrossSection=171000;
102 float QCD500to1000CrossSection=5200;
103 float QCD1000toInfCrossSection=83.0;
104
105 // float totEventsQCD50to100=207418.0; // not used
106 long totEventsQCD100to250 = 638792;
107 long totEventsQCD250to500 = 344454;
108 long totEventsQCD500to1000 = 10e10; //unknown but now suppressed. (no event passes anyway)
109 long totEventsQCD1000toInf = 163185;
110
111 long totEventsZjets = 32005720;//summer11
112 long totEventsZjetsD6T = 2543706;//summer11
113 long totEventsZjetsD6Tlow = 181799;//summer11
114 // long totEventsZjetsEE = 2738801;
115 // long totEventsZjetsMM = 2148325;
116 // long totEventsZjetsTT = 2032536;
117
118 //spring:2313911.0;//2743142.0; // DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola
119 long totEventsTTbar = 3701872;//summer11
120 //1161621.0;//Spring//1144028.0; // PabloV13/TTJets_TuneZ2_7TeV-madgraph-tauola
121 long totEventsWJets = 56674902;//summer11
122 //15010237.0;//spring//14350756.0; /// WJetsToLNu_TuneZ2_7TeV-madgraph-tauola.root
123 long totEventsZnunu = 2106977;//2167964.0; //ZinvisibleJets_7TeV-madgraph.root
124 long totEventsVVJets = 959076;//509072.0;
125 long totEventsSingleTopS = 493868;//489472.0;
126 long totEventsSingleTopT = 475460;//477610.0;
127 long totEventsSingleTopU = 489417;//477599.0;
128 long totEventsLM4 = 218380;
129 long totEventsLM8 = 180960;
130
131
132 Int_t nice_blue = TColor::GetColor("#2E9AFE");
133 Int_t nice_green = TColor::GetColor("#81f781");
134 Int_t nice_red = TColor::GetColor("#F78181");
135 Int_t nice_pink = TColor::GetColor("#F781BE");
136 Int_t nice_orange= TColor::GetColor("#F7BE81");//#FA9624
137 Int_t nice_black = TColor::GetColor("#2A0A1B");//black with a bit of purple :-)
138
139
140 Int_t dy_color = nice_blue;
141 Int_t wjets_color = kGray;
142 Int_t ttbar_color = nice_green;
143 Int_t singletop_color = nice_orange;
144 Int_t qcd_color = nice_black;
145 Int_t diboson_color = nice_pink;
146 Int_t lm_color = kRed;
147
148 dy_color = kYellow;
149 wjets_color = kGray;
150 ttbar_color = kMagenta+2;
151 singletop_color = kBlue;
152 qcd_color = kPink;
153 diboson_color = kGreen;
154 lm_color = kViolet+7;
155
156 Int_t rare_color = nice_blue;
157
158 char hostname[1023];
159 gethostname(hostname,1023);
160
161 string prefix="/shome/";
162 if((int)((string)hostname).find("falda")>-1) prefix="/scratch/";
163
164 // allsamples.AddSample(prefix+"buchmann/ntuples/Data/AllData_2809pb.root","Data",1,1,true,false,0,kBlack);
165 // if(PlottingSetup::RestrictToMassPeak) {
166 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/DYJetsToLL_TuneZ2_M-50_7TeV-madgraph-tauola_Summer11.root","ZJets",totEventsZjets,ZJetsCrossSection,false,false,7,dy_color);//summer11
167 /* } else {
168 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/DYToEE_M-20_TuneZ2_7TeV-pythia6-tauola__Summer11-PU_S3_START42_V11-v2__AODSIM.root","ZJets",totEventsZjetsEE,ZJetsCrossSectionM20/3.0,false,false,7,dy_color);//summer11
169 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/DYToMuMu_M-20_TuneZ2_7TeV-pythia6-tauola__Summer11-PU_S3_START42_V11-v2__AODSIM.root","ZJets",totEventsZjetsMM,ZJetsCrossSectionM20/3.0,false,false,7,dy_color);//summer11
170 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/DYToTauTau_M-20_TuneZ2_7TeV-pythia6-tauola__Summer11-PU_S3_START42_V11-v2__AODSIM.root","ZJets",totEventsZjetsTT,ZJetsCrossSectionM20/3.0,false,false,7,dy_color);//summer11
171 }*/
172 allsamples.AddSample(prefix+"buchmann/ntuples/Data/NewSelectionForPaper/AllData_3p5_newselection__updated.root ","Data",1,1,true,false,0,kBlack);
173 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTJets_TuneZ2_7TeV-madgraph-tauola_Summer11_2.root","TTbar",totEventsTTbar,TTbarCrossSection,false,false,1,ttbar_color);//summer11
174 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/WJetsToLNu_TuneZ2_7TeV-madgraph-tauola_Summer11_2.root","WJets",totEventsWJets,WJetsCrossSection,false,false,3,wjets_color);//summer
175 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/VVJetsTo4L_TuneD6T_7TeV-madgraph-tauola.root","DiBosons",totEventsVVJets,VVJetsCrossSection,false,false,4,diboson_color);
176 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TToBLNu_TuneZ2_s-channel_7TeV-madgraph_2.root","SingleTop",totEventsSingleTopS,SingleTopSCrossSection,false,false,2,singletop_color);
177 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TToBLNu_TuneZ2_t-channel_7TeV-madgraph.root","SingleTop",totEventsSingleTopT,SingleTopTCrossSection,false,false,2,singletop_color);
178 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TToBLNu_TuneZ2_tW-channel_7TeV-madgraph.root","SingleTop",totEventsSingleTopU,SingleTopUCrossSection,false,false,2,singletop_color);
179 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/ZinvisibleJets_7TeV-madgraph.root","Z nunu",totEventsZnunu,ZnunuCrossSection,false,false,4,diboson_color);
180 allsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM4_SUSY_sftsht_7TeV-pythia6.root","LM4",totEventsLM4,LM4CrossSection,false,true,8,lm_color);
181
182
183
184 if(!PlottingSetup::RestrictToMassPeak) {
185 // signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM0_SUSY_sftsht_7TeV-pythia6.root","LM0",219796,38.93*1.41 ,false,true,3,lm_color);
186 // signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM1_SUSY_sftsht_7TeV-pythia6.root","LM1",218176,4.888*1.34,false,true,4,lm_color);
187 // signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM2_SUSY_sftsht_7TeV-pythia6.root","LM2",206336,0.6027*1.33,false,true,5,lm_color);
188 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM3_SUSY_sftsht_7TeV-pythia6.root","LM3",215120,3.438*1.40,false,true,6,lm_color);
189 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM5_SUSY_sftsht_7TeV-pythia6.root","LM5",223992,0.473*1.34,false,true,7,lm_color);
190 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM9_SUSY_sftsht_7TeV-pythia6.root","LM9",227808,7.134*1.48,false,true,8,lm_color);
191 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM11_SUSY_sftsht_7TeV-pythia6.root","LM11",218703,0.8236*1.35,false,true,9,lm_color);
192 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM12_SUSY_sftsht_7TeV-pythia6.root","LM12",223491,4.414*1.34,false,true,10,lm_color);
193 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM13_SUSY_sftsht_7TeV-pythia6.root","LM13",173240,6.899*1.42,false,true,11,lm_color);
194 }
195 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM4_SUSY_sftsht_7TeV-pythia6.root","LM4",totEventsLM4,LM4CrossSection,false,true,1,lm_color);
196 signalsamples.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/LM8_SUSY_sftsht_7TeV-pythia6.root","LM8",totEventsLM8,LM8CrossSection,false,true,2,lm_color);
197 /*
198
199
200 // We do not use the following (rare) samples; nonetheless we include them in a separate category to prove that they are negligible
201 write_warning(__FUNCTION__,"Rare samples not yet reprocessed with new selectioN");/*
202 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTWWTo2Lplus2Nu_NTP.root","Rare SS",39791,4.76E-5,false,false,6,rare_color);//summer11
203 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/WWminusTo2L2Nu_NTP.root","Rare SS",51063,0.001559,false,false,6,rare_color);//summer11
204 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTWWTo2Lminus2Nu_NTP.root","Rare SS",39496 ,4.719E-5,false,false,6,rare_color);//summer11
205 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTWTo2Lplus2Nu_NTP.root","Rare SS",48764,0.006841,false,false,6,rare_color);//summer11
206 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/WWplusTo2L2Nu_NTP.root","Rare SS",48244 ,0.004216,false,false,6,rare_color);//summer11
207 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTZTo2Lplus2Nu_NTP.root","Rare SS",36740,0.002024,false,false,6,rare_color);//summer11
208 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/WWWTo2Lplus2Nu_NTP.root","Rare SS",43322,0.008957,false,false,6,rare_color);//summer11
209 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTWTo2Lminus2Nu_NTP.root","Rare SS",50435,0.002705,false,false,6,rare_color);//summer11
210 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/WWWTo2Lminus2Nu_NTP.root","Rare SS",17147,0.004109,false,false,6,rare_color);//summer11
211 raresample.AddSample(prefix+"buchmann/ntuples/MC/NewSelectionForPaper/TTZTo2Lminus2Nu_NTP.root","Rare SS",36781,0.001946,false,false,6,rare_color);//summer11
212 */
213 //scan files are only defined when necessary!
214
215 if(showList) allsamples.ListSamples();
216
217 }