Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
RE05CalorimeterHit Class Reference

#include <RE05CalorimeterHit.hh>

Inheritance diagram for RE05CalorimeterHit:
G4VHit

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 46 of file RE05CalorimeterHit.cc.

47 {pLogV=0;}
RE05CalorimeterHit::RE05CalorimeterHit ( G4LogicalVolume logVol,
G4int  z,
G4int  phi 
)

Definition at line 49 of file RE05CalorimeterHit.cc.

50 : ZCellID(z), PhiCellID(phi), pLogV(logVol)
51 {;}
G4double z
Definition: TRTMaterials.hh:39
RE05CalorimeterHit::~RE05CalorimeterHit ( )
virtual

Definition at line 53 of file RE05CalorimeterHit.cc.

54 {;}
RE05CalorimeterHit::RE05CalorimeterHit ( const RE05CalorimeterHit right)

Definition at line 56 of file RE05CalorimeterHit.cc.

57  : G4VHit()
58 {
59  ZCellID = right.ZCellID;
60  PhiCellID = right.PhiCellID;
61  edep = right.edep;
62  pos = right.pos;
63  rot = right.rot;
64  pLogV = right.pLogV;
65 }
G4VHit()
Definition: G4VHit.cc:34

Member Function Documentation

void RE05CalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 84 of file RE05CalorimeterHit.hh.

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

Reimplemented from G4VHit.

Definition at line 115 of file RE05CalorimeterHit.cc.

References G4UIcommand::ConvertToString(), and G4BestUnit.

116 {
117  // Create expendable G4AttsValues for picking...
118  std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
119  attValues->push_back
120  (G4AttValue("HitType","RE05CalorimeterHit",""));
121  attValues->push_back
122  (G4AttValue("ZID",G4UIcommand::ConvertToString(ZCellID),""));
123  attValues->push_back
124  (G4AttValue("PhiID",G4UIcommand::ConvertToString(PhiCellID),""));
125  attValues->push_back
126  (G4AttValue("EDep",G4BestUnit(edep,"Energy"),""));
127  //G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
128  return attValues;
129 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:357
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
void RE05CalorimeterHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 85 of file RE05CalorimeterHit.cc.

References G4VVisManager::Draw(), G4VVisManager::GetConcreteInstance(), G4LogicalVolume::GetVisAttributes(), G4VisAttributes::SetColour(), and G4VisAttributes::SetForceSolid().

86 {
88  if(pVVisManager)
89  {
90  G4Transform3D trans(rot,pos);
91  G4VisAttributes attribs;
92  const G4VisAttributes* pVA = pLogV->GetVisAttributes();
93  if(pVA) attribs = *pVA;
94  G4Colour colour(1.,0.,0.);
95  attribs.SetColour(colour);
96  attribs.SetForceSolid(true);
97  pVVisManager->Draw(*pLogV,attribs,trans);
98  }
99 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
static G4VVisManager * GetConcreteInstance()
void SetForceSolid(G4bool)
const G4VisAttributes * GetVisAttributes() const
const std::map< G4String, G4AttDef > * RE05CalorimeterHit::GetAttDefs ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 101 of file RE05CalorimeterHit.cc.

102 {
103  // G4AttDefs have to have long life. Use static member...
104  if (fAttDefs.empty()) {
105  fAttDefs["HitType"] =
106  G4AttDef("HitType","Type of hit","Physics","","G4String");
107  fAttDefs["ZID"] = G4AttDef("ZID","Z Cell ID","Physics","","G4int");
108  fAttDefs["PhiID"] = G4AttDef("PhiID","Phi Cell ID","Physics","","G4int");
109  fAttDefs["EDep"] =
110  G4AttDef("EDep","Energy deposited","Physics","G4BestUnit","G4double");
111  }
112  return &fAttDefs;
113 }
G4double RE05CalorimeterHit::GetEdep ( )
inline

Definition at line 86 of file RE05CalorimeterHit.hh.

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

Definition at line 96 of file RE05CalorimeterHit.hh.

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

Definition at line 81 of file RE05CalorimeterHit.hh.

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

Definition at line 90 of file RE05CalorimeterHit.hh.

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

Definition at line 94 of file RE05CalorimeterHit.hh.

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

Definition at line 80 of file RE05CalorimeterHit.hh.

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

Definition at line 112 of file RE05CalorimeterHit.hh.

References RE05CalorimeterHitAllocator.

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.

References RE05CalorimeterHitAllocator.

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

Definition at line 67 of file RE05CalorimeterHit.cc.

68 {
69  ZCellID = right.ZCellID;
70  PhiCellID = right.PhiCellID;
71  edep = right.edep;
72  pos = right.pos;
73  rot = right.rot;
74  pLogV = right.pLogV;
75  return *this;
76 }
G4int RE05CalorimeterHit::operator== ( const RE05CalorimeterHit right) const

Definition at line 78 of file RE05CalorimeterHit.cc.

79 {
80  return ((ZCellID==right.ZCellID)&&(PhiCellID==right.PhiCellID));
81 }
void RE05CalorimeterHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 131 of file RE05CalorimeterHit.cc.

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

Definition at line 75 of file RE05CalorimeterHit.hh.

References z.

76  {
77  ZCellID = z;
78  PhiCellID = phi;
79  }
G4double z
Definition: TRTMaterials.hh:39
void RE05CalorimeterHit::SetEdep ( G4double  de)
inline

Definition at line 82 of file RE05CalorimeterHit.hh.

Referenced by RE05CalorimeterSD::ProcessHits().

83  { edep = de; }
void RE05CalorimeterHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 88 of file RE05CalorimeterHit.hh.

Referenced by RE05CalorimeterSD::ProcessHits().

89  { pos = xyz; }
void RE05CalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 92 of file RE05CalorimeterHit.hh.

Referenced by RE05CalorimeterSD::ProcessHits().

93  { rot = rmat; }

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