Changeset 4658 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
08/17/04 16:26:31 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4657 r4658  
    2222
    2323 2004/08/17: Markus Gaug
     24
     25   * mcalib/MCalibrationChargeCam.[h,cc]
     26     - removed Init() function which is already fulfilled by the Init()
     27       function of MCalibrationCam
    2428
    2529   * mbadpixels/MBadPixelsCam.cc
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc

    r4641 r4658  
    460460// 18: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kMeanTimeInLast2Bins )
    461461// 19: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kDeviatingNumPhes    )
    462 // 20: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeNotFitted )
     462// 20: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeNotFitted    )
    463463// 21: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeOscillating  )
     464// 22: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kDeviatingNumPhots   )
    464465//
    465466Bool_t MBadPixelsCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    580581      val = 1;
    581582      break;
     583    case 22:
     584      if  (!(*this)[idx].IsUncalibrated(MBadPixelsPix::kDeviatingNumPhots))
     585        return kFALSE;
     586      val = 1;
     587      break;
    582588    default:
    583589      return kFALSE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4609 r4658  
    10051005      const Int_t   aidx  = (*fGeom)[i].GetAidx();
    10061006
    1007       camphes.Fill(i,nphe);
    1008       camphes.SetUsed(i);
    10091007
    10101008      areaphes    [aidx] += nphe;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r4603 r4658  
    158158}
    159159
    160 // -------------------------------------------------------------------
    161 //
    162 // Calls:
    163 // - MCalibrationCam::Init()
    164 //
    165 void MCalibrationChargeCam::Init(const MGeomCam &geom)
    166 {
    167   MCalibrationCam::Init(geom);
    168 }
    169 
    170160// -----------------------------------------------
    171161//
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h

    r4338 r4658  
    4646  Bool_t  IsFFactorMethodValid            () const;
    4747
    48   // Inits
    49   void  Init                   ( const MGeomCam &geom         );
    50  
    5148  // Prints
    5249  void   Print(Option_t *o="")         const;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc

    r4649 r4658  
    121121    }
    122122 
    123   fCam = (MCalibrationTestCam*)pList->FindCreateObj(AddSerialNumber("MCalibrationTestCam"));
     123  fCam = (MCalibrationTestCam*)pList->FindCreateObj("MCalibrationTestCam");
    124124  if (!fCam)
    125125    {
     
    411411          bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhots );
    412412          bad.SetUnsuitable  ( MBadPixelsPix::kUnsuitableRun     );
    413           pix.SetExcluded();
    414413          continue;
    415414        }
     
    561560{
    562561
    563   const TArrayI &arr = fTestCam->GetNotInterpolateablePixels();
    564   const Int_t   size = arr.GetSize();
     562  TArrayI arr(0);
     563 
     564  for (Int_t i=0; i<fCam->GetSize(); i++)
     565    if ((*fCam)[i].IsExcluded())
     566      {
     567        const Int_t s = arr.GetSize();
     568        arr.Set(s+1);
     569        arr[s] = i;
     570      }
     571
     572  const Int_t size = arr.GetSize();
    565573 
    566574  if (size == 0)
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h

    r4649 r4658  
    6464  void  SetNumUninterpolated            ( const UInt_t i, const Int_t aidx );
    6565  void  SetNumUninterpolatedInMaxCluster( const UInt_t i ) { fNumUninterpolatedInMaxCluster = i; }
     66
     67  // Draw
     68  void DrawPixelContent( Int_t num) const {}
    6669 
    6770  ClassDef(MCalibrationTestCam, 1) // Container Test Calibration Results Camera
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r4636 r4658  
    243243{
    244244
    245   MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
     245  MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam"));
    246246  if (!signal)
    247247  {
     
    250250  }
    251251
    252   fCam = (MCalibrationCam*)pList->FindObject("MCalibrationChargeCam");
     252  fCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam"));
    253253  if (!fCam)
    254254    {
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.cc

    r4572 r4658  
    9090#include "MParList.h"
    9191
     92#include "MCalibrationTestCam.h"
     93
    9294#include "MCalibrationCam.h"
    9395#include "MCalibrationPix.h"
     
    117119  SetAverageNbins(5000);
    118120
    119   fNotInterpolateablePixels.Set(0);
    120121}
    121122
     
    157158  }
    158159
     160
    159161  const Int_t npixels  = fGeom->GetNumPixels();
    160162  const Int_t nsectors = fGeom->GetNumSectors();
     
    378380     
    379381      if (hist.IsEmpty())
    380         {
    381           const Int_t size = fNotInterpolateablePixels.GetSize();
    382           fNotInterpolateablePixels.Set(size+1);
    383           fNotInterpolateablePixels[size] = i;
    384           continue;
    385         }
     382        continue;
    386383
    387384      if (!hist.FitGaus())
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.h

    r4542 r4658  
    1212#endif
    1313
     14
    1415class MGeomCam;
    1516class MHCalibrationTestCam : public MHCalibrationCam
     
    2324  TArrayF fRmsSigmaPhotPerArea   ;
    2425
    25   TArrayI fNotInterpolateablePixels;
    26  
    2726  Bool_t ReInitHists(MParList *pList);
    2827  Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
     
    4241  const Float_t  GetRmsSigmaPhotPerArea  ( const Int_t aidx ) const { return fRmsSigmaPhotPerArea  [aidx]; }
    4342
    44   const TArrayI &GetNotInterpolateablePixels ()               const { return fNotInterpolateablePixels;    }
    45  
    4643  void CalcAverageSigma();
    4744 
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc

    r4559 r4658  
    2727//  MJExtractCalibTest
    2828//
     29// If the flag SetDataCheckDisplay() is set, only the most important distributions
     30//  are displayed.
     31// Otherwise, (default: SetNormalDisplay()), a good selection of plots is given
     32//
    2933/////////////////////////////////////////////////////////////////////////////
    3034#include "MJExtractCalibTest.h"
     
    5357#include "MCalibrationRelTimeCam.h"
    5458#include "MCalibrationQECam.h"
     59#include "MCalibrationTestCam.h"
    5560#include "MCalibrationTestCalc.h"
    5661#include "MHCamEvent.h"
     62#include "MHCalibrationTestCam.h"
    5763
    5864#include "MReadMarsFile.h"
     
    7985//
    8086// Sets fUseCosmicsFilter to kTRUE, fRuns to 0, fExtractor to NULL, fTimeExtractor to NULL
     87// fDisplay to kNormalDisplay
    8188//
    8289MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title)
    83     : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL)
     90    : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL),
     91      fDisplayType(kNormalDisplay)
    8492{
    8593    fName  = name  ? name  : "MJExtractCalibTest";
     
    105113  // Get container from list
    106114  //
    107   MGeomCam &geomcam = *(MGeomCam*)plist.FindObject("MGeomCam");
     115  MGeomCam  &geomcam = *(MGeomCam*) plist.FindObject("MGeomCam");
     116  MHCalibrationTestCam &testcam = *(MHCalibrationTestCam*)plist.FindObject("MHCalibrationTestCam");
    108117 
    109118  // Create histograms to display
     
    112121  MHCamera disp3 (geomcam, "Test;PhotonsPerArea",    "Equiv. Cherenkov Photons per Area");
    113122  MHCamera disp4 (geomcam, "Test;SigmaPhotPerArea",  "Sigma equiv. Cher. Photons per Area");
     123  MHCamera disp5 (geomcam, "Test;Phot",              "Calibrated Photons");
     124  MHCamera disp6 (geomcam, "Test;PhotPerArea",       "Calibrated Photons per Area");
     125  MHCamera disp7 (geomcam, "Test;NotInterpolate",    "Not interpolated pixels");
     126  MHCamera disp8 (geomcam, "Test;DeviatingPhots",    "Deviating Number Photons");
    114127
    115128  // Fitted charge means and sigmas
    116   disp1.SetCamContent(fTestCam,  0);
    117   disp1.SetCamError(  fTestCam,  1);
    118   disp2.SetCamContent(fTestCam,  2);
    119   disp2.SetCamError(  fTestCam,  3);
    120   disp3.SetCamContent(fTestCam,  7);
    121   disp3.SetCamError(  fTestCam,  8);
    122   disp4.SetCamContent(fTestCam,  9);
    123   disp4.SetCamError(  fTestCam,  10);
     129  disp1.SetCamContent(testcam,  0);
     130  disp1.SetCamError(  testcam,  1);
     131  disp2.SetCamContent(testcam,  2);
     132  disp2.SetCamError(  testcam,  3);
     133  disp3.SetCamContent(testcam,  7);
     134  disp3.SetCamError(  testcam,  8);
     135  disp4.SetCamContent(testcam,  9);
     136  disp4.SetCamError(  testcam,  10);
     137
     138  disp5.SetCamContent(fTestCam,  0);
     139  disp5.SetCamError(  fTestCam,  1);
     140  disp6.SetCamContent(fTestCam,  2);
     141  disp6.SetCamError(  fTestCam,  3);
     142  disp7.SetCamError(  fTestCam,  4);
     143
     144  disp8.SetCamError(  fBadPixels, 22);
     145
    124146
    125147  disp1.SetYTitle("Photons");
     
    127149  disp3.SetYTitle("Photons per Area [mm^{-2}]");
    128150  disp4.SetYTitle("\\sigma_{phot} per Area [mm^{-2}]");
     151
     152  disp5.SetYTitle("Photons");
     153  disp6.SetYTitle("Photons per Area [mm^{-2}]");
     154  disp7.SetYTitle("[1]");
     155  disp8.SetYTitle("[1]");
    129156 
    130157  gStyle->SetOptStat(1111);
    131158  gStyle->SetOptFit();
    132159
    133   TCanvas &c = fDisplay->AddTab("TestCharges");
    134   c.Divide(4,4);
    135 
    136   disp1.CamDraw(c, 1, 4, 2, 1);
    137   disp2.CamDraw(c, 2, 4, 2, 1);       
    138   disp3.CamDraw(c, 3, 4, 1, 1);       
    139   disp4.CamDraw(c, 4, 4, 2, 1);       
     160  if (fDisplayType == kNormalDisplay)
     161    {
     162
     163      TCanvas &c = fDisplay->AddTab("TestCharges");
     164      c.Divide(4,4);
     165     
     166      disp1.CamDraw(c, 1, 4, 2, 1);
     167      disp2.CamDraw(c, 2, 4, 2, 1);       
     168      disp3.CamDraw(c, 3, 4, 1, 1);       
     169      disp4.CamDraw(c, 4, 4, 2, 1);       
     170    }
     171 
     172  TCanvas &c2 = fDisplay->AddTab("TestResult");
     173  c2.Divide(2,4);
     174
     175  disp5.CamDraw(c2, 1, 2, 2, 1);
     176  disp6.CamDraw(c2, 2, 2, 2, 1);       
     177
     178  TCanvas &c3 = fDisplay->AddTab("TestDefects");
     179  c3.Divide(2,2);
     180
     181  disp7.CamDraw(c3, 1, 2, 0);
     182  disp8.CamDraw(c3, 2, 2, 0);       
    140183
    141184  return;
     
    234277  *fLog << endl;
    235278 
    236   MCerPhotEvt    cerphot;
    237   MPedPhotCam    pedphot;
     279  MCerPhotEvt          cerphot;
     280  MPedPhotCam          pedphot;
     281  MHCalibrationTestCam testcam;
    238282
    239283  // Setup Lists
     
    244288  plist.AddToList(&cerphot);
    245289  plist.AddToList(&pedphot);
     290  plist.AddToList(&testcam);
    246291  plist.AddToList(&fTestCam);
    247292  plist.AddToList(&fBadPixels);
     
    493538    if (fTestCam.Write()<=0)
    494539    {
    495         *fLog << err << "Unable to write MHCalibrationTestCam to " << oname << endl;
     540        *fLog << err << "Unable to write MCalibrationTestCam to " << oname << endl;
    496541        return kFALSE;
    497542    }
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h

    r4189 r4658  
    22#define MARS_MJExtractCalibTest
    33
    4 #ifndef MARS_MHCalibrationTestCam
    5 #include "MHCalibrationTestCam.h"
     4#ifndef MARS_MCalibrationTestCam
     5#include "MCalibrationTestCam.h"
    66#endif
    77#ifndef MARS_MHCalibrationTestTimeCam
     
    3535 
    3636  MBadPixelsCam            fBadPixels;
    37   MHCalibrationTestCam     fTestCam;
     37  MCalibrationTestCam      fTestCam;
    3838  MHCalibrationTestTimeCam fTestTimeCam;
    3939  MPedPhotCam              fPedPhotCam;
    4040
     41  enum  Display_t                                      // Possible Display types
     42    {
     43      kDataCheckDisplay,
     44      kNormalDisplay
     45    };
     46 
     47  Display_t fDisplayType;                              // Chosen Display type
     48 
    4149  Bool_t ReadPedPhotCam();
    4250 
     
    5866  const char* GetOutputFile() const;
    5967 
    60   MHCalibrationTestCam     &GetTestCam()      { return fTestCam; }
     68  MCalibrationTestCam      &GetTestCam()      { return fTestCam; }
    6169  MHCalibrationTestTimeCam &GetTestTimeCam()  { return fTestTimeCam; } 
    6270  MPedPhotCam          &GetPedPhotCam() { return fPedPhotCam; }
     
    6775  void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
    6876  void SetUseCosmicsFilter( const Bool_t b )    { fUseCosmicsFilter = b;  }
    69      
     77
     78  // Displays
     79  void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
     80  void SetNormalDisplay()    { fDisplayType = kNormalDisplay;    }
     81 
    7082  Bool_t ProcessD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam);
    7183  Bool_t ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam); 
Note: See TracChangeset for help on using the changeset viewer.