- Timestamp:
- 01/28/05 10:52:54 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6076 r6077 65 65 - fill MCalibConstCam with update results (once per calib. consts 66 66 update == every 10 sec.) 67 68 * mjobs/MJCalibrateSignal.cc: 69 - display one MHCamera more with changing conv. factors (only for 70 interlaced cal. events) 67 71 68 72 -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r6004 r6077 244 244 fRelTimeCalc->Finalize(); 245 245 if (fCalibrate) 246 { 247 fCalibrate->SetCalibUpdate((MCalibrationChargeCam*)fIntensCharge->GetCam()); 248 fCalibrate->UpdateConversionFactors(); 249 } 246 fCalibrate->UpdateConversionFactors((MCalibrationChargeCam*)fIntensCharge->GetCam()); 250 247 251 248 ReInitialize(); -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r6040 r6077 117 117 #include "MCalibrationQEPix.h" 118 118 119 #include "MCalibConstCam.h" 120 #include "MCalibConstPix.h" 121 119 122 #include "MExtractedSignalCam.h" 120 123 #include "MExtractedSignalPix.h" … … 143 146 // 144 147 MCalibrateData::MCalibrateData(CalibrationMode_t calmode,const char *name, const char *title) 145 : fGeomCam(NULL), fBadPixels(NULL), fCalibrations(NULL), fCalibUpdate(NULL),146 fQEs(NULL), fSignals(NULL), fCerPhotEvt(NULL), 148 : fGeomCam(NULL), fBadPixels(NULL), fCalibrations(NULL), 149 fQEs(NULL), fSignals(NULL), fCerPhotEvt(NULL), fCalibConstCam(NULL), 147 150 fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.) 148 151 { … … 213 216 if (!fCerPhotEvt) 214 217 return kFALSE; 218 219 fCalibConstCam = (MCalibConstCam*)pList->FindCreateObj(AddSerialNumber("MCalibConstCam")); 220 if (!fCalibConstCam) 221 return kFALSE; 215 222 } 216 223 … … 233 240 } 234 241 235 SetCalibUpdate( fCalibrations );236 242 } 237 243 … … 435 441 // have been updated... 436 442 // 437 Bool_t MCalibrateData::UpdateConversionFactors( )443 Bool_t MCalibrateData::UpdateConversionFactors( const MCalibrationChargeCam *updatecam) 438 444 { 439 445 … … 467 473 Float_t calibUpdate = 1.; 468 474 475 MCalibConstPix &cpix = (*fCalibConstCam)[pixidx]; 476 469 477 if(fCalibrationMode!=kNone) 470 478 { … … 487 495 MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx]; 488 496 489 if ( fCalibUpdate)497 if (updatecam) 490 498 { 491 MCalibrationChargePix &upix = (MCalibrationChargePix&)(* fCalibUpdate)[pixidx];499 MCalibrationChargePix &upix = (MCalibrationChargePix&)(*updatecam)[pixidx]; 492 500 // 493 501 // Correct for the possible change in amplification of the individual pixels chain … … 498 506 // Correct for global shifts in light emission 499 507 // 500 MCalibrationChargePix &ugpix = (MCalibrationChargePix&) fCalibUpdate->GetAverageArea(0);501 // MBadPixelsPix &ubad = (MBadPixelsPix&) fCalibUpdate->GetAverageBadArea(0);508 MCalibrationChargePix &ugpix = (MCalibrationChargePix&)updatecam->GetAverageArea(0); 509 // MBadPixelsPix &ubad = (MBadPixelsPix&) updatecam->GetAverageBadArea(0); 502 510 // if (ubad.IsUnsuitable()) 503 511 // *fLog << err << "Average Area is unsuitable!!!!" << endl; … … 588 596 } 589 597 590 calibConv *= fRenormFactor * calibUpdate; 598 calibConv *= fRenormFactor * calibUpdate; 599 calibFFactor *= TMath::Sqrt(fRenormFactor); 591 600 592 601 fHiLoConv [pixidx] = hiloconv; … … 595 604 fCalibFFactors[pixidx] = calibFFactor; 596 605 606 cpix.SetCalibConst(calibConv); 607 cpix.SetCalibFFactor(calibFFactor); 608 597 609 } /* for (Int_t pixidx=0; pixidx<fGeomCam->GetNumPixels(); pixidx++) */ 598 610 … … 603 615 return kFALSE; 604 616 } 617 618 605 619 606 620 // Print(); … … 824 838 } 825 839 826 //----------------------------------------------------------------------------------------------------827 //828 Bool_t MCalibrateData::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const829 {830 831 if (idx > GetSize())832 return kFALSE;833 834 switch (type)835 {836 case 0:837 val = fCalibConsts[idx];838 break;839 default:840 return kFALSE;841 }842 843 return val!=0.;844 }845 846 847 // --------------------------------------------------------------------------848 //849 //850 void MCalibrateData::DrawPixelContent(Int_t idx) const851 {852 *fLog << warn << "DrawPixelContent not available in" << GetDescriptor() << endl;853 }854 -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r6040 r6077 25 25 #endif 26 26 27 #ifndef MARS_MCamEvent28 #include "MCamEvent.h"29 #endif30 31 27 class MGeomCam; 32 28 class MBadPixelsCam; … … 38 34 class MPedPhotCam; 39 35 class MCerPhotEvt; 40 41 class MCalibrateData : public MTask , public MCamEvent36 class MCalibConstCam; 37 class MCalibrateData : public MTask 42 38 { 43 39 private: … … 46 42 MBadPixelsCam *fBadPixels; //! Bad Pixels information 47 43 MCalibrationChargeCam *fCalibrations; //! Calibration constants 48 MCalibrationChargeCam *fCalibUpdate; //! Calibration constants update (for interlaced cal events)49 44 MCalibrationQECam *fQEs; //! Quantum efficiencies 50 45 MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts 51 46 MCerPhotEvt *fCerPhotEvt; //! Cerenkov Photon Event used for calculation 47 MCalibConstCam *fCalibConstCam; //! Temporary calib consts storage 52 48 53 49 UShort_t fCalibrationMode; // Flag defining the calibration mode (CalibrationMode_t) … … 121 117 void SetSignalType ( SignalType_t sigtype=kPhot ) { fSignalType =sigtype; } 122 118 123 void SetCalibUpdate ( MCalibrationChargeCam *cam=NULL ) { fCalibUpdate = cam; }119 Bool_t UpdateConversionFactors( const MCalibrationChargeCam *updatecam=NULL); 124 120 125 Bool_t UpdateConversionFactors(); 126 127 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0 ) const; 128 void DrawPixelContent( Int_t num) const; 129 130 ClassDef(MCalibrateData, 1) // Task to calibrate FADC counts into Cherenkov photons 121 ClassDef(MCalibrateData, 1) // Task to calibrate FADC counts into photons or photo-electrons 131 122 }; 132 123 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6072 r6077 572 572 MFillH fill6(&evt6, "MBadPixelsCam", "FillUnsuitable"); 573 573 MFillH fill7(&evt7, "MArrivalTime", "FillTimes"); 574 MFillH fill8(&evt8, "MCalib rateData", "FillConv");574 MFillH fill8(&evt8, "MCalibConstCam", "FillConv"); 575 575 576 576 MTaskEnv fillflorian("FinalFantasy"); … … 699 699 tlist2.AddToList(&pextr); 700 700 tlist.AddToList(&tlist2, IsRootData() ? "Events" : "All"); 701 //if (fIsInterlaced)702 //tlist.AddToList(&fill8);701 if (fIsInterlaced) 702 tlist.AddToList(&fill8); 703 703 704 704 if (IsMC())
Note:
See TracChangeset
for help on using the changeset viewer.