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

Comparing UserCode/cbrown/AnalysisFramework/Plotting/Modules/ExclusionPlot.C (file contents):
Revision 1.15 by buchmann, Mon Dec 5 18:07:06 2011 UTC vs.
Revision 1.16 by buchmann, Tue Dec 13 09:54:38 2011 UTC

# Line 292 | Line 292 | TGraph *MarcosExclusionLine(TH2F *exclus
292          last_y=x;
293          counter++;
294    }
295 <  realgraph->SetLineColor(TColor::GetColor("#2E2EFE")); //dark blue
295 >  realgraph->SetLineColor(TColor::GetColor("#151515")); //nice black
296    realgraph->SetLineWidth(3);
297  
298    return realgraph;
# Line 491 | Line 491 | pair <float,float> find_interpolated_poi
491   }
492  
493   void project_to_last_point_on_line(float x2, float y2, float x1, float y1, float &x, float &y, int scantype) {
494 + // original code: continue the same way to the diagonal (i.e. conserve the angle to the diagonal)
495 + /*
496    float deltax=x2-x1;
497    float deltay=y2-y1;
498    float b = (y1-x1)/(deltax-deltay);
# Line 498 | Line 500 | void project_to_last_point_on_line(float
500    x = x1 + b * deltax;
501    y = y1 + b * deltay;
502    if(x<0||y<0) x=-1;
503 <  if((scantype==PlottingSetup::GMSB||scantype==PlottingSetup::SMS) && (x>PlottingSetup::mgluend||y>PlottingSetup::mLSPend)) x=-1;
503 >  if((scantype==PlottingSetup::GMSB||scantype==PlottingSetup::SMS) && (x>PlottingSetup::mgluend||y>PlottingSetup::mLSPend)) x=-1;
504 > */
505 > //new code: just connect directly with the diagonal
506 > float b = 0;
507 > if(scantype==PlottingSetup::SMS) b = -75;
508 > //float alpha = (b+x2-y2)/2.0;
509 > x           = floor((x2+y2-b)/2.0);
510 > y           = floor(x + b);
511   }
512  
513   TGraph* get_mSUGRA_exclusion_line(TH2F *exclusionhisto, int scantype) {
# Line 538 | Line 547 | TGraph* get_mSUGRA_exclusion_line(TH2F *
547      }
548  
549      bool usethispoint=true;
550 <    if(scantype==PlottingSetup::GMSB) {
551 <        if(spoints[i]<points[i].first) usethispoint=false;
552 <    }
544 <    if(scantype==PlottingSetup::SMS) {
545 <        if(spoints[i]-50.<points[i].first) usethispoint=false;
546 <    }
550 >    if(scantype==PlottingSetup::GMSB) if(spoints[i]<points[i].first) usethispoint=false;
551 >    if(scantype==PlottingSetup::SMS)  if(spoints[i]-75.<points[i].first) usethispoint=false;
552 >
553      if((scantype==PlottingSetup::GMSB||scantype==PlottingSetup::SMS) && (spoints[i]>PlottingSetup::mgluend||points[i].first>PlottingSetup::mLSPend)) usethispoint=false;
554  
555      if(usethispoint) {
# Line 560 | Line 566 | TGraph* get_mSUGRA_exclusion_line(TH2F *
566          //The final point will be a continuation of the last one, towards the diagonal
567          float x,y;
568          project_to_last_point_on_line(lastx,lasty,lastx2,lasty2,x,y,scantype);
569 <        if(x>0&&y>0) graph->SetPoint(points.size(),x,y);
569 >        if(x>0&&y>0) graph->SetPoint(points.size(),y,x);
570          else graph->SetPoint(points.size(),lastx,lasty);
571    }
572  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines