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.4 by buchmann, Fri Jul 15 10:13:09 2011 UTC vs.
Revision 1.8 by buchmann, Wed Jul 20 14:34:53 2011 UTC

# Line 9 | Line 9 | to compile: just run make ... that shoul
9   #include "Modules/GeneralToolBox.C"
10   #include "Modules/SampleClass.C"
11   #include "Modules/PeakFinder.C"
12 #include "Modules/HistoDB.C"
12   #include "Modules/Poisson_Calculator.C"
13   #include "Modules/setTDRStyle.C"
14   #include "Modules/ActiveSamples.C"
15   #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"
21 + #include "Modules/ResultModule.C"
22 + #include "Modules/LimitCalculation.C"
23  
24   #include <TCut.h>
25   #include <TROOT.h>
# Line 62 | Line 65 | int main()
65    bool do_all=false;/// DONE
66    bool do_peak_finding=false; /// DONE
67    bool calculate_pred_and_observed=false; /// DONE
68 <  bool study_sidebands=true; /// FOR REAL
68 >  bool study_sidebands=false; /// FOR REAL
69    bool do_test=false;/// DONE    (just any test you wish)
70    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
71    bool do_find_sideband_definition=false;
72 +  bool do_pick_up_events=true; ///DONE
73 +  bool do_ttbar_with_shapes=false;
74 +  bool do_upper_limits=false;
75    
76    //**** part 1 : peak finding
77    float MCPeak=0,MCPeakError=0,DataPeak=0,DataPeakError=0,MCSigma=10,DataSigma=10;
# Line 79 | Line 85 | int main()
85    if(MCPeak>0) mcjzb<<"("<<jzbvariablemc<<"-"<<TMath::Abs(MCPeak)<<")";
86    else mcjzb<<"("<<jzbvariablemc<<"+"<<TMath::Abs(MCPeak)<<")";
87    
88 <  cout << "With peak correction, we get : " << endl;
89 <  cout << "    Data : " << datajzb.str() << endl;
90 <  cout << "    MC : " << datajzb.str() << endl;
88 >  dout << "With peak correction, we get : " << endl;
89 >  dout << "    Data : " << datajzb.str() << endl;
90 >  dout << "    MC : " << datajzb.str() << endl;
91    
92    if(do_find_sideband_definition) find_sideband_definition();
93    
94    if(do_jzb_correction) {
95      find_correction_factors(jzbvariabledata,jzbvariablemc);
96 <    cout << "Please update Modules/Setup.C to reflect the following values (round them first ... )" <<endl;
97 <    cout << "Corrected JZB variable definition " << endl << "  Data: " << jzbvariabledata << "  and MC: " << jzbvariablemc << endl;
98 <    cout << endl;
99 <    cout << "If you're feeling lazy, copy & paste this : " << endl;
100 <    cout << "  string jzbvariabledata=\""<<jzbvariabledata<<"\";"<<endl;
101 <    cout << "  string jzbvariablemc=\""  <<jzbvariablemc<<"\";"<<endl;
96 >    dout << "Please update Modules/Setup.C to reflect the following values (round them first ... )" <<endl;
97 >    dout << "Corrected JZB variable definition " << endl << "  Data: " << jzbvariabledata << "  and MC: " << jzbvariablemc << endl;
98 >    dout << endl;
99 >    dout << "If you're feeling lazy, copy & paste this : " << endl;
100 >    dout << "  string jzbvariabledata=\""<<jzbvariabledata<<"\";"<<endl;
101 >    dout << "  string jzbvariablemc=\""  <<jzbvariablemc<<"\";"<<endl;
102    }
103    
104    if(study_sidebands) look_at_sidebands(mcjzb.str(),datajzb.str());
105    
106 +  vector<float>jzb_limit_bins;
107 +  jzb_limit_bins.push_back(50);jzb_limit_bins.push_back(75);jzb_limit_bins.push_back(100);
108 +  jzb_limit_bins.push_back(150);jzb_limit_bins.push_back(200);jzb_limit_bins.push_back(500);
109 +
110 +  
111 +  if(do_ttbar_with_shapes) prepare_ttbar_limits(mcjzb.str(),datajzb.str(),DataPeakError,MCPeakError,jzb_limit_bins);
112 +  
113 +  if(do_upper_limits) calculate_upper_limits(mcjzb.str(),datajzb.str());
114 +  
115 +  if(do_pick_up_events) {
116 +    
117 +    dout << "Observed: " << endl;
118 +    pick_up_events((const char*)(cutmass&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
119 +    dout << "Predicted (JZB<-100) OSSF" << endl;
120 +    pick_up_events((const char*)(cutmass&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
121 +    dout << "Predicted (emu, JZB>100) OSOF" << endl;
122 +    pick_up_events((const char*)(cutmass&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
123 +    dout << "Predicted (emu, JZB<-100) OSOF" << endl;
124 +    pick_up_events((const char*)(cutmass&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
125 +    dout << "Predicted (SB emu, JZB>100) OSOF" << endl;
126 +    pick_up_events((const char*)(sidebandcut&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
127 +    dout << "Predicted (SB emu, JZB<-100) OSOF" << endl;
128 +    pick_up_events((const char*)(cutOSOF&&cutnJets&&basiccut&&sidebandcut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
129 +    dout << "Predicted (SB SF, JZB>100) OSSF" << endl;
130 +    pick_up_events((const char*)(sidebandcut&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
131 +    dout << "Predicted (SB SF, JZB<-100) OSSF" << endl;
132 +    pick_up_events((const char*)(sidebandcut&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
133 +  }
134 +  
135    if(do_test) test();
136    
137    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines