Changeset 4616


Ignore:
Timestamp:
08/14/04 12:35:23 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4615 r4616  
    2626     - documented data members
    2727     - included default for SetNamePedContainer()
     28
     29   * mjobs/MJPedestal.[h,cc]
     30     - some small modifications in the data-check display, discussed
     31       with Florian
    2832
    2933
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r4609 r4616  
    7777const Float_t  MJPedestal::fgRefPedExtraGalactic    = 9.93;
    7878const Float_t  MJPedestal::fgRefPedGalactic         = 10.03;
    79 const Float_t  MJPedestal::fgRefPedRmsClosedLids    = 1.7;
    80 const Float_t  MJPedestal::fgRefPedRmsExtraGalactic = 5.6;
    81 const Float_t  MJPedestal::fgRefPedRmsGalactic      = 6.92;
    82 
     79const Float_t  MJPedestal::fgRefPedRmsClosedLidsInner    = 1.7;
     80const Float_t  MJPedestal::fgRefPedRmsExtraGalacticInner = 5.6;
     81const Float_t  MJPedestal::fgRefPedRmsGalacticInner      = 6.92;
     82const Float_t  MJPedestal::fgRefPedRmsClosedLidsOuter    = 1.7;
     83const Float_t  MJPedestal::fgRefPedRmsExtraGalacticOuter = 3.35;
     84const Float_t  MJPedestal::fgRefPedRmsGalacticOuter      = 4.2;
    8385// --------------------------------------------------------------------------
    8486//
     
    183185    disp1.SetCamError  (fPedestalCam, 3);
    184186
    185     disp0.SetYTitle("P [fadc/slice]");
    186     disp1.SetYTitle("\\sigma_{P} [fadc/slice]");
     187    disp0.SetYTitle("Pedestal [counts/slice]");
     188    disp1.SetYTitle("RMS [counts/slice]");
    187189
    188190    //
     
    203205    gPad->SetTicks();
    204206    MHCamera *obj1=(MHCamera*)disp0.DrawCopy("hist");
    205     obj1->SetDirectory(NULL);
    206 
    207207    //
    208208    // for the datacheck, fix the ranges!!
     
    211211    obj1->SetMaximum(fgPedestalMax);
    212212
     213    //
     214    // Set the datacheck sizes:
     215    //
     216    FixDataCheckHist((TH1D*)obj1);
    213217    //
    214218    // set reference lines
     
    227231    gPad->SetBorderMode(0);
    228232    gPad->SetTicks();
    229     obj1->DrawProjection(7);
     233    TH1D *obj2 = (TH1D*)obj1->Projection(obj1->GetName());
     234    obj2->Draw();
     235    obj2->SetBit(kCanDelete);
     236    obj2->Fit("gaus","Q");
     237    obj2->GetFunction("gaus")->SetLineColor(kYellow);
     238    //
     239    // Set the datacheck sizes:
     240    //
     241    FixDataCheckHist(obj2);
     242    obj2->SetStats(1);
    230243
    231244    c3.cd(2);
    232245    gPad->SetBorderMode(0);
    233246    gPad->SetTicks();
    234     MHCamera *obj2=(MHCamera*)disp1.DrawCopy("hist");
    235     obj2->SetDirectory(NULL);
    236     obj2->SetMinimum(fgPedRmsMin);
    237     obj2->SetMaximum(fgPedRmsMax);
    238 
     247    MHCamera *obj3=(MHCamera*)disp1.DrawCopy("hist");
     248    //
     249    // for the datacheck, fix the ranges!!
     250    //
     251    obj3->SetMinimum(fgPedRmsMin);
     252    obj3->SetMaximum(fgPedRmsMax);
     253    //
     254    // Set the datacheck sizes:
     255    //
     256    FixDataCheckHist((TH1D*)obj3);
    239257    //
    240258    // set reference lines
     
    244262    c3.cd(4);
    245263    gPad->SetBorderMode(0);
    246     obj2->SetPrettyPalette();
    247     obj2->Draw();
     264    obj3->SetPrettyPalette();
     265    obj3->Draw();
    248266
    249267    c3.cd(6);
     
    282300        inout[0] = disp1.ProjectionS(s0, inner, "Inner");
    283301        inout[1] = disp1.ProjectionS(s0, outer, "Outer");
     302        FixDataCheckHist(inout[0]);
     303        FixDataCheckHist(inout[1]);
     304
     305        inout[0]->SetTitle(Form("%s %s",disp1.GetTitle(),"Inner"));
     306        inout[1]->SetTitle(Form("%s %s",disp1.GetTitle(),"Outer"));
     307       
    284308
    285309        for (int i=0; i<2; i++)
     
    326350void  MJPedestal::DisplayReferenceLines(MHCamera *cam, const Int_t what) const
    327351{
    328     const Double_t x = cam->GetNbinsX();
    329 
    330     TLine line;
    331     line.SetLineStyle(kDashed);
    332     line.SetLineWidth(3);
     352
     353  Double_t x = cam->GetNbinsX();
     354 
     355  const MGeomCam *geom = cam->GetGeometry();
     356
     357  if (geom->InheritsFrom("MGeomCamMagic"))
     358    x = what ? 397 : cam->GetNbinsX();
     359
     360  TLine line;
     361  line.SetLineStyle(kDashed);
     362  line.SetLineWidth(3);
     363 
     364  line.SetLineColor(kBlue);
     365  TLine *l1 = line.DrawLine(0, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic,
     366                            x, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic);
     367 
     368  line.SetLineColor(kYellow);
     369  TLine *l2 = line.DrawLine(0, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic,
     370                            x, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic);
     371 
     372  line.SetLineColor(kMagenta);
     373  TLine *l3 = line.DrawLine(0, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids,
     374                            x, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids);
     375 
     376  if (geom->InheritsFrom("MGeomCamMagic"))
     377    if (what)
     378      {
     379        const Double_t x2 = cam->GetNbinsX();
     380
     381        line.SetLineColor(kBlue);
     382        line.DrawLine(398, fgRefPedRmsGalacticOuter,
     383                      x2,  fgRefPedRmsGalacticOuter);
     384       
     385        line.SetLineColor(kYellow);
     386        line.DrawLine(398, fgRefPedRmsExtraGalacticOuter,
     387                      x2,  fgRefPedRmsExtraGalacticOuter);
     388       
     389        line.SetLineColor(kMagenta);
     390        line.DrawLine(398, fgRefPedRmsClosedLidsOuter,
     391                      x2,  fgRefPedRmsClosedLidsOuter);
     392      }
     393 
    333394   
    334     line.SetLineColor(kBlue);
    335     TLine *l1 = line.DrawLine(0, what ? fgRefPedRmsGalactic : fgRefPedGalactic,
    336                               x, what ? fgRefPedRmsGalactic : fgRefPedGalactic);
    337 
    338     line.SetLineColor(kYellow);
    339     TLine *l2 = line.DrawLine(0, what ? fgRefPedRmsExtraGalactic : fgRefPedExtraGalactic,
    340                               x, what ? fgRefPedRmsExtraGalactic : fgRefPedExtraGalactic);
    341 
    342     line.SetLineColor(kMagenta);
    343     TLine *l3 = line.DrawLine(0, what ? fgRefPedRmsClosedLids : fgRefPedClosedLids,
    344                               x, what ? fgRefPedRmsClosedLids : fgRefPedClosedLids);
    345 
    346    
    347     TLegend *leg = new TLegend(0.4,0.75,0.7,0.99);
    348     leg->SetBit(kCanDelete);
    349     leg->AddEntry(l1, "Galactic Source","l");
    350     leg->AddEntry(l2, "Extra-Galactic Source","l");
    351     leg->AddEntry(l3, "Closed Lids","l");
    352     leg->Draw();
     395  TLegend *leg = new TLegend(0.4,0.75,0.7,0.99);
     396  leg->SetBit(kCanDelete);
     397  leg->AddEntry(l1, "Galactic Source","l");
     398  leg->AddEntry(l2, "Extra-Galactic Source","l");
     399  leg->AddEntry(l3, "Closed Lids","l");
     400  leg->Draw();
    353401}
    354402
     
    369417    noisytex.DrawLatex(0.1,hist->GetBinContent(hist->GetMaximumBin())/1.2,Form("%3i noisy pixels",(Int_t)noisy));
    370418}
     419
     420void MJPedestal::FixDataCheckHist(TH1D *hist) const
     421{
     422
     423    hist->SetDirectory(NULL);
     424    hist->SetStats(0);
     425
     426    //
     427    // set the labels bigger
     428    //
     429    TAxis *xaxe = hist->GetXaxis();
     430    TAxis *yaxe = hist->GetYaxis();
     431   
     432    xaxe->CenterTitle();
     433    yaxe->CenterTitle();   
     434    xaxe->SetTitleSize(0.06);
     435    yaxe->SetTitleSize(0.06);   
     436    xaxe->SetTitleOffset(0.8);
     437    yaxe->SetTitleOffset(0.5);   
     438    xaxe->SetLabelSize(0.05);
     439    yaxe->SetLabelSize(0.05);   
     440
     441}
     442
    371443
    372444Bool_t MJPedestal::WriteResult()
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r4609 r4616  
    3030    static const Float_t  fgRefPedGalactic;
    3131
    32     static const Float_t  fgRefPedRmsClosedLids;
    33     static const Float_t  fgRefPedRmsExtraGalactic;
    34     static const Float_t  fgRefPedRmsGalactic;
     32    static const Float_t  fgRefPedRmsClosedLidsInner;
     33    static const Float_t  fgRefPedRmsExtraGalacticInner;
     34    static const Float_t  fgRefPedRmsGalacticInner;
    3535
     36    static const Float_t  fgRefPedRmsClosedLidsOuter;
     37    static const Float_t  fgRefPedRmsExtraGalacticOuter;
     38    static const Float_t  fgRefPedRmsGalacticOuter;
     39   
    3640    TString fOutputPath;
    3741
     
    5761    void   DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
    5862    void   DisplayOutliers(TH1D *hist) const;
    59 
     63    void   FixDataCheckHist(TH1D *hist) const;
     64   
    6065    void   CheckEnv();
    6166
Note: See TracChangeset for help on using the changeset viewer.