Ignore:
Timestamp:
04/27/04 18:44:34 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc

    r3768 r3852  
    7373    fTitle = title ? title : "Calculate and write conversion factors into MCalibrationChargeCam and MCalibrationQECam containers";
    7474
    75     fHistRatio = new TH1F(AddSerialNumber("HistRatio"), "log10(fPhotElfromShower/fSize)", 1500, -3., 3.);
    76     fHistRatio->SetXTitle("log_{10}(fPhotElfromShower / fSize) [photel/ADC count]");
     75    fHistADC2PhotEl = new TH1F(AddSerialNumber("ADC2PhotEl"), "log10(fPhotElfromShower/fSize)", 1500, -3., 3.);
     76    fHistADC2PhotEl->SetXTitle("log_{10}(fPhotElfromShower / fSize) [photel/ADC count]");
     77
     78
     79    fHistPhot2PhotEl = new TH1F(AddSerialNumber("Phot2PhotEl"), "Photon conversion efficiency", 1000, 0., 1.);
     80    fHistPhot2PhotEl->SetXTitle("Overall photon conversion efficiency [photoelectron/photon]");
     81
    7782}
    7883
     
    101106Int_t MMcCalibrationCalc::PreProcess(MParList *pList)
    102107{
    103     fHistRatio->Reset();
     108    fHistADC2PhotEl->Reset();
     109    fHistPhot2PhotEl->Reset();
     110
    104111    fADC2PhotEl = 0;
    105112    fPhot2PhotEl = 0;
     
    215222        return kTRUE;
    216223
    217     fPhot2PhotEl += (Float_t) fMcEvt->GetPhotElfromShower() /
    218       (Float_t) fMcEvt->GetPassPhotCone();
    219 
    220     fHistRatio->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size));
     224    fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size));
     225    fHistPhot2PhotEl->Fill( (Float_t) fMcEvt->GetPhotElfromShower() /
     226                        (Float_t) fMcEvt->GetPassPhotCone() );
    221227
    222228    return kTRUE;
     
    229235Int_t MMcCalibrationCalc::PostProcess()
    230236{
    231     const Stat_t n = fHistRatio->GetEntries();
     237    const Stat_t n = fHistADC2PhotEl->GetEntries();
    232238    if (n<1)
    233239    {
     
    236242    }
    237243
    238     fPhot2PhotEl /= n;   // Average quantum efficiency
     244    fPhot2PhotEl = fHistPhot2PhotEl->GetMean();   // Average quantum efficiency
    239245
    240246    //
     
    244250    Stat_t summax = 0;
    245251    Int_t  mode   = 0;
    246     for (Int_t ibin = 1+reach; ibin <= fHistRatio->GetNbinsX()-reach; ibin++)
    247     {
    248         const Stat_t sum = fHistRatio->Integral(ibin-reach, ibin+reach);
     252    for (Int_t ibin = 1+reach; ibin <= fHistADC2PhotEl->GetNbinsX()-reach; ibin++)
     253    {
     254        const Stat_t sum = fHistADC2PhotEl->Integral(ibin-reach, ibin+reach);
    249255
    250256        if (sum <= summax)
     
    255261    }
    256262
    257     fADC2PhotEl = TMath::Power(10, fHistRatio->GetBinCenter(mode));
     263    fADC2PhotEl = TMath::Power(10, fHistADC2PhotEl->GetBinCenter(mode));
    258264
    259265    const Int_t num = fCalCam->GetSize();
     
    270276        // average QE for a spectrum like that of Cherenkov light (see the documentration
    271277        // of MCalibrationQEPix).
    272         // Here we obtain average QE using already a Cherenkov spectrum so AvNormFFacto 
     278        // Here we obtain average QE using already a Cherenkov spectrum so AvNormFFactor
    273279        // must be 1.
    274280
  • trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h

    r3768 r3852  
    3131    Long_t  fEvents;
    3232
    33     TH1F*   fHistRatio; // Histogram for monitoring the calibration.
     33    TH1F*   fHistADC2PhotEl;
     34    TH1F*   fHistPhot2PhotEl; // Histograms for monitoring the calibration.
    3435
    3536    Bool_t CheckRunType(MParList *pList) const;
     
    4243    MMcCalibrationCalc(const char *name=NULL, const char *title=NULL);
    4344
    44     TH1F*   GetHist() { return fHistRatio; }
     45    TH1F*   GetHistADC2PhotEl() { return fHistADC2PhotEl; }
     46    TH1F*   GetHistPhot2PhotEl() { return fHistPhot2PhotEl; }
    4547
    4648    ClassDef(MMcCalibrationCalc, 0)   // Task which obtains, for MC files, the calibration factor from ADC counts to photons.
Note: See TracChangeset for help on using the changeset viewer.