Geant4  10.02.p03
B5HadCalorimeterHit Class Reference

#include <B5HadCalorimeterHit.hh>

Inheritance diagram for B5HadCalorimeterHit:
Collaboration diagram for B5HadCalorimeterHit:

Public Member Functions

 B5HadCalorimeterHit ()
 
 B5HadCalorimeterHit (G4int iCol, G4int iRow)
 
 B5HadCalorimeterHit (const B5HadCalorimeterHit &right)
 
virtual ~B5HadCalorimeterHit ()
 
const B5HadCalorimeterHitoperator= (const B5HadCalorimeterHit &right)
 
int operator== (const B5HadCalorimeterHit &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 SetColumnID (G4int z)
 
G4int GetColumnID () const
 
void SetRowID (G4int z)
 
G4int GetRowID () const
 
void SetEdep (G4double de)
 
void AddEdep (G4double de)
 
G4double GetEdep () const
 
void SetPos (G4ThreeVector xyz)
 
G4ThreeVector GetPos () const
 
void SetRot (G4RotationMatrix rmat)
 
G4RotationMatrix GetRot () const
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 

Private Attributes

G4int fColumnID
 
G4int fRowID
 
G4double fEdep
 
G4ThreeVector fPos
 
G4RotationMatrix fRot
 

Detailed Description

Hadron Calorimeter hit

It records:

  • the cell column ID and row ID
  • the energy deposit
  • the cell position and rotation

Definition at line 52 of file B5HadCalorimeterHit.hh.

Constructor & Destructor Documentation

◆ B5HadCalorimeterHit() [1/3]

B5HadCalorimeterHit::B5HadCalorimeterHit ( )

Definition at line 52 of file B5HadCalorimeterHit.cc.

◆ B5HadCalorimeterHit() [2/3]

B5HadCalorimeterHit::B5HadCalorimeterHit ( G4int  iCol,
G4int  iRow 
)

Definition at line 58 of file B5HadCalorimeterHit.cc.

◆ B5HadCalorimeterHit() [3/3]

B5HadCalorimeterHit::B5HadCalorimeterHit ( const B5HadCalorimeterHit right)

Definition at line 69 of file B5HadCalorimeterHit.cc.

70 : G4VHit() {
71  fColumnID = right.fColumnID;
72  fRowID = right.fRowID;
73  fEdep = right.fEdep;
74  fPos = right.fPos;
75  fRot = right.fRot;
76 }
G4VHit()
Definition: G4VHit.cc:34

◆ ~B5HadCalorimeterHit()

B5HadCalorimeterHit::~B5HadCalorimeterHit ( )
virtual

Definition at line 64 of file B5HadCalorimeterHit.cc.

65 {}

Member Function Documentation

◆ AddEdep()

void B5HadCalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 78 of file B5HadCalorimeterHit.hh.

78 { fEdep += de; }
Here is the caller graph for this function:

◆ CreateAttValues()

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

Reimplemented from G4VHit.

Definition at line 147 of file B5HadCalorimeterHit.cc.

148 {
149  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
150 
151  values
152  ->push_back(G4AttValue("HitType","HadCalorimeterHit",""));
153  values
154  ->push_back(G4AttValue("Column",G4UIcommand::ConvertToString(fColumnID),
155  ""));
156  values
157  ->push_back(G4AttValue("Row",G4UIcommand::ConvertToString(fRowID),""));
158  values
159  ->push_back(G4AttValue("Energy",G4BestUnit(fEdep,"Energy"),""));
160  values
161  ->push_back(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
162 
163  return values;
164 }
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 B5HadCalorimeterHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 100 of file B5HadCalorimeterHit.cc.

101 {
103  if (pVVisManager&&(fEdep>0.))
104  {
105  // Draw a calorimeter cell with depth propotional to the energy deposition
106  G4Transform3D trans(fRot.inverse(),fPos);
107  G4VisAttributes attribs;
108  G4Colour colour(1.,0.,0.);
109  attribs.SetColour(colour);
110  attribs.SetForceSolid(true);
111  G4Box box("dummy",15.*cm,15.*cm,1.*m*fEdep/(0.1*GeV));
112  pVVisManager->Draw(box,attribs,trans);
113  }
114 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static const double cm
Definition: G4SIunits.hh:118
static G4VVisManager * GetConcreteInstance()
Definition: G4Box.hh:64
static const double GeV
Definition: G4SIunits.hh:214
static const double m
Definition: G4SIunits.hh:128
HepRotation inverse() const
Here is the call graph for this function:

◆ GetAttDefs()

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

Reimplemented from G4VHit.

Definition at line 118 of file B5HadCalorimeterHit.cc.

119 {
120  G4bool isNew;
121  std::map<G4String,G4AttDef>* store
122  = G4AttDefStore::GetInstance("B5HadCalorimeterHit",isNew);
123 
124  if (isNew) {
125  (*store)["HitType"]
126  = G4AttDef("HitType","Hit Type","Physics","","G4String");
127 
128  (*store)["Column"]
129  = G4AttDef("Column","Column ID","Physics","","G4int");
130 
131  (*store)["Row"]
132  = G4AttDef("Row","Row ID","Physics","","G4int");
133 
134  (*store)["Energy"]
135  = G4AttDef("Energy","Energy Deposited","Physics","G4BestUnit",
136  "G4double");
137 
138  (*store)["Pos"]
139  = G4AttDef("Pos", "Position", "Physics","G4BestUnit",
140  "G4ThreeVector");
141  }
142  return store;
143 }
bool G4bool
Definition: G4Types.hh:79
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
Here is the call graph for this function:

◆ GetColumnID()

G4int B5HadCalorimeterHit::GetColumnID ( ) const
inline

Definition at line 72 of file B5HadCalorimeterHit.hh.

72 { return fColumnID; }
Here is the caller graph for this function:

◆ GetEdep()

G4double B5HadCalorimeterHit::GetEdep ( ) const
inline

Definition at line 79 of file B5HadCalorimeterHit.hh.

79 { return fEdep; }
Here is the caller graph for this function:

◆ GetPos()

G4ThreeVector B5HadCalorimeterHit::GetPos ( ) const
inline

Definition at line 82 of file B5HadCalorimeterHit.hh.

82 { return fPos; }

◆ GetRot()

G4RotationMatrix B5HadCalorimeterHit::GetRot ( ) const
inline

Definition at line 85 of file B5HadCalorimeterHit.hh.

85 { return fRot; }

◆ GetRowID()

G4int B5HadCalorimeterHit::GetRowID ( ) const
inline

Definition at line 75 of file B5HadCalorimeterHit.hh.

75 { return fRowID; }

◆ operator delete()

void B5HadCalorimeterHit::operator delete ( void *  aHit)
inline

Definition at line 106 of file B5HadCalorimeterHit.hh.

107 {
109 }
G4ThreadLocal G4Allocator< B5HadCalorimeterHit > * B5HadCalorimeterHitAllocator

◆ operator new()

void * B5HadCalorimeterHit::operator new ( size_t  )
inline

Definition at line 99 of file B5HadCalorimeterHit.hh.

100 {
103  return (void*)B5HadCalorimeterHitAllocator->MallocSingle();
104 }
G4ThreadLocal G4Allocator< B5HadCalorimeterHit > * B5HadCalorimeterHitAllocator

◆ operator=()

const B5HadCalorimeterHit & B5HadCalorimeterHit::operator= ( const B5HadCalorimeterHit right)

Definition at line 80 of file B5HadCalorimeterHit.cc.

82 {
83  fColumnID = right.fColumnID;
84  fRowID = right.fRowID;
85  fEdep = right.fEdep;
86  fPos = right.fPos;
87  fRot = right.fRot;
88  return *this;
89 }

◆ operator==()

int B5HadCalorimeterHit::operator== ( const B5HadCalorimeterHit right) const

Definition at line 93 of file B5HadCalorimeterHit.cc.

94 {
95  return (fColumnID==right.fColumnID&&fRowID==right.fRowID);
96 }

◆ Print()

void B5HadCalorimeterHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 168 of file B5HadCalorimeterHit.cc.

169 {
170  G4cout << " Cell[" << fRowID << ", " << fColumnID << "] "
171  << fEdep/MeV << " (MeV) " << fPos << G4endl;
172 }
static const double MeV
Definition: G4SIunits.hh:211
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

◆ SetColumnID()

void B5HadCalorimeterHit::SetColumnID ( G4int  z)
inline

Definition at line 71 of file B5HadCalorimeterHit.hh.

Here is the caller graph for this function:

◆ SetEdep()

void B5HadCalorimeterHit::SetEdep ( G4double  de)
inline

Definition at line 77 of file B5HadCalorimeterHit.hh.

77 { fEdep = de; }

◆ SetPos()

void B5HadCalorimeterHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 81 of file B5HadCalorimeterHit.hh.

81 { fPos = xyz; }
Here is the caller graph for this function:

◆ SetRot()

void B5HadCalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 84 of file B5HadCalorimeterHit.hh.

84 { fRot = rmat; }
Here is the caller graph for this function:

◆ SetRowID()

void B5HadCalorimeterHit::SetRowID ( G4int  z)
inline

Definition at line 74 of file B5HadCalorimeterHit.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ fColumnID

G4int B5HadCalorimeterHit::fColumnID
private

Definition at line 88 of file B5HadCalorimeterHit.hh.

◆ fEdep

G4double B5HadCalorimeterHit::fEdep
private

Definition at line 90 of file B5HadCalorimeterHit.hh.

◆ fPos

G4ThreeVector B5HadCalorimeterHit::fPos
private

Definition at line 91 of file B5HadCalorimeterHit.hh.

◆ fRot

G4RotationMatrix B5HadCalorimeterHit::fRot
private

Definition at line 92 of file B5HadCalorimeterHit.hh.

◆ fRowID

G4int B5HadCalorimeterHit::fRowID
private

Definition at line 89 of file B5HadCalorimeterHit.hh.


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