Changeset 4939


Ignore:
Timestamp:
09/10/04 20:47:26 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhcalib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/HCalibLinkDef.h

    r4938 r4939  
    1414#pragma link C++ class MHCalibrationRelTimeCam+;
    1515#pragma link C++ class MHCalibrationTestCam+;
    16 #pragma link C++ class MHCalibrationTestPix+;
    1716#pragma link C++ class MHCalibrationTestTimeCam+;
    1817#pragma link C++ class MHCalibrationTestTimePix+;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc

    r4938 r4939  
    168168// - MHCalibrationCam::fAverageHiGainSectors
    169169//
    170 // Sets number of bins to MHCalibrationCam::fAverageNbins for:
    171 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas
    172 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors
    173 //
    174170Bool_t MHCalibrationRelTimeCam::ReInitHists(MParList *pList)
    175171{
     
    217213          pix.SetLast (fRelTimeLast);
    218214
    219           pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
    220           pix.GetHGausHist()->SetTitle("Rel. Times High Gain Pixel "); 
     215          TH1F *h =  pix.GetHGausHist();
     216         
     217          h->SetName ("HRelTimeHiGainPix");
     218          h->SetTitle("Rel. Times High Gain Pixel "); 
     219          h->SetXTitle("Rel. Arr. Time [FADC slices]");
     220          h->SetYTitle("Nr. of events");
    221221
    222222          InitHists(pix,(*fBadPixels)[i],i);
     
    237237          pix.SetLast (fRelTimeLast);
    238238
    239           pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
    240           pix.GetHGausHist()->SetTitle("Rel. Times Low Gain Pixel "); 
     239          TH1F *h =  pix.GetHGausHist();
     240         
     241          h->SetName ("HRelTimeLoGainPix");
     242          h->SetTitle("Rel. Times Low Gain Pixel "); 
     243          h->SetXTitle("Rel. Arr. Time [FADC slices]");
     244          h->SetYTitle("Nr. of events");
    241245
    242246          InitHists((*this)(i),(*fBadPixels)[i],i);
     
    261265        pix.SetLast (fRelTimeLast);
    262266       
    263         pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
    264         pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Area Idx "); 
     267        TH1F *h =  pix.GetHGausHist();
     268
     269        h->SetName ("HRelTimeHiGainArea");
     270        h->SetXTitle("Rel. Arr. Time [FADC slices]");
     271        h->SetYTitle("Nr. of events");
    265272
    266273        if (fGeom->InheritsFrom("MGeomCamMagic"))
    267274          {
    268             pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
    269                                                j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
     275            h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
     276                             j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: "));
    270277            pix.InitBins();
    271278            pix.SetEventFrequency(fPulserFrequency);
     
    273280        else
    274281          {
    275             pix.GetHGausHist()->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
     282            h->SetTitle("Signal averaged on event-by-event basis High Gain Area Idx ");
    276283            InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
    277284          }
     
    295302        pix.SetLast (fRelTimeLast);
    296303       
    297         pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
    298         pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Area Idx "); 
     304        TH1F *h =  pix.GetHGausHist();
     305
     306        h->SetName ("HRelTimeLoGainArea");
     307        h->SetXTitle("Rel. Arr. Time [FADC slices]");
     308        h->SetYTitle("Nr. of events");
    299309
    300310        if (fGeom->InheritsFrom("MGeomCamMagic"))
    301311          {
    302             pix.GetHGausHist()->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
    303                                                j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
     312            h->SetTitle(Form("%s%s%s","Rel. Times averaged on event-by-event basis ",
     313                             j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: "));
    304314            pix.InitBins();
    305315            pix.SetEventFrequency(fPulserFrequency);
     
    307317        else
    308318          {
    309             pix.GetHGausHist()->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx ");
     319            h->SetTitle("Rel. Times averaged on event-by-event basis Low Gain Area Idx ");
    310320            InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadArea(j) : fCam->GetAverageBadArea(j),j);
    311321          }
     
    329339          pix.SetLast (fRelTimeLast);
    330340         
    331           pix.GetHGausHist()->SetName ("HRelTimeHiGainPix");
    332           pix.GetHGausHist()->SetTitle("Rel. Times average High Gain Sector "); 
     341          TH1F *h =  pix.GetHGausHist();
     342
     343          h->SetName ("HRelTimeHiGainSector");
     344          h->SetTitle("Rel. Times average High Gain Sector "); 
     345          h->SetXTitle("Rel. Arr. Time [FADC slices]");
     346          h->SetYTitle("Nr. of events");
    333347
    334348          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
     
    352366          pix.SetLast (fRelTimeLast);
    353367         
    354           pix.GetHGausHist()->SetName ("HRelTimeLoGainPix");
    355           pix.GetHGausHist()->SetTitle("Rel. Times average Low Gain Sector "); 
     368          TH1F *h =  pix.GetHGausHist();
     369         
     370          h->SetName ("HRelTimeLoGainSector");
     371          h->SetTitle("Rel. Times average Low Gain Sector "); 
     372          h->SetXTitle("Rel. Arr. Time [FADC slices]");
     373          h->SetYTitle("Nr. of events");
    356374
    357375          InitHists(pix,fIntensCam ? fIntensCam->GetAverageBadSector(j) : fCam->GetAverageBadSector(j),j);
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc

    r4929 r4939  
    2727//                                                                       
    2828// Fills the calibrated signal from an MCerPhotEvt into
    29 // MHCalibrationTestPix for every:
     29// MHCalibrationPix for every:
    3030//
    3131// - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 
     
    8383/////////////////////////////////////////////////////////////////////////////
    8484#include "MHCalibrationTestCam.h"
    85 #include "MHCalibrationTestPix.h"
    8685
    8786#include "MHCalibrationPix.h"
     
    109108
    110109using namespace std;
     110
     111const Int_t   MHCalibrationTestCam::fgTestNbins    = 900;
     112const Axis_t  MHCalibrationTestCam::fgTestFirst    = -5.;
     113const Axis_t  MHCalibrationTestCam::fgTestLast     =  5.;
    111114// --------------------------------------------------------------------------
    112115//
    113116// Default Constructor.
     117//
     118// Sets:
     119// - fTestNbins to fgTestNbins
     120// - fTestFirst to fgTestFirst
     121// - fTestLast  to fgTestLast
    114122//
    115123MHCalibrationTestCam::MHCalibrationTestCam(const char *name, const char *title)
     
    119127  fTitle = title ? title : "Histogram class for testing the calibration";
    120128 
    121   SetAverageNbins(5000);
    122 
     129  SetTestNbins();
     130  SetTestFirst();
     131  SetTestLast ();
    123132}
    124133
     
    146155// - MHCalibrationCam::fAverageHiGainSectors
    147156//
    148 // Sets number of bins to MHCalibrationCam::fAverageNbins for:
    149 // - MHCalibrationCam::fAverageHiGainAreas
    150 // - MHCalibrationCam::fAverageHiGainSectors
    151 //
    152157Bool_t MHCalibrationTestCam::ReInitHists(MParList *pList)
    153158{
     
    170175      for (Int_t i=0; i<npixels; i++)
    171176      {
    172           (*fHiGainArray)[i] = new MHCalibrationTestPix("Calibrated Events",
     177          (*fHiGainArray)[i] = new MHCalibrationPix("Calibrated Events",
    173178                                                "Test Calibration Pixel");
     179
     180          MHCalibrationPix &pix = (*this)[i];         
     181
     182          pix.SetNbins(fTestNbins);
     183          pix.SetFirst(fTestFirst);
     184          pix.SetLast (fTestLast);
     185
     186          TH1F *h =  pix.GetHGausHist();
     187       
     188          h->SetName ("HTestHiGainPix");
     189          h->SetTitle("Distribution of calibrated Photons Pixel "); 
     190          h->SetXTitle("Nr. Photons");
     191          h->SetYTitle("Nr. of events");
     192
    174193          InitHists((*this)[i],(*fBadPixels)[i],i);
    175194      }
     
    184203      {
    185204        (*fAverageHiGainAreas)[j] =
    186           new MHCalibrationTestPix("MHCalibrationTestAverageArea",
     205          new MHCalibrationPix("MHCalibrationTestAverageArea",
    187206                           "Average Test Calibrations Area Idx ");
    188207
    189         GetAverageHiGainArea(j).GetHGausHist()->SetTitle("Test Calibrations Area Idx ");
    190         GetAverageHiGainArea(j).SetNbins(fAverageNbins);
    191         GetAverageHiGainArea(j).InitBins();
    192         GetAverageHiGainArea(j).ChangeHistId(j);
    193         GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency);
    194 
    195         TH1F *h =  GetAverageHiGainArea(j).GetHGausHist();
     208        MHCalibrationPix &pix = GetAverageHiGainArea(j);
     209
     210        pix.SetNbins(fTestNbins*3);
     211        pix.SetFirst(fTestFirst);
     212        pix.SetLast (fTestLast);
     213       
     214        TH1F *h =  pix.GetHGausHist();
     215
     216        h->SetName ("HTestPix");
     217        h->SetTitle("Test Calibrations Area Idx ");
     218        h->SetXTitle("Nr. Photons");
     219        h->SetYTitle("Nr. of events");
     220
     221        pix.InitBins();
     222        pix.ChangeHistId(j);
     223        pix.SetEventFrequency(fPulserFrequency);
     224
    196225        h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    197226      }
     
    206235      {
    207236          (*fAverageHiGainSectors)[j] =
    208             new MHCalibrationTestPix("MHCalibrationTestAverageSector",
    209                              "Average Test Calibrations Sector ");
    210 
    211           GetAverageHiGainSector(j).GetHGausHist()->SetTitle("Test Calibrations Sector ");
    212           GetAverageHiGainSector(j).SetNbins(fAverageNbins);
    213           GetAverageHiGainSector(j).InitBins();
    214           GetAverageHiGainSector(j).ChangeHistId(j);
    215           GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency);
    216 
    217           TH1F *h =  GetAverageHiGainSector(j).GetHGausHist();
    218           h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    219 
     237            new MHCalibrationPix("MHCalibrationTestAverageSector",
     238                                 "Average Test Calibrations Sector ");
     239
     240        MHCalibrationPix &pix = GetAverageHiGainSector(j);
     241
     242        pix.SetNbins(fTestNbins*3);
     243        pix.SetFirst(fTestFirst);
     244        pix.SetLast (fTestLast);
     245       
     246        TH1F *h =  pix.GetHGausHist();
     247
     248        h->SetName ("HTestPix");
     249        h->SetTitle("Test Calibrations Sector ");
     250        h->SetXTitle("Nr. Photons");
     251        h->SetYTitle("Nr. of events");
     252
     253        pix.InitBins();
     254        pix.ChangeHistId(j);
     255        pix.SetEventFrequency(fPulserFrequency);
     256
     257        h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    220258      }
    221259  }
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.h

    r4929 r4939  
    1818private:
    1919
     20  static const Int_t   fgTestNbins;        // Default for fNBins  (now set to: 2000  )
     21  static const Axis_t  fgTestFirst;        // Default for fFirst  (now set to: -0.5  )
     22  static const Axis_t  fgTestLast;         // Default for fLast   (now set to: 1999.5)
     23
     24  Int_t   fTestNbins;            // Number of bins        (now set to: 2000   )
     25  Axis_t  fTestFirst;            // Lower histogram limit (now set to: -0.5   )
     26  Axis_t  fTestLast;             // Upper histogram limit (now set to:  1999.5)
     27 
    2028  TArrayF fMeanMeanPhotPerArea;
    2129  TArrayF fRmsMeanPhotPerArea   ;
     
    4250  void CalcAverageSigma();
    4351 
     52  void  SetTestNbins  ( const Int_t  i=fgTestNbins  ) { fTestNbins   = i; }
     53  void  SetTestFirst  ( const Axis_t f=fgTestFirst  ) { fTestFirst   = f; }
     54  void  SetTestLast   ( const Axis_t f=fgTestLast   ) { fTestLast    = f; } 
     55
    4456  ClassDef(MHCalibrationTestCam, 1)     // Histogram class for Relative Time Camera Calibration
    4557};
  • trunk/MagicSoft/Mars/mhcalib/Makefile

    r4938 r4939  
    4141           MHCalibrationRelTimeCam.cc \
    4242           MHCalibrationTestCam.cc \
    43            MHCalibrationTestPix.cc  \
    4443           MHCalibrationTestTimeCam.cc \
    4544           MHCalibrationTestTimePix.cc \
Note: See TracChangeset for help on using the changeset viewer.