Ignore:
Timestamp:
03/18/05 17:21:58 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
5 edited

Legend:

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

    r6845 r6855  
    3434//   This task takes the integrated charge from MExtractedSignal and applies
    3535//   the calibration constants from MCalibrationCam to convert the summed FADC
    36 //   slices into photons. The number of photons obtained is stored in MCerPhotEvt.
     36//   slices into photons. The number of photons obtained is stored in MSignalCam.
    3737//   Optionally, the calibration of pedestals from an MPedestalCam container into
    3838//   an MPedPhotCam container can be chosen with the member functions
     
    8989//   Output Containers:
    9090//    [MPedPhotCam]
    91 //    [MCerPhotEvt]
     91//    [MSignalCam]
    9292//
    9393// See also: MJCalibration, MJPedestal, MJExtractSignal, MJExtractCalibTest
     
    129129#include "MBadPixelsPix.h"
    130130
    131 #include "MCerPhotEvt.h"
     131#include "MSignalCam.h"
    132132
    133133ClassImp(MCalibrateData);
     
    194194//
    195195//  - MPedPhotCam
    196 //  - MCerPhotEvt
     196//  - MSignalCam
    197197//
    198198Int_t MCalibrateData::PreProcess(MParList *pList)
     
    218218        }
    219219
    220         fCerPhotEvt = (MCerPhotEvt*)pList->FindCreateObj(AddSerialNumber("MCerPhotEvt"));
     220        fCerPhotEvt = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam"));
    221221        if (!fCerPhotEvt)
    222222            return kFALSE;
     
    657657    const Float_t sqrtslices = TMath::Sqrt(slices);
    658658
     659    Int_t numsatlo=0;
     660    Int_t numsathi=0;
     661
    659662    for (UInt_t pixidx=0; pixidx<npix; pixidx++)
    660663    {
     
    699702            const Float_t nphotErr = TMath::Sqrt(TMath::Abs(nphot)) * fCalibFFactors[pixidx];
    700703           
    701             MCerPhotPix *cpix = fCerPhotEvt->AddPixel(pixidx, nphot, nphotErr);
     704            fCerPhotEvt->AddPixel(pixidx, nphot, nphotErr);
    702705
    703706            if (sig.GetNumHiGainSaturated() > 0)
    704                 cpix->SetPixelHGSaturated();
     707                numsathi++;
    705708
    706709            if (sig.GetNumLoGainSaturated() > 0)
    707               cpix->SetPixelSaturated();
     710                numsatlo++;
    708711        } /* if (data) */
    709712     
     
    735738    if (data)
    736739    {
    737         fCerPhotEvt->FixSize();
     740        fCerPhotEvt->SetNumPixelsSaturated(numsathi, numsatlo);
    738741        fCerPhotEvt->SetReadyToSave();
    739742    }
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.h

    r6330 r6855  
    22#define MARS_MCalibrateData
    33
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MCalibrateData                                                          //
    7 //                                                                         //
    8 // Integrates the desired ADC time slices of one pixel and apply           //
    9 // calibration constants                                                   //
    10 //                                                                         //
    11 // Differences between MCalibrateData and MCalibrate :                     //
    12 // in MCalibrateData                                                       //
    13 // - in ReInit the MPedPhot container is filled using                      //
    14 //      - the pedstals/slice from MPedestalCam                             //
    15 //      - the number of used FADC slices from MExtractedSignalCam          //
    16 //      - the photon/ADC conversion factor from MCalibrationCam            //
    17 //                                                                         //
    18 /////////////////////////////////////////////////////////////////////////////
    194#ifndef MARS_MTask
    205#include "MTask.h"
     
    3318
    3419class MPedPhotCam;
    35 class MCerPhotEvt;
     20class MSignalCam;
    3621class MCalibConstCam;
     22
    3723class MCalibrateData : public MTask
    3824{
     
    5036  MCalibrationQECam     *fQEs;           //! Quantum efficiencies
    5137  MExtractedSignalCam   *fSignals;       //! Integrated charge in FADCs counts
    52   MCerPhotEvt           *fCerPhotEvt;    //! Cerenkov Photon Event used for calculation
     38  MSignalCam            *fCerPhotEvt;    //! Cerenkov Photon Event used for calculation
    5339  MCalibConstCam        *fCalibConstCam; //! Temporary calib consts storage
    5440 
  • trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc

    r6038 r6855  
    2929//   This task takes the extracted arrival times from MArrivalTimeCam for each 
    3030//   pixel and applies the offset calibrated in MCalibrationRelTimeCam
    31 //   The calibrated arrival time and its error gets stored in MCerPhotEvt.
     31//   The calibrated arrival time and its error gets stored in MSignalCam.
    3232//
    3333//   Input Containers:
     
    3636//
    3737//   Output Containers:
    38 //    MArrivalTime
     38//    MSignalCam
    3939//
    4040//////////////////////////////////////////////////////////////////////////////
     
    5858#include "MBadPixelsPix.h"
    5959
    60 #include "MArrivalTime.h"
     60#include "MSignalCam.h"
     61#include "MSignalPix.h"
    6162
    6263ClassImp(MCalibrateRelTimes);
     
    112113
    113114
    114     fArrivalTime = (MArrivalTime*)pList->FindCreateObj(AddSerialNumber("MArrivalTime"));
     115    fArrivalTime = (MSignalCam*)pList->FindCreateObj(AddSerialNumber("MSignalCam"));
    115116    if (!fArrivalTime)
    116       {
    117         *fLog << err << AddSerialNumber("MArrivalTime") << ": Cannot create ... aborting." << endl;
    118117        return kFALSE;
    119       }
    120118   
    121119    return kTRUE;
    122120}
    123121
    124 // --------------------------------------------------------------------------
    125 //
    126 // Check for validity of the selected calibration method, switch to a
    127 // different one in case of need
    128 //
    129 Bool_t MCalibrateRelTimes::ReInit(MParList *pList)
    130 {
    131   return kTRUE;
    132 }
    133122// --------------------------------------------------------------------------
    134123//
     
    142131     {
    143132     // FIXME: MArrivalTime must be of variable size -
    144      //        like MCerPhotEvt - because we must be able
     133     //        like MSignalCam - because we must be able
    145134     //        to reduce size by zero supression
    146135     //        For the moment this check could be done in ReInit...
     
    172161        const Float_t time = signal - offset;
    173162
    174         fArrivalTime->SetTime(pixidx, time);
     163        (*fArrivalTime)[pixidx].SetArrivalTime(time);
    175164
    176165    } /* for (UInt_t pixidx=0; pixidx<npix; pixidx++) */
  • trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.h

    r3752 r6855  
    1818class MCalibrationRelTimeCam;
    1919class MArrivalTimeCam;
    20 class MArrivalTime;
     20class MSignalCam;
     21
    2122class MCalibrateRelTimes : public MTask
    2223{
     
    2627    MBadPixelsCam          *fBadPixels;    // Bad Pixels information
    2728    MArrivalTimeCam        *fSignals;      // Extracted Arrival Time
    28     MArrivalTime           *fArrivalTime;  // Calibrated arrival times
     29    MSignalCam             *fArrivalTime;  // Calibrated arrival times
    2930
    3031    Int_t PreProcess(MParList *pList);
    31     Bool_t ReInit(MParList *pList);
    3232    Int_t Process();
    3333
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r6828 r6855  
    489489      fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam"));
    490490      if (!fBlindCam)
    491         {
    492           *fLog << endl;
    493           *fLog << warn << GetDescriptor()
    494                 << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
    495         }
     491        *fLog << warn << GetDescriptor()
     492              << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
    496493    }
    497494 
    498495  fHBlindCam = (MHCalibrationChargeBlindCam*)pList->FindObject(AddSerialNumber("MHCalibrationChargeBlindCam")); 
    499496  if (!fHBlindCam)
    500     {
    501       *fLog << endl;
    502       *fLog << warn << GetDescriptor()
    503             << ": No MHCalibrationChargeBlindCam found... no Blind Pixel method! " << endl;
    504     }
     497    *fLog << warn << GetDescriptor()
     498          << ": No MHCalibrationChargeBlindCam found... no Blind Pixel method! " << endl;
    505499
    506500  fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
     
    522516  fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode");
    523517  if (!fPINDiode)
    524     {
    525       *fLog << endl;
    526       *fLog << warn << GetDescriptor()
    527             << ": MCalibrationChargePINDiode not found... no PIN Diode method! " << endl;
    528     }
     518    *fLog << warn << GetDescriptor()
     519          << ": No MCalibrationChargePINDiode found... no PIN Diode method! " << endl;
    529520 
    530521  MCalibrationQECam     *qecam     = fIntensQE     
     
    18651856    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    18661857
     1858  if (!blindcam)
     1859    return;
     1860
    18671861  //
    18681862  // Set the results in the MCalibrationChargeCam
     
    19561950  MBadPixelsCam         *badcam    = fIntensBad
    19571951    ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
     1952
     1953  if (!fPINDiode)
     1954    return;
     1955
    19581956  //
    19591957  //  With the knowledge of the overall photon flux, calculate the
Note: See TracChangeset for help on using the changeset viewer.