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.2 by buchmann, Tue Jul 10 16:00:42 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 123 | Line 119 | int main (int argc, char ** argv)
119    if(directory!="") PlottingSetup::directoryname=directory;
120    if(option_counter==0) usage();
121    
122 <  
122 >  PlottingSetup::publicmode=true; // suppressing the whole JZB header
123    
124    ///----------------------------------- BELOW THIS LINE: NO MORE OPTIONS BUT ACTUAL FUNCTION CALLS! ---------------------------------------------------------
125    gROOT->SetStyle("Plain");
# Line 136 | Line 132 | int main (int argc, char ** argv)
132    
133    PlottingSetup::RestrictToMassPeak=true;
134    
135 <  define_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples);
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!");
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 148 | Line 149 | int main (int argc, char ** argv)
149    do_root(saveRoot);
150    
151    
152 <
153 <  
154 <  
155 <  
155 <  
156 <  
157 <  write_warning(__FUNCTION__,"Everything missing so far goes here: ");
158 <  
159 <  
160 <  write_warning(__FUNCTION__,"Commented out all yields");
161 <  
162 <  
163 <  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  
159  
160  
161 +
162 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines