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.12 by buchmann, Fri Aug 10 12:59:45 2012 UTC vs.
Revision 1.15 by fronga, Mon Aug 27 13:10:59 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 << "Drawing " << drawthis.str() << "   with cut   " << (const char*) (essentialcut&&Cut)*cutWeight << 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)));
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)
# Line 398 | Line 401 | TH2F* samplecollection::Draw(string m_hi
401      if(use_this_sample) {
402        if(Verbosity>0) dout << "[samplecollection::Draw] : Added contribution from sample " << (this->collection)[isample].samplename << endl;
403        (this->collection)[isample].events->Draw(drawthis.str().c_str(),(essentialcut&&Cut)*cutWeight);//this weight is based on PU etc. not XS
404 <      cout << "About to draw : " << drawthis.str() << "  with cut   " << (const char*) (essentialcut&&Cut)*cutWeight << endl;
404 > //       cout << "About to draw : " << drawthis.str() << "  with cut   " << (const char*) (essentialcut&&Cut)*cutWeight << endl;
405        if(addoverunderflowbins) {
406          //now also adding the overflow & underflow bins:
407          tempdrawhisto->SetBinContent(tempdrawhisto->GetNbinsX(),tempdrawhisto->GetBinContent(tempdrawhisto->GetNbinsX()+1)+tempdrawhisto->GetBinContent(tempdrawhisto->GetNbinsX()));
# Line 429 | Line 432 | TH1F* samplecollection::Draw(string m_hi
432    {
433      binning.push_back(((float)(m_maxx-m_minx)/((float)m_nbins))*i+m_minx);
434    }
435 <  
435 >
436    TH1F *histo = this->Draw(m_histoname,m_var, binning, m_xlabel, m_ylabel, Cut, m_is_data, luminosity, onlyindex,drawsignal);
437    return histo;
438    }
# Line 561 | Line 564 | TLegend* samplecollection::allbglegend(s
564   //  TLegend *leg = new TLegend(0.65,0.60,0.89,0.77);
565    TLegend *leg = new TLegend(posx,posy,0.89,0.89);
566    if(title!="") leg->SetHeader(title.c_str());
567 <  if(data->GetName()!="nothing") leg->AddEntry(data,"Data","p");
567 >  if(data->GetName()!="nothing") leg->AddEntry(data,"Data","lp");
568    leg->SetFillColor(kWhite);
569    leg->SetBorderSize(0);
570    leg->SetLineColor(kWhite);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines