Changeset 3108 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/12/04 00:33:23 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3107 r3108  
    4040       of inverted events.
    4141
     42   * mcalib/MHGausEvent.[h,cc]
     43   * mcalib/Makefile
     44   * mcalib/CalibLinkDef.h
     45     - new base class for all kind of events with variables having a
     46       Gaussian distribution. Will serve as base class for the
     47       existing and new calibration histogram classes.
    4248
    4349
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r2876 r3108  
    1919#pragma link C++ class MMcCalibrationCalc++;
    2020
     21#pragma link C++ class MHGausEvent++;
     22
    2123#endif
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc

    r3107 r3108  
    465465              // We need a dedicated signal extractor for the blind pixel
    466466              //
    467               MPedestalPix &ped  = (*fPedestals)[fBlindPixelId];
    468 
    469467              Int_t diff = 0;
    470468
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc

    r3081 r3108  
    8888const Double_t MHCalibrationBlindPixel::fgBlindPixelElectronicAmpError = 0.002;
    8989 
    90 const Int_t   MHCalibrationBlindPixel::fPSDNbins          = 30;
    91  
     90const Int_t   MHCalibrationBlindPixel::fPSDNbins          = 50;
     91const Int_t   MHCalibrationBlindPixel::fPulserFrequency   = 500; 
    9292// --------------------------------------------------------------------------
    9393//
     
    113113
    114114    // Create a large number of bins, later we will rebin
    115     fBlindPixelChargefirst = -200.;
    116     fBlindPixelChargelast  = 800.;
     115    fBlindPixelChargefirst = -400.;
     116    fBlindPixelChargelast  = 1600.;
    117117
    118118    fHBlindPixelCharge = new TH1F("HBlindPixelCharge","Distribution of Summed FADC Slices",
     
    173173  fCurrentSize             = 1024;
    174174 
    175   fBlindPixelChargefirst = -200.;
    176   fBlindPixelChargelast  = 800.;
     175  fBlindPixelChargefirst = -400.;
     176  fBlindPixelChargelast  = 1600.;
    177177
    178178  fLambda    = 0.;
     
    259259    return IsOscillating();
    260260
     261  // This cuts only the non-used zero's, but MFFT will later cut the rest
     262  CutArrayBorder(fHiGains);
     263  CutArrayBorder(fLoGains); 
     264
    261265  MFFT fourier;
    262266
     
    267271                           "PSDProjectionBlindPixel",
    268272                           "Power Spectrum Density Projection HiGain Blind Pixel");
     273
    269274  //
    270275  // First guesses for the fit (should be as close to reality as possible,
     
    280285  fPSDExpFit->SetParNames("Offset","Slope");
    281286  fPSDExpFit->SetParLimits(0,offset_guess/2.,2.*offset_guess);
    282   fPSDExpFit->SetParLimits(1,slope_guess/2.,2.*slope_guess);
     287  fPSDExpFit->SetParLimits(1,slope_guess/1.5,1.5*slope_guess);
    283288  fPSDExpFit->SetRange(0.,xmax);
    284289
     
    307312
    308313  for (Int_t i=0;i<n;i++)
    309     fPSDXaxis->AddAt((Float_t)i,i);
     314  for (Int_t i=0;i<n;i++)
     315    fPSDXaxis->AddAt((Float_t)(fPulserFrequency*i)/2./n,i);
    310316}
    311317
     
    317323      fChargeXaxis = new TArrayF(n);
    318324      for (Int_t i=0;i<n;i++)
    319         fChargeXaxis->AddAt((Float_t)i,i);
     325        fChargeXaxis->AddAt((Float_t)i/fPulserFrequency,i);
    320326      return;
    321327    }
     
    328334  if (diff < 0)
    329335    for (Int_t i=n;i<n+diff;i++)
    330       fChargeXaxis->AddAt((Float_t)i,i);
     336      fChargeXaxis->AddAt((Float_t)i/fPulserFrequency,i);
    331337}
    332338
     
    498504    TCanvas *c = MakeDefCanvas(this,550,700);
    499505
    500     c->Divide(2,4);
     506    c->Divide(2,5);
    501507
    502508    gROOT->SetSelectedPad(NULL);
     
    539545                             fChargeXaxis->GetArray(),
    540546                             fHiGains->GetArray()); 
    541     gr1->SetTitle("Evolution of HiGain charges with event number");
     547    gr1->SetTitle("Evolution of HiGain charges with time");
     548    gr1->GetXaxis()->SetTitle("Time [s]");
     549    gr1->GetYaxis()->SetTitle("Sum FADC slices"); 
    542550    gr1->SetBit(kCanDelete);
    543551    gr1->Draw("AL");
     
    551559                             fChargeXaxis->GetArray(),
    552560                             fLoGains->GetArray()); 
    553     gr2->SetTitle("Evolution of HiGain charges with event number");
     561    gr2->SetTitle("Evolution of LoGain charges with time");
     562    gr2->GetXaxis()->SetTitle("Time [s]");
     563    gr2->GetYaxis()->SetTitle("Sum FADC slices"); 
    554564    gr2->SetBit(kCanDelete);
    555565    gr2->Draw("AL");
     
    571581    TGraph *gr3 = new TGraph(fPSDXaxis->GetSize(),fPSDXaxis->GetArray(),array->GetArray());
    572582    gr3->SetTitle("Power Spectrum Density");
     583    gr3->GetXaxis()->SetTitle("Freq. [Hz]");
     584    gr3->GetYaxis()->SetTitle("P(f)"); 
    573585    gr3->SetBit(kCanDelete);
    574586    gr3->Draw("AL");
     
    586598   
    587599    fHPSD->Draw(opt);
     600    fHPSD->GetXaxis()->SetTitle("P(f)");
     601    fHPSD->GetYaxis()->SetTitle("Counts"); 
    588602   
    589603    if (fPSDExpFit)
     
    593607      }
    594608   
     609    c->cd(9);
     610   
     611    array = fPSDLoGain;
     612 
     613    if (!fPSDXaxis)
     614      CreatePSDXaxis(array->GetSize());
     615
     616    TGraph *gr4 = new TGraph(fPSDXaxis->GetSize(),fPSDXaxis->GetArray(),array->GetArray());
     617    gr4->SetTitle("Power Spectrum Density");
     618    gr4->GetXaxis()->SetTitle("Freq. [Hz]");
     619    gr4->GetYaxis()->SetTitle("P(f)"); 
     620    gr4->SetBit(kCanDelete);
     621    gr4->Draw("AL");
     622   
    595623    c->Modified();
    596624    c->Update();
    597    
    598625}
    599626
     
    892919{
    893920
    894   Int_t nbins = 20;
     921  Int_t nbins = 30;
    895922
    896923  CutEdges(fHBlindPixelCharge,nbins);
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h

    r3081 r3108  
    2626
    2727  static const Int_t   fPSDNbins;
     28  static const Int_t   fPulserFrequency;
    2829 
    2930  TH1F* fHBlindPixelCharge;        // Histogram with the single Phe spectrum
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationPixel.cc

    r3087 r3108  
    6262
    6363const Int_t   MHCalibrationPixel::fPSDNbins          = 30;
     64const Int_t   MHCalibrationPixel::fPulserFrequency   = 500;
    6465 
    6566// --------------------------------------------------------------------------
     
    316317
    317318  for (Int_t i=0;i<n;i++)
    318     fPSDXaxis->AddAt((Float_t)i,i);
     319    fPSDXaxis->AddAt((Float_t)(fPulserFrequency*i)/2./n,i);
    319320}
    320321
     
    326327      fChargeXaxis = new TArrayF(n);
    327328      for (Int_t i=0;i<n;i++)
    328         fChargeXaxis->AddAt((Float_t)i,i);
     329        fChargeXaxis->AddAt((Float_t)i/fPulserFrequency,i);
    329330      return;
    330331    }
     
    646647                           fChargeXaxis->GetArray(),
    647648                           fHiGains->GetArray()); 
    648   gr1->SetTitle("Evolution of HiGain charges with event number");
     649  gr1->SetTitle("Evolution of HiGain charges with time");
     650  gr1->GetXaxis()->SetTitle("Time [s]");
     651  gr1->GetYaxis()->SetTitle("Sum FADC slices"); 
    649652  gr1->SetBit(kCanDelete);
    650653  gr1->Draw("AL");
     
    657660                           fChargeXaxis->GetArray(),
    658661                           fLoGains->GetArray()); 
    659   gr2->SetTitle("Evolution of LoGain charges with event number");
     662  gr2->SetTitle("Evolution of LoGain charges with time");
     663  gr2->GetXaxis()->SetTitle("Time [s]");
     664  gr2->GetYaxis()->SetTitle("Sum FADC slices"); 
    660665  gr2->SetBit(kCanDelete);
    661666  gr2->Draw("AL");
     
    689694  TGraph *gr3 = new TGraph(fPSDXaxis->GetSize(),fPSDXaxis->GetArray(),array->GetArray());
    690695  gr3->SetTitle(title.Data());
     696  gr3->GetXaxis()->SetTitle("Freq. [Hz]");
     697  gr3->GetYaxis()->SetTitle("P(f)"); 
    691698  gr3->SetBit(kCanDelete);
    692699  gr3->Draw("AL");
     
    705712
    706713  fHPSD->Draw(opt);
     714  fHPSD->GetXaxis()->SetTitle("P(f)");
     715  fHPSD->GetYaxis()->SetTitle("Counts"); 
    707716
    708717  if (fPSDExpFit)
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r2876 r3108  
    4545           MHCalibrationPINDiode.cc \
    4646           MHCalibrationPixel.cc \
    47            MMcCalibrationCalc.cc
     47           MMcCalibrationCalc.cc \
     48           MHGausEvent.cc
    4849
    4950SRCS    = $(SRCFILES)
Note: See TracChangeset for help on using the changeset viewer.