Changeset 4404 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
07/19/04 23:45:15 (20 years ago)
Author:
fgoebel
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4402 r4404  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
     21
     22 2004/07/20: Florian Goebel
     23
     24 * mpedestal/MPedestalPix.[h,cc]
     25   - added:
     26    - fPedestalABoffset  difference between pedestal mean of odd slices and
     27                         the total pedestal mean (fPedestal)               
     28    - fNumEvents         number of times, the Process was executed         
     29                         (to estimate the error of pedestal)
     30
     31 * mpedestal/MPedestalCam.cc
     32   - calculate error using pixel vise fNumEvents
     33
     34 * mpedestal/MPedCalcFromLoGain.[h,cc]
     35 * mpedestal/Makefile
     36 * mpedestal/PedestalLinkDef.h
     37   - added class which calculates pedestal values from the low gain slices of
     38     a data run
     39   - it also calculates the ABoffset values and fills MPedestalPix accordingly
     40
     41 * macros/ScanPulseABPed.C
     42   - macro plotting the pulse shape using MPedCalcFromLoGain
     43     and correcting for the AB 150 MHz clock noise.
     44
     45 * msignal/MExtractSignalABcorr.[h,cc]
     46 * msignal/Makefile
     47 * msignal/SignalLinkDef.h
     48   - example for signal extractor class similar to MExtractSignal
     49     correcting for ABoffset which allows to use odd number of slices
     50
     51 * macros/ScanExtractSignalABCorr.C
     52   - macro using MExtractSignalABcorr
    2153
    2254
  • trunk/MagicSoft/Mars/mpedestal/MPedestalCam.cc

    r3931 r4404  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !              Markus Gaug   02/2004 <mailto:markus@ifae.es>
     18!   Author(s): Thomas Bretz   12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!              Markus Gaug    02/2004 <mailto:markus@ifae.es>
     20!              Florian Goebel 06/2004 <mailto:fgoebel@mppmu.mpg.de>
    2021!
    2122!   Copyright: MAGIC Software Development, 2000-2004
     
    310311}
    311312
    312 Bool_t MPedestalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    313 {
     313Bool_t MPedestalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const {
    314314
    315315  if (GetSize() <= idx)
     
    319319    return kFALSE;
    320320
    321   const Float_t ped      = (*this)[idx].GetPedestal();
    322   const Float_t rms      = (*this)[idx].GetPedestalRms();
    323 
    324   const Float_t pederr   = rms/TMath::Sqrt((Float_t)fTotalEntries);
    325   const Float_t rmserr   = rms/TMath::Sqrt((Float_t)fTotalEntries)/2.;
    326 
    327   switch (type)
    328     {
     321  switch (type) {
    329322    case 0:
    330       val = ped;
     323      val = (*this)[idx].GetPedestal();
    331324      break;
    332325    case 1:
    333       val = pederr;
     326      val = fTotalEntries > 0 ?
     327          (*this)[idx].GetPedestalRms()/TMath::Sqrt((Float_t)fTotalEntries)
     328        : (*this)[idx].GetPedestalError();
    334329      break;
    335330    case 2:
    336       val = rms;
     331      val = (*this)[idx].GetPedestalRms();
    337332      break;
    338333    case 3:
    339       val = rmserr;
     334      val = fTotalEntries > 0 ?
     335          (*this)[idx].GetPedestalRms()/TMath::Sqrt((Float_t)fTotalEntries)/2.
     336        : (*this)[idx].GetPedestalRmsError();
    340337      break;
    341338    default:
  • trunk/MagicSoft/Mars/mpedestal/MPedestalPix.cc

    r3931 r4404  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
    19 !              Markus Gaug   04/2004 <mailto:markus@ifae.es>               
     18!   Author(s): Thomas Bretz   12/2000 <mailto:tbretz@uni-sw.gwdg.de>
     19!              Markus Gaug    04/2004 <mailto:markus@ifae.es>               
     20!              Florian Goebel 06/2004 <mailto:fgoebel@mppmu.mpg.de>
    2021!
    2122!   Copyright: MAGIC Software Development, 2000-2004
     
    3132// (offset) value of one Pixel (PMT).                                      //
    3233//                                                                         //
     34// version 2:                                                              //
     35// ----------                                                              //
     36// added:                                                                  //
     37//  fPedestalABoffset   difference between pedestal mean of odd slices and //
     38//                      the total pedestal mean (fPedestal)                //
     39//  fNumEvents          number of times, the Process was executed          //
     40//                      (to estimate the error of pedestal)                //
     41//                                                                         //
    3342/////////////////////////////////////////////////////////////////////////////
    3443#include "MPedestalPix.h"
     
    4251
    4352MPedestalPix::MPedestalPix()
    44     : fValid(kTRUE)
     53  : fValid(kTRUE)
    4554{
    4655  Clear();
     
    5463void MPedestalPix::Clear(Option_t *o)
    5564{
    56   fPedestal    = -1.;
    57   fPedestalRms = -1.;
     65  fPedestal         = -1.;
     66  fPedestalRms      = -1.;
     67  fPedestalABoffset = -1.;
     68  fNumEvents        = 0;
    5869}
    5970
     
    6172{
    6273
    63   fPedestal    = 0.;
    64   fPedestalRms = 0.;
     74  fPedestal         = 0.;
     75  fPedestalRms      = 0.;
     76  fPedestalABoffset = 0.;
     77  fNumEvents        = 0;
    6578}
    6679
    6780
    68 void MPedestalPix::Set(Float_t m, Float_t r)
     81void MPedestalPix::Set(Float_t m, Float_t r, Float_t offs, UInt_t n)
    6982{
    70   fPedestal    = m;
    71   fPedestalRms = r;
     83  fPedestal         = m;
     84  fPedestalRms      = r;
     85  fPedestalABoffset = offs;
     86  fNumEvents        = n;
    7287}
    7388
    74 Bool_t MPedestalPix::IsValid() const
     89
     90Bool_t MPedestalPix::IsValid() const
    7591{
    76 
     92 
    7793  if (!fValid)
    7894    return kFALSE;
    79 
     95 
    8096 return fPedestal>=0||fPedestalRms>=0;
    8197}
    82 
  • trunk/MagicSoft/Mars/mpedestal/MPedestalPix.h

    r3931 r4404  
    1212  Float_t fPedestal;     // mean value of pedestal (PMT offset)
    1313  Float_t fPedestalRms;  // root mean square / sigma  / standard deviation of pedestal
    14   Bool_t  fValid;        // flag to set pixel valid
     14  Float_t fPedestalABoffset; // the difference between odd slice pedestal mean and the
     15                             // total pedestal mean (fPedestal). For even slices pedestal
     16                             // use -fPedestalABoffset.
     17  UInt_t fNumEvents; // number of times, the Process was executed (to estimate the error of pedestal)
     18  Bool_t fValid;   // flag to set pixel valid
    1519 
    1620public:
     
    2327 
    2428    // Setters
    25   void SetPedestal(const Float_t f)    { fPedestal = f; }
    26   void SetPedestalRms(const Float_t f) { fPedestalRms = f; }
    27  
    28   void Set(const Float_t m, const Float_t r);
     29  void SetPedestal(const Float_t f)         { fPedestal = f; }
     30  void SetPedestalRms(const Float_t f)      { fPedestalRms = f; }
     31  void SetPedestalABoffset(const Float_t f) { fPedestalABoffset = f; }
     32  void SetNumEvents(const UInt_t n)         { fNumEvents = n; }
     33
     34  void Set(const Float_t m, const Float_t r, const Float_t offs=0, const UInt_t n=0);
    2935  void SetValid(const Bool_t b=kTRUE)    { fValid = b;  }
    3036 
     
    3238  Float_t GetPedestal()    const { return fPedestal; }
    3339  Float_t GetPedestalRms() const { return fPedestalRms; }
     40  Float_t GetPedestalABoffset() const { return fPedestalABoffset; }
     41  Float_t GetPedestalError()    const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents)   : 0; }
     42  Float_t GetPedestalRmsError() const { return fNumEvents>0 ? fPedestalRms/TMath::Sqrt((Float_t)fNumEvents/2) : 0; }
    3443 
    3544  Bool_t IsValid()         const;
    3645
    37   ClassDef(MPedestalPix, 1)     // Storage Container for Pedestal information of one pixel
     46  ClassDef(MPedestalPix, 2)     // Storage Container for Pedestal information of one pixel
    3847};
    3948
  • trunk/MagicSoft/Mars/mpedestal/Makefile

    r4355 r4404  
    3232           MMcPedestalNSBAdd.cc \
    3333           MPedCalcPedRun.cc \
     34           MPedCalcFromLoGain.cc \
    3435           MPedPhotCalc.cc \
    35            MPedPhotCam.cc \
     36           MPedPhotCam.cc \
    3637           MPedPhotPix.cc \
    3738           MPedestalCam.cc \
  • trunk/MagicSoft/Mars/mpedestal/PedestalLinkDef.h

    r4355 r4404  
    1313
    1414#pragma link C++ class MPedCalcPedRun++;
     15#pragma link C++ class MPedCalcFromLoGain++;
    1516#pragma link C++ class MPedestalCam++;
    1617#pragma link C++ class MPedestalPix++;
  • trunk/MagicSoft/Mars/msignal/Makefile

    r4340 r4404  
    4141           MExtractSignal2.cc \
    4242           MExtractSignal3.cc \
     43           MExtractSignalABcorr.cc \
    4344           MExtractPINDiode.cc \
    4445           MExtractBlindPixel.cc \
  • trunk/MagicSoft/Mars/msignal/SignalLinkDef.h

    r4340 r4404  
    1313#pragma link C++ class MExtractSignal2+;
    1414#pragma link C++ class MExtractSignal3+;
     15#pragma link C++ class MExtractSignalABcorr+;
    1516
    1617#pragma link C++ class MExtractor+;
Note: See TracChangeset for help on using the changeset viewer.