Changeset 8429


Ignore:
Timestamp:
04/20/07 15:09:30 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r8428 r8429  
    1919#pragma link C++ class MCalibrationIntensityCam+;
    2020#pragma link C++ class MCalibrationIntensityChargeCam+;
    21 #pragma link C++ class MCalibrationIntensityTestCam+;
    2221
    2322#pragma link C++ class MCalibrationCam+;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc

    r8417 r8429  
    6464#include "MHCalibrationPix.h"
    6565
    66 #include "MCalibrationIntensityTestCam.h"
    6766#include "MCalibrationTestCam.h"
    6867#include "MCalibrationTestPix.h"
     
    8079// Default constructor.
    8180//
    82 // Sets the pointer to fTestCam and fGeom to NULL
     81// Sets the pointer to fHTestCam and fGeom to NULL
    8382// Sets outputpath to "."
    8483// Sets outputfile to "TestCalibStat.txt"
     
    8988//
    9089MCalibrationTestCalc::MCalibrationTestCalc(const char *name, const char *title)
    91     : fBadPixels(NULL), fTestCam(NULL), fIntensCam(NULL), fCam(NULL),
    92       fGeom(NULL)
     90    : fBadPixels(NULL), fHTestCam(NULL), fCam(NULL), fGeom(NULL)
    9391{
    9492       
     
    109107// - MGeomCam
    110108// - MHCalibrationTestCam
    111 // - MCalibrationIntensityTestCam or MCalibrationTestCam
     109// - MCalibrationTestCam
    112110// - MBadPixelsCam
    113111//
     
    122120    }
    123121 
    124   fTestCam = (MHCalibrationTestCam*)pList->FindObject("MHCalibrationTestCam");
    125   if (!fTestCam)
     122  fHTestCam = (MHCalibrationTestCam*)pList->FindObject("MHCalibrationTestCam");
     123  if (!fHTestCam)
    126124    {
    127125      *fLog << err << "Cannot find MHCalibrationTestCam... aborting" << endl;
     
    130128    }
    131129
    132   fIntensCam = (MCalibrationIntensityTestCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityTestCam"));
    133   if (fIntensCam)
    134     *fLog << inf << "Found MCalibrationIntensityTestCam ... " << endl;
    135   else
    136     {
    137       fCam = (MCalibrationTestCam*)pList->FindObject(AddSerialNumber("MCalibrationTestCam"));
    138       if (!fCam)
    139         {
    140           *fLog << err << "Cannot find MCalibrationTestCam ... abort." << endl;
    141           *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationTestCam before..." << endl;
    142           return kFALSE;
    143         }
    144     }
     130  fCam = (MCalibrationTestCam*)pList->FindObject(AddSerialNumber("MCalibrationTestCam"));
     131  if (!fCam)
     132  {
     133      *fLog << err << "Cannot find MCalibrationTestCam ... abort." << endl;
     134      return kFALSE;
     135  }
    145136
    146137  fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
     
    166157    return kTRUE;
    167158
    168   MCalibrationTestCam *testcam = fIntensCam
    169     ? (MCalibrationTestCam*)fIntensCam->GetCam()  : fCam;
    170 
    171159  //
    172160  // Re-direct the output to an ascii-file from now on:
     
    189177  {
    190178      *fLog << " Not interpolateable Pixels:";
    191       *fLog << " Inner: " << Form("%3i", testcam->GetNumUninterpolated(0));
    192       *fLog << " Outer: " << Form("%3i", testcam->GetNumUninterpolated(1)) << endl;
     179      *fLog << " Inner: " << Form("%3i", fCam->GetNumUninterpolated(0));
     180      *fLog << " Outer: " << Form("%3i", fCam->GetNumUninterpolated(1)) << endl;
    193181      *fLog << " Biggest not-interpolateable cluster: " << maxbad << endl;
    194182  }
    195183
    196   testcam->SetNumUninterpolatedInMaxCluster(maxbad);
     184  fCam->SetNumUninterpolatedInMaxCluster(maxbad);
    197185
    198186  *fLog << endl; 
     
    220208  const UInt_t nareas   = fGeom->GetNumAreas();
    221209  const UInt_t nsectors = fGeom->GetNumSectors();
    222 
    223   MCalibrationTestCam *testcam = fIntensCam
    224     ? (MCalibrationTestCam*)fIntensCam->GetCam()  : fCam;
    225210
    226211  TArrayD lowlim      (nareas);
     
    244229    {
    245230     
    246       MHCalibrationPix     &hist = (*fTestCam)[i];
    247       MCalibrationTestPix  &pix =  (MCalibrationTestPix&)(*testcam)[i];
     231      MHCalibrationPix     &hist = (*fHTestCam)[i];
     232      MCalibrationTestPix  &pix =  (MCalibrationTestPix&)(*fCam)[i];
    248233      //
    249234      // We assume that the pixels have been interpolated so far.
     
    304289      const Float_t areaerr  = TMath::Sqrt(areavars[aidx]);
    305290     
    306       MCalibrationTestPix &avpix = (MCalibrationTestPix&)testcam->GetAverageArea(aidx);
     291      MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageArea(aidx);
    307292      avpix.SetNumPhotons   (areamean);
    308293      avpix.SetNumPhotonsErr(areaerr );
     
    372357    {
    373358     
    374       MHCalibrationPix &hist    = (*fTestCam)[i];
    375       MCalibrationTestPix  &pix =  (MCalibrationTestPix&) (*testcam)[i];
     359      MHCalibrationPix &hist    = (*fHTestCam)[i];
     360      MCalibrationTestPix  &pix =  (MCalibrationTestPix&) (*fCam)[i];
    376361
    377362      const Int_t    aidx         = (*fGeom)[i].GetAidx();
     
    424409     
    425410
    426       MCalibrationTestPix &avpix = (MCalibrationTestPix&)testcam->GetAverageArea(aidx);
     411      MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageArea(aidx);
    427412
    428413      if (areavars[aidx] < 0. || areaphotons[aidx] <= 0.)
     
    467452        }
    468453     
    469       MCalibrationTestPix &avpix = (MCalibrationTestPix&)testcam->GetAverageSector(sector);
     454      MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageSector(sector);
    470455
    471456      if (sectorvars[sector] < 0. || sectorphotons[sector] <= 0.)
     
    501486{
    502487 
    503   MCalibrationTestCam *testcam = fIntensCam
    504     ? (MCalibrationTestCam*)fIntensCam->GetCam()  : fCam;
    505 
    506488  const Int_t areas  = fGeom->GetNumAreas();
    507489  TArrayI *newarr[areas];
     
    510492    newarr[aidx] = new TArrayI(0);
    511493
    512   for (Int_t i=0; i<testcam->GetSize(); i++)
     494  for (Int_t i=0; i<fCam->GetSize(); i++)
    513495    {
    514496      const Int_t aidx = (*fGeom)[i].GetAidx();
    515       MCalibrationTestPix &pix = (MCalibrationTestPix&)(*testcam)[i];
     497      MCalibrationTestPix &pix = (MCalibrationTestPix&)(*fCam)[i];
    516498      if (pix.IsExcluded())
    517499        {
     
    534516          num++;
    535517        }
    536       testcam->SetNumUninterpolated(newarr[aidx]->GetSize(),aidx);
     518      fCam->SetNumUninterpolated(newarr[aidx]->GetSize(),aidx);
    537519      *fLog << endl;
    538520    }
     
    545527{
    546528
    547   MCalibrationTestCam *testcam = fIntensCam
    548     ? (MCalibrationTestCam*)fIntensCam->GetCam()  : fCam;
    549 
    550529  TArrayI arr(0);
    551530 
    552   for (Int_t i=0; i<testcam->GetSize(); i++)
    553     {
    554       MCalibrationTestPix &pix = (MCalibrationTestPix&)(*testcam)[i];
     531  for (Int_t i=0; i<fCam->GetSize(); i++)
     532    {
     533      MCalibrationTestPix &pix = (MCalibrationTestPix&)(*fCam)[i];
    555534      if (pix.IsExcluded())
    556535        {
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r8428 r8429  
    4141           MCalibrationIntensityCam.cc \
    4242           MCalibrationIntensityChargeCam.cc \
    43            MCalibrationIntensityTestCam.cc \
    4443           MCalibrationCam.cc \
    4544           MCalibrationPix.cc  \
Note: See TracChangeset for help on using the changeset viewer.