Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 
voidoperator 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
 

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::B5HodoscopeHit ( G4int  i,
G4double  t 
)

Definition at line 51 of file B5HodoscopeHit.cc.

52 : G4VHit(),
53  fId(id), fTime(time), fPos(0.), fPLogV(nullptr)
54 {}
G4VHit()
Definition: G4VHit.cc:34
B5HodoscopeHit::B5HodoscopeHit ( const B5HodoscopeHit right)

Definition at line 63 of file B5HodoscopeHit.cc.

64 : G4VHit(),
65  fId(right.fId),
66  fTime(right.fTime),
67  fPos(right.fPos),
68  fRot(right.fRot),
69  fPLogV(right.fPLogV)
70 {}
G4VHit()
Definition: G4VHit.cc:34
B5HodoscopeHit::~B5HodoscopeHit ( )
virtual

Definition at line 58 of file B5HodoscopeHit.cc.

59 {}

Member Function Documentation

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

Reimplemented from G4VHit.

Definition at line 136 of file B5HodoscopeHit.cc.

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

Here is the call graph for this function:

void B5HodoscopeHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 93 of file B5HodoscopeHit.cc.

94 {
95  auto visManager = G4VVisManager::GetConcreteInstance();
96  if (! visManager) return;
97 
98  G4Transform3D trans(fRot.inverse(),fPos);
99  G4VisAttributes attribs;
100  auto pVA = fPLogV->GetVisAttributes();
101  if (pVA) attribs = *pVA;
102  G4Colour colour(0.,1.,1.);
103  attribs.SetColour(colour);
104  attribs.SetForceSolid(true);
105  visManager->Draw(*fPLogV,attribs,trans);
106 }
static G4VVisManager * GetConcreteInstance()
HepRotation inverse() const
const G4VisAttributes * GetVisAttributes() const

Here is the call graph for this function:

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  auto store = G4AttDefStore::GetInstance("B5HodoscopeHit",isNew);
114 
115  if (isNew) {
116  (*store)["HitType"]
117  = G4AttDef("HitType","Hit Type","Physics","","G4String");
118 
119  (*store)["ID"]
120  = G4AttDef("ID","ID","Physics","","G4int");
121 
122  (*store)["Time"]
123  = G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
124 
125  (*store)["Pos"]
126  = G4AttDef("Pos","Position","Physics","G4BestUnit","G4ThreeVector");
127 
128  (*store)["LVol"]
129  = G4AttDef("LVol","Logical Volume","Physics","","G4String");
130  }
131  return store;
132 }
bool G4bool
Definition: G4Types.hh:79
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)

Here is the call graph for this function:

G4int B5HodoscopeHit::GetID ( ) const
inline

Definition at line 70 of file B5HodoscopeHit.hh.

70 { return fId; }
const G4LogicalVolume* B5HodoscopeHit::GetLogV ( ) const
inline

Definition at line 82 of file B5HodoscopeHit.hh.

82 { return fPLogV; }
G4ThreeVector B5HodoscopeHit::GetPos ( ) const
inline

Definition at line 76 of file B5HodoscopeHit.hh.

76 { return fPos; }
G4RotationMatrix B5HodoscopeHit::GetRot ( ) const
inline

Definition at line 79 of file B5HodoscopeHit.hh.

79 { return fRot; }
G4double B5HodoscopeHit::GetTime ( ) const
inline

Definition at line 73 of file B5HodoscopeHit.hh.

73 { return fTime; }
void B5HodoscopeHit::operator delete ( void aHit)
inline

Definition at line 104 of file B5HodoscopeHit.hh.

105 {
106  B5HodoscopeHitAllocator->FreeSingle((B5HodoscopeHit*) aHit);
107 }
G4ThreadLocal G4Allocator< B5HodoscopeHit > * B5HodoscopeHitAllocator
void * B5HodoscopeHit::operator new ( size_t  )
inline

Definition at line 96 of file B5HodoscopeHit.hh.

97 {
100  }
101  return (void*)B5HodoscopeHitAllocator->MallocSingle();
102 }
G4ThreadLocal G4Allocator< B5HodoscopeHit > * B5HodoscopeHitAllocator
const B5HodoscopeHit & B5HodoscopeHit::operator= ( const B5HodoscopeHit right)

Definition at line 74 of file B5HodoscopeHit.cc.

75 {
76  fId = right.fId;
77  fTime = right.fTime;
78  fPos = right.fPos;
79  fRot = right.fRot;
80  fPLogV = right.fPLogV;
81  return *this;
82 }
int B5HodoscopeHit::operator== ( const B5HodoscopeHit right) const

Definition at line 86 of file B5HodoscopeHit.cc.

87 {
88  return 0;
89 }
void B5HodoscopeHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 159 of file B5HodoscopeHit.cc.

160 {
161  G4cout << " Hodoscope[" << fId << "] " << fTime/ns << " (nsec)" << G4endl;
162 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
#define ns
Definition: xmlparse.cc:614
void B5HodoscopeHit::SetLogV ( G4LogicalVolume val)
inline

Definition at line 81 of file B5HodoscopeHit.hh.

81 { fPLogV = val; }
void B5HodoscopeHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 75 of file B5HodoscopeHit.hh.

75 { fPos = xyz; }
void B5HodoscopeHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 78 of file B5HodoscopeHit.hh.

78 { fRot = rmat; }
void B5HodoscopeHit::SetTime ( G4double  val)
inline

Definition at line 72 of file B5HodoscopeHit.hh.

72 { fTime = val; }

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