Changeset 7095 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 05/27/05 10:44:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r7005 r7095 173 173 SetOscillations(kTRUE); 174 174 SetSizeCheck (kTRUE); 175 SetIsReset (kTRUE); 175 176 176 177 SetLowerFitLimitHiGain(); … … 383 384 void MHCalibrationCam::ResetHists() 384 385 { 386 SetIsReset(); 385 387 386 388 ResetHistTitles(); … … 396 398 { fAverageHiGainSectors->ForEach(MHCalibrationPix,Reset)(); } 397 399 } 398 400 399 401 if (!IsLoGain()) 400 402 return; … … 428 430 MHCalibrationPix &pix = (*this)[i]; 429 431 h = pix.GetHGausHist(); 430 h->SetName (Form(" %s%s%s%04d","H",fHistName.Data(),"HiGainPix",i));431 h->SetTitle(Form("%s %s%04d%s",fHistTitle.Data()," High Gain Pixel ",i," Runs: "));432 h->SetName (Form("H%sHiGainPix%04d",fHistName.Data(),i)); 433 h->SetTitle(Form("%s High Gain Pixel %04d Runs: ",fHistTitle.Data(),i)); 432 434 h->SetXTitle(fHistXTitle.Data()); 433 435 h->SetYTitle(fHistYTitle.Data()); … … 441 443 MHCalibrationPix &pix = GetAverageHiGainArea(j); 442 444 h = pix.GetHGausHist(); 443 h->SetName (Form(" %s%s%s%d","H",fHistName.Data(),"HiGainArea",j));445 h->SetName (Form("H%sHiGainArea%d",fHistName.Data(),j)); 444 446 h->SetXTitle(fHistXTitle.Data()); 445 447 h->SetYTitle(fHistYTitle.Data()); 446 448 if (fGeom->InheritsFrom("MGeomCamMagic")) 447 h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis",448 j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs:"));449 h->SetTitle(Form("%s averaged on event-by-event basis %s High Gain Runs: ", 450 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels")); 449 451 else 450 h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),451 " averaged on event-by-event basis High Gain Area Idx ",j," Runs: "));452 h->SetTitle(Form("%s averaged on event-by-event basis High Gain Area Idx %d Runs: ", 453 fHistTitle.Data(), j)); 452 454 } 453 455 … … 457 459 MHCalibrationPix &pix = GetAverageHiGainSector(j); 458 460 h = pix.GetHGausHist(); 459 h->SetName (Form(" %s%s%s%02d","H",fHistName.Data(),"HiGainSector",j));460 h->SetTitle(Form("%s %s%02d%s",fHistTitle.Data(),461 " averaged on event-by-event basis High Gain Sector ",j," Runs: "));461 h->SetName (Form("H%sHiGainSector%02d",fHistName.Data(),j)); 462 h->SetTitle(Form("%s averaged on event-by-event basis High Gain Sector %02d Runs: ", 463 fHistTitle.Data(), j)); 462 464 h->SetXTitle(fHistXTitle.Data()); 463 465 h->SetYTitle(fHistYTitle.Data()); … … 473 475 MHCalibrationPix &pix = (*this)(i); 474 476 h = pix.GetHGausHist(); 475 h->SetName (Form(" %s%s%s%04d","H",fHistName.Data(),"LoGainPix",i));476 h->SetTitle(Form("%s %s%04d%s",fHistTitle.Data()," Low Gain Pixel ",i," Runs: "));477 h->SetName (Form("H%sLoGainPix%04d",fHistName.Data(),i)); 478 h->SetTitle(Form("%s Low Gain Pixel %04d Runs: ", fHistTitle.Data(),i)); 477 479 h->SetXTitle(fHistXTitle.Data()); 478 480 h->SetYTitle(fHistYTitle.Data()); … … 486 488 MHCalibrationPix &pix = GetAverageLoGainArea(j); 487 489 h = pix.GetHGausHist(); 488 h->SetName (Form(" %s%s%s%d","H",fHistName.Data(),"LoGainArea",j));490 h->SetName (Form("H%sLoGainArea%d", fHistName.Data(), j)); 489 491 h->SetXTitle(fHistXTitle.Data()); 490 492 h->SetYTitle(fHistYTitle.Data()); 491 493 if (fGeom->InheritsFrom("MGeomCamMagic")) 492 h->SetTitle(Form("%s%s%s%s",fHistTitle.Data()," averaged on event-by-event basis",493 j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs:"));494 h->SetTitle(Form("%s averaged on event-by-event basis %s Low Gain Runs: ", 495 fHistTitle.Data(), j==0 ? "Inner Pixels" : "Outer Pixels")); 494 496 else 495 h->SetTitle(Form("%s%s%d%s",fHistTitle.Data(),496 " averaged on event-by-event basis Low Gain Area Idx ",j," Runs: "));497 h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Area Idx %d Runs: ", 498 fHistTitle.Data(), j)); 497 499 } 498 500 … … 502 504 MHCalibrationPix &pix = GetAverageLoGainSector(j); 503 505 h = pix.GetHGausHist(); 504 h->SetName (Form(" %s%s%s%02d","H",fHistName.Data(),"LoGainSector",j));505 h->SetTitle(Form("%s %s%02d%s",fHistTitle.Data(),506 " averaged on event-by-event basis Low Gain Sector ",j," Runs: "));506 h->SetName (Form("H%sLoGainSector%02d",fHistName.Data(),j)); 507 h->SetTitle(Form("%s averaged on event-by-event basis Low Gain Sector %02d Runs: ", 508 fHistTitle.Data(), j)); 507 509 h->SetXTitle(fHistXTitle.Data()); 508 510 h->SetYTitle(fHistYTitle.Data()); … … 872 874 Bool_t MHCalibrationCam::Fill(const MParContainer *par, const Stat_t w) 873 875 { 876 SetIsReset(kFALSE); 874 877 875 878 if (!IsSizeCheck()) … … 942 945 Bool_t MHCalibrationCam::Finalize() 943 946 { 947 if (IsReset()) 948 return kTRUE; 944 949 945 950 if (GetNumExecutions() < 2) -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r7005 r7095 108 108 Int_t fPulserFrequency; // Light pulser frequency 109 109 110 enum { kDebug, kLoGain, kAverageing, 111 kOscillations, kSizeCheck }; // Possible global flags 110 enum { 111 kDebug, 112 kLoGain, 113 kAverageing, 114 kOscillations, 115 kSizeCheck, 116 kIsReset 117 }; // Possible global flags 112 118 113 119 Byte_t fFlags; // Bit-field to hold the global flags … … 159 165 Bool_t IsOscillations() const { return TESTBIT(fFlags,kOscillations); } 160 166 Bool_t IsSizeCheck () const { return TESTBIT(fFlags,kSizeCheck); } 167 Bool_t IsReset () const { return TESTBIT(fFlags,kIsReset); } 168 169 void ToggleFlag(Bool_t b, Byte_t flag) { b ? SETBIT(fFlags, flag) : CLRBIT(fFlags,flag); } 161 170 162 171 void Remove ( TOrdCollection *col ); … … 203 212 const MHCalibrationPix &operator() (UInt_t i) const; 204 213 205 void SetColor ( const MCalibrationCam::PulserColor_t color) { fColor = color; } 206 void SetAverageing ( const Bool_t b=kTRUE ) { b 207 ? SETBIT(fFlags,kAverageing) 208 : CLRBIT(fFlags,kAverageing); } 209 void SetDebug ( const Bool_t b=kTRUE ) { b 210 ? SETBIT(fFlags,kDebug) 211 : CLRBIT(fFlags,kDebug); } 212 void SetLoGain ( const Bool_t b=kTRUE ) { b 213 ? SETBIT(fFlags,kLoGain) 214 : CLRBIT(fFlags,kLoGain); } 215 void SetOscillations ( const Bool_t b=kTRUE ) { b 216 ? SETBIT(fFlags,kOscillations) 217 : CLRBIT(fFlags,kOscillations); } 218 void SetSizeCheck ( const Bool_t b=kTRUE ) { b 219 ? SETBIT(fFlags,kSizeCheck) 220 : CLRBIT(fFlags,kSizeCheck); } 214 void SetColor(const MCalibrationCam::PulserColor_t color) { fColor = color; } 215 216 void SetAverageing(const Bool_t b=kTRUE) { ToggleFlag(b,kAverageing); } 217 void SetDebug(const Bool_t b=kTRUE) { ToggleFlag(b,kDebug); } 218 void SetLoGain(const Bool_t b=kTRUE) { ToggleFlag(b,kLoGain); } 219 void SetOscillations(const Bool_t b=kTRUE) { ToggleFlag(b,kOscillations); } 220 void SetSizeCheck(const Bool_t b=kTRUE) { ToggleFlag(b,kSizeCheck); } 221 void SetIsReset(const Bool_t b=kTRUE) { ToggleFlag(b,kIsReset); } 222 221 223 void SetHistName ( const char *name ) { fHistName = name; } 222 224 void SetHistTitle ( const char *name ) { fHistTitle = name; } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
r7028 r7095 1 1 2 /* ======================================================================== *\ 2 3 ! … … 371 372 { 372 373 MHCalibrationPix &histhi = GetAverageHiGainArea(j); 373 histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 374 if (IsOscillations()) 375 histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 376 else 377 histhi.FillHist(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 374 378 375 379 if (IsLoGain()) 376 380 { 377 381 MHCalibrationPix &histlo = GetAverageLoGainArea(j); 378 histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]); 382 if (IsOscillations()) 383 histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]); 384 else 385 histlo.FillHist(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]); 379 386 } 380 387 } … … 383 390 { 384 391 MHCalibrationPix &hist = GetAverageHiGainSector(j); 385 hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 392 if (IsOscillations()) 393 hist.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 394 else 395 hist.FillHist(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 386 396 387 397 if (IsLoGain()) 388 398 { 389 399 MHCalibrationPix &histlo = GetAverageLoGainSector(j); 390 histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]); 400 if (IsOscillations()) 401 histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]); 402 else 403 histlo.FillHist(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]); 391 404 } 392 405 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.h
r6772 r7095 18 18 class MGeomCam; 19 19 class MArrivalTimeCam; 20 20 21 class MHCalibrationHiLoCam : public MHCalibrationCam 21 22 { 22 23 23 private: 24 25 24 static const Int_t fgNbins; //! Default number of bins (now set to: 900 ) 26 25 static const Axis_t fgFirst; //! Default lower histogram limit (now set to: -13.5 ) … … 52 51 53 52 public: 54 55 53 MHCalibrationHiLoCam(const char *name=NULL, const char *title=NULL); 56 ~MHCalibrationHiLoCam() {}57 54 58 55 // Clone
Note:
See TracChangeset
for help on using the changeset viewer.