Changeset 3637 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
04/03/04 17:35:39 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3636 r3637  
    2424   * mcalib/MHCalibrationChargeHiGainPix.[h,cc]
    2525   * mcalib/MHCalibrationChargeLoGainPix.[h,cc]
    26    * mcalib/MHCalibrationRelTimePix.[h,cc]
     26   * mcalib/MHCalibrationChargeBlindPix.[h,cc]
     27   * mcalib/MHCalibrationChargePINDiode.[h,cc]
    2728     - put fPixId, fPickup, fPickupLimt, CountPickup(), RepeatFit() and
    2829       ChangeHistId() into MHGausEvents (before in the derived classes)
    2930     - put fChargeNbins, fChargeFirst, fChargeLast,
     31   * mcalib/MHCalibrationRelTimePix.[h,cc]
    3032     - put fRelTimeNbins, fRelTimeFirst, fRelTimeLast together
    3133       into MHGausEvents as fNbins, fFirst and fLast
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc

    r3627 r3637  
    111111//
    112112MCalibrationChargePix::MCalibrationChargePix(const char *name, const char *title)
    113     : fPixId(-1),
    114       fFlags(0)
     113    : fCalibFlags(0)
    115114{
    116115
     
    138137{
    139138
    140   SetHiGainSaturation       ( kFALSE );
    141   SetExcluded               ( kFALSE );
    142139  SetBlindPixelMethodValid  ( kFALSE );
    143140  SetFFactorMethodValid     ( kFALSE );
     
    145142  SetCombinedMethodValid    ( kFALSE );
    146143
    147   fHiGainMeanCharge                 =  -1.;
    148   fHiGainMeanChargeVar              =  -1.;
    149   fHiGainSigmaCharge                =  -1.;
    150   fHiGainSigmaChargeVar             =  -1.;
    151   fHiGainChargeProb                 =  -1.;
    152 
    153   fLoGainMeanCharge                 =  -1.;
    154   fLoGainMeanChargeVar              =  -1.;
    155   fLoGainSigmaCharge                =  -1.;
    156   fLoGainSigmaChargeVar             =  -1.;
    157   fLoGainChargeProb                 =  -1.;
    158 
    159   fRSigmaCharge                     =  -1.;
    160   fRSigmaChargeVar                  =  -1.;
    161  
    162   fHiGainNumPickup                  =  -1;
    163   fLoGainNumPickup                  =  -1;
    164 
     144  fRSigma                           =  -1.;
     145  fRSigmaVar                        =  -1.;
     146 
    165147  fPed                              =  -1.;
    166148  fPedRms                           =  -1.;
     
    196178  fTotalFFactorCombinedMethod       =  -1.;
    197179
     180  MCalibrationPix::Clear();
    198181}
    199182
     
    212195 
    213196
    214 void  MCalibrationChargePix::SetMeanCharge( const Float_t f )
    215 {
    216     if (IsHiGainSaturation())
    217         fLoGainMeanCharge = f;
    218     else
    219         fHiGainMeanCharge = f;
    220 }
    221 
    222 void  MCalibrationChargePix::SetMeanChargeErr( const Float_t f )
    223 {
    224     if (IsHiGainSaturation())
    225         fLoGainMeanChargeVar = f*f;
    226     else
    227         fHiGainMeanChargeVar = f*f;
    228 
    229 }
    230 
    231 void  MCalibrationChargePix::SetSigmaCharge( const Float_t f ) 
    232 {
    233     if (IsHiGainSaturation())
    234         fLoGainSigmaCharge = f;
    235     else
    236         fHiGainSigmaCharge = f;
    237 }
    238 
    239 
    240 void  MCalibrationChargePix::SetSigmaChargeErr( const Float_t f )   
    241 {
    242     if (IsHiGainSaturation())
    243         fLoGainSigmaChargeVar = f*f;
    244     else
    245         fHiGainSigmaChargeVar = f*f;
    246 
    247 }
    248197
    249198// --------------------------------------------------------------------------
     
    294243// --------------------------------------------------------------------------
    295244//
    296 // Set the Hi Gain Saturation Bit from outside
    297 //
    298 void MCalibrationChargePix::SetHiGainSaturation(Bool_t b)
    299 {
    300     b ?  SETBIT(fFlags, kHiGainSaturation) : CLRBIT(fFlags, kHiGainSaturation);
    301 }
    302 
    303 
    304 // --------------------------------------------------------------------------
    305 //
    306245// Set the Excluded Bit from outside
    307246//
    308 void MCalibrationChargePix::SetExcluded(Bool_t b )
    309 {
    310     b ?  SETBIT(fFlags, kExcluded) : CLRBIT(fFlags, kExcluded);
    311 }
    312 
    313    
     247void MCalibrationChargePix::SetBlindPixelMethodValid(const Bool_t b )
     248{
     249  b ?  SETBIT(fCalibFlags, kBlindPixelMethodValid) : CLRBIT(fCalibFlags, kBlindPixelMethodValid);
     250}   
     251
    314252// --------------------------------------------------------------------------
    315253//
    316254// Set the Excluded Bit from outside
    317255//
    318 void MCalibrationChargePix::SetBlindPixelMethodValid(const Bool_t b )
    319 {
    320   b ?  SETBIT(fFlags, kBlindPixelMethodValid) : CLRBIT(fFlags, kBlindPixelMethodValid);
     256void MCalibrationChargePix::SetFFactorMethodValid(const Bool_t b )
     257{
     258  b ?  SETBIT(fCalibFlags, kFFactorMethodValid) : CLRBIT(fCalibFlags, kFFactorMethodValid);
    321259}   
    322260
     
    325263// Set the Excluded Bit from outside
    326264//
    327 void MCalibrationChargePix::SetFFactorMethodValid(const Bool_t b )
    328 {
    329   b ?  SETBIT(fFlags, kFFactorMethodValid) : CLRBIT(fFlags, kFFactorMethodValid);
    330 }   
     265void MCalibrationChargePix::SetPINDiodeMethodValid(const Bool_t b ) 
     266{
     267  b ?  SETBIT(fCalibFlags, kPINDiodeMethodValid) : CLRBIT(fCalibFlags, kPINDiodeMethodValid);
     268}
    331269
    332270// --------------------------------------------------------------------------
     
    334272// Set the Excluded Bit from outside
    335273//
    336 void MCalibrationChargePix::SetPINDiodeMethodValid(const Bool_t b ) 
    337 {
    338   b ?  SETBIT(fFlags, kPINDiodeMethodValid) : CLRBIT(fFlags, kPINDiodeMethodValid);
    339 }
    340 
    341 // --------------------------------------------------------------------------
    342 //
    343 // Set the Excluded Bit from outside
    344 //
    345274void MCalibrationChargePix::SetCombinedMethodValid(const Bool_t b ) 
    346275{
    347   b ?  SETBIT(fFlags, kCombinedMethodValid) : CLRBIT(fFlags, kCombinedMethodValid);
     276  b ?  SETBIT(fCalibFlags, kCombinedMethodValid) : CLRBIT(fCalibFlags, kCombinedMethodValid);
    348277}
    349278
     
    364293}
    365294
    366 Float_t  MCalibrationChargePix::GetMeanCharge()   const
    367 {
    368     return IsHiGainSaturation() ? GetLoGainMeanCharge() : GetHiGainMeanCharge() ;
    369 }
    370 
    371 Float_t  MCalibrationChargePix::GetMeanChargeErr()   const
    372 {
    373     return IsHiGainSaturation() ? GetLoGainMeanChargeErr() : GetHiGainMeanChargeErr() ;
    374 }
    375 
    376 Float_t  MCalibrationChargePix::GetChargeProb()   const
    377 {
    378     return IsHiGainSaturation() ? fLoGainChargeProb : fHiGainChargeProb ;
    379 }
    380 
    381 Float_t  MCalibrationChargePix::GetSigmaCharge()   const
    382 {
    383     return IsHiGainSaturation() ? GetLoGainSigmaCharge() : GetHiGainSigmaCharge() ;
    384 }
    385 
    386 Float_t  MCalibrationChargePix::GetSigmaChargeErr()   const
    387 {
    388     return IsHiGainSaturation() ? GetLoGainSigmaChargeErr() : GetHiGainSigmaChargeErr() ;
    389 }
    390 
    391 Float_t MCalibrationChargePix::GetHiGainMeanChargeErr()  const
    392 {
    393   return TMath::Sqrt(fHiGainMeanChargeVar);
    394 }
    395 
    396 Float_t MCalibrationChargePix::GetLoGainMeanCharge()  const
    397 {
    398   return fLoGainMeanCharge * fConversionHiLo;
    399 }
    400 
    401 Float_t MCalibrationChargePix::GetLoGainMeanChargeErr()  const
    402 {
    403 
    404   const Float_t chargeRelVar     =  fLoGainMeanChargeVar
    405                                  /( fLoGainMeanCharge * fLoGainMeanCharge );
     295
     296Float_t MCalibrationChargePix::GetLoGainMean()  const
     297{
     298  return fLoGainMean * fConversionHiLo;
     299}
     300
     301Float_t MCalibrationChargePix::GetLoGainMeanErr()  const
     302{
     303
     304  const Float_t chargeRelVar     =  fLoGainMeanVar
     305                                 /( fLoGainMean * fLoGainMean );
    406306
    407307  const Float_t conversionRelVar =  fConversionHiLoVar
    408308                                 /( fConversionHiLo   * fConversionHiLo   );
    409309
    410   return TMath::Sqrt(chargeRelVar+conversionRelVar) * GetLoGainMeanCharge();
    411 }
    412 
    413 Float_t MCalibrationChargePix::GetLoGainSigmaCharge()  const
    414 {
    415   return fLoGainSigmaCharge * fConversionHiLo;
    416 }
    417 
    418 Float_t MCalibrationChargePix::GetLoGainSigmaChargeErr()  const
    419 {
    420 
    421   const Float_t sigmaRelVar     =  fLoGainSigmaChargeVar
    422                                 /( fLoGainSigmaCharge * fLoGainSigmaCharge );
     310  return TMath::Sqrt(chargeRelVar+conversionRelVar) * GetLoGainMean();
     311}
     312
     313Float_t MCalibrationChargePix::GetLoGainSigma()  const
     314{
     315  return fLoGainSigma * fConversionHiLo;
     316}
     317
     318Float_t MCalibrationChargePix::GetLoGainSigmaErr()  const
     319{
     320
     321  const Float_t sigmaRelVar     =  fLoGainSigmaVar
     322                                /( fLoGainSigma * fLoGainSigma );
    423323
    424324  const Float_t conversionRelVar =  fConversionHiLoVar
    425325                                 /( fConversionHiLo   * fConversionHiLo   );
    426326
    427   return TMath::Sqrt(sigmaRelVar+conversionRelVar) * GetLoGainSigmaCharge();
    428 }
    429 
    430 Float_t MCalibrationChargePix::GetHiGainSigmaChargeErr()  const
    431 {
    432   return TMath::Sqrt(fHiGainSigmaChargeVar);
    433 }
    434 
    435 Float_t MCalibrationChargePix::GetRSigmaCharge()  const
    436 {
    437   return IsHiGainSaturation() ? fRSigmaCharge*fConversionHiLo : fRSigmaCharge ;
     327  return TMath::Sqrt(sigmaRelVar+conversionRelVar) * GetLoGainSigma();
     328}
     329
     330Float_t MCalibrationChargePix::GetRSigma()  const
     331{
     332  return IsHiGainSaturation() ? fRSigma*fConversionHiLo : fRSigma ;
    438333}
    439334
    440 Float_t MCalibrationChargePix::GetRSigmaChargeErr()  const
     335Float_t MCalibrationChargePix::GetRSigmaErr()  const
    441336{
    442337 if (IsHiGainSaturation())
    443338    {
    444       const Float_t rsigmaRelVar     =  fRSigmaChargeVar
    445                                     /( fRSigmaCharge * fRSigmaCharge );
     339      const Float_t rsigmaRelVar     =  fRSigmaVar
     340                                    /( fRSigma * fRSigma );
    446341      const Float_t conversionRelVar =  fConversionHiLoVar
    447342                                     /( fConversionHiLo   * fConversionHiLo   );
    448       return TMath::Sqrt(rsigmaRelVar+conversionRelVar) * GetRSigmaCharge();
     343      return TMath::Sqrt(rsigmaRelVar+conversionRelVar) * GetRSigma();
    449344    }
    450345 else
    451    return TMath::Sqrt(fRSigmaChargeVar);
     346   return TMath::Sqrt(fRSigmaVar);
    452347
    453348}
     
    523418}
    524419
    525 Bool_t MCalibrationChargePix::IsExcluded()     const
    526 {
    527    return TESTBIT(fFlags,kExcluded); 
    528 }
    529 
    530 Bool_t MCalibrationChargePix::IsHiGainSaturation()    const
    531 {
    532    return TESTBIT(fFlags,kHiGainSaturation); 
    533 }
    534 
    535420Bool_t MCalibrationChargePix::IsBlindPixelMethodValid() const
    536421{
    537   return TESTBIT(fFlags, kBlindPixelMethodValid);
     422  return TESTBIT(fCalibFlags, kBlindPixelMethodValid);
    538423}
    539424
    540425Bool_t MCalibrationChargePix::IsFFactorMethodValid()   const
    541426{
    542   return TESTBIT(fFlags, kFFactorMethodValid);     
     427  return TESTBIT(fCalibFlags, kFFactorMethodValid);     
    543428}
    544429
    545430Bool_t MCalibrationChargePix::IsPINDiodeMethodValid()  const
    546431{
    547   return TESTBIT(fFlags, kPINDiodeMethodValid);   
     432  return TESTBIT(fCalibFlags, kPINDiodeMethodValid);   
    548433}
    549434
    550435Bool_t MCalibrationChargePix::IsCombinedMethodValid()  const
    551436{
    552   return TESTBIT(fFlags, kCombinedMethodValid);   
     437  return TESTBIT(fCalibFlags, kCombinedMethodValid);   
    553438}
    554439
     
    559444{
    560445
    561   const Float_t sigmacharge    = IsHiGainSaturation() ? fLoGainSigmaCharge    : fHiGainSigmaCharge   ;
    562   const Float_t sigmachargevar = IsHiGainSaturation() ? fLoGainSigmaChargeVar : fHiGainSigmaChargeVar;
    563 
    564   const Float_t sigmaSquare     =      sigmacharge     * sigmacharge;
    565   const Float_t sigmaSquareVar  = 4.*  sigmachargevar  * sigmaSquare;
     446  const Float_t sigma    = IsHiGainSaturation() ? fLoGainSigma    : fHiGainSigma   ;
     447  const Float_t sigmavar = IsHiGainSaturation() ? fLoGainSigmaVar : fHiGainSigmaVar;
     448
     449  const Float_t sigmaSquare     =      sigma     * sigma;
     450  const Float_t sigmaSquareVar  = 4.*  sigmavar  * sigmaSquare;
    566451
    567452  Float_t pedRmsSquare ;         
     
    581466  // Calculate the reduced sigmas
    582467  //
    583   const Float_t rsigmachargesquare = sigmaSquare - pedRmsSquare;
    584   if (rsigmachargesquare <= 0.)
     468  const Float_t rsigmasquare = sigmaSquare - pedRmsSquare;
     469  if (rsigmasquare <= 0.)
    585470    {
    586471      *fLog << warn
     
    591476 
    592477
    593   fRSigmaCharge    = TMath::Sqrt(rsigmachargesquare);
    594   fRSigmaChargeVar = 0.25 * (sigmaSquareVar + pedRmsSquareVar) / rsigmachargesquare;
     478  fRSigma    = TMath::Sqrt(rsigmasquare);
     479  fRSigmaVar = 0.25 * (sigmaSquareVar + pedRmsSquareVar) / rsigmasquare;
    595480
    596481  return kTRUE;
     
    604489{
    605490
    606   if (fRSigmaCharge < 0.)
     491  if (fRSigma < 0.)
    607492    {
    608493      SetFFactorMethodValid(kFALSE);
     
    610495    }
    611496 
    612   const Float_t charge    = IsHiGainSaturation() ? fLoGainMeanCharge    : fHiGainMeanCharge   ;
    613   const Float_t chargevar = IsHiGainSaturation() ? fLoGainMeanChargeVar : fHiGainMeanChargeVar;
     497  const Float_t mean = IsHiGainSaturation() ? fLoGainMean    : fHiGainMean   ;
     498  const Float_t var  = IsHiGainSaturation() ? fLoGainMeanVar : fHiGainMeanVar;
    614499
    615500  //
     
    618503  // First the relative error squares
    619504  //
    620   const Float_t chargeSquare        =     charge * charge;
    621   const Float_t chargeSquareRelVar  = 4.* chargevar/ chargeSquare;
     505  const Float_t meanSquare        =     mean * mean;
     506  const Float_t meanSquareRelVar  = 4.* var/ meanSquare;
    622507
    623508  const Float_t ffactorsquare       =    gkFFactor    * gkFFactor;
    624509  const Float_t ffactorsquareRelVar = 4.*gkFFactorErr * gkFFactorErr / ffactorsquare;
    625510
    626   const Float_t rsigmaSquare        =     fRSigmaCharge    * fRSigmaCharge;
    627   const Float_t rsigmaSquareRelVar  = 4.* fRSigmaChargeVar / rsigmaSquare;
     511  const Float_t rsigmaSquare        =     fRSigma    * fRSigma;
     512  const Float_t rsigmaSquareRelVar  = 4.* fRSigmaVar / rsigmaSquare;
    628513
    629514  //
     
    631516  // (independent on Hi Gain or Lo Gain)
    632517  //
    633   fPheFFactorMethod = ffactorsquare * chargeSquare / rsigmaSquare;
     518  fPheFFactorMethod = ffactorsquare * meanSquare / rsigmaSquare;
    634519
    635520  if (fPheFFactorMethod < fPheFFactorMethodLimit)
     
    642527  // Calculate the Error of Nphe
    643528  //
    644   fPheFFactorMethodVar =  (ffactorsquareRelVar + chargeSquareRelVar + rsigmaSquareRelVar)
     529  fPheFFactorMethodVar =  (ffactorsquareRelVar + meanSquareRelVar + rsigmaSquareRelVar)
    645530                         * fPheFFactorMethod * fPheFFactorMethod;
    646531
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3626 r3637  
    22#define MARS_MCalibrationChargePix
    33
    4 #ifndef MARS_MParContainer
    5 #include "MParContainer.h"
     4#ifndef MARS_MCalibrationPix
     5#include "MCalibrationPix.h"
    66#endif
    77
    88class MBadPixelsPix;
    9 class MCalibrationChargePix : public MParContainer
     9class MCalibrationChargePix : public MCalibrationPix
    1010{
    1111private:
     
    2727  Float_t fPheFFactorMethodLimit;   // The minimum number of Photo-electrons for a pixel to be accepted.
    2828 
    29   Int_t   fPixId;                   // the pixel Id
    30 
    31   UInt_t  fFlags;                   // Flag for the set bits
    32  
    33   Float_t fHiGainMeanCharge;        // The mean reduced charge after the fit
    34   Float_t fHiGainMeanChargeVar;     // The error of reduced mean charge after the fit
    35   Float_t fHiGainSigmaCharge;       // The sigma of the mean charge after the fit
    36   Float_t fHiGainSigmaChargeVar;    // The error of the sigma of the mean charge after the fit
    37   Float_t fHiGainChargeProb;        // The probability of the fit function
    38 
    39   Float_t fLoGainMeanCharge;        // The mean reduced charge after the fit
    40   Float_t fLoGainMeanChargeVar;     // The error of reduced mean charge after the fit
    41   Float_t fLoGainSigmaCharge;       // The sigma of the mean charge after the fit
    42   Float_t fLoGainSigmaChargeVar;    // The error of the sigma of the mean charge after the fit
    43   Float_t fLoGainChargeProb;        // The probability of the fit function
    44 
    45   Float_t fRSigmaCharge;            // The reduced squares of sigmas after the fit
    46   Float_t fRSigmaChargeVar;         // The reduced squares of sigmas after the fit 
     29  Float_t fRSigma;                  // The reduced squares of sigmas after the fit
     30  Float_t fRSigmaVar;               // The reduced squares of sigmas after the fit 
    4731
    4832  Float_t fPed;                     // The mean pedestal (from MPedestalPix) times number of FADC slices
     
    9074  Float_t fConversionHiLoVar;               // The error of the conversion factor between Hi Gain and Lo Gain 
    9175
    92   Float_t fHiGainNumPickup;
    93   Float_t fLoGainNumPickup;
     76  Byte_t fCalibFlags;
    9477
    95   enum  { kHiGainSaturation, kExcluded,
    96           kBlindPixelMethodValid, kFFactorMethodValid,
     78  enum  { kBlindPixelMethodValid, kFFactorMethodValid,
    9779          kPINDiodeMethodValid, kCombinedMethodValid };
    9880
     
    10587
    10688  // Setter
    107   void SetPixId( const Int_t i )                                    { fPixId = i; }
    108 
    10989  void SetPedestal(const Float_t ped, const Float_t pedrms, const Float_t pederr);
    11090
     
    11494  void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit  ) { fPheFFactorMethodLimit  = f;   }
    11595 
    116   // Charges
    117   void SetHiGainMeanCharge      ( const Float_t f ) { fHiGainMeanCharge      = f; }
    118   void SetHiGainMeanChargeErr   ( const Float_t f ) { fHiGainMeanChargeVar   = f*f; }
    119   void SetHiGainChargeProb      ( const Float_t f ) { fHiGainChargeProb      = f; }
    120   void SetHiGainSigmaCharge     ( const Float_t f ) { fHiGainSigmaCharge     = f; }
    121   void SetHiGainSigmaChargeErr  ( const Float_t f ) { fHiGainSigmaChargeVar  = f*f; }
    122 
    123   void SetLoGainMeanCharge      ( const Float_t f ) { fLoGainMeanCharge      = f; }
    124   void SetLoGainMeanChargeErr   ( const Float_t f ) { fLoGainMeanChargeVar   = f*f; }
    125   void SetLoGainChargeProb      ( const Float_t f ) { fLoGainChargeProb      = f; }
    126   void SetLoGainSigmaCharge     ( const Float_t f ) { fLoGainSigmaCharge     = f; }
    127   void SetLoGainSigmaChargeErr  ( const Float_t f ) { fLoGainSigmaChargeVar  = f*f; }
    128 
    129   void SetMeanCharge            ( const Float_t f );               
    130   void SetMeanChargeErr         ( const Float_t f );             
    131   void SetSigmaCharge           ( const Float_t f );               
    132   void SetSigmaChargeErr        ( const Float_t f );           
    133 
    134   void SetHiGainNumPickup       ( const Float_t   f ) { fHiGainNumPickup       = f; }
    135   void SetLoGainNumPickup       ( const Float_t   f ) { fLoGainNumPickup       = f; }
    136 
    13796  // Times
    13897  void SetAbsTimeMean           ( const Float_t f ) { fAbsTimeMean           = f; }
     
    154113 
    155114  // Bit Setters
    156   void SetHiGainSaturation    (  const Bool_t b = kTRUE );
    157   void SetExcluded            (  const Bool_t b = kTRUE );
    158115  void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
    159116  void SetFFactorMethodValid  (  const Bool_t b = kTRUE );
     
    161118  void SetCombinedMethodValid (  const Bool_t b = kTRUE );
    162119
    163   // Charges
    164   Float_t GetHiGainMeanCharge()          const { return fHiGainMeanCharge;      }
    165   Float_t GetHiGainMeanChargeErr()       const;
    166   Float_t GetHiGainChargeProb()          const { return fHiGainChargeProb;      }   
    167   Float_t GetHiGainSigmaCharge()         const { return fHiGainSigmaCharge;     }
    168   Float_t GetHiGainSigmaChargeErr()      const;
     120  Float_t GetLoGainMean     ()           const;
     121  Float_t GetLoGainMeanErr  ()           const;
     122  Float_t GetLoGainSigma    ()           const;
     123  Float_t GetLoGainSigmaErr ()           const;
    169124
    170   Float_t GetLoGainMeanCharge()          const;
    171   Float_t GetLoGainMeanChargeErr()       const;
    172   Float_t GetLoGainChargeProb()          const { return fLoGainChargeProb;      }   
    173   Float_t GetLoGainSigmaCharge()         const;
    174   Float_t GetLoGainSigmaChargeErr()      const;
    175 
    176   Float_t GetMeanCharge()                const;
    177   Float_t GetMeanChargeErr()             const;
    178   Float_t GetChargeProb()                const;
    179   Float_t GetSigmaCharge()               const;
    180   Float_t GetSigmaChargeErr()            const;
    181 
    182   Float_t GetRSigmaCharge()              const;
    183   Float_t GetRSigmaChargeErr()           const;
    184 
    185   Float_t GetHiGainNumPickup()           const { return fHiGainNumPickup; }
    186   Float_t GetLoGainNumPickup()           const { return fLoGainNumPickup; }
     125  Float_t GetRSigma()                    const;
     126  Float_t GetRSigmaErr()                 const;
    187127
    188128  Float_t GetAbsTimeMean()               const { return fAbsTimeMean;     }
     
    212152  Float_t GetPheFFactorMethodErr()             const;
    213153
    214   Int_t   GetPixId()                           const { return fPixId;                            }
    215 
    216154  Float_t GetPed()                             const { return fPed;                              }
    217155  Float_t GetPedErr()                          const;
     
    231169  Float_t GetTotalFFactorCombinedMethodErr()   const;
    232170 
    233   Bool_t IsExcluded()                          const;
    234   Bool_t IsHiGainSaturation()                  const;
    235171  Bool_t IsBlindPixelMethodValid()             const;
    236172  Bool_t IsPINDiodeMethodValid()               const;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc

    r3622 r3637  
    105105//
    106106// Sets:
    107 // - the default number for fChargeNbins  (fgChargeNbins)
    108 // - the default number for fChargeFirst  (fgChargeFirst)
    109 // - the default number for fChargeLast   (fgChargeLast)
     107// - the default number for MHGausEvents::fNbins  (fgChargeNbins)
     108// - the default number for MHGausEvents::fFirst  (fgChargeFirst)
     109// - the default number for MHGausEvents::fLast   (fgChargeLast)
    110110// - the default number for fSinglePheCut (fgSingePheCut)
    111111// - the default number for fNumSinglePheLimit (fgNumSinglePheLimit)
     
    132132    fTitle = title ? title : "Fill the accumulated charges and times of all Blind Pixel events and perform fits";
    133133
    134     SetChargeNbins();
    135     SetChargeFirst();
    136     SetChargeLast();
     134    SetNbins( fgChargeNbins );
     135    SetFirst( fgChargeFirst );
     136    SetLast ( fgChargeLast  );
    137137   
    138138    SetSinglePheCut();
     
    278278// - fAPedestalFADCSlices(0);
    279279//
    280 // Sets Binning of the following histograms:
    281 // - fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);
     280// Sets Binning of the fHGausHist
    282281//
    283282Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList)
     
    301300  fAPedestalFADCSlices(0);
    302301 
    303   fHGausHist.SetBins( fChargeNbins, fChargeFirst, fChargeLast);
     302  InitBins();
    304303 
    305304  return kTRUE;
     
    403402  CreateFourierSpectrum();
    404403  fBlindPix->SetOscillating  ( !IsFourierSpectrumOK() );
    405  
     404
    406405  fMeanPedestal     = fSignal->GetPed();
    407406  fMeanPedestalErr  = fSignal->GetPedErr();
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h

    r3617 r3637  
    2727private:
    2828
    29   static const Int_t    fgChargeNbins;       // Default for fChargeNBins  (now set to: 5300   )
    30   static const Axis_t   fgChargeFirst;       // Default for fChargeFirst  (now set to: -100.5 )
    31   static const Axis_t   fgChargeLast;        // Default for fChargeLast   (now set to: 5199.5 )
    32   static const Float_t  fgSinglePheCut;      // Default for fSinglePheCut (now set to: 200   )
    33   static const Float_t  fgNumSinglePheLimit; // Default for fNumSinglePheLimit (now set to: 50  )
     29  static const Int_t    fgChargeNbins;       //! Default for MHGausEvents::fNBins  (now set to: 5300   )
     30  static const Axis_t   fgChargeFirst;       //! Default for MHGausEvents::fFirst  (now set to: -100.5 )
     31  static const Axis_t   fgChargeLast;        //! Default for MHGausEvents::fLast   (now set to: 5199.5 )
     32  static const Float_t  fgSinglePheCut;      //! Default for fSinglePheCut (now set to: 200   )
     33  static const Float_t  fgNumSinglePheLimit; //! Default for fNumSinglePheLimit (now set to: 50  )
    3434
    3535  static const Double_t gkElectronicAmp;     // Electronic Amplification after the PMT (in FADC counts/N_e)
     
    103103 
    104104  // Setters
    105   void SetChargeNbins       ( const Int_t  bins =fgChargeNbins       )    { fChargeNbins       = bins;     }
    106   void SetChargeFirst       ( const Axis_t first=fgChargeFirst       )    { fChargeFirst       = first;    }
    107   void SetChargeLast        ( const Axis_t last =fgChargeLast        )    { fChargeLast        = last;     }
    108105  void SetSinglePheCut      ( const Float_t cut =fgSinglePheCut      )    { fSinglePheCut      = cut;      }
    109106  void SetNumSinglePheLimit ( const Float_t lim =fgNumSinglePheLimit )    { fNumSinglePheLimit = lim;      }
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc

    r3620 r3637  
    6565//
    6666// Sets:
    67 // - the default number for fChargeNbins    (fgChargeNbins)
    68 // - the default number for fChargeFirst    (fgChargeFirst)
    69 // - the default number for fChargeLast      (fgChargeLast)
    70 // - the default number for fRmsChargeNbins  (fgRmsChargeNbins)
    71 // - the default number for fRmsChargeFirst  (fgRmsChargeFirst)
    72 // - the default number for fRmsChargeLast   (fgRmsChargeLast)
    73 // - the default number for fAbsTimeNbins    (fgAbsTimeNbins)
    74 // - the default number for fAbsTimeFirst    (fgAbsTimeFirst)
    75 // - the default number for fAbsTimeLast     (fgAbsTimeLast)
     67// - the default number for MHGausEvents::fNbins (fgChargeNbins)
     68// - the default number for MHGausEvents::fFirst (fgChargeFirst)
     69// - the default number for MHGausEvents::fLast  (fgChargeLast)
     70// - the default number for fRmsChargeNbins      (fgRmsChargeNbins)
     71// - the default number for fRmsChargeFirst      (fgRmsChargeFirst)
     72// - the default number for fRmsChargeLast       (fgRmsChargeLast)
     73// - the default number for fAbsTimeNbins        (fgAbsTimeNbins)
     74// - the default number for fAbsTimeFirst        (fgAbsTimeFirst)
     75// - the default number for fAbsTimeLast         (fgAbsTimeLast)
    7676//
    7777// - the default name of the  fHGausHist      ("HCalibrationChargePINDiode")
     
    102102  fTitle = title ? title : "Fill the FADC sums of the PINDiode events and perform the fits";
    103103 
    104   SetChargeNbins();
    105   SetChargeFirst();
    106   SetChargeLast();
     104  SetNbins( fgChargeNbins );
     105  SetFirst( fgChargeFirst );
     106  SetLast ( fgChargeLast  );
    107107 
    108108  SetRmsChargeNbins();
     
    137137//
    138138// Initializes Binning of the following histograms:
    139 // - fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);
     139// - fHGausHist.SetBins(fNbins,fFirst,fLast);
    140140// - fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast);
    141141// - fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast);
     
    144144{
    145145
    146   fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);
     146  MHGausEvents::InitBins();
     147
    147148  fHAbsTime.SetBins(fAbsTimeNbins,fAbsTimeFirst,fAbsTimeLast);
    148149  fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast);
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h

    r3617 r3637  
    1313private:
    1414
    15   static const Int_t   fgChargeNbins;     // Default for fChargeNBins  (now set to: 200   )
    16   static const Axis_t  fgChargeFirst;     // Default for fChargeFirst  (now set to: -0.5  )
    17   static const Axis_t  fgChargeLast;      // Default for fChargeLast   (now set to: 199.5 )
    18   static const Int_t   fgRmsChargeNbins;  // Default for fChargeNBins  (now set to: 100   )
    19   static const Axis_t  fgRmsChargeFirst;  // Default for fChargeFirst  (now set to: 0.    )
    20   static const Axis_t  fgRmsChargeLast;   // Default for fChargeLast   (now set to: 100.  )
    21   static const Int_t   fgAbsTimeNbins;    // Default for fChargeNBins  (now set to: 30    )
    22   static const Axis_t  fgAbsTimeFirst;    // Default for fChargeFirst  (now set to: -0.5  )
    23   static const Axis_t  fgAbsTimeLast;     // Default for fChargeLast   (now set to: 29.5  )
     15  static const Int_t   fgChargeNbins;     //! Default for MHGausEvents::fNBins  (now set to: 200   )
     16  static const Axis_t  fgChargeFirst;     //! Default for MHGausEvents::fFirst  (now set to: -0.5  )
     17  static const Axis_t  fgChargeLast;      //! Default for MHGausEvents::fLast   (now set to: 199.5 )
     18  static const Int_t   fgRmsChargeNbins;  //! Default for fRmsChargeNBins       (now set to: 100   )
     19  static const Axis_t  fgRmsChargeFirst;  //! Default for fRmsChargeFirst       (now set to: 0.    )
     20  static const Axis_t  fgRmsChargeLast;   //! Default for fRmsChargeLast        (now set to: 100.  )
     21  static const Int_t   fgAbsTimeNbins;    //! Default for fAbsTimeNBins         (now set to: 30    )
     22  static const Axis_t  fgAbsTimeFirst;    //! Default for fAbsTimeFirst         (now set to: -0.5  )
     23  static const Axis_t  fgAbsTimeLast;     //! Default for fAbsTimeLast          (now set to: 29.5  )
    2424
    2525  MCalibrationChargePINDiode *fPINDiode; //! Storage container of the results
     
    4747
    4848  // Setters
    49   void SetChargeNbins(const Int_t  bins =fgChargeNbins)          { fChargeNbins = bins;     }
    50   void SetChargeFirst(const Axis_t first=fgChargeFirst)          { fChargeFirst = first;    }
    51   void SetChargeLast( const Axis_t last =fgChargeLast)           { fChargeLast  = last;     }
    52  
    5349  void SetAbsTimeNbins(const Int_t  bins =fgAbsTimeNbins)        { fAbsTimeNbins = bins;    }
    5450  void SetAbsTimeFirst(const Axis_t first=fgAbsTimeFirst)        { fAbsTimeFirst = first;   }
Note: See TracChangeset for help on using the changeset viewer.