Changeset 4914 for trunk/MagicSoft
- Timestamp:
- 09/09/04 20:20:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4912 r4914 22 22 2004/09/09: Markus Gaug 23 23 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 24 34 * mcalib/MCalibrationCam.[h,cc] 25 35 - make default for GetNumUnsuitable and GetNumUnreliable -
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r4900 r4914 41 41 #pragma link C++ class MHCalibrationChargeCam+; 42 42 #pragma link C++ class MHCalibrationChargePix+; 43 #pragma link C++ class MHCalibrationChargeHiGainPix+;44 #pragma link C++ class MHCalibrationChargeLoGainPix+;45 43 #pragma link C++ class MHCalibrationChargeBlindCam+; 46 44 #pragma link C++ class MHCalibrationChargeBlindPix+; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4903 r4914 117 117 #include "MParList.h" 118 118 119 #include "MHCalibrationChargeHiGainPix.h"120 #include "MHCalibrationChargeLoGainPix.h"121 119 #include "MHCalibrationChargePix.h" 122 120 #include "MHCalibrationPix.h" … … 156 154 using namespace std; 157 155 158 const Int_t MHCalibrationChargeCam::fgAverageNbinsHiGain = 3300; 159 const Int_t MHCalibrationChargeCam::fgAverageNbinsLoGain = 1950; 156 const Axis_t MHCalibrationChargeCam::fgChargeHiGainFirst = -100.5; 157 const Axis_t MHCalibrationChargeCam::fgChargeHiGainLast = 999.5; 158 const Axis_t MHCalibrationChargeCam::fgChargeLoGainFirst = -150.5; 159 const Axis_t MHCalibrationChargeCam::fgChargeLoGainLast = 499.5; 160 160 161 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.01; 161 162 const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005; … … 179 180 // - fTimeLowerLimit to fgTimeLowerLimit 180 181 // - fTimeUpperLimit to fgTimeUpperLimit 181 // - fAverageNbins to fgAverageNbinsHiGain182 182 // 183 183 MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title) … … 193 193 SetTimeUpperLimit(); 194 194 195 SetAverageNbins(fgAverageNbinsHiGain);196 195 } 197 196 … … 242 241 // - MHCalibrationCam::fAverageHiGainAreas 243 242 // - MHCalibrationCam::fAverageHiGainSectors 244 //245 // Sets number of bins to MHCalibrationCam::fAverageNbins for:246 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas247 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors248 243 // 249 244 Bool_t MHCalibrationChargeCam::ReInitHists(MParList *pList) … … 321 316 for (Int_t i=0; i<npixels; i++) 322 317 { 323 (*fHiGainArray)[i] = new MHCalibrationCharge HiGainPix("ChargeHiGainPix");318 (*fHiGainArray)[i] = new MHCalibrationChargePix("ChargeHiGainPix","Signals of the HiGain"); 324 319 MHCalibrationChargePix &pix = (MHCalibrationChargePix&)(*this)[i]; 320 325 321 pix.SetAbsTimeNbins(higainsamples); 322 pix.SetAbsTimeFirst(-0.5); 326 323 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 327 335 InitHists((*this)[i],(*fBadPixels)[i],i); 328 336 } … … 335 343 for (Int_t i=0; i<npixels; i++) 336 344 { 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 339 362 // 340 363 // Adapt the range for the case, the intense blue is used: … … 346 369 if ( fColor == MCalibrationCam::kBLUE) 347 370 { 348 lopix.SetLast(999.5);349 lopix.SetNbins(1150);371 pix.SetLast(999.5); 372 pix.SetNbins((Int_t)(999.5-fgChargeLoGainFirst)); 350 373 } 351 374 } 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); 355 376 } 356 377 } … … 362 383 for (Int_t j=0; j<nareas; j++) 363 384 { 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 "); 372 403 373 404 if (fGeom->InheritsFrom("MGeomCamMagic")) 374 405 { 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 ", 376 407 j==0 ? "Inner Pixels " : "Outer Pixels ","High Gain Runs: ")); 377 hist.InitBins();378 hist.SetEventFrequency(fPulserFrequency);408 pix.InitBins(); 409 pix.SetEventFrequency(fPulserFrequency); 379 410 } 380 411 else 381 412 { 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); 384 414 } 385 415 } … … 393 423 for (Int_t j=0; j<nareas; j++) 394 424 { 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 "); 401 443 402 444 // … … 409 451 if ( fColor == MCalibrationCam::kBLUE) 410 452 { 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); 414 456 } 415 457 } 416 458 417 hist.GetHAbsTime()->SetTitle("Absolute Arrival Time average LoGain Area Idx ");418 419 459 if (fGeom->InheritsFrom("MGeomCamMagic")) 420 460 { 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 ", 422 462 j==0 ? "Inner Pixels " : "Outer Pixels ","Low Gain Runs: ")); 423 hist.InitBins();424 hist.SetEventFrequency(fPulserFrequency);463 pix.InitBins(); 464 pix.SetEventFrequency(fPulserFrequency); 425 465 } 426 466 else 427 467 { 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); 430 469 } 431 470 } … … 438 477 for (Int_t j=0; j<nsectors; j++) 439 478 { 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); 451 499 } 452 500 } … … 458 506 for (Int_t j=0; j<nsectors; j++) 459 507 { 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); 468 516 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 469 527 // 470 528 // Adapt the range for the case, the intense blue is used: … … 476 534 if ( fColor == MCalibrationCam::kBLUE) 477 535 { 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); 481 539 } 482 540 } 483 541 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); 487 543 } 488 544 } … … 1108 1164 cam->fColor = fColor; 1109 1165 cam->fPulserFrequency = fPulserFrequency; 1110 cam->fAverageNbins = fAverageNbins;1111 1166 1112 1167 return cam; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
r4882 r4914 24 24 private: 25 25 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 29 31 static const Float_t fgNumHiGainSaturationLimit; //! The default for fNumHiGainSaturationLimit (now at: 0.01) 30 32 static const Float_t fgNumLoGainSaturationLimit; //! The default for fNumLoGainSaturationLimit (now at: 0.005) -
trunk/MagicSoft/Mars/mcalib/Makefile
r4900 r4914 66 66 MHCalibrationPix.cc \ 67 67 MHCalibrationChargeCam.cc \ 68 MHCalibrationChargeHiGainPix.cc \69 MHCalibrationChargeLoGainPix.cc \70 68 MHCalibrationChargePINDiode.cc \ 71 69 MHCalibrationRelTimeCam.cc \
Note:
See TracChangeset
for help on using the changeset viewer.