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.4 by buchmann, Fri Aug 17 13:06:09 2012 UTC vs.
Revision 1.12 by buchmann, Thu Jan 17 16:25:46 2013 UTC

# Line 4 | Line 4
4   #include <getopt.h>
5   #include <stdio.h>
6   #include <stdlib.h>
7 + #include <signal.h>
8 +
9   #include "Modules/GeneralToolBox.C"
10   #include "Modules/SampleClass.C"
11   #include "Modules/setTDRStyle.C"
12 < #include "Modules/Setup.C"
13 < //#include "Modules/Poisson_Calculator.C"
12 > #include "Modules/ZbSetup.C"
13 > #include "Modules/JSON/JSONSampleLoader.C"
14   #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
15   #include "Modules/ValueClass.C"
16   #include "Modules/ZbTools.C"
17  
# Line 50 | Line 41 | using namespace PlottingSetup;
41   void usage(int passed=0 ) {
42    std::cout << "USAGE : " << std::endl;
43    std::cout << "You can use different options when running this program : " << std::endl;
44 +  std::cout << "\033[1;34m Full (f)\033[0m   \t\t  Run the FULL analysis including all systematics etc. " << std::endl;
45    std::cout << std::endl;
46    std::cout << "\033[1;34m all\033[0m  \t\t  All processes of the standard workflow" << std::endl;
47    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 62 | int main (int argc, char ** argv)
62    int saveRoot=true;
63    int savepng=true;
64    int saveeps=false;
65 +  int do_Full=false;
66  
67    std::string directory="";
68    int option_iterator;
# Line 88 | Line 81 | int main (int argc, char ** argv)
81                 {"pdf",      no_argument,       &savepdf,1},
82                 {"root",     no_argument,       &saveRoot,1},
83                 {"C",        no_argument,       &saveC,1},
84 +               {"full",     no_argument,       &do_Full,1},
85                 /* The following options store values.*/
86                 {"dir",     required_argument, 0, 'd'},
87                 {0, 0, 0, 0}
88               };
89      int option_index = 0;
90 <    option_iterator = getopt_long(argc, argv, "d:",long_options, &option_index);
90 >    option_iterator = getopt_long(argc, argv, "d:f",long_options, &option_index);
91      if(option_iterator == -1) moreoptions=false;
92      else {
93        option_counter++;
# Line 111 | Line 105 | int main (int argc, char ** argv)
105                 directory=(std::string)optarg;
106                 std::cout<<"Option directory was passed with argument " << optarg << std::endl;
107                 break;
108 +             case 'f':
109 +               do_Full=true;
110 +               break;
111               case '?':
112                 usage(option_iterator);
113                 break;
# Line 125 | Line 122 | int main (int argc, char ** argv)
122    
123    PlottingSetup::publicmode=true; // suppressing the whole JZB header
124    
128  
125    ///----------------------------------- BELOW THIS LINE: NO MORE OPTIONS BUT ACTUAL FUNCTION CALLS! ---------------------------------------------------------
126    gROOT->SetStyle("Plain");
127    bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2
# Line 137 | Line 133 | int main (int argc, char ** argv)
133    
134    PlottingSetup::RestrictToMassPeak=true;
135    
136 <  define_Zb_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples);
136 >  //define_Zb_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples);
137 >  IsZbAnalysis=true;
138 >  IsWZAnalysis=false;
139 >  IsJZBAnalysis=false;
140 >  write_warning(__FUNCTION__,"Need to adapt sample collection!");
141 >  define_samples(showList,allsamples,signalsamples,scansample,raresample,systsamples,qcdsamples,comparesamples);
142    setlumi(luminosity);
143 <  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!
143 >  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!
144    stringstream resultsummary;
145  
146    do_png(savepng);
# Line 149 | Line 150 | int main (int argc, char ** argv)
150    do_root(saveRoot);
151    
152    
153 <
154 <  
155 <  
156 <  
156 <  
157 <  
158 <  write_warning(__FUNCTION__,"Everything missing so far goes here: ");
159 <  cout << " Still need to carry out cross - checks" << endl;
160 <  cout << " Still need to define errors in final plot " << endl;
161 <  cout << " Still need to make PU cut " << endl;
162 <  
163 <  
164 <  do_basic_ZB_analysis();
153 >  write_warning(__FUNCTION__,"Using preliminary weights!");
154 >  //cutWeight=TCut("(weight*(weight<1000)*(is_data+(!is_data)*((id1==id2)*0.95+(id1!=id2)*0.94)))");
155 >  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)))");
156 >  do_basic_ZB_analysis(do_Full);
157    return 0;  
158   }
159  
160  
161  
162 +
163 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines