SimDigit Class Reference

#include <SimDigit.h>

List of all members.

Public Member Functions

 SimDigit ()
 SimDigit (PlexPixelSpotId psid, RawChannelId rcid, Int_t adc=0, Int_t tdc=0, DigiSignal *signalPtr=NULL, Int_t errors=0)
void SetPixelSpotId (const PlexPixelSpotId &in)
void SetRawChannelId (const RawChannelId &in)
void SetADC (Int_t in)
void SetTDC (Int_t in)
void SetSignal (DigiSignal *in)
void SetErrors (Int_t in)
PlexPixelSpotId GetPixelSpotId (void) const
RawChannelId GetRawChannelId (void) const
Int_t GetADC (void) const
Int_t GetTDC (void) const
DigiSignalGetSignal (void) const
Int_t GetErrors (void) const
Double_t GetTime (void) const
const char * AsString (void) const
void ComputeTime (void)
const SimDigitoperator= (const SimDigit &rhs)

Private Attributes

PlexPixelSpotId fPsid
RawChannelId fRcid
Int_t fADC
Int_t fTDC
Int_t fErrors
DigiSignalfSignal
Double_t fTime

Detailed Description

Definition at line 24 of file SimDigit.h.


Constructor & Destructor Documentation

SimDigit::SimDigit (  )  [inline]

Definition at line 26 of file SimDigit.h.

00026 {};

SimDigit::SimDigit ( PlexPixelSpotId  psid,
RawChannelId  rcid,
Int_t  adc = 0,
Int_t  tdc = 0,
DigiSignal signalPtr = NULL,
Int_t  errors = 0 
) [inline]

Definition at line 27 of file SimDigit.h.

References ComputeTime().

00033               :
00034     fPsid(psid),
00035     fRcid(rcid),
00036     fADC(adc),
00037     fTDC(tdc),
00038     fErrors(errors),
00039     fSignal(signalPtr),
00040     fTime(0)
00041     { ComputeTime(); };


Member Function Documentation

const char * SimDigit::AsString ( void   )  const

Definition at line 26 of file SimDigit.cxx.

References PlexPixelSpotId::AsString(), RawChannelId::AsString(), fADC, fErrors, Form(), fPsid, fRcid, fSignal, fTDC, fTime, DigiSignal::GetTruth(), and Munits::ns.

Referenced by SimElectronics::AddDigit(), and SimQieElectronics::ReadoutPmt().

00027 {
00028   return Form("%s %s (%4d ADC) (%4d TDC = %2.1f ns) (%2d Errors) (0x%02x Truth)",
00029               fPsid.AsString(),
00030               fRcid.AsString(),
00031               fADC,
00032               fTDC,
00033               fTime/Munits::ns,
00034               fErrors,
00035               fSignal?(fSignal->GetTruth()):0
00036               );
00037 }

void SimDigit::ComputeTime ( void   ) 

Definition at line 39 of file SimDigit.cxx.

References fRcid, fTDC, fTime, Calibrator::GetTimeFromTDC(), and Calibrator::Instance().

Referenced by SetTDC(), and SimDigit().

00040 {
00041   // Convert TDC to Munits time.
00042 
00043   fTime = Calibrator::Instance().GetTimeFromTDC(fTDC,fRcid);
00044 }

Int_t SimDigit::GetADC ( void   )  const [inline]

Definition at line 54 of file SimDigit.h.

References fADC.

Referenced by SimDetector::CompileStats(), DetSim::Get(), and SimQieElectronics::ReadoutPmt().

00054 { return fADC; };

Int_t SimDigit::GetErrors ( void   )  const [inline]

Definition at line 57 of file SimDigit.h.

References fErrors.

Referenced by DetSim::Get(), and compareDigits::operator()().

00057 { return fErrors; };

PlexPixelSpotId SimDigit::GetPixelSpotId ( void   )  const [inline]

