Changeset 2956


Ignore:
Timestamp:
01/29/04 15:56:15 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2955 r2956  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6 2004/01/29: Markus Gaug
     7
     8   * mcalib/MCalibrationCalc.[h,cc], mcalib/MCalibrationCam.[h,cc],
     9     mcalib/MCalibrationConfig.h
     10     - put gkCalibrationBlindPixelId and gkCalibrationPINDiodeId
     11       directly into the corresponding classes.
     12
     13
    614 2004/01/29: Nicola Galante
    715
    816   * mhistmc/MHMcTriggerLvl2.[h,cc]:
    9      - In method MHMcTriggerLvl2::GetHistByName(const TString name) added
    10        string checking to return also fHistCellPseudoSize, fHistCellPseudoSizeNorm
     17     - In method MHMcTriggerLvl2::GetHistByName(const TString name)
     18       added string checking to return also
     19       fHistCellPseudoSize, fHistCellPseudoSizeNorm
    1120       and fHistCellPseudoSizeEnergy.
    1221     - Added inline functions GetHistCellPseudoSize() and
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc

    r2952 r2956  
    121121    : fPedestals(NULL), fCalibrations(NULL), fSignals(NULL),
    122122      fRawEvt(NULL), fRunHeader(NULL), fArrivalTime(NULL), fEvtTime(NULL)
     123  //      fBlindPixelId(559), fPINDiodeId(9999)
    123124{
    124125
     
    460461        {
    461462         
    462         case gkCalibrationBlindPixelId:
     463        case kBlindPixelId:
    463464         
    464465          if (!blindpixel.FillCharge(sumhi))
     
    478479          break;
    479480         
    480         case gkCalibrationPINDiodeId:
     481        case kPINDiodeId:
    481482
    482483          if (!pindiode.FillCharge(sumhi))
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h

    r2943 r2956  
    5050  MTime                    *fEvtTime;      // Time of the event
    5151
     52  enum { kBlindPixelId = 559,               // ID of the blind pixel
     53         kPINDiodeId = 9999};              // ID of the PIN Diode
     54 
    5255  Int_t fEvents;                           // Number of events 
    5356  Int_t fCosmics;                          // Number of events due to supposed cosmics
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc

    r2943 r2956  
    7272    : fOffsets(NULL),
    7373      fSlopes(NULL),
    74       fOffvsSlope(NULL)
     74      fOffvsSlope(NULL),
     75      fBlindPixelId(559),
     76      fPINDiodeId(9999)
    7577{
    7678    fName  = name  ? name  : "MCalibrationCam";
     
    181183  fPINDiode->Clear();
    182184
    183   fNumPhotInsidePlexiglassAvailable  = kFALSE;
    184185  fMeanPhotInsidePlexiglass          = -1.;
    185186  fMeanPhotErrInsidePlexiglass       = -1.;
    186   fNumPhotOutsidePlexiglassAvailable = kFALSE;
    187187  fMeanPhotOutsidePlexiglass         = -1.;
    188188  fMeanPhotErrOutsidePlexiglass      = -1.;
    189189
    190190  fNumExcludedPixels                 = 0;
     191
     192  CLRBIT(fFlags,kBlindPixelMethodValid);
     193  CLRBIT(fFlags,kPINDiodeMethodValid);
     194  CLRBIT(fFlags,kNumPhotInsidePlexiglassAvailable);
     195  CLRBIT(fFlags,kNumPhotOutsidePlexiglassAvailable); 
    191196
    192197  return;
     
    223228  return TESTBIT(fFlags,kPINDiodeMethodValid); 
    224229}
     230
     231
     232Bool_t  MCalibrationCam::IsNumPhotInsidePlexiglassAvailable()   const
     233{
     234  return TESTBIT(fFlags,kNumPhotInsidePlexiglassAvailable);
     235}
     236
     237Bool_t  MCalibrationCam::IsNumPhotOutsidePlexiglassAvailable()   const
     238{
     239  return TESTBIT(fFlags,kNumPhotOutsidePlexiglassAvailable);
     240}
     241
    225242
    226243
     
    374391    return kFALSE;
    375392 
    376   if (idx == gkCalibrationBlindPixelId)
     393  if (idx == fBlindPixelId)
     394    return kFALSE;
     395
     396  if (idx == fPINDiodeId)
    377397    return kFALSE;
    378398
     
    501521    }
    502522
    503   fNumPhotInsidePlexiglassAvailable = kTRUE;
     523  SETBIT(fFlags,kNumPhotInsidePlexiglassAvailable);
    504524
    505525  *fLog << inf << endl;
     
    557577    }
    558578
    559   fNumPhotOutsidePlexiglassAvailable = kTRUE;
     579  SETBIT(fFlags,kNumPhotOutsidePlexiglassAvailable); 
    560580
    561581  *fLog << inf << endl;
     
    583603    return kFALSE;
    584604
    585   if (!fNumPhotInsidePlexiglassAvailable)
     605  if (!IsNumPhotInsidePlexiglassAvailable())
    586606    if (!CalcNumPhotInsidePlexiglass())
    587607      return kFALSE;
     
    627647  if (ipx < 0 || !IsPixelFitted(ipx))
    628648    return kFALSE;
     649
     650  if (!IsNumPhotOutsidePlexiglassAvailable())
     651    if (!CalcNumPhotOutsidePlexiglass())
     652      return kFALSE;
     653
     654  mean  = (*this)[ipx].GetMeanConversionPINDiodeMethod();
     655  err   = (*this)[ipx].GetErrorConversionPINDiodeMethod();
     656  sigma = (*this)[ipx].GetSigmaConversionPINDiodeMethod();
    629657
    630658  return kFALSE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h

    r2943 r2956  
    2424  MCalibrationPINDiode *fPINDiode;            //-> Pointer to the PIN Diode with fit results
    2525
    26   Bool_t  fNumPhotInsidePlexiglassAvailable;  // TRUE: Blind Pixel could have been fitted well
    27   Float_t fMeanPhotInsidePlexiglass;          //  The mean number of photons in an INNER PIXEL inside the plexiglass
    28   Float_t fMeanPhotErrInsidePlexiglass;       //  The uncertainty about the number of photons in an INNER PIXEL 
    29 
    30   Bool_t  fNumPhotOutsidePlexiglassAvailable; // TRUE: PIN Diode could have been fitted well
    31   Float_t fMeanPhotOutsidePlexiglass;         //  The mean number of photons in an INNER PIXEL outside the plexiglass
    32   Float_t fMeanPhotErrOutsidePlexiglass;      //  The uncertainty about the number of photons in an INNER PIXEL 
    3326
    3427  TH1D* fOffsets;                             //!
     
    3730  TH2D* fOffvsSlope;                          //!
    3831
     32  const Int_t fBlindPixelId;
     33  const Int_t fPINDiodeId; 
     34
     35  Float_t fMeanPhotInsidePlexiglass;     //  The mean number of photons in an INNER PIXEL inside the plexiglass
     36  Float_t fMeanPhotErrInsidePlexiglass;  //  The uncertainty about the number of photons in an INNER PIXEL 
     37  Float_t fMeanPhotOutsidePlexiglass;    //  The mean number of photons in an INNER PIXEL outside the plexiglass
     38  Float_t fMeanPhotErrOutsidePlexiglass; //  The uncertainty about the number of photons in an INNER PIXEL 
     39
    3940  UInt_t fNumExcludedPixels;
    4041
    4142  Byte_t fFlags;
    4243
    43   enum  { kBlindPixelMethodValid, kPINDiodeMethodValid  };
     44  enum  { kBlindPixelMethodValid, kPINDiodeMethodValid,
     45          kNumPhotInsidePlexiglassAvailable, kNumPhotOutsidePlexiglassAvailable  };
    4446 
    4547public:
     
    6264  void SetColor(const CalibrationColor_t color)       {  fColor = color; }
    6365  void SetNumPixelsExcluded(const UInt_t n)               {  fNumExcludedPixels = n;    }
     66
    6467  void SetBlindPixelMethodValid(const Bool_t b = kTRUE);
    6568  void SetPINDiodeMethodValid(const Bool_t b = kTRUE); 
     
    8487  Bool_t IsBlindPixelMethodValid()   const;
    8588  Bool_t IsPINDiodeMethodValid()     const; 
     89
     90  Bool_t IsNumPhotInsidePlexiglassAvailable() const;
     91  Bool_t IsNumPhotOutsidePlexiglassAvailable() const;
     92
    8693
    8794  // Others
  • trunk/MagicSoft/Mars/mcalib/MCalibrationConfig.h

    r2734 r2956  
    1212/////////////////////////////////////////////////////////////////////////////
    1313
    14 
    15 // The highest value of the High Gain in the linear regime
    16 const Byte_t gkSaturationLimit = 250;
    17 
    1814// The conversion factor between High Gain and Low Gain
    1915const Float_t gkConversionHiLo      = 10.;
    2016const Float_t gkConversionHiLoError = 2.5;
    2117
    22 // The penalty constant to produce overflow in the histogram
    23 const ULong_t gkLoGainOverFlow = 99999999;
    24 
    2518// ----- BLIND PIXEL ----------------------//
    26 
    27 // Pixel ID of the Calibration Blind Pixel
    28 const UShort_t gkCalibrationBlindPixelId = 559;
    2919
    3020// Average QE of Blind Pixel (three colours)
Note: See TracChangeset for help on using the changeset viewer.