Changeset 3651


Ignore:
Timestamp:
04/05/04 16:48:56 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3650 r3651  
    2424   * mcalib/Makefile
    2525   * mcalib/CalibLinkDef.h
     26   * manalysis/MGeomApply.cc
    2627     - new class to store information obtained from MHPedestalCam
    2728
  • trunk/MagicSoft/Mars/macros/calibration.C

    r3638 r3651  
    5959  if (!pedloop.Process())
    6060    return;
     61
     62  //
     63  // Create a empty Parameter List and an empty Task List
     64  // The tasklist is identified in the eventloop by its name
     65  //
     66  MParList  plist0;
     67  MTaskList tlist0;
     68  plist0.AddToList(&tlist0);
     69 
     70  //
     71  // Now setup the tasks and tasklist for the pedestals:
     72  // ---------------------------------------------------
     73  //
     74  MReadMarsFile read("Events");
     75  read.DisableAutoScheme();
     76  static_cast<MRead&>(read).AddFiles(pruns);
     77
     78  MGeomApply      geomapl;
     79  MExtractSignal  sigcalc;
     80 
     81  //
     82  // Additionally to calculating the pedestals,
     83  // you can fill histograms and look at them
     84  //
     85  MFillH fill("MHPedestalCam", "MExtractedSignalCam");
     86 
     87  tlist0.AddToList(&read);
     88  tlist0.AddToList(&geomapl);
     89  tlist0.AddToList(&sigcalc);
     90  tlist0.AddToList(&fill);
     91 
     92  MGeomCamMagic  geomcam;
     93  MHPedestalCam  hpedcam;
     94  plist0.AddToList(&geomcam);
     95  plist0.AddToList(&pedloop.GetPedestalCam());
     96  plist0.AddToList(&badcam);
     97  plist0.AddToList(&hpedcam);
     98 
     99  //
     100  // Create and setup the eventloop
     101  //
     102  MEvtLoop evtloop0;
     103 
     104  evtloop0.SetParList(&plist0);
     105  evtloop0.SetDisplay(display);
     106 
     107  //
     108  // Execute first analysis
     109  //
     110  if (!evtloop0.Eventloop())
     111    return;
     112
     113  tlist0.PrintStatistics();
     114
     115  for (Int_t aidx=0;aidx<2;aidx++)
     116    {
     117      hpedcam.GetAverageHiGainArea(aidx).DrawClone("fourierevents");
     118      hpedcam.GetAverageLoGainArea(aidx).DrawClone("fourierevents");
     119    }
     120 
     121  for (Int_t sector=1;sector<7;sector++)
     122    {
     123      hpedcam.GetAverageHiGainSector(sector).DrawClone("fourierevents");
     124      hpedcam.GetAverageLoGainSector(sector).DrawClone("fourierevents");
     125    }
     126 
    61127
    62128  //
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r3638 r3651  
    7474#include "MCalibrationRelTimeCam.h"
    7575#include "MCalibrationQECam.h"
     76#include "MCalibrationPedCam.h"
    7677#include "MPedPhotCam.h"
    7778#include "MExtractedSignalCam.h"
     
    156157      (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam"));
    157158    if (qe)
    158         qe->InitSize(cam->GetNumPixels());
    159 
     159      {
     160        qe->InitSize           ( cam->GetNumPixels()  );
     161        qe->InitAverageAreas   ( cam->GetNumAreas()   );
     162        qe->InitAverageSectors ( cam->GetNumSectors() );
     163      }
     164   
     165    MCalibrationPedCam *pcam =
     166      (MCalibrationPedCam*)pList->FindObject(AddSerialNumber("MCalibrationPedCam"));
     167    if (pcam)
     168      {
     169        pcam->InitSize           ( cam->GetNumPixels()  );
     170        pcam->InitAverageAreas   ( cam->GetNumAreas()   );
     171        pcam->InitAverageSectors ( cam->GetNumSectors() );
     172      }
     173   
    160174    MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam"));
    161175    if (pedphot)
  • trunk/MagicSoft/Mars/manalysis/MHPedestalCam.cc

    r3649 r3651  
    9090/////////////////////////////////////////////////////////////////////////////
    9191#include "MHPedestalCam.h"
     92#include "MHPedestalPix.h"
    9293
    9394#include "MLog.h"
     
    9697#include "MParList.h"
    9798
    98 #include "MHPedestalPix.h"
    99 
    10099#include "MExtractedSignalCam.h"
    101100#include "MExtractedSignalPix.h"
     
    106105#include "MGeomCam.h"
    107106#include "MGeomPix.h"
     107
     108#include "MCalibrationPedCam.h"
    108109
    109110ClassImp(MHPedestalCam);
     
    133134// - MPedestalCam
    134135// - MExtractedSignalCam
     136//
     137// Searches or creates:
     138// - MCalibrationPedCam
    135139//
    136140// Retrieves from MExtractedSignalCam:
     
    179183    }
    180184
    181   Float_t sliceshi = signal->GetNumUsedHiGainFADCSlices();
    182   Float_t sliceslo = signal->GetNumUsedLoGainFADCSlices();
    183 
    184   if (sliceshi == 0.)
    185     {
    186       gLog << err << "Number of used signal slices in MExtractedSignalCam is zero  ... abort."
    187            << endl;
    188       return kFALSE;
    189     }
    190 
    191   if (fExtractHiGainSlices != 0. && sliceshi != fExtractHiGainSlices )
    192     {
    193       gLog << err << "Number of used High Gain signal slices changed in MExtractedSignalCam  ... abort."
    194            << endl;
    195       return kFALSE;
    196     }
    197 
    198   if (fExtractLoGainSlices != 0. && sliceslo != fExtractLoGainSlices )
    199     {
    200       gLog << err << "Number of used Low Gain signal slices changed in MExtractedSignalCam  ... abort."
    201            << endl;
    202       return kFALSE;
    203     }
    204 
    205   fExtractHiGainSlices = sliceshi;
    206   fExtractLoGainSlices = sliceslo;
    207 
    208185  const Int_t npixels  = fGeom->GetNumPixels();
    209186  const Int_t nsectors = fGeom->GetNumSectors();
    210187  const Int_t nareas   = fGeom->GetNumAreas();
     188
     189  fCam = (MCalibrationCam*)pList->FindObject("MCalibrationPedCam");
     190  if (!fCam)
     191    {
     192      fCam = (MCalibrationCam*)pList->FindCreateObj(AddSerialNumber("MCalibrationPedCam"));
     193      if (!fCam)
     194        {
     195          gLog << err << "Cannot find nor create MCalibrationPedCam ... abort." << endl;
     196          return kFALSE;
     197        }
     198      else
     199        {
     200          fCam->InitSize(npixels);
     201          fCam->InitAverageAreas(nareas);
     202          fCam->InitAverageSectors(nsectors);
     203        }
     204    }
     205 
     206  Float_t sliceshi = signal->GetNumUsedHiGainFADCSlices();
     207  Float_t sliceslo = signal->GetNumUsedLoGainFADCSlices();
     208
     209  if (sliceshi == 0.)
     210    {
     211      gLog << err << "Number of used signal slices in MExtractedSignalCam is zero  ... abort."
     212           << endl;
     213      return kFALSE;
     214    }
     215
     216  if (fExtractHiGainSlices != 0. && sliceshi != fExtractHiGainSlices )
     217    {
     218      gLog << err << "Number of used High Gain signal slices changed in MExtractedSignalCam  ... abort."
     219           << endl;
     220      return kFALSE;
     221    }
     222
     223  if (fExtractLoGainSlices != 0. && sliceslo != fExtractLoGainSlices )
     224    {
     225      gLog << err << "Number of used Low Gain signal slices changed in MExtractedSignalCam  ... abort."
     226           << endl;
     227      return kFALSE;
     228    }
     229
     230  fExtractHiGainSlices = sliceshi;
     231  fExtractLoGainSlices = sliceslo;
    211232
    212233  if (fHiGainArray->GetEntries()==0)
     
    431452{
    432453
    433   FitHiGainArrays((MCalibrationCam&)(*fCam),*fBadPixels,
     454  FitHiGainArrays((*fCam),*fBadPixels,
    434455                  MBadPixelsPix::kHiGainNotFitted,
    435456                  MBadPixelsPix::kHiGainOscillating);
    436   FitLoGainArrays((MCalibrationCam&)(*fCam),*fBadPixels,
     457  FitLoGainArrays((*fCam),*fBadPixels,
    437458                  MBadPixelsPix::kLoGainNotFitted,
    438459                  MBadPixelsPix::kLoGainOscillating);
  • trunk/MagicSoft/Mars/manalysis/MHPedestalPix.h

    r3643 r3651  
    1111private:
    1212
    13   static const Int_t   fgChargeNbins;        // Default for fNbins          (now set to: 450  )
    14   static const Axis_t  fgChargeFirst;        // Default for fFirst          (now set to: -0.5 )
    15   static const Axis_t  fgChargeLast;         // Default for fLast           (now set to: 449.5)
     13  static const Int_t   fgChargeNbins;        // Default for fNbins   (now set to: 450  )
     14  static const Axis_t  fgChargeFirst;        // Default for fFirst   (now set to: -0.5 )
     15  static const Axis_t  fgChargeLast;         // Default for fLast    (now set to: 449.5)
    1616
    1717  Float_t fNSlices;                         // Number of FADC slices summed in extraction
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r3635 r3651  
    1212#pragma link C++ class MCalibrationRelTimeCam+;
    1313#pragma link C++ class MCalibrationRelTimePix+;
     14#pragma link C++ class MCalibrationPedCam+;
    1415#pragma link C++ class MCalibrationQECam+;
    1516#pragma link C++ class MCalibrationQEPix+;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h

    r3645 r3651  
    1212class MCalibrationChargePINDiode;
    1313class MCalibrationChargePix;
    14 class MGeomCam;
    15 class MBadPixelsCam;
    1614class MCalibrationChargeCam : public MCalibrationCam
    1715{
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h

    r3647 r3651  
    2828  Float_t fConversionHiLo;                  // Conversion factor betw. Hi Gain and Lo Gain 
    2929  Float_t fConversionHiLoVar;               // Variance Conversion factor betw. Hi and Lo Gain
    30   Float_t fLoGainPedRms;                    // Pedestal RMS of Low Gain
    31   Float_t fLoGainPedRmsVar;                 // Pedestal RMS Variance of Low Gain
     30  Float_t fLoGainPedRmsSquare;              // Pedestal RMS square of Low Gain
     31  Float_t fLoGainPedRmsSquareVar;           // Pedestal RMS square Variance of Low Gain
    3232  Float_t fMeanConversionFFactorMethod;     // Conversion factor (F-factor method)
    3333  Float_t fMeanConversionBlindPixelMethod;  // Conversion factor (Blind Pixel method)
     
    4040  Float_t fPheFFactorMethodVar;             // Variance number of Phe's (F-factor method)
    4141  Float_t fPheFFactorMethodLimit;           // Min. number Photo-electrons for pix to be accepted.
    42   Float_t fRSigma;                          // Reduced sigma
    43   Float_t fRSigmaVar;                       // Variance Reduced sigma
     42  Float_t fRSigmaSquare;                    // Square of Reduced sigma
     43  Float_t fRSigmaSquareVar;                 // Variance Reduced sigma
    4444  Float_t fSigmaConversionFFactorMethod;    // Sigma Conversion factor (F-factor method)
    4545  Float_t fSigmaConversionBlindPixelMethod; // Sigma Conversion factor (Blind Pixel method)
     
    5757  enum  { kBlindPixelMethodValid, kFFactorMethodValid,
    5858          kPINDiodeMethodValid, kCombinedMethodValid }; // Possible bits to be set
     59
     60  const Float_t GetConversionHiLoRelVar()  const;
     61  const Float_t GetChargeRelVar()  const;
    5962
    6063public:
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r3635 r3651  
    4545           MCalibrationQECam.cc \
    4646           MCalibrationQEPix.cc  \
     47           MCalibrationPedCam.cc \
    4748           MCalibrationChargeCalc.cc \
    4849           MCalibrationChargeCam.cc \
Note: See TracChangeset for help on using the changeset viewer.