Definition at line 52 of file SimDigit.h.

References fPsid.

00052 { return fPsid; };

RawChannelId SimDigit::GetRawChannelId ( void   )  const [inline]

Definition at line 53 of file SimDigit.h.

References fRcid.

Referenced by SimDetector::AdjustTimeWithinSec(), and DetSim::Get().

00053 { return fRcid; };

DigiSignal* SimDigit::GetSignal ( void   )  const [inline]

Definition at line 56 of file SimDigit.h.

References fSignal.

Referenced by DetSim::Get().

00056 { return fSignal; };

Int_t SimDigit::GetTDC ( void   )  const [inline]

Definition at line 55 of file SimDigit.h.

References fTDC.

Referenced by SimDetector::AdjustTimeWithinSec(), and DetSim::Get().

00055 { return fTDC; };

Double_t SimDigit::GetTime ( void   )  const [inline]

Definition at line 58 of file SimDigit.h.

References fTime.

Referenced by compareDigits::operator()().

00058 { return fTime; };

const SimDigit & SimDigit::operator= ( const SimDigit rhs  ) 

Definition at line 14 of file SimDigit.cxx.

References fADC, fErrors, fPsid, fRcid, fSignal, fTDC, and fTime.

00015 {
00016   fPsid = rhs.fPsid;
00017   fRcid = rhs.fRcid;
00018   fADC = rhs.fADC;
00019   fTDC = rhs.fTDC;
00020   fErrors = rhs.fErrors;
00021   fSignal = rhs.fSignal;
00022   fTime   = rhs.fTime;
00023   return *this;
00024 }

void SimDigit::SetADC ( Int_t  in  )  [inline]

Definition at line 46 of file SimDigit.h.

References fADC.

00046 { fADC = in; };

void SimDigit::SetErrors ( Int_t  in  )  [inline]

Definition at line 49 of file SimDigit.h.

References fErrors.

00049 { fErrors = in; };

void SimDigit::SetPixelSpotId ( const PlexPixelSpotId in  )  [inline]

Definition at line 44 of file SimDigit.h.

References fPsid.

00044 { fPsid = in; };

void SimDigit::SetRawChannelId ( const RawChannelId in  )  [inline]

Definition at line 45 of file SimDigit.h.

References fRcid.

00045 { fRcid = in; };

void SimDigit::SetSignal ( DigiSignal in  )  [inline]

Definition at line 48 of file SimDigit.h.

References fSignal.

00048 { fSignal = in; };

void SimDigit::SetTDC ( Int_t  in  )  [inline]

Definition at line 47 of file SimDigit.h.

References ComputeTime(), and fTDC.

Referenced by SimDetector::AdjustTimeWithinSec().

00047 { fTDC = in; ComputeTime(); };


Member Data Documentation

Int_t SimDigit::fADC [private]

Definition at line 70 of file SimDigit.h.

Referenced by AsString(), GetADC(), operator=(), and SetADC().

Int_t SimDigit::fErrors [private]

Definition at line 72 of file SimDigit.h.

Referenced by AsString(), GetErrors(), operator=(), and SetErrors().

Definition at line 68 of file SimDigit.h.

Referenced by AsString(), GetPixelSpotId(), operator=(), and SetPixelSpotId().

Definition at line 69 of file SimDigit.h.

Referenced by AsString(), ComputeTime(), GetRawChannelId(), operator=(), and SetRawChannelId().

Definition at line 73 of file SimDigit.h.

Referenced by AsString(), GetSignal(), operator=(), and SetSignal().

Int_t SimDigit::fTDC [private]

Definition at line 71 of file SimDigit.h.

Referenced by AsString(), ComputeTime(), GetTDC(), operator=(), and SetTDC().

Double_t SimDigit::fTime [private]

Definition at line 74 of file SimDigit.h.

Referenced by AsString(), ComputeTime(), GetTime(), and operator=().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1