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

Legend:

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

    r8425 r8427  
    1919#pragma link C++ class MCalibrationIntensityCam+;
    2020#pragma link C++ class MCalibrationIntensityChargeCam+;
    21 #pragma link C++ class MCalibrationIntensityBlindCam+;
    2221#pragma link C++ class MCalibrationIntensityRelTimeCam+;
    2322#pragma link C++ class MCalibrationIntensityTestCam+;
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r8425 r8427  
    5858
    5959#include "MCalibrationIntensityChargeCam.h"
    60 #include "MCalibrationIntensityBlindCam.h"
    6160//#include "MCalibrationIntensityRelTimeCam.h"
    6261
     
    6463
    6564#include "MCalibrationQECam.h"
    66 #include "MCalibrationQEPix.h"
     65#include "MCalibrationBlindCam.h"
    6766#include "MCalibrationChargePix.h"
    6867#include "MCalibrationChargeCalc.h"
     
    8786MCalibCalcFromPast::MCalibCalcFromPast(const char *name, const char *title)
    8887    : fGeom(NULL), fParList(NULL), fRunHeader(NULL),
    89       fIntensCharge(NULL), fIntensBlind(NULL),
    90       fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL),
     88    fIntensCharge(NULL), fBlindCam(NULL), fQECam(NULL), fBadPixels(NULL),
     89    fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL),
    9190    fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE),
    9291    fNumFails(0)
     
    152151  if (pList->FindObject(AddSerialNumber("MHCalibrationBlindCam")))
    153152  {
    154 
    155     *fLog << inf << "Found MHCalibrationBlindCam ... " << flush;
    156 
    157     fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam");
    158     if (!fIntensBlind)
    159       {
    160         *fLog << err << "Could not find nor create MCalibrationIntensitBlindCam abort... " << endl;
    161         return kFALSE;
    162       }
    163   }
    164  
    165   //
     153      *fLog << inf << "Found MHCalibrationBlindCam ... " << flush;
     154
     155      fBlindCam = (MCalibrationBlindCam*)pList->FindCreateObj("MCalibrationBlindCam");
     156      if (!fBlindCam)
     157          return kFALSE;
     158  }
     159
     160  //
    166161  // Look for the MFillH-class "MHCalibrationChargeCam". In case yes, initialize the
    167162  // corresponding IntensityCam
     
    394389  // IS IT REALLY NECESSARY?
    395390
     391  if (fBlindCam)
     392  {
     393      *fLog << "MCalibrationBlindCam...";
     394      fBlindCam->Clear();
     395      fBlindCam->SetRunNumber(runnumber);
     396  }
     397  // IS IT REALLY NECESSARY?
     398
    396399  // IF SIMPLE ENOUGH, REMOVE THE FUNCTION!
    397400
     
    411414            fIntensCharge->DeleteOldCam(cold);
    412415        }
    413   }
    414 
    415   if (fIntensBlind)
    416   {
    417       *fLog << "MCalibrationBlindCam...";
    418       MCalibrationCam *cold = fIntensBlind->GetCam();
    419       fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
    420       fIntensBlind->GetCam()->SetRunNumber(runnumber);
    421       if (cold)
    422           fIntensBlind->DeleteOldCam(cold);
    423416  }
    424417
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h

    r8425 r8427  
    1818class MCalibrateData;
    1919class MCalibrationIntensityChargeCam;
    20 class MCalibrationIntensityBlindCam;
     20class MCalibrationBlindCam;
    2121class MCalibrationQECam;
    2222
     
    3333  MRawRunHeader                   *fRunHeader;       //! Run header storing the run number
    3434  MCalibrationIntensityChargeCam  *fIntensCharge;    //! Intensity Charge Cam (to be created)
    35   MCalibrationIntensityBlindCam   *fIntensBlind;     //! Intensity Blind  Cam (to be created)
    3635
     36  MCalibrationBlindCam            *fBlindCam;        //! Blind  Cam
    3737  MCalibrationQECam               *fQECam;           //! QE Cam
    3838  MBadPixelsCam                   *fBadPixels;       //! Bad Pixels Cam
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc

    r8425 r8427  
    5858
    5959#include "MCalibrationIntensityChargeCam.h"
    60 #include "MCalibrationIntensityBlindCam.h"
    6160#include "MCalibrationIntensityRelTimeCam.h"
    6261
    6362#include "MCalibrationPattern.h"
    6463#include "MCalibrationQECam.h"
     64#include "MCalibrationBlindCam.h"
    6565#include "MCalibrationChargeCam.h"
    6666#include "MCalibrationChargeCalc.h"
     
    141141
    142142  //
    143   // Look for the MCalibrationIntensityBlindCam
    144   //
    145   fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam");
    146   if (!fIntensBlind)
    147   {
    148       *fLog << err << "MCalibrationIntensityBlindCam not found... abort." << endl;
    149       return kFALSE;
    150   }
    151  
     143  // Look for the MCalibrationBlindCam
     144  //
     145  fBlindCam = (MCalibrationBlindCam*)pList->FindCreateObj("MCalibrationBlindCam");
     146  if (!fBlindCam)
     147      return kFALSE;
     148
    152149  //
    153150  // Look for the MFillH name "FillChargeCam". In case yes, initialize the
     
    320317  fQECam->Clear();
    321318
     319  fBlindCam->Clear();
     320  fBlindCam->SetPulserColor(fCalibPattern->GetPulserColor());
     321
    322322  if (fIntensCharge)
    323323    {
     
    331331    }
    332332
    333   if (fIntensBlind)
    334     {
    335       fIntensBlind->AddToList(Form("MCalibrationBlindCam%s",namep.Data()),*fGeom);
    336       MCalibrationCam *cam = fIntensBlind->GetCam();
    337       cam->SetPulserColor(fCalibPattern->GetPulserColor());
    338       *fLog << inf << "New MCalibrationBlindCam with name: " << cam->GetName() << endl;
    339     }
    340 
    341333  if (fIntensRelTime)
    342334    {
     
    392384          fIntensCharge->AddHist((MHCalibrationCam*)hcam->Clone());
    393385    }
    394   if (n.Contains("Blind"))
    395     if (fIntensBlind)
    396           fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone());
     386//  if (n.Contains("Blind"))
     387//    if (fIntensBlind)
     388//        fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone());
    397389
    398390  if (n.Contains("RelTime"))
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h

    r8425 r8427  
    1818class MCalibrationRelTimeCalc;
    1919class MCalibrationIntensityChargeCam;
    20 class MCalibrationIntensityBlindCam;
    2120class MCalibrationIntensityRelTimeCam;
     21class MCalibrationBlindCam;
    2222class MCalibrationQECam;
    2323class MBadPixelsCam;
     
    3131  MParList                        *fParList;         //!
    3232  MCalibrationIntensityChargeCam  *fIntensCharge;    //!
    33   MCalibrationIntensityBlindCam   *fIntensBlind;     //! 
    3433  MCalibrationIntensityRelTimeCam *fIntensRelTime;   //!
     34  MCalibrationBlindCam            *fBlindCam;        //!
    3535  MCalibrationQECam               *fQECam;           //!
    3636  MBadPixelsCam                   *fBad;             //!
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r8425 r8427  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.175 2007-04-20 11:48:08 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.176 2007-04-20 13:21:11 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    222222
    223223#include "MCalibrationIntensityChargeCam.h"
    224 #include "MCalibrationIntensityBlindCam.h"
    225224
    226225#include "MHCalibrationChargeCam.h"
     
    367366    fHCam        = NULL;
    368367    fQECam       = NULL;
    369     fIntensBlind = NULL;
    370368    fBlindCam    = NULL;
    371369    fHBlindCam   = NULL;
     
    513511    }
    514512 
    515   fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityBlindCam"));
    516   if (fIntensBlind)
    517     *fLog << inf << "Found MCalibrationIntensityBlindCam... " << flush;
    518   else
    519     {
    520       fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam"));
    521       if (!fBlindCam)
    522         *fLog << inf << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl;
    523     }
    524 
    525     //
    526     // Required containers
    527     //
     513  //
     514  // Blind pixel calibration
     515  //
     516  fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam"));
     517  if (!fBlindCam)
     518      *fLog << inf << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl;
     519
     520  //
     521  // Required containers
     522  //
    528523  fQECam = (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam"));
    529524  if (!fQECam)
     
    664659    fHBlindCam->SetColor(col);
    665660
    666   MCalibrationBlindCam  *blindcam  = fIntensBlind   
    667     ? (MCalibrationBlindCam*)fIntensBlind->GetCam() : fBlindCam;
    668661  MCalibrationChargeCam *chargecam = fIntensCam
    669662    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
     
    671664  chargecam->SetPulserColor(col);
    672665
    673   if (blindcam)
    674     blindcam->SetPulserColor(col);
     666  if (fBlindCam)
     667    fBlindCam->SetPulserColor(col);
    675668  if (fPINDiode)
    676669    fPINDiode->SetColor(col);
     
    756749      }
    757750
    758   MCalibrationBlindCam  *blindcam  = fIntensBlind ? (MCalibrationBlindCam*) fIntensBlind->GetCam() : fBlindCam;
    759751  MCalibrationChargeCam *chargecam = fIntensCam   ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    760752
     
    928920  fBadPixels->SetReadyToSave();
    929921
    930   if (blindcam)
    931     blindcam->SetReadyToSave();
     922  if (fBlindCam)
     923    fBlindCam->SetReadyToSave();
    932924  if (fPINDiode)
    933925    fPINDiode->SetReadyToSave();
     
    15801572Bool_t MCalibrationChargeCalc::FinalizeBlindCam()
    15811573{
    1582 
    1583   MCalibrationBlindCam  *blindcam = fIntensBlind   
    1584     ? (MCalibrationBlindCam*)fIntensBlind->GetCam() : fBlindCam;
    1585 
    1586   if (!blindcam)
     1574  if (!fBlindCam)
    15871575    return kFALSE; 
    15881576
    1589   Int_t   nvalid  = 0;
    1590 
    1591   for (Int_t i=0; i<blindcam->GetSize(); i++)
    1592     {
    1593      
    1594       MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*blindcam)[i];
     1577  Int_t nvalid  = 0;
     1578
     1579  for (Int_t i=0; i<fBlindCam->GetSize(); i++)
     1580    {
     1581     
     1582      MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*fBlindCam)[i];
    15951583
    15961584      if (!blindpix.IsValid())
     
    19661954{
    19671955
    1968 
    1969   MCalibrationBlindCam  *blindcam  = fIntensBlind
    1970     ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam;
    1971   MCalibrationChargeCam *chargecam = fIntensCam 
     1956  if (!fBlindCam)
     1957    return;
     1958
     1959  MCalibrationChargeCam *chargecam = fIntensCam
    19721960    ? (MCalibrationChargeCam*)fIntensCam->GetCam()  : fCam;
    19731961
    1974   if (!blindcam)
    1975     return;
    19761962
    19771963  //
    19781964  // Set the results in the MCalibrationChargeCam
    19791965  //
    1980   if (!blindcam || !(blindcam->IsFluxInsidePlexiglassAvailable()))
    1981     {
    1982  
    1983       const Float_t photons = blindcam->GetFluxInsidePlexiglass() * (*fGeom)[0].GetA()
     1966  if (!fBlindCam->IsFluxInsidePlexiglassAvailable())
     1967    {
     1968 
     1969      const Float_t photons = fBlindCam->GetFluxInsidePlexiglass() * (*fGeom)[0].GetA()
    19841970                           / fQECam->GetPlexiglassQE();
    19851971      chargecam->SetNumPhotonsBlindPixelMethod(photons);
    19861972         
    1987       const Float_t photrelvar = blindcam->GetFluxInsidePlexiglassRelVar()
     1973      const Float_t photrelvar = fBlindCam->GetFluxInsidePlexiglassRelVar()
    19881974                              + fQECam->GetPlexiglassQERelVar();
    19891975 
     
    20021988      MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i];
    20031989     
    2004       if (!blindcam || !(blindcam->IsFluxInsidePlexiglassAvailable()))
     1990      if (!fBlindCam->IsFluxInsidePlexiglassAvailable())
    20051991        {
    20061992          qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor);
     
    20202006
    20212007      const Float_t qe        = pix.GetPheFFactorMethod()
    2022                              / blindcam->GetFluxInsidePlexiglass()
     2008                             / fBlindCam->GetFluxInsidePlexiglass()
    20232009                             / geo.GetA()
    20242010                             * fQECam->GetPlexiglassQE();
    20252011
    2026       const Float_t qerelvar = blindcam->GetFluxInsidePlexiglassRelVar()
     2012      const Float_t qerelvar = fBlindCam->GetFluxInsidePlexiglassRelVar()
    20272013                               + fQECam->GetPlexiglassQERelVar()
    20282014                               + pix.GetPheFFactorMethodRelVar();
  • trunk/MagicSoft/Mars/mcalib/Makefile

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