Changeset 2749
- Timestamp:
- 12/23/03 16:26:30 (21 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2748 r2749 4 4 5 5 -*-*- END OF LINE -*-*- 6 7 2003/12/23: Abelardo Moralejo 8 9 * manalysis/MExtractedSignalPix.cc 10 - in Clear(), initialized fExtractedSignalHiGain to 0 instead 11 of -1. In MC files run without noise, the ADC info of pixels 12 with no C-photons is missing. Later noise will be added to all 13 pixels in the padding, and "empty" ones must have a 0 before 14 the addition of this noise. 15 16 * manalysis/MGeomApply.cc 17 - initialized size of MPedPhotCam. 18 19 * manalysis/MMcCalibrationCalc.[cc,h] 20 - Removed setter function SetConversionHiLo: the ratio from high 21 to low gain is now read from MMcFadcHeader, and set in ReInit. 22 - Fixed bug: fADC2PhOuter was initialized before the MMcFadcHeader 23 was available. Now it is done in ReInit. 24 - fPedPhotCam is now initialized in PreProcess and not in ReInit. 25 - fGeom is now set in ReInit (there should be one MGeomCam per 26 run header in the camera file). 27 28 * mmc/MMcFadcHeader.hxx 29 - added getter function GetLow2HighGain() 30 6 31 7 32 2003/12/23: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.cc
r2641 r2749 64 64 { 65 65 66 fExtractedSignalHiGain = -1.; 66 fExtractedSignalHiGain = 0.; 67 // fExtractedSignalHiGain = -1.; 67 68 fExtractedSignalHiGainError = -1.; 69 68 70 fIsLoGainUsed = kFALSE; 69 71 fNumHiGainSaturated = 0; -
trunk/MagicSoft/Mars/manalysis/MGeomApply.cc
r2674 r2749 58 58 #include "MPedestalCam.h" 59 59 #include "MCalibrationCam.h" 60 #include "MPedPhotCam.h" 60 61 #include "MBlindPixels.h" 61 62 … … 122 123 123 124 125 MPedPhotCam *pedphot = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam")); 126 if (pedphot) 127 pedphot->InitSize(cam->GetNumPixels()); 128 129 124 130 MBlindPixels *bnd = (MBlindPixels*)pList->FindObject(AddSerialNumber("MBlindPixels")); 125 131 if (bnd) -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.cc
r2731 r2749 101 101 { 102 102 fADC2PhInner = x; 103 fADC2PhOuter = x *104 fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter();105 103 106 104 return; … … 125 123 } 126 124 127 if ( ! pList->FindCreateObj(AddSerialNumber("MPedPhotCam"))) 125 fPedPhotCam = (MPedPhotCam*) pList->FindCreateObj(AddSerialNumber("MPedPhotCam")); 126 if ( ! fPedPhotCam) 128 127 { 129 128 *fLog << err << dbginf << "Cannot create MPedPhotCam... aborting." << endl; … … 131 130 } 132 131 133 fGeom = (MGeomCam*) pList->FindObject(AddSerialNumber("MGeomCam"));134 if ( ! fGeom )135 {136 *fLog << err << dbginf << "Cannot find MGeomCam... aborting." << endl;137 return kFALSE;138 }139 140 132 fSignalCam = (MExtractedSignalCam*) pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 141 133 if ( ! fSignalCam) … … 145 137 } 146 138 139 fCalCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam")); 140 141 if (!fCalCam) 142 { 143 *fLog << err << dbginf << "Could not create MCalibrationCam... aborting. " << endl; 144 return kFALSE; 145 } 146 147 147 return kTRUE; 148 148 … … 163 163 164 164 // 165 // Now check the existence of all necessary containers. This has 166 // to be done only if this is a MC file. 167 // 165 // Now check the existence of all necessary containers. 166 // 167 168 fGeom = (MGeomCam*) pList->FindObject(AddSerialNumber("MGeomCam")); 169 if ( ! fGeom ) 170 { 171 *fLog << err << dbginf << "Cannot find MGeomCam... aborting." << endl; 172 return kFALSE; 173 } 168 174 169 175 fHeaderFadc = (MMcFadcHeader*)pList->FindObject(AddSerialNumber("MMcFadcHeader")); … … 174 180 } 175 181 176 fCalCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationCam")); 177 178 if (!fCalCam) 179 { 180 *fLog << err << dbginf << "Could not create MCalibrationCam... aborting. " << endl; 181 return kFALSE; 182 } 183 184 fPedPhotCam = (MPedPhotCam*)pList->FindObject(AddSerialNumber("MPedPhotCam")); 185 186 if (!fPedPhotCam) 187 { 188 *fLog << err << dbginf << "Could not create MPedPhotCam... aborting. " << endl; 189 return kFALSE; 190 } 191 192 fPedPhotCam->InitSize(fGeom->GetNumPixels()); 182 // 183 // Set the ADC to photons conversion factor for outer pixels: 184 // 185 fADC2PhOuter = fADC2PhInner * 186 (fHeaderFadc->GetAmplitud() / fHeaderFadc->GetAmplitudOuter()); 187 188 // 189 // Set the conversion factor between high and low gain: 190 // 191 fConversionHiLo = fHeaderFadc->GetLow2HighGain(); 193 192 194 193 return kTRUE; … … 231 230 // 232 231 233 Float_t adc2phot = (fGeom->GetPixRatio(i) >fGeom->GetPixRatio(0))?232 Float_t adc2phot = (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))? 234 233 fADC2PhOuter : fADC2PhInner; 235 234 -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationCalc.h
r2731 r2749 28 28 Float_t fADC2PhInner; // Conversion factor from ADC counts to photons 29 29 Float_t fADC2PhOuter; // for inner and outer pixels. 30 31 30 Float_t fConversionHiLo; 32 31 … … 35 34 36 35 void SetADC2PhInner(Float_t x); 37 void SetConversionHiLo(Float_t x) { fConversionHiLo = x; }38 36 39 37 ClassDef(MMcCalibrationCalc, 0) // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons. -
trunk/MagicSoft/include-Classes/MMcFormat/MMcFadcHeader.hxx
r2730 r2749 83 83 Float_t GetAmplitud() const { return fAmplFadc; } 84 84 Float_t GetAmplitudOuter() const { return fAmplFadcOuter; } 85 Float_t GetLow2HighGain() const { return fLow2HighGain; } 85 86 86 87 UInt_t GetNumPixel() const { return MFADC_CHANNELS; }
Note:
See TracChangeset
for help on using the changeset viewer.