#include <SimQieClock.h>
Public Member Functions | |
| SimQieClock (const VldContext &context) | |
| virtual | ~SimQieClock () |
| virtual void | Reset (const VldContext &) |
| virtual Int_t | GetBucketForTime (Double_t time) |
| virtual Double_t | GetTimeOfBucket (Int_t bucket) |
Public Attributes | |
| Double_t | fPhase |
| Double_t | fNDClock |
| Double_t | fNDTick |
SimQIEClock
Little class to deal with QIE clock. The model here is that the QIE counter reset is tied to the start of the second, but with a phase of one clock tick. This means the same event simulated with a different time stamp will give slightly different digitization buckets.
Definition at line 23 of file SimQieClock.h.
|
|
Definition at line 42 of file SimQieClock.h. References Reset(). 00043 { Reset(context); }
|
|
|
Definition at line 27 of file SimQieClock.h. 00027 { }
|
|
|
Definition at line 45 of file SimQieClock.h. References fNDClock, and fPhase. Referenced by SimPmtM64::TimeToBucket(). 00046 {
00047 return (int)floor(time*fNDClock+ fPhase);
00048 }
|
|
|
Definition at line 50 of file SimQieClock.h. References fNDTick. Referenced by SimPmtM64::BucketToStartTime(), and SimPmtM64::BucketToStopTime(). 00051 {
00052 return (Double_t)(bucket) * fNDTick - fPhase;
00053 }
|
|
|
Definition at line 4 of file SimQieClock.cxx. References fNDClock, fNDTick, fPhase, VldContext::GetDetector(), Calibrator::GetTDCConvert(), and Calibrator::Instance(). Referenced by SimQieElectronics::Reset(), SimPmtM64::Reset(), and SimQieClock(). 00005 {
00006 fNDTick = Calibrator::Instance().GetTDCConvert(RawChannelId(cx.GetDetector(),
00007 ElecType::kQIE,
00008 0,0)
00009 );
00010 fNDClock = 1.0/fNDTick;
00011
00012 // Turn off variable phase. Clock is now locked at 0 ticks = 0 ns.
00013 //const double kPi = 3.14159265358979323846;
00014 //fPhase = fmod(context.GetTimeStamp().GetSec(),kPi)/kPi;
00015 fPhase = 0;
00016 }
|
|
|
Definition at line 35 of file SimQieClock.h. Referenced by GetBucketForTime(), and Reset(). |
|
|
Definition at line 36 of file SimQieClock.h. Referenced by SimPmtM64::GetBucketDuration(), GetTimeOfBucket(), and Reset(). |
|
|
Definition at line 34 of file SimQieClock.h. Referenced by GetBucketForTime(), and Reset(). |
1.3.9.1