Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE05CalorimeterHit Class Reference

#include <RE05CalorimeterHit.hh>

Inheritance diagram for RE05CalorimeterHit:
Collaboration diagram for RE05CalorimeterHit:

Public Member Functions

 RE05CalorimeterHit ()
 
 RE05CalorimeterHit (G4LogicalVolume *logVol, G4int z, G4int phi)
 
virtual ~RE05CalorimeterHit ()
 
 RE05CalorimeterHit (const RE05CalorimeterHit &right)
 
const RE05CalorimeterHitoperator= (const RE05CalorimeterHit &right)
 
G4int operator== (const RE05CalorimeterHit &right) const
 
voidoperator new (size_t)
 
void operator delete (void *aHit)
 
virtual void Draw ()
 
virtual const std::map
< G4String, G4AttDef > * 
GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
virtual void Print ()
 
void SetCellID (G4int z, G4int phi)
 
G4int GetZ ()
 
G4int GetPhi ()
 
void SetEdep (G4double de)
 
void AddEdep (G4double de)
 
G4double GetEdep ()
 
void SetPos (G4ThreeVector xyz)
 
G4ThreeVector GetPos ()
 
void SetRot (G4RotationMatrix rmat)
 
G4RotationMatrix GetRot ()
 
const G4LogicalVolumeGetLogV ()
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 

Detailed Description

Definition at line 46 of file RE05CalorimeterHit.hh.

Constructor & Destructor Documentation

RE05CalorimeterHit::RE05CalorimeterHit ( )

Definition at line 50 of file RE05CalorimeterHit.cc.

51 : G4VHit(),
52  fZCellID(-1),fPhiCellID(-1),fEdep(0.),fPos(),fRot(),fLogV(0)
53 {}
G4VHit()
Definition: G4VHit.cc:34
RE05CalorimeterHit::RE05CalorimeterHit ( G4LogicalVolume logVol,
G4int  z,
G4int  phi 
)

Definition at line 57 of file RE05CalorimeterHit.cc.

58 : G4VHit(),
59  fZCellID(z), fPhiCellID(phi),fEdep(0.),fPos(),fRot(),fLogV(logVol)
60 {}
G4VHit()
Definition: G4VHit.cc:34
tuple z
Definition: test.py:28
RE05CalorimeterHit::~RE05CalorimeterHit ( )
virtual

Definition at line 64 of file RE05CalorimeterHit.cc.

65 {}
RE05CalorimeterHit::RE05CalorimeterHit ( const RE05CalorimeterHit right)

Definition at line 69 of file RE05CalorimeterHit.cc.

70  : G4VHit()
71 {
72  fZCellID = right.fZCellID;
73  fPhiCellID = right.fPhiCellID;
74  fEdep = right.fEdep;
75  fPos = right.fPos;
76  fRot = right.fRot;
77  fLogV = right.fLogV;
78 }
G4VHit()
Definition: G4VHit.cc:34

Member Function Documentation

void RE05CalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 84 of file RE05CalorimeterHit.hh.

85  { fEdep += de; }
std::vector< G4AttValue > * RE05CalorimeterHit::CreateAttValues ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 136 of file RE05CalorimeterHit.cc.

