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

Comparing UserCode/cbrown/AnalysisFramework/Plotting/various_studies.C (file contents):
Revision 1.8 by buchmann, Wed Jul 20 14:34:53 2011 UTC vs.
Revision 1.21 by buchmann, Tue Aug 23 07:34:53 2011 UTC

# Line 8 | Line 8 | to compile: just run make ... that shoul
8   #include <sys/stat.h>
9   #include "Modules/GeneralToolBox.C"
10   #include "Modules/SampleClass.C"
11 + #include "Modules/Setup.C"
12   #include "Modules/PeakFinder.C"
13   #include "Modules/Poisson_Calculator.C"
14   #include "Modules/setTDRStyle.C"
15   #include "Modules/ActiveSamples.C"
16   #include "Modules/UpperLimitsWithShape.C"
16 #include "Modules/Setup.C"
17   #include "Modules/external/cl95cms.c"
18   #include "Modules/Plotting_Functions.C" //also included for peak finding etc.
19 #include "Modules/StudyModule.C" //also included for peak finding etc.
20 #include "Modules/ExperimentalModule.C"
19   #include "Modules/ResultModule.C"
20 + #include "Modules/ExperimentalModule.C"
21 + #include "Modules/StudyModule.C" //also included for peak finding etc.
22   #include "Modules/LimitCalculation.C"
23 + #include "Modules/Systematics.C"
24 + #include "Modules/SUSYScan.C"
25  
26   #include <TCut.h>
27   #include <TROOT.h>
# Line 47 | Line 49 | using namespace PlottingSetup;
49   int main()
50   {
51    gROOT->SetStyle("Plain");
52 <  setTDRStyle();
52 >  bool do_fat_line=false; // if you want to have HistLineWidth=1 and FuncWidth=1 as it was before instead of 2
53 >  setTDRStyle(do_fat_line);
54    gStyle->SetTextFont(42);
55    bool showList=false;
56    set_treename("events");//you can set the treename here to be used; options are "events" (for reco) for "PFevents" (for particle flow)
57 <  define_samples(showList,allsamples,signalsamples);
57 >  define_samples(showList,allsamples,signalsamples,scansample);
58    setlumi(luminosity);
59    do_png(true);
60 <  do_pdf(false);
60 >  do_pdf(true);
61    do_eps(false);
62    do_C(false);
63 <  set_directory("summer_mc");//here you can give it a name, for instance "1234pb" or whatever you like :-)
63 >  set_directory(directoryname);//Indicate the directory name where you'd like to save the output files in Setup.C
64    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!
65    stringstream resultsummary;
66    
67    //what to do :
68    bool do_all=false;/// DONE
69 <  bool do_peak_finding=false; /// DONE
69 >  bool do_peak_finding=true; /// DONE
70    bool calculate_pred_and_observed=false; /// DONE
71    bool study_sidebands=false; /// FOR REAL
72    bool do_test=false;/// DONE    (just any test you wish)
73    bool do_jzb_correction=false; //use this to find out the correction factor; originally this was done automatically but now you should do this separately and update Modules/Setup.C
74    bool do_find_sideband_definition=false;
75 <  bool do_pick_up_events=true; ///DONE
75 >  bool do_pick_up_events=false; ///DONE
76    bool do_ttbar_with_shapes=false;
77    bool do_upper_limits=false;
78 +  bool do_run_check=false;
79 +  bool do_kinematic_dist_of_pred_and_obs=false;//former do_plot_list
80 +  
81 +  bool do_show_dibosons=false;
82 +  
83 +  bool overlay_signal=false;
84    
85 +  bool do_efficiency_scan_in_susy_space=false; /// NOW OUTSOURCED TO T3
86 +       bool requireZ=true;
87 +      
88 +  //very experimental :
89 +  bool do_beautiful_ratio_plots=false;
90 +  write_warning(__FUNCTION__,"BEAUTIFUL PLOTS CURRENTLY DEACTIVATED IN FAVOR OF INTERESTING FITTING!");
91 +      
92    //**** part 1 : peak finding
93    float MCPeak=0,MCPeakError=0,DataPeak=0,DataPeakError=0,MCSigma=10,DataSigma=10;
94    method=Kostasmethod;//Kostasmethod;//dogaus3sigma;// options: dogaus,doKM,dogaus2sigma,dogaus3sigma
95 <  if(do_peak_finding||calculate_pred_and_observed||do_all) find_peaks(MCPeak,MCPeakError, DataPeak, DataPeakError,MCSigma,DataSigma,resultsummary);
95 >  if(do_peak_finding||do_show_dibosons||calculate_pred_and_observed||do_all) find_peaks(MCPeak,MCPeakError, DataPeak, DataPeakError,MCSigma,DataSigma,resultsummary);
96    
97    stringstream datajzb;
98    if(DataPeak>0) datajzb<<"("<<jzbvariabledata<<"-"<<TMath::Abs(DataPeak)<<")";
# Line 87 | Line 103 | int main()
103    
104    dout << "With peak correction, we get : " << endl;
105    dout << "    Data : " << datajzb.str() << endl;
106 <  dout << "    MC : " << datajzb.str() << endl;
106 >  dout << "    MC : " << mcjzb.str() << endl;
107    
108    if(do_find_sideband_definition) find_sideband_definition();
109    
# Line 104 | Line 120 | int main()
120    if(study_sidebands) look_at_sidebands(mcjzb.str(),datajzb.str());
121    
122    vector<float>jzb_limit_bins;
123 <  jzb_limit_bins.push_back(50);jzb_limit_bins.push_back(75);jzb_limit_bins.push_back(100);
124 <  jzb_limit_bins.push_back(150);jzb_limit_bins.push_back(200);jzb_limit_bins.push_back(500);
123 >  jzb_limit_bins.push_back(50);
124 >  //jzb_limit_bins.push_back(75);jzb_limit_bins.push_back(100);
125 >  //jzb_limit_bins.push_back(150);jzb_limit_bins.push_back(200);jzb_limit_bins.push_back(500);
126  
127    
128    if(do_ttbar_with_shapes) prepare_ttbar_limits(mcjzb.str(),datajzb.str(),DataPeakError,MCPeakError,jzb_limit_bins);
# Line 132 | Line 149 | int main()
149      pick_up_events((const char*)(sidebandcut&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
150    }
151    
152 +  if(do_run_check) run_check();
153 +  if(do_show_dibosons) show_dibosons(datajzb.str(),mcjzb.str());
154 +  
155 +  if(do_kinematic_dist_of_pred_and_obs) kinematic_dist_of_pred_and_obs();
156 +  
157    if(do_test) test();
158    
159 +  vector<float> ratio_binning;
160 +  ratio_binning.push_back(0);
161 +  ratio_binning.push_back(5);
162 +  ratio_binning.push_back(10);
163 +  ratio_binning.push_back(20);
164 +  ratio_binning.push_back(50);
165 +  ratio_binning.push_back(100);
166 +  ratio_binning.push_back(200);
167 +  ratio_binning.push_back(350);
168 +  ratio_binning.push_back(500);
169 +  if(do_beautiful_ratio_plots) Poisson_ratio_plots(mcjzb.str(),datajzb.str(),ratio_binning,MCPeakError,DataPeakError);
170    
171 + //  write_warning(__FUNCTION__,"WATCH OUT : STILL NEED TO DO THE NICE FIT FUNCTION THINGIE");
172 +  write_warning(__FUNCTION__,"WATCH OUT : STILL NEED TO DO THE NICE PREDICTION PLOT (do_beautiful_ratio_plots)");
173    
174    return 0;  
175   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines