Changeset 4296 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 06/16/04 10:39:19 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.