Changeset 2997


Ignore:
Timestamp:
01/30/04 21:30: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

    r2996 r2997  
    8787
    8888   * mcalib/MCalibrationCalc.[h,cc]
     89   * mcalib/MHCalibrationBlindPixel.[h,cc]
    8990     - fBlindPixelId and fPINDiodeId now like in PedestalCam
    9091     - fill Blind Pixel with information about its fitted pedestal if
  • trunk/MagicSoft/Mars/manalysis/MHPedestalPixel.h

    r2973 r2997  
    5353  void ChangeHistId(Int_t i);
    5454 
    55   // Setters
    56   const TH1F *GetHPedestalCharge()    const { return fHPedestalCharge;    }
     55  // Getters
     56  const TH1F *GetHPedestalCharge() const { return fHPedestalCharge; }
    5757
    58   Double_t GetChargeMean()     const { return fChargeMean;    }
    59   Double_t GetChargeMeanErr()  const { return fChargeMeanErr; }
    60   Double_t GetChargeSigma()    const { return fChargeSigma;   }
    61   Double_t GetChargeSigmaErr() const { return fChargeSigmaErr; }
    62   Double_t GetChargeChiSquare() const { return fChargeChisquare; }
    63   Double_t GetChargeProb()      const { return fChargeProb;      } 
    64   Int_t    GetChargeNdf()       const { return fChargeNdf;       }   
     58  Double_t GetChargeMean()         const { return fChargeMean;      }
     59  Double_t GetChargeMeanErr()      const { return fChargeMeanErr;   }
     60  Double_t GetChargeSigma()        const { return fChargeSigma;     }
     61  Double_t GetChargeSigmaErr()     const { return fChargeSigmaErr;  }
     62  Double_t GetChargeChiSquare()    const { return fChargeChisquare; }
     63  Double_t GetChargeProb()         const { return fChargeProb;      } 
     64  Int_t    GetChargeNdf()          const { return fChargeNdf;       }
     65
     66  Int_t    GetTotalEntries()       const { return fTotalEntries;    }     
    6567
    6668  Bool_t IsFitOK()     const;   
  • trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc

    r2991 r2997  
    3939// Actually, MPedCalcPedRun applies the following formula (1):
    4040//
    41 // PedRMS = Sqrt(  (sum(x_i2) - sum(x_i)/n) / n-1 / 14 )
     41// PedRMS = Sqrt(  (sum(x_i^2) - sum(x_i)/n) / n-1 / 14 )
    4242//
    4343// where x_i is the sum of 14 FADC slices and sum means the sum over all
  • trunk/MagicSoft/Mars/manalysis/MPedestalPix.h

    r2969 r2997  
    4747 
    4848  // Getters
     49  MHPedestalPixel *GetHist() const { return fHist; }
     50
    4951  Float_t GetPedestal()    const { return fPedestal; }
    5052  Float_t GetPedestalRms() const { return fPedestalRms; }
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc

    r2980 r2997  
    3434// 2) at least 100 events are in the single Photo-electron peak
    3535//
     36// Used numbers are the following:
     37//
     38// Electronic conversion factor:
     39//   Assume, we have N_e electrons at the anode,
     40//   thus a charge of N_e*e (e = electron charge) Coulomb.
     41//
     42//   This charge is AC coupled and runs into a R_pre = 50 Ohm resistency.
     43//   The corresponding current is amplified by a gain factor G_pre = 400
     44//   (the precision of this value still has to be checked !!!) and again AC coupled to
     45//   the output.
     46//   The corresponding signal goes through the whole transmission and
     47//   amplification chain and is digitized in the FADCs.
     48//   The conversion Signal Area to FADC counts (Conv_trans) has been measured
     49//   by David and Oscar to be approx. 3.9 pVs^-1
     50//
     51//   Thus: Conversion FADC counts to Number of Electrons at Anode:
     52//         FADC counts = (1/Conv_tran) * G_pre * R_pre *  e * N_e = 8 * 10^-4 N_e.
     53//
     54//   Also: FADC counts = 8*10^-4 * GAIN * N_phe
     55//
     56//   In the blind pixel, there is an additional pre-amplifier with an amplification of
     57//   about 10. Therefore, we have for the blind pixel:
     58//
     59//   FADC counts (Blind Pixel) = 8*10^-3 * GAIN * N_phe
     60//
    3661//////////////////////////////////////////////////////////////////////////////
    3762#include "MHCalibrationBlindPixel.h"
     
    5378using namespace std;
    5479
     80const Int_t    MHCalibrationBlindPixel::fgBlindPixelChargeNbins        = 1000;
     81const Int_t    MHCalibrationBlindPixel::fgBlindPixelTimeNbins          = 32;
     82const Int_t    MHCalibrationBlindPixel::fgBlindPixelChargevsNbins      = 10000;
     83const Axis_t   MHCalibrationBlindPixel::fgBlindPixelTimeFirst          = -0.25;
     84const Axis_t   MHCalibrationBlindPixel::fgBlindPixelTimeLast           = 15.75;
     85const Double_t MHCalibrationBlindPixel::fgBlindPixelElectronicAmp      = 0.008;
     86const Double_t MHCalibrationBlindPixel::fgBlindPixelElectronicAmpError = 0.002;
     87 
    5588// --------------------------------------------------------------------------
    5689//
     
    5891//
    5992MHCalibrationBlindPixel::MHCalibrationBlindPixel(const char *name, const char *title)
    60     :   fBlindPixelChargeNbins(1000),
    61         fBlindPixelTimeNbins(32),
    62         fBlindPixelChargevsNbins(10000),
    63         fBlindPixelTimeFirst(-0.25),
    64         fBlindPixelTimeLast(15.75),
    65         fHBlindPixelPSD(NULL),
     93    :   fHBlindPixelPSD(NULL),
    6694        fSinglePheFit(NULL), 
    6795        fTimeGausFit(NULL),
     
    78106
    79107    fHBlindPixelCharge = new TH1F("HBlindPixelCharge","Distribution of Summed FADC Slices",
    80                                   fBlindPixelChargeNbins,fBlindPixelChargefirst,fBlindPixelChargelast);
     108                                  fgBlindPixelChargeNbins,fBlindPixelChargefirst,fBlindPixelChargelast);
    81109    fHBlindPixelCharge->SetXTitle("Sum FADC Slices");
    82110    fHBlindPixelCharge->SetYTitle("Nr. of events");
     
    85113
    86114    fHBlindPixelTime = new TH1F("HBlindPixelTime","Distribution of Mean Arrival Times",
    87                                 fBlindPixelTimeNbins,fBlindPixelTimeFirst,fBlindPixelTimeLast);
     115                                fgBlindPixelTimeNbins,fgBlindPixelTimeFirst,fgBlindPixelTimeLast);
    88116    fHBlindPixelTime->SetXTitle("Mean Arrival Times [FADC slice nr]");
    89117    fHBlindPixelTime->SetYTitle("Nr. of events");
     
    92120
    93121    fHBlindPixelChargevsN = new TH1I("HBlindPixelChargevsN","Sum of Charges vs. Event Number",
    94                                      fBlindPixelChargevsNbins,-0.5,(Axis_t)fBlindPixelChargevsNbins-0.5);
     122                                     fgBlindPixelChargevsNbins,-0.5,(Axis_t)fgBlindPixelChargevsNbins-0.5);
    95123    fHBlindPixelChargevsN->SetXTitle("Event Nr.");
    96124    fHBlindPixelChargevsN->SetYTitle("Sum of FADC slices");
     
    431459  const Double_t delta1_guess     = 8.;
    432460  const Double_t delta2_guess     = 5.;
    433   const Double_t electronicAmp_guess  = 0.0025;
     461  const Double_t electronicAmp_guess  = fgBlindPixelElectronicAmp;
     462  const Double_t electronicAmp_limit  = fgBlindPixelElectronicAmpError;
    434463
    435464  //
     
    481510
    482511    case kEPolya:
    483       fSinglePheFit->SetParameters(lambda_guess, excessPoisson_guess,
    484                                    delta1_guess,delta2_guess,
    485                                    electronicAmp_guess,
    486                                    si_0_guess,
    487                                    norm, mu_0_guess);
     512      if ((fMeanPedestal) && (fSigmaPedestal))
     513        fSinglePheFit->SetParameters(lambda_guess, excessPoisson_guess,
     514                                     delta1_guess,delta2_guess,
     515                                     electronicAmp_guess,
     516                                     fSigmaPedestal,
     517                                     norm,
     518                                     fMeanPedestal);
     519      else
     520        fSinglePheFit->SetParameters(lambda_guess, excessPoisson_guess,
     521                                     delta1_guess,delta2_guess,
     522                                     electronicAmp_guess,
     523                                     si_0_guess,
     524                                     norm, mu_0_guess);
    488525      fSinglePheFit->SetParNames("#lambda","b_{tot}",
    489526                                 "#delta_{1}","#delta_{2}",
     
    494531      fSinglePheFit->SetParLimits(2,6.,12.);   
    495532      fSinglePheFit->SetParLimits(3,3.,8.);   
    496       fSinglePheFit->SetParLimits(4,0.,0.005);   
    497       fSinglePheFit->SetParLimits(5,min,(max-min)/1.5);
     533      fSinglePheFit->SetParLimits(4,electronicAmp_guess-electronicAmp_limit,
     534                                    electronicAmp_guess+electronicAmp_limit);   
     535      if ((fMeanPedestal) && (fSigmaPedestal))
     536        fSinglePheFit->SetParLimits(5,
     537                                    fSigmaPedestal-3.*fSigmaPedestalErr,
     538                                    fSigmaPedestal+3.*fSigmaPedestalErr);
     539      else
     540        fSinglePheFit->SetParLimits(5,min,(max-min)/1.5);
     541
    498542      fSinglePheFit->SetParLimits(6,norm-0.1,norm+0.1);
    499       fSinglePheFit->SetParLimits(7,-35.,15.);
     543      if ((fMeanPedestal) && (fSigmaPedestal))
     544        fSinglePheFit->SetParLimits(7,
     545                                    fMeanPedestal-3.*fMeanPedestalErr,
     546                                    fMeanPedestal+3.*fMeanPedestalErr);
     547      else
     548        fSinglePheFit->SetParLimits(7,-35.,15.);
    500549      break;
    501550
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h

    r2972 r2997  
    1717private:
    1818
    19   const Int_t fBlindPixelChargeNbins;
    20   const Int_t fBlindPixelTimeNbins;
    21   const Int_t fBlindPixelChargevsNbins;
    22   const Axis_t fBlindPixelTimeFirst;
    23   const Axis_t fBlindPixelTimeLast;
     19  static const Int_t    fgBlindPixelChargeNbins;
     20  static const Int_t    fgBlindPixelTimeNbins;
     21  static const Int_t    fgBlindPixelChargevsNbins;
     22  static const Axis_t   fgBlindPixelTimeFirst;
     23  static const Axis_t   fgBlindPixelTimeLast;
     24  static const Double_t fgBlindPixelElectronicAmp;
     25  static const Double_t fgBlindPixelElectronicAmpError;
    2426 
    2527  TH1F* fHBlindPixelCharge;        // Histogram with the single Phe spectrum
Note: See TracChangeset for help on using the changeset viewer.