Changeset 19664 for trunk/Mars/msimcamera
- Timestamp:
- 09/23/19 18:17:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/msimcamera/MSimCamera.cc
r19623 r19664 297 297 // FIXME: Should we use a higher sampling here? 298 298 299 // Start end end of sampling window (in ns, converted to samples) 300 // The sampling window starts at start+pulsewidth to have a potential 301 // previous pulse in the widdow. The trigger should then be at 302 // start+pulsewidth+triggerpos 299 303 const Double_t start = fStat->GetTimeFirst()*freq; 300 304 const Double_t end = fStat->GetTimeLast() *freq; 301 305 306 // Length of the simulated window (in units of samples) 307 // nlen = (last-first)+roi+pulsewidth 302 308 const UInt_t nlen = TMath::CeilNint(end-start); 303 309 … … 313 319 } 314 320 315 const Double_t pl = fSpline->GetXmin()*freq; 316 const Double_t pr = fSpline->GetXmax()*freq; 321 const Double_t pw = fSpline->GetXmax()-fSpline->GetXmin(); // [samples] Width of pulse 317 322 318 323 // Init the arrays and set the range which will contain valid data 324 // FIXME: There must be some contingency for all the time offsets... 325 // otherwise, we might loose late triggers!!!!! 319 326 fCamera->Init(npix, nlen); 320 fCamera->SetValidRange(TMath::FloorNint(p r), TMath::CeilNint(nlen+pl));327 fCamera->SetValidRange(TMath::FloorNint(pw), nlen); 321 328 322 329 Double_t timeoffset[npix]; 323 324 330 325 331 // Add electronic noise to empty channels … … 504 510 const Double_t gain = (*fGain)[idx].GetPedestal(); 505 511 512 // The "-GetXmin" ensures that a photon at t=0 does not get sampled 513 // before the sampling window! 506 514 // === FIXME === FIXME === FIXME === Frequency!!!! 507 (*fCamera)[idx].AddPulse(*fSpline, t , ph.GetWeight()*gain);515 (*fCamera)[idx].AddPulse(*fSpline, t - fSpline->GetXmin(), ph.GetWeight()*gain); 508 516 } 509 517
Note:
See TracChangeset
for help on using the changeset viewer.