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

Comparing UserCode/cbrown/Development/Plotting/Modules/SampleClass.C (file contents):
Revision 1.14 by fronga, Thu Aug 23 16:05:40 2012 UTC vs.
Revision 1.16 by buchmann, Thu Sep 13 09:44:16 2012 UTC

# Line 323 | Line 323 | TH1F* samplecollection::Draw(string m_hi
323      tempdrawhisto->Sumw2();
324      if(use_this_sample) {
325        (this->collection)[isample].events->Draw(drawthis.str().c_str(),(essentialcut&&Cut)*cutWeight);//this weight is based on PU etc. not XS
326 <      //cout << "Drawing " << drawthis.str() << "   with cut   " << (const char*) (essentialcut&&Cut)*cutWeight << endl;
326 > //   cout << "\033[1;33m Drawing " << drawthis.str() << "   with cut   " << (const char*) (essentialcut&&Cut)*cutWeight << " for sample " <<  (this->collection)[isample].filename << "\033[0m   (overflow: " << addoverunderflowbins << ")" << endl;
327        if(addoverunderflowbins) {
328          //now also adding the overflow & underflow bins:
329          tempdrawhisto->SetBinContent(tempdrawhisto->GetNbinsX(),tempdrawhisto->GetBinContent(tempdrawhisto->GetNbinsX()+1)+tempdrawhisto->GetBinContent(tempdrawhisto->GetNbinsX()));
330          tempdrawhisto->SetBinError(tempdrawhisto->GetNbinsX(),TMath::Sqrt(tempdrawhisto->GetBinContent(tempdrawhisto->GetNbinsX())));
331 <        tempdrawhisto->SetBinContent(1,tempdrawhisto->GetBinContent(0)+tempdrawhisto->GetBinContent(1));
332 <        tempdrawhisto->SetBinError(1,TMath::Sqrt(tempdrawhisto->GetBinContent(1)));
331 > //      tempdrawhisto->SetBinContent(1,tempdrawhisto->GetBinContent(0)+tempdrawhisto->GetBinContent(1));
332 > //      tempdrawhisto->SetBinError(1,TMath::Sqrt(tempdrawhisto->GetBinContent(1)));
333 >        // Delete over- and under-flow bins
334 >        tempdrawhisto->SetBinContent(tempdrawhisto->GetNbinsX()+1,0);
335 > //        tempdrawhisto->SetBinContent(0,0);
336        }
337  
338        if(!(this->collection)[isample].is_data) tempdrawhisto->Scale(luminosity*((this->collection)[isample].weight));//weight applied here is XS & N(entries)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines