Geant4  10.02.p03
B5HodoscopeHit Class Reference

#include <B5HodoscopeHit.hh>

Inheritance diagram for B5HodoscopeHit:
Collaboration diagram for B5HodoscopeHit:

Public Member Functions

 B5HodoscopeHit (G4int i, G4double t)
 
 B5HodoscopeHit (const B5HodoscopeHit &right)
 
virtual ~B5HodoscopeHit ()
 
const B5HodoscopeHitoperator= (const B5HodoscopeHit &right)
 
int operator== (const B5HodoscopeHit &right) const
 
void * operator new (size_t)
 
void operator delete (void *aHit)
 
void Draw ()
 
virtual const std::map< G4String, G4AttDef > * GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
void Print ()
 
G4int GetID () const
 
void SetTime (G4double val)
 
G4double GetTime () const
 
void SetPos (G4ThreeVector xyz)
 
G4ThreeVector GetPos () const
 
void SetRot (G4RotationMatrix rmat)
 
G4RotationMatrix GetRot () const
 
void SetLogV (G4LogicalVolume *val)
 
const G4LogicalVolumeGetLogV () const
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 

Private Attributes

G4int fId
 
G4double fTime
 
G4ThreeVector fPos
 
G4RotationMatrix fRot
 
const G4LogicalVolumefPLogV
 

Detailed Description

Hodoscope hit

It records:

  • the strip ID
  • the particle time
  • the strip logical volume, its position and rotation

Definition at line 52 of file B5HodoscopeHit.hh.

Constructor & Destructor Documentation

◆ B5HodoscopeHit() [1/2]

B5HodoscopeHit::B5HodoscopeHit ( G4int  i,
G4double  t 
)

Definition at line 51 of file B5HodoscopeHit.cc.

52 : G4VHit(), fId(i), fTime(t), fPos(0), fPLogV(0)
53 {}
G4VHit()
Definition: G4VHit.cc:34
const G4LogicalVolume * fPLogV
G4ThreeVector fPos

◆ B5HodoscopeHit() [2/2]

B5HodoscopeHit::B5HodoscopeHit ( const B5HodoscopeHit right)

Definition at line 62 of file B5HodoscopeHit.cc.

63 : G4VHit() {
64  fId = right.fId;
65  fTime = right.fTime;
66  fPos = right.fPos;
67  fRot = right.fRot;
68  fPLogV = right.fPLogV;
69 }
G4VHit()
Definition: G4VHit.cc:34
const G4LogicalVolume * fPLogV
G4ThreeVector fPos
G4RotationMatrix fRot

◆ ~B5HodoscopeHit()

B5HodoscopeHit::~B5HodoscopeHit ( )
virtual

Definition at line 57 of file B5HodoscopeHit.cc.

58 {}

Member Function Documentation

◆ CreateAttValues()

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

Reimplemented from G4VHit.

Definition at line 137 of file B5HodoscopeHit.cc.

138 {
139  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
140 
141  values
142  ->push_back(G4AttValue("HitType","HodoscopeHit",""));
143  values
144  ->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fId),""));
145  values
146  ->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
147  values
148  ->push_back(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
149 
150  if (fPLogV)
151  values->push_back(G4AttValue("LVol",fPLogV->GetName(),""));
152  else
153  values->push_back(G4AttValue("LVol"," ",""));
154 
155  return values;
156 }
const G4LogicalVolume * fPLogV
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:371
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4String & GetName() const
G4ThreeVector fPos
Here is the call graph for this function:

◆ Draw()

void B5HodoscopeHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 92 of file B5HodoscopeHit.cc.

