Changeset 17383
- Timestamp:
- 11/25/13 21:40:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimcamera/MSimCamera.cc
r17209 r17383 254 254 // * areaOfOnePulse / samplingRate; 255 255 // Therefore I need the following variables 256 Double_t accidentalPhotonRate = 0; // [MHz]257 Float_t crossTalkProb = 0;// [1]258 Double_t areaOfOnePulse = 0;// [ADC-Counts * s]259 Double_t samplingRate = 0;// [slices * MHz]256 // Double_t accidentalPhotonRate; // [MHz] 257 // Float_t crossTalkProb; // [1] 258 // Double_t areaOfOnePulse; // [ADC-Counts * s] 259 // Double_t samplingRate; // [slices * MHz] 260 260 261 261 // The accidental photon rate is stored in GHz, so we have to multiply 262 262 // with 1E3 to get MHz: 263 MPedestalPix &accPhoPix = (*fAccidentalPhotons)[i]; 264 accidentalPhotonRate = accPhoPix.GetPedestal() * 1E3; 263 const MPedestalPix &accPhoPix = (*fAccidentalPhotons)[i]; 264 265 const Double_t accidentalPhotonRate = accPhoPix.GetPedestal() * 1e3; //[MHz] 266 265 267 Double_t currentAccidentalPhotonRate = accidentalPhotonRate; 266 267 if(fACTimeConstant!=0) 268 if (fACTimeConstant!=0) 268 269 { 269 Double_t accidentalPhotons = fACTimeConstant * accidentalPhotonRate;270 Double_t sigmaAccidentalPhotons = sqrt(accidentalPhotons);271 272 TRandom3 *random = new TRandom3(0);273 Double_t gaus = random->Gaus(accidentalPhotons,sigmaAccidentalPhotons); 270 const Double_t accidentalPhotons = fACTimeConstant * accidentalPhotonRate; 271 const Double_t sigmaAccidentalPhotons = sqrt(accidentalPhotons); 272 273 const Double_t gaus = gRandom->Gaus(accidentalPhotons,sigmaAccidentalPhotons); 274 274 275 currentAccidentalPhotonRate = gaus / fACTimeConstant; 275 delete random;276 276 } 277 277 278 // I don't know how to get the variable fCrosstalkProb from278 // FIXME: I don't know how to get the variable fCrosstalkProb from 279 279 // the class APD (see MAvalanchePhotoDiode.h), because there is no 280 280 // getter for the APD array(fAPDs) in MSimAPD. 281 281 // So I set the crossTalkProb hardcoded to the value 0.15, which is 282 282 // equal to the value of the apd of type 4 283 c rossTalkProb= 0.15;283 const Double_t crossTalkProb = 0.15; 284 284 285 285 // To get the area of one Pulse, I only need to calculate the Integral 286 286 // of the Pulse Shape, which is stored in fSpline. Because the spline is 287 287 // normalized to a maximal amplitude of 1.0, I had to multiply it with 288 // the Default gain :289 areaOfOnePulse= fSpline->Integral() * fDefaultGain;288 // the Default gain [ADC-Counts * s] 289 const Double_t areaOfOnePulse = fSpline->Integral() * fDefaultGain; 290 290 291 291 // The sampling rate I get from the RunHeader: 292 samplingRate = fRunHeader->GetFreqSampling();293 294 Double_t accouplingPerSlice = currentAccidentalPhotonRate295 296 292 const Double_t samplingRate = fRunHeader->GetFreqSampling(); // [slices * MHz] 293 294 const Double_t accouplingPerSlice = currentAccidentalPhotonRate 295 * (1 + crossTalkProb + fACFudgeFactor) 296 * areaOfOnePulse / samplingRate; 297 297 298 298 // The accoupling is substracted from the timeline by decreasing the
Note:
See TracChangeset
for help on using the changeset viewer.