SimPmtTimeBucket Class Reference

#include <SimPmtTimeBucket.h>

List of all members.

Public Member Functions

 SimPmtTimeBucket (int nPixels, int nSpots)
 ~SimPmtTimeBucket ()
void AddDigiPE (const DigiPE *digipe, Int_t pixel, Int_t spot)
SimPixelTimeBucketGetPixelBucket (int ipixel)
Float_t GetTotalCharge () const
Double_t GetDynodeTime () const
void AddTotalCharge (Float_t q)
void SetDynodeTime (Double_t t)

Private Member Functions

 SimPmtTimeBucket ()

Private Attributes

Int_t fNPixels
TClonesArray fPixels
Float_t fTotalCharge
Double_t fDynodeTime

Detailed Description

Definition at line 10 of file SimPmtTimeBucket.h.


Constructor & Destructor Documentation

SimPmtTimeBucket::SimPmtTimeBucket ( int  nPixels,
int  nSpots 
)

Definition at line 22 of file SimPmtTimeBucket.cxx.

References fNPixels, and fPixels.

00022                                                             :
00023   fNPixels(nPixels),
00024   fPixels(SimPixelTimeBucket::Class(),nPixels),
00025   fTotalCharge(0),
00026   fDynodeTime(kPmtTime_Never)
00027 {
00028   // Creator.
00029 
00030   // Fill the pixel array with new pixel objects
00031 
00032   for(int i=0;i<fNPixels;i++) {
00033     new(fPixels[i]) SimPixelTimeBucket(nSpots);
00034   }
00035   
00036 
00037 }

SimPmtTimeBucket::~SimPmtTimeBucket (  ) 

Definition at line 39 of file SimPmtTimeBucket.cxx.

References fPixels.

00040 {
00041   // Delete all the objects from the pixel array
00042 
00043   fPixels.Delete();
00044 
00045 }

SimPmtTimeBucket::SimPmtTimeBucket (  )  [private]

Definition at line 11 of file SimPmtTimeBucket.cxx.

References Msg::kError, and MSG.

00011                                    :
00012   fNPixels(0),
00013   fPixels(SimPixelTimeBucket::Class(),0),
00014   fTotalCharge(0),
00015   fDynodeTime(kPmtTime_Never)
00016 {  
00017   // Do not use. I/O only.
00018 
00019   MSG("DetSim",Msg::kError) << "SimPmtTimeBucket default constructor called.. this should never happen!" << endl;
00020 }


Member Function Documentation

void SimPmtTimeBucket::AddDigiPE ( const DigiPE digipe,
Int_t  pixel,
Int_t  spot 
)

Definition at line 48 of file SimPmtTimeBucket.cxx.

References PlexPixelSpotId::AsString(), fNPixels, fPixels, DigiPE::GetPixelSpotId(), Msg::kWarning, and MSG.

Referenced by SimPmt::AddDigiPE().

00049 {
00050   // Add the digipe to the pixel given 
00051   // (not to the pixel in the DigiPE, which has the wrong numbering
00052   // because, as I've said before, the database is STUPID).
00053   //
00054   
00055   //int pix = digipe->GetPixelSpotId().GetPixel();
00056 
00057   if((pix >0) && (pix <= fNPixels)) {
00058     ((SimPixelTimeBucket*)(fPixels[pix-1]))->AddDigiPE(digipe,spot);
00059   } else {
00060     MSG("DetSim",Msg::kWarning) << "AddDigiPE() Invalid pixel number " << pix << " psid:" << digipe->GetPixelSpotId().AsString() << endl;
00061   }
00062 }

void SimPmtTimeBucket::AddTotalCharge ( Float_t  q  )  [inline]
Double_t SimPmtTimeBucket::GetDynodeTime (  )  const [inline]

Definition at line 20 of file SimPmtTimeBucket.h.

References fDynodeTime.

Referenced by SimPmt::GetDynodeTime().

00020 { return fDynodeTime; };

SimPixelTimeBucket & SimPmtTimeBucket::GetPixelBucket ( int  ipixel  )  [inline]
Float_t SimPmtTimeBucket::GetTotalCharge ( void   )  const [inline]

Definition at line 19 of file SimPmtTimeBucket.h.

References fTotalCharge.

Referenced by SimPmt::GetDynodeCharge().

00019 { return fTotalCharge; };

void SimPmtTimeBucket::SetDynodeTime ( Double_t  t  )  [inline]

Definition at line 22 of file SimPmtTimeBucket.h.

References fDynodeTime.

Referenced by SimPmt::AddDigiPE().

00022 { if(t<fDynodeTime) fDynodeTime = t;};


Member Data Documentation

Double_t SimPmtTimeBucket::fDynodeTime [private]

Definition at line 30 of file SimPmtTimeBucket.h.

Referenced by GetDynodeTime(), and SetDynodeTime().

Int_t SimPmtTimeBucket::fNPixels [private]

Definition at line 22 of file SimPmtTimeBucket.h.

Referenced by AddDigiPE(), GetPixelBucket(), and SimPmtTimeBucket().

TClonesArray SimPmtTimeBucket::fPixels [mutable, private]

Definition at line 27 of file SimPmtTimeBucket.h.

Referenced by AddDigiPE(), GetPixelBucket(), SimPmtTimeBucket(), and ~SimPmtTimeBucket().

Float_t SimPmtTimeBucket::fTotalCharge [private]

Definition at line 29 of file SimPmtTimeBucket.h.

Referenced by AddTotalCharge(), and GetTotalCharge().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1