Ignore:
Timestamp:
05/06/04 08:59:56 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/pedestalstudies.C

    r3775 r3992  
    1616!
    1717!
    18 !   Author(s): Markus Gaug, 11/2003 <mailto:markus@ifae.es>
     18!   Author(s): Markus Gaug, 04/2004 <mailto:markus@ifae.es>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    2626// pedestalstudies.C
    2727//
    28 // macro to observe the pedestals and pedestalRMS with the number of FADC
     28// macro to study the pedestal and pedestalRMS with the number of FADC
    2929// slices summed up.
    30 //
    31 // In order to use this macro, you have to uncomment the following
    32 // line in MPedCalcPedRun (line 214):
    33 //
    34 // fNumHiGainSamples = runheader->GetNumSamplesHiGain() & ~1;
    35 //
    3630//
    3731/////////////////////////////////////////////////////////////////////////////////
     
    10498      // Set the extraction range higher:
    10599      //               
    106       //sigcalc.SetRange(1,14,1,14);
     100      MExtractFixedWindow sigcalc;
     101      sigcalc.SetRange(0,samples-1,0,1);
     102 
    107103      MPedCalcPedRun pedcalc;
    108       pedcalc.SetNumHiGainSamples((Byte_t)samples);
    109      
    110       MExtractSignal  sigcalc;
    111       sigcalc.SetRange(0,samples-1,0,samples-1);
    112  
     104      pedcalc.SetRange(0,samples-1,0,0);
     105      pedcalc.SetWindowSize((Int_t)sigcalc.GetNumHiGainSamples());
     106
    113107      //
    114108      // Additionally to calculating the pedestals,
     
    217211    }
    218212
     213  /*
    219214  TF1 *logg = new TF1("logg","[1]+TMath::Log(x-[0])",1.,30.,2);
    220215  logg->SetParameters(1.,3.5);
     
    222217  logg->SetParLimits(1,-1.,7.);
    223218  logg->SetLineColor(kRed);
     219  */
    224220
    225221  TCanvas *canvas = new TCanvas("PedstudInner","Pedestal Studies Inner Pixels",600,900);
     
    234230  gmeaninn->GetXaxis()->SetTitle("Nr. added FADC slices");
    235231  gmeaninn->GetYaxis()->SetTitle("Calculated Mean per slice");
    236   gmeaninn->Fit("pol0");
    237   gmeaninn->GetFunction("pol0")->SetLineColor(kGreen);
    238   //  gmeaninn->Fit(logg);
     232  //  gmeaninn->Fit("pol0");
     233  //  gmeaninn->GetFunction("pol0")->SetLineColor(kGreen);
     234  //  //  gmeaninn->Fit(logg);
    239235
    240236  canvas->cd(2);
     
    247243  gmuinn->GetXaxis()->SetTitle("Nr. added FADC slices");
    248244  gmuinn->GetYaxis()->SetTitle("Fitted Mean per Slice");
    249   gmuinn->Fit("pol0");
    250   gmuinn->GetFunction("pol0")->SetLineColor(kGreen);
     245  //  gmuinn->Fit("pol0");
     246  //  gmuinn->GetFunction("pol0")->SetLineColor(kGreen);
    251247  //gmuinn->Fit(logg);
    252248
     
    261257  grmsinn->GetXaxis()->SetTitle("Nr. added FADC slices");
    262258  grmsinn->GetYaxis()->SetTitle("Calculated Rms per Slice");
    263   //grmsinn->Fit("pol2");
    264   //grmsinn->GetFunction("pol2")->SetLineColor(kRed);
    265   grmsinn->Fit(logg);
     259  //  //grmsinn->Fit("pol2");
     260  //  //grmsinn->GetFunction("pol2")->SetLineColor(kRed);
     261  //  grmsinn->Fit(logg);
    266262
    267263  canvas->cd(4);
     
    274270  gsigmainn->GetXaxis()->SetTitle("Nr. added FADC slices");
    275271  gsigmainn->GetYaxis()->SetTitle("Fitted Sigma per Slice");
    276   //  gsigmainn->Fit("pol2");
    277   //  gsigmainn->GetFunction("pol2")->SetLineColor(kRed);
    278   gsigmainn->Fit(logg);
     272  //  //  gsigmainn->Fit("pol2");
     273  //  //  gsigmainn->GetFunction("pol2")->SetLineColor(kRed);
     274  //  gsigmainn->Fit(logg);
    279275
    280276  canvas->cd(5);
     
    287283  gmeandiffinn->GetXaxis()->SetTitle("Nr. added FADC slices");
    288284  gmeandiffinn->GetYaxis()->SetTitle("Rel. Difference Mean per Slice");
    289   //gmeandiffinn->Fit("pol2");
    290   //gmeandiffinn->GetFunction("pol2")->SetLineColor(kBlue);
    291   gmeandiffinn->Fit(logg);
     285  //  //gmeandiffinn->Fit("pol2");
     286  //  //gmeandiffinn->GetFunction("pol2")->SetLineColor(kBlue);
     287  //  gmeandiffinn->Fit(logg);
    292288
    293289
     
    301297  grmsdiffinn->GetXaxis()->SetTitle("Nr. added FADC slices");
    302298  grmsdiffinn->GetYaxis()->SetTitle("Rel. Difference Sigma per Slice-RMS");
    303   //grmsdiffinn->Fit("pol2");
    304   //grmsdiffinn->GetFunction("pol2")->SetLineColor(kBlue);
    305   grmsdiffinn->Fit(logg);
    306 
     299  //  //grmsdiffinn->Fit("pol2");
     300  //  //grmsdiffinn->GetFunction("pol2")->SetLineColor(kBlue);
     301  //  grmsdiffinn->Fit(logg);
     302
     303  canvas->SaveAs("PedestalStudyInner.root");
     304  canvas->SaveAs("PedestalStudyInner.ps");
    307305
    308306  TCanvas *canvas2 = new TCanvas("PedstudOut","Pedestal Studies Outer Pixels",600,900);
    309307  canvas2->Divide(2,3);
    310   canvas2->cd(1);
    311 
    312 
    313308  canvas2->cd(1);
    314309
     
    320315  gmeanout->GetXaxis()->SetTitle("Nr. added FADC slices");
    321316  gmeanout->GetYaxis()->SetTitle("Calculated Mean per Slice");
    322   gmeanout->Fit("pol0");
    323   gmeanout->GetFunction("pol0")->SetLineColor(kGreen);
     317  //  gmeanout->Fit("pol0");
     318  //  gmeanout->GetFunction("pol0")->SetLineColor(kGreen);
    324319  //gmeanout->Fit(logg);
    325320
     
    333328  gmuout->GetXaxis()->SetTitle("Nr. added FADC slices");
    334329  gmuout->GetYaxis()->SetTitle("Fitted Mean per Slice");
    335   gmuout->Fit("pol0");
    336   gmuout->GetFunction("pol0")->SetLineColor(kGreen);
     330  //  gmuout->Fit("pol0");
     331  //  gmuout->GetFunction("pol0")->SetLineColor(kGreen);
    337332  //gmuout->Fit(logg);
    338333
     
    346341  grmsout->GetXaxis()->SetTitle("Nr. added FADC slices");
    347342  grmsout->GetYaxis()->SetTitle("Calculated Rms per Slice");
    348   //grmsout->Fit("pol2");
    349   //grmsout->GetFunction("pol2")->SetLineColor(kRed);
    350   grmsout->Fit(logg);
     343  //  //grmsout->Fit("pol2");
     344  //  //grmsout->GetFunction("pol2")->SetLineColor(kRed);
     345  //  grmsout->Fit(logg);
    351346
    352347  canvas2->cd(4);
     
    359354  gsigmaout->GetXaxis()->SetTitle("Nr. added FADC slices");
    360355  gsigmaout->GetYaxis()->SetTitle("Fitted Sigma per Slice");
    361   //gsigmaout->Fit("pol2");
    362   //gsigmaout->GetFunction("pol2")->SetLineColor(kRed);
    363   gsigmaout->Fit(logg);
     356  //  //gsigmaout->Fit("pol2");
     357  //  //gsigmaout->GetFunction("pol2")->SetLineColor(kRed);
     358  //  gsigmaout->Fit(logg);
    364359
    365360
     
    373368  gmeandiffout->GetXaxis()->SetTitle("Nr. added FADC slices");
    374369  gmeandiffout->GetYaxis()->SetTitle("Rel. Difference Mean per Slice");
    375   //gmeandiffout->Fit("pol2");
    376   //gmeandiffout->GetFunction("pol2")->SetLineColor(kBlue);
    377   gmeandiffout->Fit(logg);
     370  //  //gmeandiffout->Fit("pol2");
     371  //w  //gmeandiffout->GetFunction("pol2")->SetLineColor(kBlue);
     372  //  gmeandiffout->Fit(logg);
    378373
    379374  canvas2->cd(6);
     
    386381  grmsdiffout->GetXaxis()->SetTitle("Nr. added FADC slices");
    387382  grmsdiffout->GetYaxis()->SetTitle("Rel. Difference Sigma per Slice-RMS");
    388   //grmsdiffout->Fit("pol2");
    389   //grmsdiffout->GetFunction("pol2")->SetLineColor(kBlue);
    390   grmsdiffout->Fit(logg);
     383  //  //grmsdiffout->Fit("pol2");
     384  //  //grmsdiffout->GetFunction("pol2")->SetLineColor(kBlue);
     385  //  grmsdiffout->Fit(logg);
     386
     387
     388  canvas2->SaveAs("PedestalStudyOuter.root");
     389  canvas2->SaveAs("PedestalStudyOuter.ps");
    391390
    392391
Note: See TracChangeset for help on using the changeset viewer.