Changeset 8304 for trunk/MagicSoft/Mars/mhcalib
- Timestamp:
- 02/04/07 15:33:08 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mhcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r8279 r8304 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1. 49 2007-01-30 14:16:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.50 2007-02-04 15:29:09 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 114 114 // + Float_t fNumLoGainBlackoutLimit; // Rel. amount blackout logain events until pixel is declared unsuitable 115 115 // 116 // Class Version 3: 117 // - Byte_t fFirstHiGain; // First used slice High Gain 118 // - Byte_t fLastHiGain; // Last used slice High Gain 119 // - Byte_t fFirstLoGain; // First used slice Low Gain 120 // - Byte_t fLastLoGain; // Last used slice Low Gain 121 // 116 122 ///////////////////////////////////////////////////////////////////////////// 117 123 #include "MHCalibrationChargeCam.h" … … 219 225 // 220 226 MHCalibrationChargeCam::MHCalibrationChargeCam(const char *name, const char *title) 221 : fRawEvt(NULL) 227 : fRawEvt(NULL), fSignal(NULL) 222 228 { 223 229 … … 367 373 { 368 374 369 MExtractedSignalCam *signal = 370 (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 371 if (!signal) 375 fSignal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 376 if (!fSignal) 372 377 { 373 378 *fLog << err << "MExtractedSignalCam not found... abort." << endl; … … 377 382 if (!InitCams(pList,"Charge")) 378 383 return kFALSE; 379 380 fFirstHiGain = signal->GetFirstUsedSliceHiGain();381 fLastHiGain = signal->GetLastUsedSliceHiGain();382 fFirstLoGain = signal->GetFirstUsedSliceLoGain();383 fLastLoGain = signal->GetLastUsedSliceLoGain();384 384 385 385 const Int_t npixels = fGeom->GetNumPixels(); … … 900 900 MBadPixelsCam *badcam = fIntensBad ? fIntensBad->GetCam() : fBadPixels; 901 901 902 const Int_t hifirst = fSignal->GetFirstUsedSliceHiGain(); 903 const Int_t hilast = fSignal->GetLastUsedSliceHiGain(); 904 const Int_t lofirst = fSignal->GetFirstUsedSliceLoGain(); 905 const Int_t lolast = fSignal->GetLastUsedSliceLoGain(); 906 902 907 903 908 for (Int_t i=0; i<fHiGainArray->GetSize(); i++) … … 944 949 bad.SetUncalibrated( MBadPixelsPix::kHiGainOverFlow ); 945 950 } 946 947 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);951 952 FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast); 948 953 } 949 954 … … 991 996 } 992 997 993 FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);998 FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast); 994 999 } 995 1000 … … 1009 1014 1010 1015 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j); 1011 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);1016 FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast); 1012 1017 } 1013 1018 … … 1031 1036 { 1032 1037 MBadPixelsPix &bad = chargecam->GetAverageBadArea(j); 1033 FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);1038 FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast); 1034 1039 } 1035 1040 … … 1051 1056 1052 1057 MBadPixelsPix &bad = chargecam->GetAverageBadSector(j); 1053 FinalizeAbsTimes(histhi, pix, bad, fFirstHiGain, fLastHiGain);1058 FinalizeAbsTimes(histhi, pix, bad, hifirst, hilast); 1054 1059 } 1055 1060 … … 1073 1078 1074 1079 if (pix.IsHiGainSaturation()) 1075 FinalizeAbsTimes(histlo, pix, bad, fFirstLoGain, fLastLoGain);1080 FinalizeAbsTimes(histlo, pix, bad, lofirst, lolast); 1076 1081 } 1077 1082 … … 1131 1136 // 1132 1137 void MHCalibrationChargeCam::FinalizeAbsTimes(MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad, 1133 Byte_t first, Byte_t last)1138 Int_t first, Int_t last) 1134 1139 { 1135 1140 const Float_t mean = hist.GetAbsTimeMean(); … … 1139 1144 pix.SetAbsTimeRms(rms); 1140 1145 1141 const Float_t lowerlimit = (Float_t)first ;// + fTimeLowerLimit;1142 const Float_t upperlimit = (Float_t)last ;// - fTimeUpperLimit;1146 const Float_t lowerlimit = (Float_t)first+1;// + fTimeLowerLimit; 1147 const Float_t upperlimit = (Float_t)last -1;// - fTimeUpperLimit; 1143 1148 1144 1149 // FIXME: instead of checking whether the maximum is in the first or -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.h
r7188 r8304 86 86 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (in units of FADC slices) 87 87 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (in units of FADC slices) 88 Byte_t fFirstHiGain; // First used slice High Gain89 Byte_t fLastHiGain; // Last used slice High Gain90 Byte_t fFirstLoGain; // First used slice Low Gain91 Byte_t fLastLoGain; // Last used slice Low Gain92 88 93 89 MRawEvtData *fRawEvt; //! Raw event data 90 MExtractedSignalCam *fSignal; //! 94 91 95 92 Bool_t SetupHists(const MParList *pList); … … 101 98 102 99 void FinalizeAbsTimes (MHCalibrationChargePix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad, 103 Byte_t first, Byte_t last);100 Int_t first, Int_t last); 104 101 Bool_t FinalizeHists(); 105 102 void FinalizeBadPixels(); … … 141 138 void DrawPixelContent( Int_t num ) const; 142 139 143 ClassDef(MHCalibrationChargeCam, 2) // Histogram class for Charge Camera Calibration140 ClassDef(MHCalibrationChargeCam, 3) // Histogram class for Charge Camera Calibration 144 141 }; 145 142
Note:
See TracChangeset
for help on using the changeset viewer.