Ignore:
Timestamp:
07/01/08 17:07:30 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r8986 r8990  
    1919!   Author(s): Markus Gaug, 4/2004 <mailto:markus@ifae.es>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2007
     21!   Copyright: MAGIC Software Development, 2000-2008
    2222!
    2323!
     
    8989#include "MPedestalSubtract.h"
    9090
     91// Display helpers
     92#include "MJCalibration.h"
     93
    9194ClassImp(MJPedestal);
    9295
     
    393396        gPad->SetBorderMode(0);
    394397        gPad->SetTicks();
    395         TH1D *obj2 = (TH1D*)obj1->Projection(obj1->GetName());
     398        TH1D *obj2 = (TH1D*)obj1->Projection();
    396399        obj2->Draw();
    397400        obj2->SetBit(kCanDelete);
     
    431434
    432435        if (geomcam.InheritsFrom("MGeomCamMagic"))
    433           {
    434             TArrayI inner(1);
    435             inner[0] = 0;
    436 
    437             TArrayI outer(1);
    438             outer[0] = 1;
    439            
    440             TArrayI s0(6);
    441             s0[0] = 6;
    442             s0[1] = 1;
    443             s0[2] = 2;
    444             s0[3] = 3;
    445             s0[4] = 4;
    446             s0[5] = 5;
    447            
    448             TArrayI s1(3);
    449             s1[0] = 6;
    450             s1[1] = 1;
    451             s1[2] = 2;
    452            
    453             TArrayI s2(3);
    454             s2[0] = 3;
    455             s2[1] = 4;
    456             s2[2] = 5;
    457            
    458             TVirtualPad *pad = gPad;
    459             pad->Divide(2,1);
    460            
    461             TH1D *inout[2];
    462             inout[0] = disp1.ProjectionS(s0, inner, "Inner");
    463             inout[1] = disp1.ProjectionS(s0, outer, "Outer");
    464             FixDataCheckHist(inout[0]);
    465             FixDataCheckHist(inout[1]);
    466            
    467             inout[0]->SetTitle(Form("%s %s",disp1.GetTitle(),"Inner"));
    468             inout[1]->SetTitle(Form("%s %s",disp1.GetTitle(),"Outer"));
    469            
    470            
    471             for (int i=0; i<2; i++)
    472               {
    473                 pad->cd(i+1);
    474                 gPad->SetBorderMode(0);
    475                 gPad->SetTicks();
    476                
    477                 inout[i]->SetDirectory(NULL);
    478                 inout[i]->SetLineColor(kRed+i);
    479                 inout[i]->SetBit(kCanDelete);
    480                 inout[i]->Draw();
    481                 inout[i]->Fit("gaus", "Q");
    482                
    483                 TLegend *leg2 = new TLegend(0.6,0.2,0.9,0.55);
    484                 leg2->SetHeader(inout[i]->GetName());
    485                 leg2->AddEntry(inout[i], inout[i]->GetName(), "l");
    486                
    487                 //
    488                 // Display the outliers as dead and noisy pixels
    489                 //
    490                 DisplayOutliers(inout[i]);
    491                
    492                 //
    493                 // Display the two half of the camera separately
    494                 //
    495                 TH1D *half[2];
    496                 half[0] = disp1.ProjectionS(s1, i==0 ? inner : outer , "Sector 6-1-2");
    497                 half[1] = disp1.ProjectionS(s2, i==0 ? inner : outer , "Sector 3-4-5");
    498                
    499                 for (int j=0; j<2; j++)
    500                   {
    501                     half[j]->SetLineColor(kRed+i+2*j+1);
    502                     half[j]->SetDirectory(NULL);
    503                     half[j]->SetBit(kCanDelete);
    504                     half[j]->Draw("same");
    505                     leg2->AddEntry(half[j], half[j]->GetName(), "l");
    506                   }
    507                 leg2->Draw();
    508                 delete leg2;
    509               }
     436        {
     437            MJCalibration::DisplayDoubleProject(disp1);
    510438            return;
    511           }
     439        }
    512440      }
    513441
     
    578506        line.DrawLine(398, fRefPedRmsGalacticOuter,
    579507                      x2,  fRefPedRmsGalacticOuter);
    580        
     508
    581509        line.SetLineColor(kYellow);
    582510        line.DrawLine(398, fRefPedRmsExtraGalacticOuter,
    583511                      x2,  fRefPedRmsExtraGalacticOuter);
    584        
     512
    585513        line.SetLineColor(kMagenta);
    586514        line.DrawLine(398, fRefPedRmsClosedLidsOuter,
     
    595523}
    596524
     525/*
    597526void  MJPedestal::DisplayOutliers(TH1D *hist) const
    598527{
     
    611540    noisytex.DrawLatex(0.1,hist->GetBinContent(hist->GetMaximumBin())/1.2,Form("%3i noisy pixels",(Int_t)noisy));
    612541}
     542*/
    613543
    614544void MJPedestal::FixDataCheckHist(TH1D *hist) const
Note: See TracChangeset for help on using the changeset viewer.