Changeset 4296
- Timestamp:
- 06/16/04 10:39:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4292 r4296 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2004/06/12: Abelardo Moralejo 22 23 * manalysis/MMcCalibrationUpdate.cc 24 * mcalib/MMcCalibrationCalc.[h,cc] 25 - Fixed mistake in the calibration which occurred only when 26 different light collection efficiency was simulated for outer 27 pixels. 20 28 21 29 2004/06/12: Abelardo Moralejo -
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r4291 r4296 253 253 // (at angle = 90 deg) 254 254 255 // Set now the conversion from ADC counts to photoelectrons (in case256 // no previous calibration existed in the parameter list).255 // Set now the default conversion from ADC counts to "photoelectrons" 256 // (in case no previous calibration existed in the parameter list). 257 257 // As default we want 1 photon = 1 inner pixel ADC count 258 // (this will make Size to be in ADC counts which is what we want for259 // the MC calibration loop . To achieve this we set the ADC to258 // (this will make Size to be in ADC counts, which is what we want for 259 // the MC calibration loop). To achieve this we set the ADC to 260 260 // photoelectron conversion equal to the QE, which will later make the 261 // ADC to photon conversion factor to be = 1.261 // ADC to photon conversion factor (= ADC2PhotEl/QE) to be = 1. 262 262 // 263 263 fADC2PhElInner = MCalibrationQEPix::gkDefaultAverageQE; 264 264 265 265 // 266 // Set the ADC to photons conversion factor for outer pixels.267 // One can choose not to apply the known (in MC) gain factor between268 // inner and outer pixels, (fOuterPixelsGainScaling = kFALSE),266 // Set the default ADC to "photoelectrons" conversion factor for outer 267 // pixels. One can choose not to apply the known (in MC) gain factor 268 // between inner and outer pixels, (in case fOuterPixelsGainScaling = kFALSE), 269 269 // which may be useful for display purposes. 270 // If we apply the factor, we must take into account the different 271 // gain photoelectrons->ADC counts, and also apply the correct QE 272 // (see comment above) for the outer pixels through the factor 273 // fOuterPixelsLightCollection. 270 // If on the contrary we apply the factor, we must take into account the 271 // different gains photoelectrons->ADC counts, given in MC by fAmplitude 272 // and fAmplitudeOuter. This "default" calibration is such that a shower 273 // completely contained in the inner part would have Size in ADC counts, 274 // whereas one partially in the outer part would have Size in "equivalent 275 // inner ADC counts" : the "same" shower (light density distribution) would 276 // have the same Size no matter where in the camera it lies. For this we have 277 // also to set later (see below) the right QE for outer pixels, which may 278 // be different from that of inner pixels. 274 279 // 275 280 276 281 if (fOuterPixelsGainScaling) 277 282 fADC2PhElOuter = MCalibrationQEPix::gkDefaultAverageQE 278 * fOuterPixelsLightCollection 279 * (fAmplitude / fAmplitudeOuter); 283 * (fAmplitude / fAmplitudeOuter); 280 284 else 281 285 fADC2PhElOuter = fADC2PhElInner; … … 306 310 fADC2PhElOuter : fADC2PhElInner; 307 311 312 308 313 calpix.SetMeanConvFADC2Phe(adc2photel); 309 314 calpix.SetMeanConvFADC2PheVar(0.); … … 314 319 // 315 320 // Now set the average QE for each type of pixels. Correct outer pixels 316 // bydifferent light collection efficiency.321 // for different light collection efficiency. 317 322 // 318 323 num = fQECam->GetSize(); … … 320 325 { 321 326 MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i]; 322 Float_t avqe = 323 (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0))? 324 MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection: 325 MCalibrationQEPix::gkDefaultAverageQE; 327 328 Float_t avqe = MCalibrationQEPix::gkDefaultAverageQE; 329 330 if (fOuterPixelsGainScaling) 331 if (fGeom->GetPixRatio(i) < fGeom->GetPixRatio(0)) 332 avqe = MCalibrationQEPix::gkDefaultAverageQE*fOuterPixelsLightCollection; 326 333 327 334 qepix.SetAverageQE(avqe); -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
r3852 r4296 28 28 // 29 29 // Input Containers: 30 // MMcConfigRunHeader 30 31 // MRawRunHeader 31 32 // MMcFadcHeader … … 57 58 #include "MGeomCam.h" 58 59 #include "MRawRunHeader.h" 60 #include "MMcConfigRunHeader.h" 59 61 60 62 #include "MHillas.h" … … 194 196 } 195 197 198 // Now check the light collection for inner and outer pixels to 199 // calculate the ratio between the two. FIXME! Light collection 200 // depends on the incidence angle of the light w.r.t. the camera 201 // plane. For the moment we take the ratio for light impinging 202 // perpendicular to the camera plane. 203 // 204 // FIXME! We should look for AddSerialNumber("MMcConfigRunHeader") but 205 // for the moment the stereo version of camera does not write one such 206 // header per telescope (it should!) 207 // 208 MMcConfigRunHeader* mcconfig = (MMcConfigRunHeader*) pList->FindObject("MMcConfigRunHeader"); 209 if (!mcconfig) 210 { 211 *fLog << err << "MMcConfigRunHeader" << " not found... aborting." << endl; 212 return kFALSE; 213 } 214 TArrayF innerlightcoll = mcconfig->GetLightCollectionFactor(); 215 TArrayF outerlightcoll = mcconfig->GetLightCollectionFactorOuter(); 216 217 // In principle outer pixels seem to have a different average light 218 // collection efficiency than outer ones. We set here the factor between 219 // the two. 220 221 fOuterPixelsLightCollection = outerlightcoll[90] / innerlightcoll[90]; 222 // (at angle = 90 deg) 223 224 196 225 return kTRUE; 197 226 } … … 210 239 return kTRUE; 211 240 241 const Float_t size = fHillas->GetSize(); 242 const Float_t innersize = fNew->GetInnerSize(); 243 244 // Size will at this point be in ADC counts (still uncalibrated) 212 245 // 213 246 // Exclude events with low Size (larger fluctuations) … … 216 249 // 217 250 218 const Float_t size = fHillas->GetSize();219 // Size will at this point be in ADC counts (still uncalibrated)220 221 251 if (size < 1000) 222 252 return kTRUE; 223 253 224 fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 225 fHistPhot2PhotEl->Fill( (Float_t) fMcEvt->GetPhotElfromShower() / 226 (Float_t) fMcEvt->GetPassPhotCone() ); 254 // 255 // PATCH: Convert number of photoelectrons in camera to the approximate number 256 // of photoelectrons that would have been registered if all pixels had the same 257 // light collection efficiency as inner ones (called here "corrected_photel"). 258 // 259 260 const Float_t inner_photel = (Float_t) fMcEvt->GetPhotElfromShower() * innersize / size; 261 const Float_t outer_photel = (Float_t) fMcEvt->GetPhotElfromShower() - inner_photel; 262 263 const Float_t corrected_photel = inner_photel + outer_photel / fOuterPixelsLightCollection; 264 265 266 // fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 267 268 fHistADC2PhotEl->Fill(TMath::Log10(corrected_photel/size)); 269 fHistPhot2PhotEl->Fill( corrected_photel / (Float_t) fMcEvt->GetPassPhotCone() ); 227 270 228 271 return kTRUE; … … 270 313 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam) [i]; 271 314 272 qepix.SetAverageQE(fPhot2PhotEl); 315 Float_t qe = fPhot2PhotEl; 316 if (fGeom->GetPixRatio(i) < 1.) 317 qe *= fOuterPixelsLightCollection; 318 qepix.SetAverageQE(qe); 273 319 274 320 qepix.SetAvNormFFactor(1.); … … 284 330 // 285 331 // We take into account the (possibly) different gain of outer pixels: 332 // FIXME: we are now assuming that all inner pixels have the same gain, and all 333 // outer pixels have the same gain (different from inner ones though). This can 334 // only be like this in camera 0.7, but may change in future versions of camera. 286 335 // 336 287 337 if (fGeom->GetPixRatio(i) < 1.) 288 338 factor *= fHeaderFadc->GetAmplitud()/fHeaderFadc->GetAmplitudOuter(); -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h
r3852 r4296 27 27 MMcFadcHeader *fHeaderFadc; 28 28 29 Float_t fADC2PhotEl; // Conversion factor (photel / ADC count) 30 Float_t fPhot2PhotEl; // Conversion factor (photons / photoelectron) = average QE 29 Float_t fADC2PhotEl; // Conversion factor (photel / ADC count). FOR INER PIXELS 30 Float_t fPhot2PhotEl; // Conversion factor (photons / photoelectron) = average QE. FOR INER PIXELS 31 31 Long_t fEvents; 32 Float_t fOuterPixelsLightCollection; // Light collection efficiency (plexiglas, light guide) of 33 // outer pixels w.r.t inner ones 32 34 33 35 TH1F* fHistADC2PhotEl;
Note:
See TracChangeset
for help on using the changeset viewer.