Changeset 4914 for trunk/MagicSoft


Ignore:
Timestamp:
09/09/04 20:20:08 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4912 r4914  
    2222 2004/09/09: Markus Gaug
    2323 
     24   * mcalib/MHCalibrationChargeCam.[h,cc]
     25     - initialize bins directly here. Remove MHCalibraitonChargeHiGainPix
     26       and MHCalibrationChargeLoGainPix classes
     27
     28   * mcalib/MHCalibrationChargeHiGainPix.[h,cc]
     29   * mcalib/MHCalibrationChargeLoGainPix.[h,cc]
     30   * mcalib/Makefile
     31   * mcalib/CalibLinkDef.h
     32     - removed first two classes
     33
    2434   * mcalib/MCalibrationCam.[h,cc]
    2535     - make default for GetNumUnsuitable and GetNumUnreliable
  • trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h

    r4900 r4914  
    4141#pragma link C++ class MHCalibrationChargeCam+;
    4242#pragma link C++ class MHCalibrationChargePix+;
    43 #pragma link C++ class MHCalibrationChargeHiGainPix+;
    44 #pragma link C++ class MHCalibrationChargeLoGainPix+;
    4543#pragma link C++ class MHCalibrationChargeBlindCam+;
    4644#pragma link C++ class MHCalibrationChargeBlindPix+;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r4903 r4914  
    117117#include "MParList.h"
    118118
    119 #include "MHCalibrationChargeHiGainPix.h"
    120 #include "MHCalibrationChargeLoGainPix.h"
    121119#include "MHCalibrationChargePix.h"
    122120#include "MHCalibrationPix.h"
     
    156154using namespace std;
    157155
    158 const Int_t   MHCalibrationChargeCam::fgAverageNbinsHiGain       = 3300;
    159 const Int_t   MHCalibrationChargeCam::fgAverageNbinsLoGain       = 1950;
     156const Axis_t  MHCalibrationChargeCam::fgChargeHiGainFirst = -100.5;
     157const Axis_t  MHCalibrationChargeCam::fgChargeHiGainLast  = 999.5;
     158const Axis_t  MHCalibrationChargeCam::fgChargeLoGainFirst = -150.5;
     159const Axis_t  MHCalibrationChargeCam::fgChargeLoGainLast  = 499.5;
     160
    160161const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.01;
    161162const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005;
     
    179180// - fTimeLowerLimit           to fgTimeLowerLimit
    180181// - fTimeUpperLimit           to fgTimeUpperLimit
    181 // - fAverageNbins             to fgAverageNbinsHiGain
    182182//
    183183MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title)
     
    193193  SetTimeUpperLimit();
    194194
    195   SetAverageNbins(fgAverageNbinsHiGain);
    196195}
    197196
     
    242241// - MHCalibrationCam::fAverageHiGainAreas
    243242// - MHCalibrationCam::fAverageHiGainSectors
    244 //
    245 // Sets number of bins to MHCalibrationCam::fAverageNbins for:
    246 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
    247 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
    248243//
    249244Bool_t MHCalibrationChargeCam::ReInitHists(MParList *pList)
     
    321316      for (Int_t i=0; i<npixels; i++)
    322317      {
    323         (*fHiGainArray)[i] = new MHCalibrationChargeHiGainPix("ChargeHiGainPix");
     318        (*fHiGainArray)[i] = new MHCalibrationChargePix("ChargeHiGainPix","Signals of the HiGain");
    324319        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)[i];
     320
    325321        pix.SetAbsTimeNbins(higainsamples);
     322        pix.SetAbsTimeFirst(-0.5);
    326323        pix.SetAbsTimeLast(higainsamples-0.5);
     324
     325        pix.SetNbins((Int_t)(fgChargeHiGainLast-fgChargeHiGainFirst));
     326        pix.SetFirst(fgChargeHiGainFirst);
     327        pix.SetLast(fgChargeHiGainLast);
     328
     329        pix.GetHGausHist()->SetName ("HCalibrationChargeHiGainPix");
     330        pix.GetHGausHist()->SetTitle("Summed Hi Gain FADC slices Pixel "); 
     331       
     332        pix.GetHAbsTime()->SetName ("HAbsTimeHiGainPix");
     333        pix.GetHAbsTime()->SetTitle("Absolute Arrival Times Hi Gain Pixel "); 
     334
    327335        InitHists((*this)[i],(*fBadPixels)[i],i);
    328336      }
     
    335343      for (Int_t i=0; i<npixels; i++)
    336344        {
    337           (*fLoGainArray)[i] = new MHCalibrationChargeLoGainPix("ChargeLoGainPix");
    338           MHCalibrationPix &lopix = (*this)(i);
     345          (*fLoGainArray)[i] = new MHCalibrationChargePix("ChargeLoGainPix","Signals of the LoGain");
     346          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)(i);
     347
     348          pix.SetAbsTimeNbins(logainsamples);
     349          pix.SetAbsTimeFirst(-0.5);
     350          pix.SetAbsTimeLast(logainsamples-0.5);
     351         
     352          pix.SetNbins((Int_t)(fgChargeLoGainLast-fgChargeLoGainFirst));
     353          pix.SetFirst(fgChargeLoGainFirst);
     354          pix.SetLast(fgChargeLoGainLast);
     355         
     356          pix.GetHGausHist()->SetName ("HCalibrationChargeLoGainPix");
     357          pix.GetHGausHist()->SetTitle("Summed Lo Gain FADC slices Pixel "); 
     358       
     359          pix.GetHAbsTime()->SetName ("HAbsTimeLoGainPix");
     360          pix.GetHAbsTime()->SetTitle("Absolute Arrival Times Lo Gain Pixel "); 
     361
    339362          //
    340363          // Adapt the range for the case, the intense blue is used:
     
    346369              if ( fColor == MCalibrationCam::kBLUE)
    347370                {
    348                   lopix.SetLast(999.5);
    349                   lopix.SetNbins(1150);
     371                  pix.SetLast(999.5);
     372                  pix.SetNbins((Int_t)(999.5-fgChargeLoGainFirst));
    350373                }
    351374            }
    352           ((MHCalibrationChargePix&)(*this)(i)).SetAbsTimeNbins(logainsamples);
    353           ((MHCalibrationChargePix&)(*this)(i)).SetAbsTimeLast(logainsamples-0.5);
    354           InitHists(lopix,(*fBadPixels)[i],i);
     375          InitHists(pix,(*fBadPixels)[i],i);
    355376      }
    356377  }
     
    362383    for (Int_t j=0; j<nareas; j++)
    363384      {
    364         (*fAverageHiGainAreas)[j] =
    365           new MHCalibrationChargeHiGainPix("ChargeAverageHiGainArea",
    366                                            "Average HiGain FADC sums area idx ");
    367 
    368         MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageHiGainArea(j);
    369 
    370         hist.SetNbins(fAverageNbins);
    371         hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Area Idx ");
     385        (*fAverageHiGainAreas)[j] = new MHCalibrationChargePix("ChargeAverageHiGainArea",
     386                                                               "Average HiGain FADC sums area idx ");
     387
     388        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainArea(j);
     389
     390        pix.SetAbsTimeNbins(higainsamples);
     391        pix.SetAbsTimeFirst(-0.5);
     392        pix.SetAbsTimeLast(higainsamples-0.5);
     393
     394        pix.SetNbins((Int_t)(fgChargeHiGainLast-fgChargeHiGainFirst)*3);
     395        pix.SetFirst(fgChargeHiGainFirst);
     396        pix.SetLast(fgChargeHiGainLast);
     397
     398        pix.GetHGausHist()->SetName ("HCalibrationChargeHiGainAreaIdx");
     399        pix.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
     400       
     401        pix.GetHAbsTime()->SetName ("HAbsTimeHiGainAreaIdx");
     402        pix.GetHAbsTime()->SetTitle("Absolute Arrival Times average Hi Gain Area Idx "); 
    372403
    373404        if (fGeom->InheritsFrom("MGeomCamMagic"))
    374405          {
    375             hist.GetHGausHist()->SetTitle(Form("%s%s%s","Signal averaged on event-by-event basis ",
     406            pix.GetHGausHist()->SetTitle(Form("%s%s%s","Signal averaged on event-by-event basis ",
    376407                                               j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
    377             hist.InitBins();
    378             hist.SetEventFrequency(fPulserFrequency);
     408            pix.InitBins();
     409            pix.SetEventFrequency(fPulserFrequency);
    379410          }
    380411        else
    381412          {
    382             hist.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
    383             InitHists(hist,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     413            InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
    384414          }
    385415      }
     
    393423      for (Int_t j=0; j<nareas; j++)
    394424        {
    395           (*fAverageLoGainAreas)[j] =
    396             new MHCalibrationChargeLoGainPix("ChargeAverageLoGainArea",
    397                                              "Average LoGain FADC sums of pixel area idx ");
    398 
    399         MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageLoGainArea(j);
    400         hist.SetNbins(fgAverageNbinsLoGain);
     425          (*fAverageLoGainAreas)[j] = new MHCalibrationChargePix("ChargeAverageLoGainArea",
     426                                                                 "Average LoGain FADC sums area idx ");
     427
     428        MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainArea(j);
     429
     430        pix.SetAbsTimeNbins(logainsamples);
     431        pix.SetAbsTimeFirst(-0.5);
     432        pix.SetAbsTimeLast(logainsamples-0.5);
     433
     434        pix.SetNbins((Int_t)(fgChargeLoGainLast-fgChargeLoGainFirst)*3);
     435        pix.SetFirst(fgChargeLoGainFirst);
     436        pix.SetLast(fgChargeLoGainLast);
     437
     438        pix.GetHGausHist()->SetName ("HChargeLoGainAreaIdx");
     439        pix.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis Low Gain Area Idx ");
     440       
     441        pix.GetHAbsTime()->SetName ("HAbsTimeLoGainAreaIdx");
     442        pix.GetHAbsTime()->SetTitle("Absolute Arrival Times average Lo Gain Area Idx "); 
    401443
    402444        //
     
    409451              if ( fColor == MCalibrationCam::kBLUE)
    410452                {
    411                   hist.SetFirst(-10.5);
    412                   hist.SetLast(999.5);
    413                   hist.SetNbins(3030);
     453                  pix.SetFirst(-10.5);
     454                  pix.SetLast(999.5);
     455                  pix.SetNbins(3030);
    414456                }
    415457            }
    416458
    417         hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Area Idx ");
    418 
    419459        if (fGeom->InheritsFrom("MGeomCamMagic"))
    420460          {
    421             hist.GetHGausHist()->SetTitle(Form("%s%s%s","Signal averaged on event-by-event basis ",
     461            pix.GetHGausHist()->SetTitle(Form("%s%s%s","Signal averaged on event-by-event basis ",
    422462                                               j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
    423             hist.InitBins();
    424             hist.SetEventFrequency(fPulserFrequency);
     463            pix.InitBins();
     464            pix.SetEventFrequency(fPulserFrequency);
    425465          }
    426466        else
    427467          {
    428             hist.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis Low Gain Area Idx ");
    429             InitHists(hist,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
     468            InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
    430469          }
    431470        }
     
    438477      for (Int_t j=0; j<nsectors; j++)
    439478      {
    440           (*fAverageHiGainSectors)[j] =
    441             new MHCalibrationChargeHiGainPix("ChargeAverageHiGainSector",
    442                                              "Averaged HiGain Signals Sector ");
    443 
    444           MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageHiGainSector(j);
    445 
    446           hist.GetHGausHist()->SetTitle("Signals averaged on event-by-event basis HiGain Sector ");
    447           hist.SetNbins(fAverageNbins);
    448           hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Sector ");
    449 
    450           InitHists(hist,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     479          (*fAverageHiGainSectors)[j] = new MHCalibrationChargePix("ChargeAverageHiGainSector",
     480                                                                   "Averaged HiGain Signals Sector ");
     481
     482          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageHiGainSector(j);
     483
     484          pix.SetAbsTimeNbins(higainsamples);
     485          pix.SetAbsTimeFirst(-0.5);
     486          pix.SetAbsTimeLast(higainsamples-0.5);
     487         
     488          pix.SetNbins((Int_t)(fgChargeHiGainLast-fgChargeHiGainFirst)*3);
     489          pix.SetFirst(fgChargeHiGainFirst);
     490          pix.SetLast(fgChargeHiGainLast);
     491
     492          pix.GetHGausHist()->SetName ("HCalibrationChargeHiGainPix");
     493          pix.GetHGausHist()->SetTitle("Signals averaged on event-by-event basis HiGain Sector "); 
     494       
     495          pix.GetHAbsTime()->SetName ("HAbsTimeHiGainPix");
     496          pix.GetHAbsTime()->SetTitle("Absolute Arrival Time average HiGain Sector "); 
     497
     498          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
    451499      }
    452500  }
     
    458506      for (Int_t j=0; j<nsectors; j++)
    459507      {
    460           (*fAverageLoGainSectors)[j] =
    461             new MHCalibrationChargeLoGainPix("ChargeAverageLoGainSector",
    462                                              "Average LoGain Signals Sector ");
    463 
    464           MHCalibrationChargePix &hist = (MHCalibrationChargePix&)GetAverageLoGainSector(j);
    465 
    466           hist.GetHGausHist()->SetTitle("Signals averaged on event-by-event basis LoGain Sector ");
    467           hist.SetNbins(fgAverageNbinsLoGain);
     508          (*fAverageLoGainSectors)[j] = new MHCalibrationChargePix("ChargeAverageLoGainSector",
     509                                                                   "Average LoGain Signals Sector ");
     510
     511          MHCalibrationChargePix &pix = (MHCalibrationChargePix&)GetAverageLoGainSector(j);
     512
     513          pix.SetAbsTimeNbins(logainsamples);
     514          pix.SetAbsTimeFirst(-0.5);
     515          pix.SetAbsTimeLast(logainsamples-0.5);
    468516         
     517          pix.SetNbins((Int_t)(fgChargeLoGainLast-fgChargeLoGainFirst)*3);
     518          pix.SetFirst(fgChargeLoGainFirst);
     519          pix.SetLast(fgChargeLoGainLast);
     520
     521          pix.GetHGausHist()->SetName ("HCalibrationChargeLoGainPix");
     522          pix.GetHGausHist()->SetTitle("Signals averaged on event-by-event basis LoGain Sector "); 
     523       
     524          pix.GetHAbsTime()->SetName ("HAbsTimeLoGainPix");
     525          pix.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Sector "); 
     526
    469527          //
    470528          // Adapt the range for the case, the intense blue is used:
     
    476534              if ( fColor == MCalibrationCam::kBLUE)
    477535                {
    478                   hist.SetFirst(-10.5);
    479                   hist.SetLast(999.5);
    480                   hist.SetNbins(3030);
     536                  pix.SetFirst(-10.5);
     537                  pix.SetLast(999.5);
     538                  pix.SetNbins(3030);
    481539                }
    482540            }
    483541         
    484           hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Sector ");
    485 
    486           InitHists(hist,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     542          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
    487543      }
    488544  }
     
    11081164  cam->fColor                  = fColor;
    11091165  cam->fPulserFrequency        = fPulserFrequency;
    1110   cam->fAverageNbins           = fAverageNbins;
    11111166
    11121167  return cam;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r4882 r4914  
    2424private:
    2525
    26   static const Int_t   fgAverageNbinsHiGain;         //! The default for fAverageNbins HiGain (now set to: 3300)
    27   static const Int_t   fgAverageNbinsLoGain;         //! The default for fAverageNbins LoGain (now set to: 1950) 
    28 
     26  static const Axis_t  fgChargeHiGainFirst;          //! First Bin of HiGain Histograms (nw set to: -100.5)
     27  static const Axis_t  fgChargeHiGainLast;           //! Last Bin of HiGain Histograms (nw set to:   999.5)
     28  static const Axis_t  fgChargeLoGainFirst;          //! First Bin of LoGain Histograms (nw set to: -150.5)
     29  static const Axis_t  fgChargeLoGainLast;           //! Last Bin of LoGain Histograms (nw set to:   499.5)
     30 
    2931  static const Float_t fgNumHiGainSaturationLimit;   //! The default for fNumHiGainSaturationLimit (now at: 0.01)
    3032  static const Float_t fgNumLoGainSaturationLimit;   //! The default for fNumLoGainSaturationLimit (now at: 0.005)
  • trunk/MagicSoft/Mars/mcalib/Makefile

    r4900 r4914  
    6666           MHCalibrationPix.cc \
    6767           MHCalibrationChargeCam.cc \
    68            MHCalibrationChargeHiGainPix.cc \
    69            MHCalibrationChargeLoGainPix.cc \
    7068           MHCalibrationChargePINDiode.cc \
    7169           MHCalibrationRelTimeCam.cc \
Note: See TracChangeset for help on using the changeset viewer.