137 {
138  // Create expendable G4AttsValues for picking...
139  std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
140  attValues->push_back
141  (G4AttValue("HitType","RE05CalorimeterHit",""));
142  attValues->push_back
143  (G4AttValue("ZID",G4UIcommand::ConvertToString(fZCellID),""));
144  attValues->push_back
145  (G4AttValue("PhiID",G4UIcommand::ConvertToString(fPhiCellID),""));
146  attValues->push_back
147  (G4AttValue("EDep",G4BestUnit(fEdep,"Energy"),""));
148  //G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
149  return attValues;
150 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1

Here is the call graph for this function:

void RE05CalorimeterHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 102 of file RE05CalorimeterHit.cc.

103 {
105  if(pVVisManager)
106  {
107  G4Transform3D trans(fRot,fPos);
108  G4VisAttributes attribs;
109  const G4VisAttributes* pVA = fLogV->GetVisAttributes();
110  if(pVA) attribs = *pVA;
111  G4Colour colour(1.,0.,0.);
112  attribs.SetColour(colour);
113  attribs.SetForceSolid(true);
114  pVVisManager->Draw(*fLogV,attribs,trans);
115  }
116 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
static G4VVisManager * GetConcreteInstance()
void SetForceSolid(G4bool=true)
const G4VisAttributes * GetVisAttributes() const

Here is the call graph for this function:

const std::map< G4String, G4AttDef > * RE05CalorimeterHit::GetAttDefs ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 120 of file RE05CalorimeterHit.cc.

121 {
122  // G4AttDefs have to have long life. Use static member...
123  if (fAttDefs.empty()) {
124  fAttDefs["HitType"] =
125  G4AttDef("HitType","Type of hit","Physics","","G4String");
126  fAttDefs["ZID"] = G4AttDef("ZID","Z Cell ID","Physics","","G4int");
127  fAttDefs["PhiID"] = G4AttDef("PhiID","Phi Cell ID","Physics","","G4int");
128  fAttDefs["EDep"] =
129  G4AttDef("EDep","Energy defPosited","Physics","G4BestUnit","G4double");
130  }
131  return &fAttDefs;
132 }
G4double RE05CalorimeterHit::GetEdep ( )
inline

Definition at line 86 of file RE05CalorimeterHit.hh.

87  { return fEdep; }
const G4LogicalVolume* RE05CalorimeterHit::GetLogV ( )
inline

Definition at line 96 of file RE05CalorimeterHit.hh.

97  { return fLogV; }
G4int RE05CalorimeterHit::GetPhi ( )
inline

Definition at line 81 of file RE05CalorimeterHit.hh.

81 { return fPhiCellID; }
G4ThreeVector RE05CalorimeterHit::GetPos ( )
inline

Definition at line 90 of file RE05CalorimeterHit.hh.

91  { return fPos; }
G4RotationMatrix RE05CalorimeterHit::GetRot ( )
inline

Definition at line 94 of file RE05CalorimeterHit.hh.

95  { return fRot; }
G4int RE05CalorimeterHit::GetZ ( )
inline

Definition at line 80 of file RE05CalorimeterHit.hh.

80 { return fZCellID; }
void RE05CalorimeterHit::operator delete ( void aHit)
inline

Definition at line 112 of file RE05CalorimeterHit.hh.

113 {
114  RE05CalorimeterHitAllocator->FreeSingle((RE05CalorimeterHit*) aHit);
115 }
G4ThreadLocal G4Allocator< RE05CalorimeterHit > * RE05CalorimeterHitAllocator
void * RE05CalorimeterHit::operator new ( size_t  )
inline

Definition at line 105 of file RE05CalorimeterHit.hh.

106 {
109  return (void*) RE05CalorimeterHitAllocator->MallocSingle();
110 }
G4ThreadLocal G4Allocator< RE05CalorimeterHit > * RE05CalorimeterHitAllocator
const RE05CalorimeterHit & RE05CalorimeterHit::operator= ( const RE05CalorimeterHit right)

Definition at line 82 of file RE05CalorimeterHit.cc.

83 {
84  fZCellID = right.fZCellID;
85  fPhiCellID = right.fPhiCellID;
86  fEdep = right.fEdep;
87  fPos = right.fPos;
88  fRot = right.fRot;
89  fLogV = right.fLogV;
90  return *this;
91 }
G4int RE05CalorimeterHit::operator== ( const RE05CalorimeterHit right) const

Definition at line 95 of file RE05CalorimeterHit.cc.

96 {
97  return ((fZCellID==right.fZCellID)&&(fPhiCellID==right.fPhiCellID));
98 }
void RE05CalorimeterHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 154 of file RE05CalorimeterHit.cc.

155 {}
void RE05CalorimeterHit::SetCellID ( G4int  z,
G4int  phi 
)
inline

Definition at line 75 of file RE05CalorimeterHit.hh.

76  {
77  fZCellID = z;
78  fPhiCellID = phi;
79  }
tuple z
Definition: test.py:28
void RE05CalorimeterHit::SetEdep ( G4double  de)
inline

Definition at line 82 of file RE05CalorimeterHit.hh.

83  { fEdep = de; }

Here is the caller graph for this function:

void RE05CalorimeterHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 88 of file RE05CalorimeterHit.hh.

89  { fPos = xyz; }

Here is the caller graph for this function:

void RE05CalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 92 of file RE05CalorimeterHit.hh.

93  { fRot = rmat; }

Here is the caller graph for this function:


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