Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
B5DriftChamberHit Class Reference

#include <B5DriftChamberHit.hh>

Inheritance diagram for B5DriftChamberHit:
Collaboration diagram for B5DriftChamberHit:

Public Member Functions

 B5DriftChamberHit ()
 
 B5DriftChamberHit (G4int layerID)
 
 B5DriftChamberHit (const B5DriftChamberHit &right)
 
virtual ~B5DriftChamberHit ()
 
const B5DriftChamberHitoperator= (const B5DriftChamberHit &right)
 
int operator== (const B5DriftChamberHit &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 SetLayerID (G4int z)
 
G4int GetLayerID () const
 
void SetTime (G4double t)
 
G4double GetTime () const
 
void SetLocalPos (G4ThreeVector xyz)
 
G4ThreeVector GetLocalPos () const
 
void SetWorldPos (G4ThreeVector xyz)
 
G4ThreeVector GetWorldPos () const
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 

Detailed Description

Drift chamber hit

It records:

  • the layer ID
  • the particle time
  • the particle local and global positions

Definition at line 52 of file B5DriftChamberHit.hh.

Constructor & Destructor Documentation

B5DriftChamberHit::B5DriftChamberHit ( )

Definition at line 51 of file B5DriftChamberHit.cc.

52 : G4VHit(),
53  fLayerID(-1), fTime(0.), fLocalPos(0), fWorldPos(0)
54 {}
G4VHit()
Definition: G4VHit.cc:34
B5DriftChamberHit::B5DriftChamberHit ( G4int  layerID)

Definition at line 58 of file B5DriftChamberHit.cc.

59 : G4VHit(),
60  fLayerID(layerID), fTime(0.), fLocalPos(0), fWorldPos(0)
61 {}
G4VHit()
Definition: G4VHit.cc:34
B5DriftChamberHit::B5DriftChamberHit ( const B5DriftChamberHit right)

Definition at line 70 of file B5DriftChamberHit.cc.

71 : G4VHit(),
72  fLayerID(right.fLayerID),
73  fTime(right.fTime),
74  fLocalPos(right.fLocalPos),
75  fWorldPos(right.fWorldPos)
76 {}
G4VHit()
Definition: G4VHit.cc:34
B5DriftChamberHit::~B5DriftChamberHit ( )
virtual

Definition at line 65 of file B5DriftChamberHit.cc.

66 {}

Member Function Documentation

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

Reimplemented from G4VHit.

Definition at line 138 of file B5DriftChamberHit.cc.

139 {
140  auto values = new std::vector<G4AttValue>;
141 
142  values
143  ->push_back(G4AttValue("HitType","DriftChamberHit",""));
144  values
145  ->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fLayerID),""));
146  values
147  ->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
148  values
149  ->push_back(G4AttValue("Pos",G4BestUnit(fWorldPos,"Length"),""));
150 
151  return values;
152 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1

Here is the call graph for this function:

void B5DriftChamberHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 98 of file B5DriftChamberHit.cc.

99 {
100  auto visManager = G4VVisManager::GetConcreteInstance();
101  if (! visManager) return;
102 
103  G4Circle circle(fWorldPos);
104  circle.SetScreenSize(2);
105  circle.SetFillStyle(G4Circle::filled);
106  G4Colour colour(1.,1.,0.);
107  G4VisAttributes attribs(colour);
108  circle.SetVisAttributes(attribs);
109  visManager->Draw(circle);
110 }
static G4VVisManager * GetConcreteInstance()

Here is the call graph for this function:

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

Reimplemented from G4VHit.

Definition at line 114 of file B5DriftChamberHit.cc.

115 {
116  G4bool isNew;
117  auto store = G4AttDefStore::GetInstance("B5DriftChamberHit",isNew);
118 
119  if (isNew) {
120  (*store)["HitType"]
121  = G4AttDef("HitType","Hit Type","Physics","","G4String");
122 
123  (*store)["ID"]
124  = G4AttDef("ID","ID","Physics","","G4int");
125 
126  (*store)["Time"]
127  = G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
128 
129  (*store)["Pos"]
130  = G4AttDef("Pos", "Position", "Physics","G4BestUnit","G4ThreeVector");
131  }
132 
133  return store;
134 }
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 B5DriftChamberHit::GetLayerID ( ) const
inline

Definition at line 72 of file B5DriftChamberHit.hh.

72 { return fLayerID; }
G4ThreeVector B5DriftChamberHit::GetLocalPos ( ) const
inline

Definition at line 78 of file B5DriftChamberHit.hh.

78 { return fLocalPos; }
G4double B5DriftChamberHit::GetTime ( ) const
inline

Definition at line 75 of file B5DriftChamberHit.hh.

75 { return fTime; }
G4ThreeVector B5DriftChamberHit::GetWorldPos ( ) const
inline

Definition at line 81 of file B5DriftChamberHit.hh.

81 { return fWorldPos; }
void B5DriftChamberHit::operator delete ( void aHit)
inline

Definition at line 102 of file B5DriftChamberHit.hh.

103 {
104  B5DriftChamberHitAllocator->FreeSingle((B5DriftChamberHit*) aHit);
105 }
G4ThreadLocal G4Allocator< B5DriftChamberHit > * B5DriftChamberHitAllocator
void * B5DriftChamberHit::operator new ( size_t  )
inline

Definition at line 94 of file B5DriftChamberHit.hh.

95 {
98  }
99  return (void*)B5DriftChamberHitAllocator->MallocSingle();
100 }
G4ThreadLocal G4Allocator< B5DriftChamberHit > * B5DriftChamberHitAllocator
const B5DriftChamberHit & B5DriftChamberHit::operator= ( const B5DriftChamberHit right)

Definition at line 80 of file B5DriftChamberHit.cc.

81 {
82  fLayerID = right.fLayerID;
83  fTime = right.fTime;
84  fLocalPos = right.fLocalPos;
85  fWorldPos = right.fWorldPos;
86  return *this;
87 }
int B5DriftChamberHit::operator== ( const B5DriftChamberHit right) const

Definition at line 91 of file B5DriftChamberHit.cc.

92 {
93  return 0;
94 }
void B5DriftChamberHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 156 of file B5DriftChamberHit.cc.

157 {
158  G4cout << " Layer[" << fLayerID << "] : time " << fTime/ns
159  << " (nsec) --- local (x,y) " << fLocalPos.x()
160  << ", " << fLocalPos.y() << G4endl;
161 }
double x() const
G4GLOB_DLL std::ostream G4cout
double y() const
#define G4endl
Definition: G4ios.hh:61
#define ns
Definition: xmlparse.cc:614

Here is the call graph for this function:

void B5DriftChamberHit::SetLayerID ( G4int  z)
inline

Definition at line 71 of file B5DriftChamberHit.hh.

71 { fLayerID = z; }
tuple z
Definition: test.py:28
void B5DriftChamberHit::SetLocalPos ( G4ThreeVector  xyz)
inline

Definition at line 77 of file B5DriftChamberHit.hh.

77 { fLocalPos = xyz; }
void B5DriftChamberHit::SetTime ( G4double  t)
inline

Definition at line 74 of file B5DriftChamberHit.hh.

74 { fTime = t; }
void B5DriftChamberHit::SetWorldPos ( G4ThreeVector  xyz)
inline

Definition at line 80 of file B5DriftChamberHit.hh.

80 { fWorldPos = xyz; }

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