Geant4  10.02.p03
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
 
void * operator 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
 

Private Attributes

G4int ZCellID
 
G4int PhiCellID
 
G4double edep
 
G4ThreeVector pos
 
G4RotationMatrix rot
 
const G4LogicalVolumepLogV
 

Static Private Attributes

static std::map< G4String, G4AttDeffAttDefs
 

Detailed Description

Definition at line 46 of file RE05CalorimeterHit.hh.

Constructor & Destructor Documentation

◆ RE05CalorimeterHit() [1/3]

RE05CalorimeterHit::RE05CalorimeterHit ( )

Definition at line 46 of file RE05CalorimeterHit.cc.

47 {pLogV=0;}
const G4LogicalVolume * pLogV

◆ RE05CalorimeterHit() [2/3]

RE05CalorimeterHit::RE05CalorimeterHit ( G4LogicalVolume logVol,
G4int  z,
G4int  phi 
)

Definition at line 49 of file RE05CalorimeterHit.cc.

50 : ZCellID(z), PhiCellID(phi), pLogV(logVol)
51 {;}
const G4LogicalVolume * pLogV

◆ ~RE05CalorimeterHit()

RE05CalorimeterHit::~RE05CalorimeterHit ( )
virtual

Definition at line 53 of file RE05CalorimeterHit.cc.

54 {;}

◆ RE05CalorimeterHit() [3/3]

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
const G4LogicalVolume * pLogV
G4RotationMatrix rot

Member Function Documentation

◆ AddEdep()

void RE05CalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 84 of file RE05CalorimeterHit.hh.

85  { edep += de; }

◆ CreateAttValues()

std::vector< G4AttValue > * RE05CalorimeterHit::CreateAttValues ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 115 of file RE05CalorimeterHit.cc.

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
123  attValues->push_back
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:371
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Here is the call graph for this function:

◆ Draw()

void RE05CalorimeterHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 85 of file RE05CalorimeterHit.cc.

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 G4LogicalVolume * pLogV
const G4VisAttributes * GetVisAttributes() const
G4RotationMatrix rot
Here is the call graph for this function:

◆ GetAttDefs()

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 }
static std::map< G4String, G4AttDef > fAttDefs

◆ GetEdep()

G4double RE05CalorimeterHit::GetEdep ( )
inline

Definition at line 86 of file RE05CalorimeterHit.hh.

87  { return edep; }

◆ GetLogV()

const G4LogicalVolume* RE05CalorimeterHit::GetLogV ( )
inline

Definition at line 96 of file RE05CalorimeterHit.hh.

97  { return pLogV; }
const G4LogicalVolume * pLogV

◆ GetPhi()

G4int RE05CalorimeterHit::GetPhi ( )
inline

Definition at line 81 of file RE05CalorimeterHit.hh.

81 { return PhiCellID; }

◆ GetPos()

G4ThreeVector RE05CalorimeterHit::GetPos ( )
inline

Definition at line 90 of file RE05CalorimeterHit.hh.

91  { return pos; }

◆ GetRot()

G4RotationMatrix RE05CalorimeterHit::GetRot ( )
inline

Definition at line 94 of file RE05CalorimeterHit.hh.

95  { return rot; }
G4RotationMatrix rot

◆ GetZ()

G4int RE05CalorimeterHit::GetZ ( )
inline

Definition at line 80 of file RE05CalorimeterHit.hh.

80 { return ZCellID; }

◆ operator delete()

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

◆ operator new()

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

◆ operator=()

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 }
const G4LogicalVolume * pLogV
G4RotationMatrix rot

◆ operator==()

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 }

◆ Print()

void RE05CalorimeterHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 131 of file RE05CalorimeterHit.cc.

132 {;}

◆ SetCellID()

void RE05CalorimeterHit::SetCellID ( G4int  z,
G4int  phi 
)
inline

Definition at line 75 of file RE05CalorimeterHit.hh.

76  {
77  ZCellID = z;
78  PhiCellID = phi;
79  }

◆ SetEdep()

void RE05CalorimeterHit::SetEdep ( G4double  de)
inline

Definition at line 82 of file RE05CalorimeterHit.hh.

83  { edep = de; }
Here is the caller graph for this function:

◆ SetPos()

void RE05CalorimeterHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 88 of file RE05CalorimeterHit.hh.

89  { pos = xyz; }
Here is the caller graph for this function:

◆ SetRot()

void RE05CalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 92 of file RE05CalorimeterHit.hh.

93  { rot = rmat; }
G4RotationMatrix rot
Here is the caller graph for this function:

Member Data Documentation

◆ edep

G4double RE05CalorimeterHit::edep
private

Definition at line 68 of file RE05CalorimeterHit.hh.

◆ fAttDefs

std::map< G4String, G4AttDef > RE05CalorimeterHit::fAttDefs
staticprivate

Definition at line 72 of file RE05CalorimeterHit.hh.

◆ PhiCellID

G4int RE05CalorimeterHit::PhiCellID
private

Definition at line 67 of file RE05CalorimeterHit.hh.

◆ pLogV

const G4LogicalVolume* RE05CalorimeterHit::pLogV
private

Definition at line 71 of file RE05CalorimeterHit.hh.

◆ pos

G4ThreeVector RE05CalorimeterHit::pos
private

Definition at line 69 of file RE05CalorimeterHit.hh.

◆ rot

G4RotationMatrix RE05CalorimeterHit::rot
private

Definition at line 70 of file RE05CalorimeterHit.hh.

◆ ZCellID

G4int RE05CalorimeterHit::ZCellID
private

Definition at line 66 of file RE05CalorimeterHit.hh.


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