Changeset 3768 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/16/04 19:17:36 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.cc
r3759 r3768 177 177 fQEFFactorVar ( MCalibrationCam::gkNumPulserColors ), 178 178 fQEPINDiode ( MCalibrationCam::gkNumPulserColors ), 179 fQEPINDiodeVar ( MCalibrationCam::gkNumPulserColors ), 179 fQEPINDiodeVar ( MCalibrationCam::gkNumPulserColors ), 180 fAverageQE ( gkDefaultAverageQE ), 180 181 fValidFlags ( MCalibrationCam::gkNumPulserColors ) 181 182 { … … 368 369 const Float_t MCalibrationQEPix::GetAverageQE( const Float_t zenith ) const 369 370 { 370 return gkDefaultAverageQE ; 371 // return gkDefaultAverageQE ; 372 return fAverageQE; 371 373 } 372 374 -
trunk/MagicSoft/Mars/mcalib/MCalibrationQEPix.h
r3755 r3768 48 48 Float_t fAvNormPINDiode; // Normalization w.r.t. default QE (PIN Diode Method) 49 49 Float_t fAvNormPINDiodeVar; // Variance norm. w.r.t. def. QE (PIN Diode Method) 50 50 Float_t fAverageQE; // Average QE for Cascade spectrum (default 0.18) 51 51 52 TArrayC fValidFlags; // Bit-field for valid flags, one array entry for each color 52 53 Byte_t fAvailableFlags; // Bit-field for available flags … … 62 63 void AddAveragePINDiodeQEs ( const MCalibrationCam::PulserColor_t col, Float_t &wav, Float_t &sumw ); 63 64 64 const Float_t GetAverageQE ( const Float_t zenith=0. ) const;65 const Float_t GetAverageQERelVar( const Float_t zenith=0. ) const;66 67 65 const Float_t GetAvNormBlindPixelRelVar() const; 68 66 const Float_t GetAvNormCombinedRelVar() const; … … 81 79 82 80 // Getters 81 82 const Float_t GetAverageQE ( const Float_t zenith=0. ) const; 83 const Float_t GetAverageQERelVar( const Float_t zenith=0. ) const; 84 83 85 Float_t GetDefaultQE ( const MCalibrationCam::PulserColor_t col ) const; 84 86 Float_t GetDefaultQERelVar ( const MCalibrationCam::PulserColor_t col ) const; … … 122 124 123 125 // Setters 126 void SetAverageQE ( const Float_t f ) { fAverageQE = f; } 124 127 void SetAvNormBlindPixel ( const Float_t f ) { fAvNormBlindPixel = f; } 125 128 void SetAvNormBlindPixelVar ( const Float_t f ) { fAvNormBlindPixelVar = f; } -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
r3688 r3768 35 35 // 36 36 // Output Containers: 37 // (containers mus exist already, they are filled with new values). 37 38 // MCalibrationChargeCam 39 // MCalibrationQECam 38 40 // 39 41 ///////////////////////////////////////////////////////////////////////////// … … 69 71 { 70 72 fName = name ? name : "MMcCalibrationCalc"; 71 fTitle = title ? title : "Calculate and write conversion factors into MCalibrationC am Container";72 73 fHistRatio = new TH1F(AddSerialNumber("HistRatio"), "log10(fP assPhotCone/fSize)", 1500, -3., 3.);74 fHistRatio->SetXTitle("log_{10}(fP assPhotCone / fSize) [phot/ADC count]");73 fTitle = title ? title : "Calculate and write conversion factors into MCalibrationChargeCam and MCalibrationQECam containers"; 74 75 fHistRatio = new TH1F(AddSerialNumber("HistRatio"), "log10(fPhotElfromShower/fSize)", 1500, -3., 3.); 76 fHistRatio->SetXTitle("log_{10}(fPhotElfromShower / fSize) [photel/ADC count]"); 75 77 } 76 78 … … 100 102 { 101 103 fHistRatio->Reset(); 102 fADC2Phot = 0; 104 fADC2PhotEl = 0; 105 fPhot2PhotEl = 0; 103 106 104 107 fCalCam = (MCalibrationChargeCam*) pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); … … 204 207 // FIXME? The present cut (1000 "inner-pixel-counts") is somehow 205 208 // arbitrary. Might it be optimized? 206 // 207 if (fHillas->GetSize()<1000) 209 // 210 211 const Float_t size = fHillas->GetSize(); 212 // Size will at this point be in ADC counts (still uncalibrated) 213 214 if (size < 1000) 208 215 return kTRUE; 209 216 210 fADC2Phot += fMcEvt->GetPassPhotCone()/fHillas->GetSize(); 211 212 fHistRatio->Fill(TMath::Log10(fMcEvt->GetPassPhotCone()/fHillas->GetSize())); 217 fPhot2PhotEl += (Float_t) fMcEvt->GetPhotElfromShower() / 218 (Float_t) fMcEvt->GetPassPhotCone(); 219 220 fHistRatio->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 213 221 214 222 return kTRUE; … … 228 236 } 229 237 230 fADC2Phot /= n; 231 232 // 233 // For the calibration we no longer use the mean, 234 // but the peak of the distribution: 238 fPhot2PhotEl /= n; // Average quantum efficiency 239 240 // 241 // Find peak of log10(photel/Size) histogram: 235 242 // 236 243 const Int_t reach = 2; 237 238 244 Stat_t summax = 0; 239 245 Int_t mode = 0; 240 241 // FIXME: Is this necessary? We could use GetMaximumBin instead..242 246 for (Int_t ibin = 1+reach; ibin <= fHistRatio->GetNbinsX()-reach; ibin++) 243 247 { … … 251 255 } 252 256 253 fADC2Phot = TMath::Power(10, fHistRatio->GetBinCenter(mode));257 fADC2PhotEl = TMath::Power(10, fHistRatio->GetBinCenter(mode)); 254 258 255 259 const Int_t num = fCalCam->GetSize(); … … 257 261 for (int i=0; i<num; i++) 258 262 { 259 260 263 MCalibrationChargePix &calpix = (MCalibrationChargePix&)(*fCalCam)[i]; 261 // MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam) [i]; 262 263 const Float_t qe = MCalibrationQEPix::gkDefaultAverageQE; 264 const Float_t factor = fADC2Phot/qe*calpix.GetMeanConvFADC2Phe(); 265 // 266 // FIXME: Now, only the conversion to PHe is stored, need also the quantum efficiency simulated!!! 267 // 264 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam) [i]; 265 266 qepix.SetAverageQE(fPhot2PhotEl); 267 268 qepix.SetAvNormFFactor(1.); 269 // This factor should convert the default average QE for different colors to 270 // average QE for a spectrum like that of Cherenkov light (see the documentration 271 // of MCalibrationQEPix). 272 // Here we obtain average QE using already a Cherenkov spectrum so AvNormFFacto 273 // must be 1. 274 275 276 Float_t factor = fADC2PhotEl; 277 278 // 279 // We take into account the (possibly) different gain of outer pixels: 280 // 281 if (fGeom->GetPixRatio(i) < 1.) 282 factor *= fHeaderFadc->GetAmplitud()/fHeaderFadc->GetAmplitudOuter(); 283 268 284 calpix.SetMeanConvFADC2Phe(factor); 269 285 calpix.SetMeanConvFADC2PheVar(0.); 286 270 287 calpix.SetMeanFFactorFADC2Phot(0.); 271 288 } -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h
r3687 r3768 27 27 MMcFadcHeader *fHeaderFadc; 28 28 29 Float_t fADC2Phot; 29 Float_t fADC2PhotEl; // Conversion factor (photel / ADC count) 30 Float_t fPhot2PhotEl; // Conversion factor (photons / photoelectron) = average QE 30 31 Long_t fEvents; 31 32
Note:
See TracChangeset
for help on using the changeset viewer.