#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.
| SimQieClock::SimQieClock | ( | const VldContext & | context | ) | [inline] |
| virtual SimQieClock::~SimQieClock | ( | ) | [inline, virtual] |
| Int_t SimQieClock::GetBucketForTime | ( | Double_t | time | ) | [inline, virtual] |
Definition at line 45 of file SimQieClock.h.
References fNDClock, and fPhase.
Referenced by SimPmtM64::TimeToBucket().
| Double_t SimQieClock::GetTimeOfBucket | ( | Int_t | bucket | ) | [inline, virtual] |
Definition at line 50 of file SimQieClock.h.
References fNDTick, and fPhase.
Referenced by SimPmtM64::BucketToStartTime(), and SimPmtM64::BucketToStopTime().
| void SimQieClock::Reset | ( | const VldContext & | ) | [virtual] |
Definition at line 4 of file SimQieClock.cxx.
References fNDClock, fNDTick, fPhase, VldContext::GetDetector(), Calibrator::GetTDCConvert(), Calibrator::Instance(), and ElecType::kQIE.
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 }
| Double_t SimQieClock::fNDClock |
| Double_t SimQieClock::fNDTick |
Definition at line 36 of file SimQieClock.h.
Referenced by SimPmtM64::GetBucketDuration(), GetTimeOfBucket(), and Reset().
| Double_t SimQieClock::fPhase |
Definition at line 34 of file SimQieClock.h.
Referenced by GetBucketForTime(), GetTimeOfBucket(), and Reset().
1.4.7