ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/ZbAnalysis.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/ZbAnalysis.C (file contents):
Revision 1.5 by buchmann, Mon Nov 5 15:25:01 2012 UTC vs.
Revision 1.13 by buchmann, Fri Jan 18 07:32:31 2013 UTC

# Line 4 | Line 4
4   #include <getopt.h>
5   #include <stdio.h>
6   #include <stdlib.h>
7 +
8   #include "Modules/GeneralToolBox.C"
9   #include "Modules/SampleClass.C"
10   #include "Modules/setTDRStyle.C"
11 < #include "Modules/Setup.C"
12 < //#include "Modules/Poisson_Calculator.C"
11 > #include "Modules/ZbSetup.C"
12 > #include "Modules/JSON/JSONSampleLoader.C"
13   #include "Modules/ActiveSamples.C"
13 //#include "Modules/PeakFinder.C"
14 //#include "Modules/UpperLimitsWithShape.C"
15 //#include "Modules/Plotting_Functions.C"
16 //#include "Modules/LimitCalculation.C"
17 //#include "Modules/ResultModule.C"
18 //#include "Modules/CrossSectionReader.C"
19 //#include "Modules/Systematics.C"
20 //#include "Modules/SugarCoating.C"
21 //#include "Modules/ExclusionPlot.C"
22 //#include "Modules/SUSYScan.C"
23
14   #include "Modules/ValueClass.C"
15   #include "Modules/ZbTools.C"
16  
# Line 50 | Line 40 | using namespace PlottingSetup;
40   void usage(int passed=0 ) {
41    std::cout << "USAGE : " << std::endl;
42    std::cout << "You can use different options when running this program : " << std::endl;
43 +  std::cout << "\033[1;34m Full (f)\033[0m   \t\t  Run the FULL analysis including all systematics etc. " << std::endl;
44    std::cout << std::endl;
45    std::cout << "\033[1;34m all\033[0m  \t\t  All processes of the standard workflow" << std::endl;
46    std::cout << "\033[1;34m png\033[0m   \t\t  Save all plots as pngs (also available: --pdf, --root, --eps, --C) standard: png&pdf" << std::endl;
# Line 70 | Line 61 | int main (int argc, char ** argv)
61    int saveRoot=true;
62    int savepng=true;
63    int saveeps=false;
64 +  int do_Full=false;
65  
66    std::string directory="";
67    int option_iterator;
# Line 88 | Line 80 | int main (int argc, char ** argv)
80                 {"pdf",      no_argument,       &savepdf,1},
81                 {"root",     no_argument,       &saveRoot,1},
82                 {"C",        no_argument,       &saveC,1},
83 +               {"full",     no_argument,       &do_Full,1},
84                 /* The following options store values.*/
85                 {"dir",     required_argument, 0, 'd'},
86                 {0, 0, 0, 0}
87               };
88      int option_index = 0;
89 <    option_iterator = getopt_long(argc, argv, "d:",long_options, &option_index);
89 >    option_iterator = getopt_long(argc, argv, "d:f",long_options, &option_index);
90      if(option_iterator == -1) moreoptions=false;
91      else {
92        option_counter++;
# Line 111 | Line 104 | int main (int argc, char ** argv)
104                 directory=(std::string)optarg;
105                 std::cout<<"Option directory was passed with argument " << optarg << std::endl;
106                 break;
107 +             case 'f':
108 +               do_Full=true;
109 +               break;
110               case '?':
111                 usage(option_iterator);
112                 break;
# Line 125 | Line 121 | int main (int argc, char ** argv)
121    
122    PlottingSetup::publicmode=true; // suppressing the whole JZB header
123    
128  
124    ///----------------------------------- BELOW THIS LINE: NO MORE OPTIONS BUT ACTUAL FUNCTION CALLS! ---------------------------------------------------------
125    gROOT->SetStyle("Plain");
126    bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2
# Line 138 | Line 133 | int main (int argc, char ** argv)
133    PlottingSetup::RestrictToMassPeak=true;
134    
135    //define_Zb_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples);
136 +  IsZbAnalysis=true;
137 +  IsWZAnalysis=false;
138 +  IsJZBAnalysis=false;
139    write_warning(__FUNCTION__,"Need to adapt sample collection!");
142  write_warning(__FUNCTION__,"Where the hell are the b efficiency corrections?!");
140    define_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples,comparesamples);
141    setlumi(luminosity);
142 <  setessentialcut(essential);//this sets the essential cut; this one is used in the draw command so it is AUTOMATICALLY applied everywhere. IMPORTANT: Do NOT store weights here!
142 >  setessentialcut(essential&&TCut("id1==id2"));//this sets the essential cut; this one is used in the draw command so it is AUTOMATICALLY applied everywhere. IMPORTANT: Do NOT store weights here!
143    stringstream resultsummary;
144  
145    do_png(savepng);
# Line 152 | Line 149 | int main (int argc, char ** argv)
149    do_root(saveRoot);
150    
151    
152 <
153 <  
154 <  
155 <  
159 <  
160 <  TCut bTagWeight=TCut("((EventFlavor!=5&&EventFlavor!=4)+(EventFlavor==5||EventFlavor==4)*(((Zb30_bTagProbCSVBP[0]>0.15&&Zb30_bTagProbCSVBP[0]<0.95)*(-0.113472343605*Zb30_bTagProbCSVBP[0] + 1.04926963159)) + ((Zb30_bTagProbCSVBP[0]>1.2&&Zb30_bTagProbCSVBP[0]<20.0)*(0.00066342906116*Zb30_bTagProbCSVBP[0] + 0.93334455507)) + (Zb30_bTagProbCSVBP[0]<0.15||Zb30_bTagProbCSVBP[0]>20) + (Zb30_bTagProbCSVBP[0]>0.95&&Zb30_bTagProbCSVBP[0]<1.2)))");
161 <    
162 <  cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)*((id1==id2&&id1==0)*0.95+(id1==id2&&id1==1)*0.88+(id1!=id2)*0.92)))"*bTagWeight);    
163 <
164 <  write_warning(__FUNCTION__,"Everything missing so far goes here: ");
165 <  cout << " Still need to carry out cross - checks" << endl;
166 <  cout << " Still need to define errors in final plot " << endl;
167 <  cout << " Still need to make PU cut " << endl;
168 <  
169 <  
170 <  do_basic_ZB_analysis();
152 >  write_warning(__FUNCTION__,"Using preliminary weights!");
153 >  //cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)*((id1==id2)*0.95+(id1!=id2)*0.94)))");
154 >  cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)*((id1==id2&&id1==0)*0.95+(id1==id2&&id1==1)*0.88+(id1!=id2)*0.92)))");
155 >  do_basic_ZB_analysis(do_Full);
156    return 0;  
157   }
158  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines