Changeset 4940 for trunk/MagicSoft


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

Legend:

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

    r4939 r4940  
    1515#pragma link C++ class MHCalibrationTestCam+;
    1616#pragma link C++ class MHCalibrationTestTimeCam+;
    17 #pragma link C++ class MHCalibrationTestTimePix+;
    1817
    1918#pragma link C++ class MHGausEvents++;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestTimeCam.cc

    r4929 r4940  
    106106
    107107using namespace std;
     108
     109const Int_t   MHCalibrationTestTimeCam::fgTestNbins     = 600;
     110const Axis_t  MHCalibrationTestTimeCam::fgTestFirst     = -0.5;
     111const Axis_t  MHCalibrationTestTimeCam::fgTestLast      = 29.5;
    108112// --------------------------------------------------------------------------
    109113//
    110114// Default Constructor.
     115//
     116// Sets:
     117// - fTestNbins to fgTestNbins
     118// - fTestFirst to fgTestFirst
     119// - fTestLast  to fgTestLast
    111120//
    112121MHCalibrationTestTimeCam::MHCalibrationTestTimeCam(const char *name, const char *title)
     
    116125  fTitle = title ? title : "Histogram class for testing the calibration of arrival times";
    117126
    118   SetAverageNbins(5000);
     127  SetTestNbins();
     128  SetTestFirst();
     129  SetTestLast ();
     130
    119131}
    120132
     
    164176      for (Int_t i=0; i<npixels; i++)
    165177      {
    166           (*fHiGainArray)[i] = new MHCalibrationTestTimePix("Calibrated Events Time",
     178          (*fHiGainArray)[i] = new MHCalibrationPix("TestTimePix",
    167179                                                "TestTime Calibration Pixel");
     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("Calibrated Rel. Arrival Times Pixel "); 
     190          h->SetXTitle("Arrival Time [FADC slices]");
     191          h->SetYTitle("Nr. of events");
     192
    168193          InitHists((*this)[i],(*fBadPixels)[i],i);
    169194      }
     
    177202      {
    178203        (*fAverageHiGainAreas)[j] =
    179           new MHCalibrationTestTimePix("MHCalibrationTestTimeAverageArea",
     204          new MHCalibrationPix("TestTimeArea",
    180205                           "Average TestTime Calibrations Area Idx ");
    181206
    182         GetAverageHiGainArea(j).GetHGausHist()->SetTitle("TestTime Calibrations Area Idx ");
    183         GetAverageHiGainArea(j).SetNbins(fAverageNbins);
    184         GetAverageHiGainArea(j).InitBins();
    185         GetAverageHiGainArea(j).ChangeHistId(j);
    186         GetAverageHiGainArea(j).SetEventFrequency(fPulserFrequency);
    187 
    188         TH1F *h =  GetAverageHiGainArea(j).GetHGausHist();
     207        MHCalibrationPix &pix = GetAverageHiGainArea(j);
     208
     209        pix.SetNbins(fTestNbins*3);
     210        pix.SetFirst(fTestFirst);
     211        pix.SetLast (fTestLast);
     212       
     213        TH1F *h =  pix.GetHGausHist();
     214
     215        h->SetName ("HTestTimeArea");
     216        h->SetTitle("Calibrated Rel. Arrival Times Area Idx ");
     217        h->SetXTitle("Arrival Time [FADC slices]");
     218        h->SetYTitle("Nr. of events");
     219
     220        pix.InitBins();
     221        pix.ChangeHistId(j);
     222        pix.SetEventFrequency(fPulserFrequency);
     223
    189224        h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    190 
    191 
    192225      }
    193226  }
     
    201234      {
    202235          (*fAverageHiGainSectors)[j] =
    203             new MHCalibrationTestTimePix("MHCalibrationTestTimeAverageSector",
     236            new MHCalibrationPix("TestTimeSector",
    204237                             "Average TestTime Calibrations Sector ");
    205238
    206           GetAverageHiGainSector(j).GetHGausHist()->SetTitle("TestTime Calibrations Sector ");
    207           GetAverageHiGainSector(j).SetNbins(fAverageNbins);
    208           GetAverageHiGainSector(j).InitBins();
    209           GetAverageHiGainSector(j).ChangeHistId(j);
    210           GetAverageHiGainSector(j).SetEventFrequency(fPulserFrequency);
    211           TH1F *h =  GetAverageHiGainSector(j).GetHGausHist();
    212           h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    213 
    214 
     239        MHCalibrationPix &pix = GetAverageHiGainSector(j);
     240
     241        pix.SetNbins(fTestNbins*3);
     242        pix.SetFirst(fTestFirst);
     243        pix.SetLast (fTestLast);
     244       
     245        TH1F *h =  pix.GetHGausHist();
     246
     247        h->SetName ("HTestTimeSector");
     248        h->SetTitle("Calibrated Rel. Arr. Times Sector ");
     249        h->SetXTitle("Arrival Time [FADC slices]");
     250        h->SetYTitle("Nr. of events");
     251
     252        pix.InitBins();
     253        pix.ChangeHistId(j);
     254        pix.SetEventFrequency(fPulserFrequency);
     255
     256        h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
    215257      }
    216258  }
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestTimeCam.h

    r4929 r4940  
    1111private:
    1212
     13  static const Int_t   fgTestNbins;        // Default for fTestNBins  (now set to: 600  )
     14  static const Axis_t  fgTestFirst;        // Default for fTestFirst  (now set to: -0.5  )
     15  static const Axis_t  fgTestLast;         // Default for fTestLast   (now set to: 29.5)
     16
     17  Int_t   fTestNbins;            // Number of bins       
     18  Axis_t  fTestFirst;            // Lower histogram limit
     19  Axis_t  fTestLast;             // Upper histogram limit
     20 
    1321  Bool_t ReInitHists(MParList *pList);
    1422  Bool_t FillHists(const MParContainer *par, const Stat_t w=1);
     
    2634  void CalcAverageSigma();
    2735 
     36  void  SetTestNbins  ( const Int_t  i=fgTestNbins  ) { fTestNbins   = i; }
     37  void  SetTestFirst  ( const Axis_t f=fgTestFirst  ) { fTestFirst   = f; }
     38  void  SetTestLast   ( const Axis_t f=fgTestLast   ) { fTestLast    = f; } 
     39
    2840  ClassDef(MHCalibrationTestTimeCam, 0) // Histogram class for Relative Time Camera Calibration
    2941};
  • trunk/MagicSoft/Mars/mhcalib/Makefile

    r4939 r4940  
    4242           MHCalibrationTestCam.cc \
    4343           MHCalibrationTestTimeCam.cc \
    44            MHCalibrationTestTimePix.cc \
    4544           MHGausEvents.cc
    4645
Note: See TracChangeset for help on using the changeset viewer.