BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcDigi.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//Author: Yuan Ye([email protected])
6//Created: Oct.26, 2004
7//Modified:
8//Comment:
9//---------------------------------------------------------------------------//
10
11#ifndef BesMdcDigi_h
12#define BesMdcDigi_h 1
13
14#include "G4VDigi.hh"
15#include "G4TDigiCollection.hh"
16#include "G4Allocator.hh"
17#include "G4ThreeVector.hh"
18
19class BesMdcDigi : public G4VDigi
20{
21 public:
22 BesMdcDigi();
23 virtual ~BesMdcDigi();
24
25 BesMdcDigi(const BesMdcDigi&);
26 const BesMdcDigi& operator=(const BesMdcDigi&);
27
28 virtual G4int operator==(const BesMdcDigi&) const;
29 inline void* operator new(size_t);
30 inline void operator delete(void*);
31
32 // virtual void Draw();
33 virtual void Print();
34
35public:
36
37 void SetTrackID (G4int track) { trackID = track; };
38 void SetLayerNo (G4int layer) { layerNo = layer; };
39 void SetCellNo (G4int cell) { cellNo =cell;};
40 void SetEdep (G4double de) { edep = de; };
41 void SetDriftT (G4double time) { driftT = time;};
42
43 G4int GetTrackID() { return trackID; };
44 G4int GetLayerNo() { return layerNo; };
45 G4int GetCellNo() { return cellNo;};
46 G4double GetEdep() { return edep; };
47 G4double GetDriftT() { return driftT;};
48
49private:
50
51 G4int trackID;
52 G4int layerNo;
53 G4int cellNo;
54 G4double edep;
55 G4double driftT;
56
57};
58
59typedef G4TDigiCollection<BesMdcDigi> BesMdcDigisCollection;
60
61extern G4Allocator<BesMdcDigi> BesMdcDigiAllocator;
62
63inline void* BesMdcDigi::operator new(size_t)
64{
65 void *aDigi;
66 aDigi = (void *) BesMdcDigiAllocator.MallocSingle();
67 return aDigi;
68}
69
70inline void BesMdcDigi::operator delete(void *aDigi)
71{
72 BesMdcDigiAllocator.FreeSingle((BesMdcDigi*) aDigi);
73}
74
75#endif
76
G4TDigiCollection< BesMdcDigi > BesMdcDigisCollection
Definition BesMdcDigi.hh:59
G4Allocator< BesMdcDigi > BesMdcDigiAllocator
Definition BesMdcDigi.cc:18
Double_t time
virtual void Print()
Definition BesMdcDigi.cc:75
void SetEdep(G4double de)
Definition BesMdcDigi.hh:40
G4int GetLayerNo()
Definition BesMdcDigi.hh:44
G4double GetEdep()
Definition BesMdcDigi.hh:46
void SetCellNo(G4int cell)
Definition BesMdcDigi.hh:39
virtual ~BesMdcDigi()
Definition BesMdcDigi.cc:29
const BesMdcDigi & operator=(const BesMdcDigi &)
Definition BesMdcDigi.cc:42
void SetDriftT(G4double time)
Definition BesMdcDigi.hh:41
G4int GetCellNo()
Definition BesMdcDigi.hh:45
G4int GetTrackID()
Definition BesMdcDigi.hh:43
G4double GetDriftT()
Definition BesMdcDigi.hh:47
void SetTrackID(G4int track)
Definition BesMdcDigi.hh:37
virtual G4int operator==(const BesMdcDigi &) const
Definition BesMdcDigi.cc:53
void SetLayerNo(G4int layer)
Definition BesMdcDigi.hh:38