Changeset 2665


Ignore:
Timestamp:
12/12/03 12:49:51 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc

    r2661 r2665  
    3737#include "MCalibrationCam.h"
    3838#include "MCalibrationPix.h"
     39#include "MHCalibrationPixel.h"
    3940#include "MCalibrationBlindPix.h"
    4041#include "MCalibrationConfig.h"
     
    6364      fMeanNrPhotInnerPixErr(-1.),
    6465      fOffsets(NULL),
    65       fSlopes(NULL)
     66      fSlopes(NULL),
     67      fOffvsSlope(NULL)
    6668{
    6769    fName  = name  ? name  : "MCalibrationCam";
     
    9294  if (fSlopes)
    9395    delete fSlopes;
     96  if (fOffvsSlope)
     97    delete fOffvsSlope;
    9498
    9599}
     
    98102{
    99103
    100   fOffsets = new TH1D("pp","Offsets of the HiGain LoGain Fit",100,-300.,300.);
    101   fSlopes  = new TH1D("mm","Slopess of the HiGain LoGain Fit",100,-3.,3.);
     104  if (!fOffsets)
     105    fOffsets = new TH1D("pp","Offsets of the HiGain LoGain Fit",100,-600.,400.);
     106  if (!fSlopes)
     107    fSlopes  = new TH1D("mm","Slopes of the HiGain LoGain Fit",100,-2.,2.);
     108  if (!fOffvsSlope)
     109    fOffvsSlope = new TH2D("aa","Slopes vs Offsets of the HiGain LoGain Fit",100,-600.,400.,100,-2.,2.);
    102110
    103111  TIter Next(fPixels);
    104112  MCalibrationPix *pix;
     113  MHCalibrationPixel *hist;
    105114  while ((pix=(MCalibrationPix*)Next()))
    106115    {
    107 
    108       fOffsets->Fill(pix->GetHist()->GetOffset());
    109       fSlopes->Fill(pix->GetHist()->GetSlope());
    110 
    111     }
    112 
    113   TCanvas *c1 = new TCanvas();
    114   c1->Divide(1,2);
    115   c1->cd(1);
    116   fOffsets->Draw();
     116      hist = pix->GetHist();
     117      hist->FitHiGainvsLoGain();
     118      fOffsets->Fill(hist->GetOffset(),1.);
     119      fSlopes->Fill(hist->GetSlope(),1.);
     120      fOffvsSlope->Fill(hist->GetOffset(),hist->GetSlope(),1.);
     121    }
     122
     123   TCanvas *c1 = new TCanvas();
     124
     125   c1->Divide(1,3);
     126   c1->cd(1);
     127   fOffsets->Draw();
     128   gPad->Modified();
     129   gPad->Update();
     130
     131   c1->cd(2);
     132  fSlopes->Draw();
    117133  gPad->Modified();
    118134  gPad->Update();
    119135
    120   c1->cd(2);
    121   fSlopes->Draw();
     136  c1->cd(3);
     137  fOffvsSlope->Draw("col1");
    122138  gPad->Modified();
    123139  gPad->Update();
  • trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h

    r2662 r2665  
    2828#ifndef ROOT_TH1D
    2929#include <TH1D.h>
     30#endif
     31
     32#ifndef ROOT_TH2D
     33#include <TH2D.h>
    3034#endif
    3135
     
    7074  TH1D* fSlopes;
    7175 
     76  TH2D* fOffvsSlope;
    7277
    7378public:
  • trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc

    r2661 r2665  
    6969      fConversionSigmaPINDiodeMethod(-1.),
    7070      fHiGainSaturation(kFALSE),
    71       fElectronicPedRms(3.67)
     71      fElectronicPedRms(1.5)
    7272{
    7373
     
    150150      if (fHiGainSaturation)
    151151        {
    152 
    153           Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms));
     152         
     153          Float_t nsb = TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms);
     154
     155          //      Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms));
     156          Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms));
    154157          if (logainrms > 0.)
    155158            fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms);
  • trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc

    r2662 r2665  
    230230
    231231        if (satHi)
    232           pix.SetArrivalTimes((float)(midlo+3),0.,0.);
     232          pix.SetArrivalTimes((Float_t)(midlo+3),0.,0.);
    233233        else
    234           pix.SetArrivalTimes((float)(midhi+3),0.,0.);
     234          pix.SetArrivalTimes((Float_t)(midhi+3),0.,0.);
    235235
    236236      } /* while (pixel.Next()) */
    237237
    238     fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fNumLoGainSamples);
     238    fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,3,8,fNumLoGainSamples,3,8);
    239239    fSignals->SetReadyToSave();
    240240
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h

    r2643 r2665  
    1919    Byte_t fNumUsedLoGainFADCSlices;
    2020
     21    Byte_t fFirstUsedSliceHiGain;
     22    Byte_t fFirstUsedSliceLoGain;
     23
     24    Byte_t fLastUsedSliceHiGain;
     25    Byte_t fLastUsedSliceLoGain;
     26
     27
    2128public:
    2229
     
    3239    Byte_t GetNumUsedHiGainFADCSlices()    { return fNumUsedHiGainFADCSlices; }
    3340    Byte_t GetNumUsedLoGainFADCSlices()    { return fNumUsedLoGainFADCSlices; }
    34     void   SetNumUsedFADCSlices(Byte_t numh, Byte_t numl)   
     41
     42    Byte_t GetFirstUsedSliceHiGain()       { return fFirstUsedSliceHiGain; }
     43    Byte_t GetLastUsedSliceHiGain()        { return fLastUsedSliceHiGain; }
     44
     45    Byte_t GetFirstUsedSliceLoGain()       { return fFirstUsedSliceLoGain; }
     46    Byte_t GetLastUsedSliceLoGain()        { return fLastUsedSliceLoGain; }
     47
     48    void   SetNumUsedFADCSlices(Byte_t numh, Byte_t firsth, Byte_t lasth,
     49                                Byte_t numl, Byte_t firstl, Byte_t lastl)   
    3550                                           {
    3651                                             fNumUsedHiGainFADCSlices = numh;
     52                                             fFirstUsedSliceHiGain    = firsth;
     53                                             fLastUsedSliceHiGain     = lasth;
    3754                                             fNumUsedLoGainFADCSlices = numl; 
     55                                             fFirstUsedSliceLoGain    = firstl;
     56                                             fLastUsedSliceLoGain     = lastl;
    3857                                           }
    3958
Note: See TracChangeset for help on using the changeset viewer.