- Timestamp:
- 12/09/03 18:48:55 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2627 r2628 105 105 read2.DisableAutoScheme(); 106 106 107 MExtractSignal sigsig; 107 108 MCalibrationCalc calcalc; 108 109 // calcalc.SetSkipTFits(); 110 MExtractedSignalCam sigcam; 109 111 110 112 plist2.AddToList(&geomcam); 113 plist2.AddToList(&sigcam); 111 114 112 115 // … … 118 121 tlist2.AddToList(&read2); 119 122 tlist2.AddToList(&calcalc); 123 tlist2.AddToList(&sigsig); 120 124 121 125 MHCamEvent hist2; -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2627 r2628 93 93 #include "MRawEvtPixelIter.h" 94 94 95 #include "MExtractedSignalCam.h" 96 #include "MExtractedSignalPix.h" 97 95 98 #include "MTime.h" 96 99 #include "TMath.h" … … 189 192 return kFALSE; 190 193 } 194 195 196 fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam"); 197 if (!fSignals) 198 { 199 *fLog << err << dbginf << "Cannot find MExtractedSignalCam ... aborting" << endl; 200 return kFALSE; 201 } 191 202 192 203 return kTRUE; … … 290 301 { 291 302 292 UShort_t sat = 0; 293 294 const Int_t pixid = pixel.GetPixelId(); 295 296 Byte_t mid = pixel.GetIdxMaxHiGainSample(); 297 UInt_t max = pixel.GetMaxHiGainSample(); 298 299 MPedestalPix &ped = (*fPedestals)[pixid]; 303 const UInt_t pixid = pixel.GetPixelId(); 304 305 MExtractedSignalPix &sig = (*fSignals)[pixid]; 306 Float_t sum = sig.GetExtractedSignal(); 307 Bool_t logain = sig.IsLoGainUsed(); 308 309 Byte_t mid; 310 311 if (logain) 312 mid = pixel.GetIdxMaxLoGainSample(); 313 else 314 mid = pixel.GetIdxMaxHiGainSample(); 315 316 300 317 MCalibrationPix &pix = (*fCalibrations)[pixid]; 301 302 Float_t pedes = ped.GetPedestal();303 Float_t sum;304 305 //306 // FIXME: This is preliminary, we will change to pedestals per slice!!!307 // Assume pedestals per time slice ==> multiply with number of slices308 //309 310 if (max < gkSaturationLimit) // take Hi Gain311 {312 sum = (float)pixel.GetSumHiGainSamples() - pedes*fNumHiGainSamples;313 }314 else // Lo Gain315 {316 317 sat++;318 pix.SetHiGainSaturation();319 320 sum = (float)pixel.GetSumLoGainSamples() - pedes*fNumLoGainSamples ;321 sum *= gkConversionHiLo;322 323 max = pixel.GetMaxLoGainSample();324 mid = pixel.GetIdxMaxLoGainSample();325 326 if (max > gkSaturationLimit)327 {328 *fLog << err << dbginf329 << "Warning: Saturation of Lo Gain reached in pixel: "330 << pixid << " " << " sum = " << sum << endl;331 fHistOverFlow++;332 }333 334 }335 318 336 319 switch(pixid) … … 364 347 default: 365 348 366 if ( sat)349 if (logain) 367 350 { 368 351 -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.h
r2627 r2628 20 20 class MPedestalCam; 21 21 class MCalibrationCam; 22 class MExtractedSignalCam; 22 23 23 24 class MTime; … … 29 30 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 30 31 MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera 32 MExtractedSignalCam *fSignals; // Calibration events of all pixels in the camera 31 33 32 34 MRawEvtData *fRawEvt; // raw event data (time slices)
Note:
See TracChangeset
for help on using the changeset viewer.