93 {
95  if (pVVisManager)
96  {
97  G4Transform3D trans(fRot.inverse(),fPos);
98  G4VisAttributes attribs;
99  const G4VisAttributes* pVA = fPLogV->GetVisAttributes();
100  if (pVA) attribs = *pVA;
101  G4Colour colour(0.,1.,1.);
102  attribs.SetColour(colour);
103  attribs.SetForceSolid(true);
104  pVVisManager->Draw(*fPLogV,attribs,trans);
105  }
106 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static G4VVisManager * GetConcreteInstance()
const G4LogicalVolume * fPLogV
const G4VisAttributes * GetVisAttributes() const
G4ThreeVector fPos
HepRotation inverse() const
G4RotationMatrix fRot
Here is the call graph for this function:

◆ GetAttDefs()

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

Reimplemented from G4VHit.

Definition at line 110 of file B5HodoscopeHit.cc.

111 {
112  G4bool isNew;
113  std::map<G4String,G4AttDef>* store
114  = G4AttDefStore::GetInstance("B5HodoscopeHit",isNew);
115 
116  if (isNew) {
117  (*store)["HitType"]
118  = G4AttDef("HitType","Hit Type","Physics","","G4String");
119 
120  (*store)["ID"]
121  = G4AttDef("ID","ID","Physics","","G4int");
122 
123  (*store)["Time"]
124  = G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
125 
126  (*store)["Pos"]
127  = G4AttDef("Pos","Position","Physics","G4BestUnit","G4ThreeVector");
128 
129  (*store)["LVol"]
130  = G4AttDef("LVol","Logical Volume","Physics","","G4String");
131  }
132  return store;
133 }
bool G4bool
Definition: G4Types.hh:79
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
Here is the call graph for this function:

◆ GetID()

G4int B5HodoscopeHit::GetID ( ) const
inline

Definition at line 70 of file B5HodoscopeHit.hh.

70 { return fId; }

◆ GetLogV()

const G4LogicalVolume* B5HodoscopeHit::GetLogV ( ) const
inline

Definition at line 82 of file B5HodoscopeHit.hh.

82 { return fPLogV; }
const G4LogicalVolume * fPLogV

◆ GetPos()

G4ThreeVector B5HodoscopeHit::GetPos ( ) const
inline

Definition at line 76 of file B5HodoscopeHit.hh.

76 { return fPos; }
G4ThreeVector fPos

◆ GetRot()

G4RotationMatrix B5HodoscopeHit::GetRot ( ) const
inline

Definition at line 79 of file B5HodoscopeHit.hh.

79 { return fRot; }
G4RotationMatrix fRot

◆ GetTime()

G4double B5HodoscopeHit::GetTime ( ) const
inline

Definition at line 73 of file B5HodoscopeHit.hh.

73 { return fTime; }

◆ operator delete()

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

Definition at line 103 of file B5HodoscopeHit.hh.

104 {
105  B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
106 }
G4ThreadLocal G4Allocator< B5HodoscopeHit > * B5HodoscopeHitAllocator

◆ operator new()

void * B5HodoscopeHit::operator new ( size_t  )
inline

Definition at line 96 of file B5HodoscopeHit.hh.

97 {
100  return (void*)B5HodoscopeHitAllocator->MallocSingle();
101 }
G4ThreadLocal G4Allocator< B5HodoscopeHit > * B5HodoscopeHitAllocator

◆ operator=()

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

Definition at line 73 of file B5HodoscopeHit.cc.

74 {
75  fId = right.fId;
76  fTime = right.fTime;
77  fPos = right.fPos;
78  fRot = right.fRot;
79  fPLogV = right.fPLogV;
80  return *this;
81 }
const G4LogicalVolume * fPLogV
G4ThreeVector fPos
G4RotationMatrix fRot

◆ operator==()

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

Definition at line 85 of file B5HodoscopeHit.cc.

86 {
87  return 0;
88 }

◆ Print()

void B5HodoscopeHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 160 of file B5HodoscopeHit.cc.

161 {
162  G4cout << " Hodoscope[" << fId << "] " << fTime/ns << " (nsec)" << G4endl;
163 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
#define ns
Definition: xmlparse.cc:614
Here is the caller graph for this function:

◆ SetLogV()

void B5HodoscopeHit::SetLogV ( G4LogicalVolume val)
inline

Definition at line 81 of file B5HodoscopeHit.hh.

81 { fPLogV = val; }
const G4LogicalVolume * fPLogV
Here is the caller graph for this function:

◆ SetPos()

void B5HodoscopeHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 75 of file B5HodoscopeHit.hh.

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

◆ SetRot()

void B5HodoscopeHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 78 of file B5HodoscopeHit.hh.

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

◆ SetTime()

void B5HodoscopeHit::SetTime ( G4double  val)
inline

Definition at line 72 of file B5HodoscopeHit.hh.

72 { fTime = val; }

Member Data Documentation

◆ fId

G4int B5HodoscopeHit::fId
private

Definition at line 85 of file B5HodoscopeHit.hh.

◆ fPLogV

const G4LogicalVolume* B5HodoscopeHit::fPLogV
private

Definition at line 89 of file B5HodoscopeHit.hh.

◆ fPos

G4ThreeVector B5HodoscopeHit::fPos
private

Definition at line 87 of file B5HodoscopeHit.hh.

◆ fRot

G4RotationMatrix B5HodoscopeHit::fRot
private

Definition at line 88 of file B5HodoscopeHit.hh.

◆ fTime

G4double B5HodoscopeHit::fTime
private

Definition at line 86 of file B5HodoscopeHit.hh.


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