ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/ZbSetup.C
Revision: 1.2
Committed: Fri Feb 1 11:53:15 2013 UTC (12 years, 3 months ago) by buchmann
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -1 lines
Log Message:
Updated Z+b luminosity

File Contents

# User Rev Content
1 buchmann 1.1 #include <iostream>
2     #include <fstream>
3     #include <TCut.h>
4     #include <TColor.h>
5     #include <TStyle.h>
6    
7     #ifndef SampleClassLoaded
8     #include "SampleClass.C"
9     #endif
10     #define SetupLoaded
11     #ifndef ResultLibraryClassLoaded
12     #include "ResultLibraryClass.C"
13     #endif
14    
15    
16     using namespace std;
17    
18    
19     namespace PlottingSetup {
20    
21     string directoryname="MetPlots53NewCR1";
22    
23     bool RestrictToMassPeak=true; //if you want to switch between offpeak ("false") and onpeak ("true") analysis please use this switch; the masscut below will be adapted automatically when adding samples :-)
24    
25     bool UseSidebandsForcJZB=true;
26     bool FullMCAnalysis=false;
27     bool DoBTag=false;
28    
29     // the 2012 switch is in GeneralToolBox
30    
31     float luminosity=4980;
32     float lumiuncert=0.022;
33    
34 buchmann 1.2 float luminosity2012=19490;
35 buchmann 1.1 float lumiuncert2012=0.022;
36    
37     string jzbvariabledata="(jzb[1]+0.062*pt)";
38     string jzbvariablemc="(jzb[1]+0.036*pt)";
39     float jzbHigh = 450.; // Range for JZB plots
40     float iMllLow = 20.; // Range for Edge Fitting (and mll plot) for iJZB
41     float iMllHigh = 400.; // Range for Edge Fitting (and mll plot) for iJZB
42    
43     samplecollection allsamples("completesamplecollection");
44     samplecollection qcdsamples("QCDcollection");
45     samplecollection signalsamples("signalsamplecollection");
46     samplecollection systsamples("systematicssamplecollection");
47     samplecollection scansample("scansamplecollection");
48     samplecollection raresample("raresamplecollection");
49     samplecollection comparesamples("comparesamplecollection");
50 buchmann 1.2 samplecollection SingleLeptonData("SingleLeptonData");
51 buchmann 1.1 int data=1;
52     int mc=0;
53     int mcwithsignal=2;
54     TCut leptoncut("(abs(eta1)<2.4 && abs(eta2)<2.4 && pt1>20 && pt2>20)");
55     TCut passtrig("((passed_filters * passed_triggers * ( (id1==id2)*(id1==0)*(trigger_bit&1) + (id1==id2)*(id1==1)*(trigger_bit&2) + (id1!=id2)*(trigger_bit&4|trigger_bit&8) ) ||!is_data))"&&leptoncut);
56    
57     TCut openmasscut("mll>20"); // this is the mass cut used in the off peak analysis!
58     TCut openGenmasscut("genMll>15");
59     TCut opensidebandcut("mll>500&&mll<100&&SIDEBANDS_CALLED_FOR_OFFPEAK_ANALYSIS"); // this won't let anything thru ...
60    
61     TCut Restrmasscut("abs(mll-91)<10"); // this is the mass cut used in the on peak analysis!
62     TCut RestrGenmasscut("abs(genMll-91)<10");
63     TCut Restrsidebandcut("((mll>55&&mll<70)||(mll>112&&mll<160))");
64    
65     TCut cutmass(Restrmasscut);
66     TCut genMassCut(RestrGenmasscut);
67    
68     TCut bTagRequirement("bTagProbCSVBP[0]>0.679");
69    
70     // WARNING: please also check ActiveSamples for 2012 settings
71     //TCut cutmass("mll>2");
72     // TCut basiccut("mll>2"&&leptoncut&&"(bTagProbTHighEff[0]>1.7)&&(bTagProbTHighEff[1]>1.7)");//basically nothing.
73     TCut basiccut("mll>2"&&leptoncut);//basically nothing
74     TCut basicqualitycut("(pfJetGoodNum>=2&&pfJetGoodID[0]!=0)&&(pfJetGoodNum>=2&&pfJetGoodID[1]!=0)"&&basiccut);//don't use this for the "essential cut", because we want to plot nJets as well as mll in the inclusive case; we thus use it as an addition nJets cut.
75    
76     TCut cutnJets("pfJetGoodNum40>=3"&&basicqualitycut);
77     TCut cutnJetsJESdown("pfJetGoodNumn1sigma>=3"&&basicqualitycut);
78     TCut cutnJetsJESup("pfJetGoodNump1sigma>=3"&&basicqualitycut);
79     TCut cutOSOF("(id1!=id2)&&(ch1*ch2<0)");
80     TCut cutOSSF("(id1==id2)&&(ch1*ch2<0)");
81     TCut sidebandcut(Restrsidebandcut);
82    
83     TCut TriLepSF("tri_id2==tri_id3");
84     TCut TriLepOF("tri_id2!=tri_id3");
85    
86    
87     // SUSY scan parameters
88     float mglustart=25;float mgluend=1200;float mglustep=25;
89     float mLSPstart=25;float mLSPend=1200;float mLSPstep=25;
90    
91     float m0start=0; float m0end=3000; float m0step=20;
92     float m12start=0; float m12end=1000; float m12step=20;
93    
94     int ScanXzones=15; // number of zones in x for (mSUGRA) scans
95     int ScanYzones=15; // number of zones in y for (mSUGRA) scans
96    
97     string mSUGRAxsFile="Plotting/Modules/external/msugra_m0_m12_10_0_1_NLO_1.0.txt";
98     string SMSReferenceXSFile="Plotting/Modules/external/reference_xSec_SMS-new.root";
99    
100     //scan types:
101     int mSUGRA=1;
102     int SMS=2;
103     int GMSB=3;
104    
105     TCut essential(passtrig);//add here any cuts you ALWAYS want
106     int dogaus=0;
107     int doKM=1;
108     int dogaus2sigma=2;
109     int dogaus3sigma=3;
110     int Kostasmethod=-99;
111    
112     float fitresultconstdata=0;//this is the result when fitting in the 0-30 GeV range
113     float fitresultconstmc=0;//this is the result when fitting in the 0-30 GeV range
114    
115     int method=-1;//Fitting method
116    
117     //now some style issues:
118     float DataMarkerSize=1.2;
119    
120     //here we save our number of predicted and observed events (with errors)
121     vector<float> Nobs;
122     vector<float> Npred;
123     vector<float> Nprederr;
124    
125     //here we save our "flipped" number of predicted and observed events (with errors) -- this means that we consider JZB<-X as observed and construct the corresponding prediction
126     bool alwaysflip=false;
127     bool allowflipping=true;
128     vector<float> flippedNobs;
129     vector<float> flippedNpred;
130     vector<float> flippedNprederr;
131    
132     int noJES=0;
133     int JESdown=1;
134     int JESup=2;
135    
136     // Uncertainties ONPEAK
137     float zjetsestimateuncertONPEAK=0.2;
138     float emuncertONPEAK=0.1;
139     float emsidebanduncertONPEAK=0.1;
140     float eemmsidebanduncertONPEAK=0.1;
141    
142     // Uncertainties OFFPEAK (iJZB)
143     float zjetsestimateuncertOFFPEAK=0.25;
144     float emuncertOFFPEAK=0.1;
145     float emsidebanduncertOFFPEAK=0.0;
146     float eemmsidebanduncertOFFPEAK=0.0;
147    
148    
149     //some refinement: nicer color gradient
150     Double_t stops[5] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
151     Double_t red[5] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
152     Double_t green[5] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
153     Double_t blue[5] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
154     int fi=TColor::CreateGradientColorTable(5, stops, red, green,blue, 255);
155    
156     // LIMITS
157     int nlimittoys=1000; // how many toys for setting limits
158     string limitmethod="cls";//what method to use to set limits
159     int limitpatience=20; // for how many minutes should the limit calculation (for one configuration!) be allowed to run before being aborted? this only has an effect when when running on the t3 batch; the value for CRAB is on the next line
160     int limitpatienceCRAB=60;
161     bool ConsiderSignalContaminationForLimits=true; //whether or not to consider signal contamination when computing limits (standard:true)
162     int nuisancemodel=1;
163    
164     float JZBPeakPositionData=-999;
165     float JZBPeakPositionMC=-999;
166     float JZBPeakWidthData=-999;
167     float JZBPeakWidthMC=-999;
168    
169     // two possible future systematics that ATM only take up CPU time in SUSY scans
170     bool computeJZBefficiency=false;
171     bool computeJZBresponse=false;
172    
173     bool requireZ=true;//this is switched to "off" automatically when doing offpeak!
174    
175     // string ScanSampleDirectory="SMS_T5zzh_newslots";//DileptonmSUGRAScan__pieces
176    
177     string ScanSampleDirectory="DileptonmSUGRAScan__pieces"; // possibilities (atm) : SMS_T5zz/, SMS_T5zzl/, SMS_T5zzh/, GMSB/, mSUGRA/ note: this string needs to either contain "SMS", "GMSB", or "mSUGRA"
178     // string ScanSampleDirectory="SMS_T1lh"; // possibilities (atm) : SMS_T5zz/, SMS_T5zzl/, SMS_T5zzh/, GMSB/, mSUGRA/ note: this string needs to either contain "SMS", "GMSB", or "mSUGRA"
179    
180     string FilterEfficiencyFile = "/shome/buchmann/JellyfishCBAF/DistributedModelCalculations/Limits/FilterEfficiencyv3.root";
181     string CMSSW_dir = "/shome/buchmann/final_production_2011/CMSSW_4_2_8/src/";
182    
183     ResultLibrary allresults;
184    
185     bool IsZbAnalysis=true;
186     bool IsWZAnalysis=false;
187     bool IsJZBAnalysis=false;
188     }