Changeset 2749


Ignore:
Timestamp:
12/23/03 16:26:30 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2748 r2749  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6
     7 2003/12/23: Abelardo Moralejo
     8
     9   * manalysis/MExtractedSignalPix.cc
     10     - in Clear(), initialized fExtractedSignalHiGain to 0 instead
     11       of -1. In MC files run without noise, the ADC info of pixels
     12       with no C-photons is missing. Later noise will be added to all
     13       pixels in the padding, and "empty" ones must have a 0 before
     14       the addition of this noise.
     15
     16   * manalysis/MGeomApply.cc
     17     - initialized size of MPedPhotCam.
     18
     19   * manalysis/MMcCalibrationCalc.[cc,h]
     20     - Removed setter function SetConversionHiLo: the ratio from high
     21       to low gain is now read from MMcFadcHeader, and set in ReInit.
     22     - Fixed bug: fADC2PhOuter was initialized before the MMcFadcHeader
     23       was available. Now it is done in ReInit.
     24     - fPedPhotCam is now initialized in PreProcess and not in ReInit.
     25     - fGeom is now set in ReInit (there should be one MGeomCam per
     26       run header in the camera file).
     27
     28   * mmc/MMcFadcHeader.hxx
     29     - added getter function GetLow2HighGain()
     30
    631
    732 2003/12/23: Thomas Bretz
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.cc

    r2641 r2749  
    6464{
    6565
    66   fExtractedSignalHiGain = -1.;
     66  fExtractedSignalHiGain = 0.;
     67  //  fExtractedSignalHiGain = -1.;
    6768  fExtractedSignalHiGainError = -1.;
     69
    6870  fIsLoGainUsed = kFALSE;
    6971  fNumHiGainSaturated = 0;
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r2674 r2749  
    5858#include "MPedestalCam.h"
    5959#include "MCalibrationCam.h"
     60#include "MPedPhotCam.h"
    6061#include "MBlindPixels.h"
    6162
     
    122123
    123124
     125    MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
     126    if (pedphot)
     127        pedphot->InitSize(cam->GetNumPixels());
     128
     129
    124130    MBlindPixels *bnd = (MBlindPixels*)pList->FindObject(AddSerialNumber("MBlindPixels"));
    125131    if (bnd)
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.cc

    r2731 r2749  
    101101{
    102102  fADC2PhInner = x;
    103   fADC2PhOuter = x *
    104     fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter();
    105103
    106104  return;
     
    125123    }
    126124
    127   if ( ! pList->FindCreateObj(AddSerialNumber("MPedPhotCam")))
     125  fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam"));
     126  if ( ! fPedPhotCam)
    128127    {
    129128      *fLog << err << dbginf << "Cannot create MPedPhotCam... aborting." << endl;
     
    131130    }
    132131
    133   fGeom = (MGeomCam*) pList->FindObject(AddSerialNumber("MGeomCam"));
    134   if ( ! fGeom )
    135     {
    136       *fLog << err << dbginf << "Cannot find MGeomCam... aborting." << endl;
    137       return kFALSE;
    138     }
    139 
    140132  fSignalCam = (MExtractedSignalCam*) pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    141133  if ( ! fSignalCam)
     
    145137    }
    146138
     139    fCalCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam"));
     140
     141    if (!fCalCam)
     142    {
     143        *fLog << err << dbginf << "Could not create MCalibrationCam... aborting. " << endl;
     144        return kFALSE;
     145    }
     146
    147147  return kTRUE;
    148148
     
    163163
    164164    //
    165     // Now check the existence of all necessary containers. This has
    166     // to be done only if this is a MC file.
    167     //
     165    // Now check the existence of all necessary containers.
     166    //
     167
     168    fGeom = (MGeomCam*) pList->FindObject(AddSerialNumber("MGeomCam"));
     169    if ( ! fGeom )
     170      {
     171        *fLog << err << dbginf << "Cannot find MGeomCam... aborting." << endl;
     172        return kFALSE;
     173      }
    168174
    169175    fHeaderFadc = (MMcFadcHeader*)pList->FindObject(AddSerialNumber("MMcFadcHeader"));
     
    174180    }
    175181
    176     fCalCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam"));
    177 
    178     if (!fCalCam)
    179     {
    180         *fLog << err << dbginf << "Could not create MCalibrationCam... aborting. " << endl;
    181         return kFALSE;
    182     }
    183 
    184     fPedPhotCam = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
    185 
    186     if (!fPedPhotCam)
    187     {
    188         *fLog << err << dbginf << "Could not create MPedPhotCam... aborting. " << endl;
    189         return kFALSE;
    190     }
    191 
    192     fPedPhotCam->InitSize(fGeom->GetNumPixels());
     182    //
     183    // Set the ADC to photons conversion factor for outer pixels:
     184    //
     185    fADC2PhOuter = fADC2PhInner *
     186      (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter());
     187
     188    //
     189    // Set the conversion factor between high and low gain:
     190    //
     191    fConversionHiLo = fHeaderFadc->GetLow2HighGain();
    193192
    194193    return kTRUE;
     
    231230        //
    232231
    233         Float_t adc2phot = (fGeom->GetPixRatio(i) > fGeom->GetPixRatio(0))?
     232        Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))?
    234233          fADC2PhOuter : fADC2PhInner;
    235234
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.h

    r2731 r2749  
    2828    Float_t fADC2PhInner; // Conversion factor from ADC counts to photons
    2929    Float_t fADC2PhOuter; // for inner and outer pixels.
    30 
    3130    Float_t fConversionHiLo;
    3231
     
    3534
    3635    void SetADC2PhInner(Float_t x);
    37     void SetConversionHiLo(Float_t x) { fConversionHiLo = x; }
    3836
    3937    ClassDef(MMcCalibrationCalc, 0)   // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons.
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx

    r2730 r2749  
    8383  Float_t GetAmplitud() const { return fAmplFadc; }
    8484  Float_t GetAmplitudOuter() const { return fAmplFadcOuter; }
     85  Float_t GetLow2HighGain() const { return fLow2HighGain; }
    8586
    8687  UInt_t GetNumPixel() const { return MFADC_CHANNELS; }
Note: See TracChangeset for help on using the changeset viewer.