Ignore:
Timestamp:
04/20/07 14:59:58 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
8 edited

Legend:

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

    r8427 r8428  
    1919#pragma link C++ class MCalibrationIntensityCam+;
    2020#pragma link C++ class MCalibrationIntensityChargeCam+;
    21 #pragma link C++ class MCalibrationIntensityRelTimeCam+;
    2221#pragma link C++ class MCalibrationIntensityTestCam+;
    2322
     
    2928#pragma link C++ class MCalibrationPulseTimeCam+;
    3029#pragma link C++ class MCalibrationPedCam+;
    31 //#pragma link C++ class MCalibrationHiLoCam+;
    32 //#pragma link C++ class MCalibrationHiLoPix+;
    3330#pragma link C++ class MCalibrationQECamMagic+;
    3431#pragma link C++ class MCalibrationQECam+;
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r8427 r8428  
    3131//   MParList
    3232//   MCalibrationIntensityChargeCam
    33 //   MCalibrationIntensityRelTimeCam
    3433//
    3534//  Output Containers:
    3635//   MCalibrationIntensityChargeCam
    37 //   MCalibrationIntensityRelTimeCam
    3836//
    3937// Class version 2:
     
    5856
    5957#include "MCalibrationIntensityChargeCam.h"
    60 //#include "MCalibrationIntensityRelTimeCam.h"
    6158
    6259#include "MBadPixelsCam.h"
     
    202199  if (pList->FindObject(AddSerialNumber("MHCalibrationRelTimeCam")))
    203200  {
    204 
    205     MParContainer *cont = pList->FindCreateObj("MCalibrationIntensityRelTimeCam");
    206     if (!cont)
    207       {
    208         *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl;
    209         return kFALSE;
    210       }
     201    // if (!pList->FindCreateObj("MCalibrationIntensityRelTimeCam"))
     202    //    return kFALSE;
    211203
    212204    if (!fRelTimeCalc)
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc

    r8427 r8428  
    3434//   MParList
    3535//   MCalibrationIntensityChargeCam
    36 //   MCalibrationIntensityRelTimeCam
    3736//
    3837//  Output Containers:
    3938//   MCalibrationIntensityChargeCam
    40 //   MCalibrationIntensityRelTimeCam
    4139//
    4240//////////////////////////////////////////////////////////////////////////////
     
    5856
    5957#include "MCalibrationIntensityChargeCam.h"
    60 #include "MCalibrationIntensityRelTimeCam.h"
    6158
    6259#include "MCalibrationPattern.h"
    6360#include "MCalibrationQECam.h"
    6461#include "MCalibrationBlindCam.h"
     62
    6563#include "MCalibrationChargeCam.h"
    6664#include "MCalibrationChargeCalc.h"
     65
     66#include "MCalibrationRelTimeCam.h"
    6767#include "MCalibrationRelTimeCalc.h"
    6868
     
    7777MCalibColorSteer::MCalibColorSteer(const char *name, const char *title)
    7878    : fCalibPattern(NULL), fGeom(NULL), fParList(NULL),
    79       fIntensCharge(NULL), fIntensRelTime(NULL),
     79      fIntensCharge(NULL),
    8080      fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE)
    8181{
     
    178178  {
    179179
    180     fIntensRelTime = (MCalibrationIntensityRelTimeCam*)pList->FindCreateObj("MCalibrationIntensityRelTimeCam");
    181     fRelTimeCalc   = (MCalibrationRelTimeCalc*)tlist->FindObject(AddSerialNumber("MCalibrationRelTimeCalc"));
    182 
    183180    *fLog << inf << "Found MHCalibrationRelTimeCam ... " << flush;
    184181
    185     if (!fIntensRelTime)
    186       {
    187         *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl;
     182    fRelTimeCam = (MCalibrationRelTimeCam*)pList->FindCreateObj("MCalibrationRelTimeCam");
     183    if (!fRelTimeCam)
    188184        return kFALSE;
    189       }
    190 
     185
     186    fRelTimeCalc = (MCalibrationRelTimeCalc*)tlist->FindObject(AddSerialNumber("MCalibrationRelTimeCalc"));
    191187    if (!fRelTimeCalc)
    192       {
    193         *fLog << err << "Could not find MCalibrationRelTimeCalc abort... " << endl;
    194188        return kFALSE;
    195       }
     189
     190    // CALL ITS PrePorcess ???
    196191  }
    197192 
     
    320315  fBlindCam->SetPulserColor(fCalibPattern->GetPulserColor());
    321316
     317  fRelTimeCam->Clear();
     318  fRelTimeCam->SetPulserColor(fCalibPattern->GetPulserColor());
     319
    322320  if (fIntensCharge)
    323321    {
     
    331329    }
    332330
    333   if (fIntensRelTime)
    334     {
    335       fIntensRelTime->AddToList(Form("MCalibrationRelTimeCam%s",namep.Data()),*fGeom);
    336       MCalibrationCam *cam = fIntensRelTime->GetCam();
    337       cam->SetPulserColor(fCalibPattern->GetPulserColor());
    338       *fLog << inf << "New MCalibrationRelTimeCam with name: " << cam->GetName() << endl;
    339     }
    340 
    341331  return kTRUE;
    342332
     
    388378//        fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone());
    389379
    390   if (n.Contains("RelTime"))
    391     if (fIntensRelTime)
    392           fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone());
    393 }
    394 
    395 // --------------------------------------------------------------------------
     380//  if (n.Contains("RelTime"))
     381//    if (fIntensRelTime)
     382//        fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone());
     383}
     384
     385// --------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h

    r8427 r8428  
    1818class MCalibrationRelTimeCalc;
    1919class MCalibrationIntensityChargeCam;
    20 class MCalibrationIntensityRelTimeCam;
     20class MCalibrationRelTimeCam;
    2121class MCalibrationBlindCam;
    2222class MCalibrationQECam;
     
    3131  MParList                        *fParList;         //!
    3232  MCalibrationIntensityChargeCam  *fIntensCharge;    //!
    33   MCalibrationIntensityRelTimeCam *fIntensRelTime;   //!
     33  MCalibrationRelTimeCam          *fRelTimeCam;      //!
    3434  MCalibrationBlindCam            *fBlindCam;        //!
    3535  MCalibrationQECam               *fQECam;           //!
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc

    r8425 r8428  
    3434//           per calibration camera result and area index
    3535//
    36 // See also: MCalibrationIntensityChargeCam, MCalibrationIntensityRelTimeCam,
     36// See also: MCalibrationIntensityChargeCam,
    3737//           MCalibrationCam, MCalibrationPix, MHCalibrationChargePix,
    3838//           MHCalibrationChargeCam, MCalibrationChargeBlindPix,
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc

    r8417 r8428  
    7171#include "MGeomPix.h"
    7272
    73 #include "MCalibrationIntensityRelTimeCam.h"
    7473#include "MCalibrationRelTimeCam.h"
    7574#include "MCalibrationRelTimePix.h"
     
    122121void MCalibrationRelTimeCalc::Clear(const Option_t *o)
    123122{
    124 
    125   fBadPixels  = NULL;
    126   fCam        = NULL;
    127   fIntensCam  = NULL;
    128 
     123    fBadPixels  = NULL;
     124    fCam        = NULL;
    129125}
    130126
     
    133129// Search for the following input containers and abort if not existing:
    134130//  - MGeomCam
    135 //  - MCalibrationIntensityRelTimeCam or MCalibrationRelTimeCam
     131//  - MCalibrationRelTimeCam
    136132//  - MBadPixelsCam
    137133//
     
    161157  }
    162158
    163   fIntensCam = (MCalibrationIntensityRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityRelTimeCam"));
    164   if (fIntensCam)
    165     *fLog << inf << "Found MCalibrationIntensityRelTimeCam ... " << endl;
    166   else
    167     {
    168       fCam = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam"));
    169       if (!fCam)
    170         {
    171           *fLog << err << "Cannot find MCalibrationRelTimeCam ... abort." << endl;
    172           *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationRelTimeCam before..." << endl;
    173           return kFALSE;
    174         }
    175     }
    176  
    177   UInt_t npixels     = fGeom->GetNumPixels();
    178  
    179   MCalibrationRelTimeCam *relcam = fIntensCam
    180     ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    181 
     159  fCam = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam"));
     160  if (!fCam)
     161  {
     162      *fLog << err << "Cannot find MCalibrationRelTimeCam ... abort." << endl;
     163      return kFALSE;
     164  }
     165
     166  const UInt_t npixels = fGeom->GetNumPixels();
    182167  for (UInt_t i=0; i<npixels; i++)
    183     {
    184      
    185       MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
     168  {
     169      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i];
    186170
    187171      if ((*fBadPixels)[i].IsBad())
    188         {
     172      {
    189173          pix.SetExcluded();
    190174          continue;
    191         }
     175      }
    192176
    193177      if (IsDebug())
    194         pix.SetDebug();
    195     }
     178          pix.SetDebug();
     179  }
    196180
    197181  return kTRUE;
     
    242226  FinalizeUnsuitablePixels();
    243227
    244   if (fIntensCam)
    245     fIntensCam->SetReadyToSave();
    246   else
    247     fCam      ->SetReadyToSave();
    248 
     228  fCam->SetReadyToSave();
    249229  fBadPixels->SetReadyToSave();
    250230
     
    277257{
    278258
    279   MCalibrationRelTimeCam *relcam = fIntensCam
    280     ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    281 
    282259  const UInt_t npixels  = fGeom->GetNumPixels();
    283260  const UInt_t nareas   = fGeom->GetNumAreas();
     
    286263  TArrayF upplim       (nareas);
    287264  TArrayF areasum      (nareas);
    288   //  Float_t areasum2     [nareas];
    289265  TArrayI numareavalid (nareas);
    290266  TArrayI useunreliable(nareas);
     
    306282      numareavalid[aidx] ++;
    307283    }
    308  
     284
    309285  for (UInt_t aidx=0; aidx<nareas; aidx++)
    310286    if (numareavalid[aidx] < 100)
     
    318294  for (UInt_t i=0; i<npixels; i++)
    319295    {
    320      
    321       MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
     296
     297      const MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i];
    322298
    323299      if (pix.IsExcluded())
     
    349325          continue;
    350326        }
    351  
     327
    352328      // Calculate the rms out of sum2:
    353329      /*
     
    358334      lowlim  [aidx]  = 0;
    359335      upplim  [aidx]  = areasum [aidx] + fRelTimeResolutionLimit;
    360      
     336
    361337    }
    362338  *fLog << endl; 
     
    365341  for (UInt_t i=0; i<npixels; i++)
    366342    {
    367      
    368       MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
    369      
     343
     344      MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i];
     345
    370346      if (pix.IsExcluded())
    371347        continue;
    372      
     348
    373349      MBadPixelsPix &bad = (*fBadPixels)[i];
    374350      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    375351        continue;
    376      
     352
    377353      const Float_t res    = pix.GetTimePrecision();
    378354      const Int_t   aidx   = (*fGeom)[i].GetAidx();
    379      
     355
    380356      if ( res < lowlim[aidx] || res > upplim[aidx] )
    381357        {
     
    401377void MCalibrationRelTimeCalc::FinalizeBadPixels()
    402378{
    403  
    404   MCalibrationRelTimeCam *relcam = fIntensCam
    405     ? (MCalibrationRelTimeCam*)fIntensCam->GetCam()  : fCam;
    406379
    407380  for (Int_t i=0; i<fBadPixels->GetSize(); i++)
    408381    {
    409      
    410       MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];
    411382
    412383      MBadPixelsPix &bad = (*fBadPixels)[i];
     
    425396
    426397      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
     398      {
     399          MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i];
    427400          pix.SetExcluded();
     401      }
    428402    }
    429403
     
    442416    *fLog << dec;
    443417
    444     MCalibrationRelTimeCam *relcam = fIntensCam ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam;
    445 
    446418    const Int_t nareas = fGeom->GetNumAreas();
    447419
     
    453425        unsuit[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx);
    454426        unrel[aidx]  += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx);
    455         relcam->SetNumUnsuitable(unsuit[aidx], aidx);
    456         relcam->SetNumUnreliable(unrel[aidx],  aidx);
     427        fCam->SetNumUnsuitable(unsuit[aidx], aidx);
     428        fCam->SetNumUnreliable(unrel[aidx],  aidx);
    457429    }
    458430
  • trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h

    r8417 r8428  
    1919#endif
    2020
    21 class MCalibrationIntensityRelTimeCam;
    2221class MCalibrationRelTimeCam;
    2322class MGeomCam;
    24 //class MBadPixelsIntensityCam;
    2523class MBadPixelsCam;
    2624
     
    3533 
    3634  // Pointers
    37   //MBadPixelsIntensityCam     *fIntensBad;        //  Bad Pixels Intensity Cam
    3835  MBadPixelsCam              *fBadPixels;        //  Bad Pixels
    39   MCalibrationIntensityRelTimeCam *fIntensCam;   //  Calibrated RelTimes for different intensities
    4036  MCalibrationRelTimeCam     *fCam;              //  Calibrated RelTimes of all pixels
    4137  MGeomCam                   *fGeom;             //! Camera geometry
  • trunk/MagicSoft/Mars/mcalib/Makefile

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