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.2 by buchmann, Thu Jul 14 06:25:39 2011 UTC vs.
Revision 1.5 by buchmann, Tue Jul 19 07:06:51 2011 UTC

# Line 15 | Line 15 | to compile: just run make ... that shoul
15   #include "Modules/ActiveSamples.C"
16   #include "Modules/UpperLimitsWithShape.C"
17   #include "Modules/Setup.C"
18 #include "Modules/Var_Studies.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  
# Line 49 | Line 48 | int main()
48    gStyle->SetTextFont(42);
49    bool showList=false;
50    set_treename("events");//you can set the treename here to be used; options are "events" (for reco) for "PFevents" (for particle flow)
51 <  define_samples(showList,allsamples);
51 >  define_samples(showList,allsamples,signalsamples);
52    setlumi(luminosity);
53    do_png(true);
54    do_pdf(false);
55    do_eps(false);
56    do_C(false);
57 <  set_directory("comparison__corrected__fixed");//here you can give it a name, for instance "1234pb" or whatever you like :-)
57 >  set_directory("summer_mc");//here you can give it a name, for instance "1234pb" or whatever you like :-)
58    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!
59    stringstream resultsummary;
60    
# Line 63 | Line 62 | int main()
62    bool do_all=false;/// DONE
63    bool do_peak_finding=false; /// DONE
64    bool calculate_pred_and_observed=false; /// DONE
65 <  bool study_sidebands=true; /// FOR REAL
65 >  bool study_sidebands=false; /// FOR REAL
66    bool do_test=false;/// DONE    (just any test you wish)
67    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
68 +  bool do_find_sideband_definition=false;
69 +  bool do_pick_up_events=true; ///DONE
70    
71    //**** part 1 : peak finding
72    float MCPeak=0,MCPeakError=0,DataPeak=0,DataPeakError=0,MCSigma=10,DataSigma=10;
# Line 83 | Line 84 | int main()
84    cout << "    Data : " << datajzb.str() << endl;
85    cout << "    MC : " << datajzb.str() << endl;
86    
87 <  //jzb response correction
88 <  if(do_jzb_correction) find_correction_factors(jzbvariabledata,jzbvariablemc);
89 <  cout << "Please update Modules/Setup.C to reflect the following values (round them first ... )" <<endl;
90 <  cout << "Corrected JZB variable definition " << endl << "  Data: " << jzbvariabledata << "  and MC: " << jzbvariablemc << endl;
91 <  cout << endl;
92 <  cout << "If you're feeling lazy, copy & paste this : " << endl;
93 <  cout << "  string jzbvariabledata=\""<<jzbvariabledata<<"\";"<<endl;
94 <  cout << "  string jzbvariablemc=\""  <<jzbvariablemc<<"\";"<<endl;
87 >  if(do_find_sideband_definition) find_sideband_definition();
88 >  
89 >  if(do_jzb_correction) {
90 >    find_correction_factors(jzbvariabledata,jzbvariablemc);
91 >    cout << "Please update Modules/Setup.C to reflect the following values (round them first ... )" <<endl;
92 >    cout << "Corrected JZB variable definition " << endl << "  Data: " << jzbvariabledata << "  and MC: " << jzbvariablemc << endl;
93 >    cout << endl;
94 >    cout << "If you're feeling lazy, copy & paste this : " << endl;
95 >    cout << "  string jzbvariabledata=\""<<jzbvariabledata<<"\";"<<endl;
96 >    cout << "  string jzbvariablemc=\""  <<jzbvariablemc<<"\";"<<endl;
97 >  }
98    
99    if(study_sidebands) look_at_sidebands(mcjzb.str(),datajzb.str());
100    
101 +  if(do_pick_up_events) {
102 +    
103 +    cout << "Observed: " << endl;
104 +    pick_up_events((const char*)(cutmass&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
105 +    cout << "Predicted (JZB<-100) OSSF" << endl;
106 +    pick_up_events((const char*)(cutmass&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
107 +    cout << "Predicted (emu, JZB>100) OSOF" << endl;
108 +    pick_up_events((const char*)(cutmass&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
109 +    cout << "Predicted (emu, JZB<-100) OSOF" << endl;
110 +    pick_up_events((const char*)(cutmass&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
111 +    cout << "Predicted (SB emu, JZB>100) OSOF" << endl;
112 +    pick_up_events((const char*)(sidebandcut&&cutOSOF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
113 +    cout << "Predicted (SB emu, JZB<-100) OSOF" << endl;
114 +    pick_up_events((const char*)(cutOSOF&&cutnJets&&basiccut&&sidebandcut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
115 +    cout << "Predicted (SB SF, JZB>100) OSSF" << endl;
116 +    pick_up_events((const char*)(sidebandcut&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)>100)"));
117 +    cout << "Predicted (SB SF, JZB<-100) OSSF" << endl;
118 +    pick_up_events((const char*)(sidebandcut&&cutOSSF&&cutnJets&&basiccut&&"((jzb[1]+0.06*pt-2.84727)<-100)"));
119 +  }
120 +  
121    if(do_test) test();
122    
123    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines