Changeset 4813
- Timestamp:
- 08/30/04 16:51:41 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4793 r4813 469 469 } 470 470 471 fSumhiarea .Set(nareas); 472 fSumloarea .Set(nareas); 473 fTimehiarea .Set(nareas); 474 fTimeloarea .Set(nareas); 475 fSumhisector.Set(nsectors); 476 fSumlosector.Set(nsectors); 477 fTimehisector.Set(nsectors); 478 fTimelosector.Set(nsectors); 479 480 fSathiarea .Set(nareas); 481 fSatloarea .Set(nareas); 482 fSathisector.Set(nsectors); 483 fSatlosector.Set(nsectors); 484 471 485 return kTRUE; 472 486 } … … 512 526 const UInt_t lofirst = signal->GetFirstUsedSliceLoGain(); 513 527 514 Float_t sumhiarea [nareas], sumloarea [nareas], timehiarea [nareas], timeloarea [nareas]; 515 Float_t sumhisector[nsectors], sumlosector[nsectors], timehisector[nsectors], timelosector[nsectors]; 516 Int_t sathiarea [nareas], satloarea [nareas]; 517 Int_t sathisector[nsectors], satlosector[nsectors]; 518 519 memset(sumhiarea, 0, nareas * sizeof(Float_t)); 520 memset(sumloarea, 0, nareas * sizeof(Float_t)); 521 memset(timehiarea, 0, nareas * sizeof(Float_t)); 522 memset(timeloarea, 0, nareas * sizeof(Float_t)); 523 memset(sathiarea, 0, nareas * sizeof(Int_t )); 524 memset(satloarea, 0, nareas * sizeof(Int_t )); 525 memset(sumhisector, 0, nsectors*sizeof(Float_t)); 526 memset(sumlosector, 0, nsectors*sizeof(Float_t)); 527 memset(timehisector,0, nsectors*sizeof(Float_t)); 528 memset(timelosector,0, nsectors*sizeof(Float_t)); 529 memset(sathisector, 0, nsectors*sizeof(Int_t )); 530 memset(satlosector, 0, nsectors*sizeof(Int_t )); 528 fSumhiarea .Reset(); 529 fSumloarea .Reset(); 530 fTimehiarea .Reset(); 531 fTimeloarea .Reset(); 532 fSumhisector.Reset(); 533 fSumlosector.Reset(); 534 fTimehisector.Reset(); 535 fTimelosector.Reset(); 536 537 fSathiarea .Reset(); 538 fSatloarea .Reset(); 539 fSathisector.Reset(); 540 fSatlosector.Reset(); 531 541 532 542 for (UInt_t i=0; i<npixels; i++) … … 559 569 const Int_t sector = (*fGeom)[i].GetSector(); 560 570 561 sumhiarea[aidx] += sumhi;562 sumloarea[aidx] += sumlo;563 sathiarea[aidx] += sathi;564 satloarea[aidx] += satlo;565 566 sumhisector[sector] += sumhi;567 sumlosector[sector] += sumlo;568 sathisector[sector] += sathi;569 satlosector[sector] += satlo;571 fSumhiarea[aidx] += sumhi; 572 fSumloarea[aidx] += sumlo; 573 fSathiarea[aidx] += sathi; 574 fSatloarea[aidx] += satlo; 575 576 fSumhisector[sector] += sumhi; 577 fSumlosector[sector] += sumlo; 578 fSathisector[sector] += sathi; 579 fSatlosector[sector] += satlo; 570 580 } 571 581 … … 591 601 const Int_t sector = (*fGeom)[pixid].GetSector(); 592 602 593 timehiarea[aidx] += timehi;594 timeloarea[aidx] += timelo;595 596 timehisector[sector] += timehi;597 timelosector[sector] += timelo;603 fTimehiarea[aidx] += timehi; 604 fTimeloarea[aidx] += timelo; 605 606 fTimehisector[sector] += timehi; 607 fTimelosector[sector] += timelo; 598 608 } 599 609 … … 609 619 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainArea(j); 610 620 611 hipix.FillHistAndArray( sumhiarea[j]/npix);612 lopix.FillHistAndArray( sumloarea[j]/npix);613 614 hipix.SetSaturated( sathiarea[j]/npix);615 lopix.SetSaturated( satloarea[j]/npix);616 617 hipix.FillAbsTime( timehiarea[j]/npix);618 lopix.FillAbsTime( timeloarea[j]/npix);621 hipix.FillHistAndArray(fSumhiarea[j]/npix); 622 lopix.FillHistAndArray(fSumloarea[j]/npix); 623 624 hipix.SetSaturated(fSathiarea[j]/npix); 625 lopix.SetSaturated(fSatloarea[j]/npix); 626 627 hipix.FillAbsTime(fTimehiarea[j]/npix); 628 lopix.FillAbsTime(fTimeloarea[j]/npix); 619 629 620 630 } … … 631 641 MHCalibrationChargePix &lopix = (MHCalibrationChargePix&)GetAverageLoGainSector(j); 632 642 633 hipix.FillHistAndArray( sumhisector[j]/npix);634 lopix.FillHistAndArray( sumlosector[j]/npix);635 636 hipix.SetSaturated( sathisector[j]/npix);637 lopix.SetSaturated( satlosector[j]/npix);638 639 hipix.FillAbsTime( timehisector[j]/npix);640 lopix.FillAbsTime( timelosector[j]/npix);643 hipix.FillHistAndArray(fSumhisector[j]/npix); 644 lopix.FillHistAndArray(fSumlosector[j]/npix); 645 646 hipix.SetSaturated(fSathisector[j]/npix); 647 lopix.SetSaturated(fSatlosector[j]/npix); 648 649 hipix.FillAbsTime(fTimehisector[j]/npix); 650 lopix.FillAbsTime(fTimelosector[j]/npix); 641 651 642 652 } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
r4793 r4813 4 4 #ifndef MARS_MHCalibrationCam 5 5 #include "MHCalibrationCam.h" 6 #endif7 8 #ifndef ROOT_TArrayF9 #include "TArrayF.h"10 6 #endif 11 7 … … 27 23 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit (now set to: 2.) 28 24 29 static const Float_t gkHiGainInnerRefLines[7]; 30 static const Float_t gkHiGainOuterRefLines[7]; 31 static const Float_t gkLoGainInnerRefLines[7]; 32 static const Float_t gkLoGainOuterRefLines[7]; 33 25 static const Float_t gkHiGainInnerRefLines[7]; //! 26 static const Float_t gkHiGainOuterRefLines[7]; //! 27 static const Float_t gkLoGainInnerRefLines[7]; //! 28 static const Float_t gkLoGainOuterRefLines[7]; //! 29 30 TArrayF fSumhiarea ; //! 31 TArrayF fSumloarea ; //! 32 TArrayF fTimehiarea ; //! 33 TArrayF fTimeloarea ; //! 34 TArrayF fSumhisector; //! 35 TArrayF fSumlosector; //! 36 TArrayF fTimehisector; //! 37 TArrayF fTimelosector; //! 38 39 TArrayI fSathiarea ; //! 40 TArrayI fSatloarea ; //! 41 TArrayI fSathisector; //! 42 TArrayI fSatlosector; //! 43 34 44 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (in units of FADC slices) 35 45 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (in units of FADC slices) -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
r4128 r4813 281 281 } 282 282 283 fSumareahi .Set(nareas); 284 fSumarealo .Set(nareas); 285 fSumsectorhi.Set(nsectors); 286 fSumsectorlo.Set(nsectors); 287 fNumareahi .Set(nareas); 288 fNumarealo .Set(nareas); 289 fNumsectorhi.Set(nsectors); 290 fNumsectorlo.Set(nsectors); 291 283 292 return kTRUE; 284 293 } … … 313 322 const Int_t nsectors = fGeom->GetNumSectors(); 314 323 315 Float_t sumareahi [nareas], sumarealo [nareas]; 316 Float_t sumsectorhi[nsectors], sumsectorlo[nsectors]; 317 Int_t numareahi [nareas], numarealo [nareas]; 318 Int_t numsectorhi[nsectors], numsectorlo[nsectors]; 319 320 memset(sumareahi, 0, nareas * sizeof(Float_t)); 321 memset(sumarealo, 0, nareas * sizeof(Float_t)); 322 memset(sumsectorhi, 0, nsectors*sizeof(Float_t)); 323 memset(sumsectorlo, 0, nsectors*sizeof(Float_t)); 324 memset(numareahi, 0, nareas * sizeof(Float_t)); 325 memset(numarealo, 0, nareas * sizeof(Float_t)); 326 memset(numsectorhi, 0, nsectors*sizeof(Float_t)); 327 memset(numsectorlo, 0, nsectors*sizeof(Float_t)); 328 324 fSumareahi .Reset(); 325 fSumarealo .Reset(); 326 fSumsectorhi.Reset(); 327 fSumsectorlo.Reset(); 328 fNumareahi .Reset(); 329 fNumarealo .Reset(); 330 fNumsectorhi.Reset(); 331 fNumsectorlo.Reset(); 332 329 333 const MArrivalTimePix &refpix = (*arrtime)[fReferencePixel]; 330 334 const Float_t reftime = refpix.IsLoGainUsed() … … 349 353 histhi.SetSaturated(1); 350 354 histlo.FillHistAndArray(reltime); 351 sumarealo [aidx] += reltime;352 numarealo [aidx] ++;353 sumsectorlo[sector] += reltime;354 numsectorlo[sector] ++;355 fSumarealo [aidx] += reltime; 356 fNumarealo [aidx] ++; 357 fSumsectorlo[sector] += reltime; 358 fNumsectorlo[sector] ++; 355 359 } 356 360 else … … 358 362 const Float_t reltime = pix.GetArrivalTimeHiGain() - reftime; 359 363 histhi.FillHistAndArray(reltime) ; 360 sumareahi [aidx] += reltime;361 numareahi [aidx] ++;362 sumsectorhi[sector] += reltime;363 numsectorhi[sector] ++;364 fSumareahi [aidx] += reltime; 365 fNumareahi [aidx] ++; 366 fSumsectorhi[sector] += reltime; 367 fNumsectorhi[sector] ++; 364 368 } 365 369 } … … 368 372 { 369 373 MHGausEvents &histhi = GetAverageHiGainArea(j); 370 histhi.FillHistAndArray( numareahi[j] == 0 ? 0. : sumareahi[j]/numareahi[j]);374 histhi.FillHistAndArray(fNumareahi[j] == 0 ? 0. : fSumareahi[j]/fNumareahi[j]); 371 375 372 376 MHGausEvents &histlo = GetAverageLoGainArea(j); 373 histlo.FillHistAndArray( numarealo[j] == 0 ? 0. : sumarealo[j]/numarealo[j]);377 histlo.FillHistAndArray(fNumarealo[j] == 0 ? 0. : fSumarealo[j]/fNumarealo[j]); 374 378 } 375 379 … … 377 381 { 378 382 MHGausEvents &histhi = GetAverageHiGainSector(j); 379 histhi.FillHistAndArray( numsectorhi[j] == 0 ? 0. : sumsectorhi[j]/numsectorhi[j]);383 histhi.FillHistAndArray(fNumsectorhi[j] == 0 ? 0. : fSumsectorhi[j]/fNumsectorhi[j]); 380 384 381 385 MHGausEvents &histlo = GetAverageLoGainSector(j); 382 histlo.FillHistAndArray( numsectorlo[j] == 0 ? 0. : sumsectorlo[j]/numsectorlo[j]);386 histlo.FillHistAndArray(fNumsectorlo[j] == 0 ? 0. : fSumsectorlo[j]/fNumsectorlo[j]); 383 387 } 384 388 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.h
r4128 r4813 14 14 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.25) 15 15 static const UInt_t fgReferencePixel; //! Default for fReferencePixel (now set to: 1) 16 17 TArrayF fSumareahi ; //! 18 TArrayF fSumarealo ; //! 19 TArrayF fSumsectorhi; //! 20 TArrayF fSumsectorlo; //! 21 TArrayI fNumareahi ; //! 22 TArrayI fNumarealo ; //! 23 TArrayI fNumsectorhi; //! 24 TArrayI fNumsectorlo; //! 25 16 26 UInt_t fReferencePixel; // The reference pixel for rel. times 17 27
Note:
See TracChangeset
for help on using the changeset viewer.