Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B5::HodoscopeHit Class Reference

Hodoscope hit. More...

#include <Doxymodules_basic.h>

Inheritance diagram for B5::HodoscopeHit:
G4VHit

Public Member Functions

 HodoscopeHit (G4int i, G4double t)
 
 HodoscopeHit (const HodoscopeHit &right)=default
 
 ~HodoscopeHit () override=default
 
HodoscopeHitoperator= (const HodoscopeHit &right)=default
 
G4bool operator== (const HodoscopeHit &right) const
 
void * operator new (size_t)
 
void operator delete (void *aHit)
 
void Draw () override
 
const std::map< G4String, G4AttDef > * GetAttDefs () const override
 
std::vector< G4AttValue > * CreateAttValues () const override
 
void Print () override
 
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
 

Private Attributes

G4int fId = -1
 
G4double fTime = 0.
 
G4ThreeVector fPos
 
G4RotationMatrix fRot
 
const G4LogicalVolumefPLogV = nullptr
 

Detailed Description

Hodoscope hit.

It records:

Definition at line 194 of file Doxymodules_basic.h.

Constructor & Destructor Documentation

◆ HodoscopeHit() [1/2]

B5::HodoscopeHit::HodoscopeHit ( G4int  i,
G4double  t 
)

Definition at line 53 of file HodoscopeHit.cc.

54: fId(id), fTime(time)
55{}

◆ HodoscopeHit() [2/2]

B5::HodoscopeHit::HodoscopeHit ( const HodoscopeHit right)
default

◆ ~HodoscopeHit()

B5::HodoscopeHit::~HodoscopeHit ( )
overridedefault

Member Function Documentation

◆ operator=()

HodoscopeHit & B5::HodoscopeHit::operator= ( const HodoscopeHit right)
default

◆ operator==()

G4bool B5::HodoscopeHit::operator== ( const HodoscopeHit right) const

Definition at line 59 of file HodoscopeHit.cc.

60{
61 return false;
62}

◆ operator new()

void * B5::HodoscopeHit::operator new ( size_t  )
inline

Definition at line 98 of file HodoscopeHit.hh.

99{
102 }
103 return (void*)HodoscopeHitAllocator->MallocSingle();
104}
G4ThreadLocal G4Allocator< HodoscopeHit > * HodoscopeHitAllocator

◆ operator delete()

void B5::HodoscopeHit::operator delete ( void *  aHit)
inline

Definition at line 106 of file HodoscopeHit.hh.

107{
108 HodoscopeHitAllocator->FreeSingle((HodoscopeHit*) aHit);
109}

◆ Draw()

void B5::HodoscopeHit::Draw ( )
override

Definition at line 66 of file HodoscopeHit.cc.

67{
68 auto visManager = G4VVisManager::GetConcreteInstance();
69 if (! visManager) return;
70
71 G4Transform3D trans(fRot.inverse(),fPos);
72 G4VisAttributes attribs;
73 auto pVA = fPLogV->GetVisAttributes();
74 if (pVA) attribs = *pVA;
75 attribs.SetColour(G4Colour::Cyan());
76 attribs.SetForceSolid(true);
77 visManager->Draw(*fPLogV,attribs,trans);
78}
G4ThreeVector fPos
const G4LogicalVolume * fPLogV
G4RotationMatrix fRot

◆ GetAttDefs()

const std::map< G4String, G4AttDef > * B5::HodoscopeHit::GetAttDefs ( ) const
override

Definition at line 82 of file HodoscopeHit.cc.

83{
84 G4bool isNew;
85 auto store = G4AttDefStore::GetInstance("HodoscopeHit",isNew);
86
87 if (isNew) {
88 (*store)["HitType"]
89 = G4AttDef("HitType","Hit Type","Physics","","G4String");
90
91 (*store)["ID"]
92 = G4AttDef("ID","ID","Physics","","G4int");
93
94 (*store)["Time"]
95 = G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
96
97 (*store)["Pos"]
98 = G4AttDef("Pos","Position","Physics","G4BestUnit","G4ThreeVector");
99
100 (*store)["LVol"]
101 = G4AttDef("LVol","Logical Volume","Physics","","G4String");
102 }
103 return store;
104}

◆ CreateAttValues()

std::vector< G4AttValue > * B5::HodoscopeHit::CreateAttValues ( ) const
override

Definition at line 108 of file HodoscopeHit.cc.

109{
110 auto values = new std::vector<G4AttValue>;
111
112 values
113 ->push_back(G4AttValue("HitType","HodoscopeHit",""));
114 values
115 ->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fId),""));
116 values
117 ->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
118 values
119 ->push_back(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
120
121 if (fPLogV)
122 values->push_back(G4AttValue("LVol",fPLogV->GetName(),""));
123 else
124 values->push_back(G4AttValue("LVol"," ",""));
125
126 return values;
127}

◆ Print()

void B5::HodoscopeHit::Print ( )
override

Definition at line 131 of file HodoscopeHit.cc.

132{
133 G4cout << " Hodoscope[" << fId << "] " << fTime/ns << " (nsec)" << G4endl;
134}

◆ GetID()

G4int B5::HodoscopeHit::GetID ( ) const
inline

Definition at line 72 of file HodoscopeHit.hh.

72{ return fId; }

◆ SetTime()

void B5::HodoscopeHit::SetTime ( G4double  val)
inline

Definition at line 74 of file HodoscopeHit.hh.

74{ fTime = val; }

◆ GetTime()

G4double B5::HodoscopeHit::GetTime ( ) const
inline

Definition at line 75 of file HodoscopeHit.hh.

75{ return fTime; }

◆ SetPos()

void B5::HodoscopeHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 77 of file HodoscopeHit.hh.

77{ fPos = xyz; }

◆ GetPos()

G4ThreeVector B5::HodoscopeHit::GetPos ( ) const
inline

Definition at line 78 of file HodoscopeHit.hh.

78{ return fPos; }

◆ SetRot()

void B5::HodoscopeHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 80 of file HodoscopeHit.hh.

80{ fRot = rmat; }

◆ GetRot()

G4RotationMatrix B5::HodoscopeHit::GetRot ( ) const
inline

Definition at line 81 of file HodoscopeHit.hh.

81{ return fRot; }

◆ SetLogV()

void B5::HodoscopeHit::SetLogV ( G4LogicalVolume val)
inline

Definition at line 83 of file HodoscopeHit.hh.

83{ fPLogV = val; }

◆ GetLogV()

const G4LogicalVolume * B5::HodoscopeHit::GetLogV ( ) const
inline

Definition at line 84 of file HodoscopeHit.hh.

84{ return fPLogV; }

Member Data Documentation

◆ fId

G4int B5::HodoscopeHit::fId = -1
private

Definition at line 87 of file HodoscopeHit.hh.

◆ fTime

G4double B5::HodoscopeHit::fTime = 0.
private

Definition at line 88 of file HodoscopeHit.hh.

◆ fPos

G4ThreeVector B5::HodoscopeHit::fPos
private

Definition at line 89 of file HodoscopeHit.hh.

◆ fRot

G4RotationMatrix B5::HodoscopeHit::fRot
private

Definition at line 90 of file HodoscopeHit.hh.

◆ fPLogV

const G4LogicalVolume* B5::HodoscopeHit::fPLogV = nullptr
private

Definition at line 91 of file HodoscopeHit.hh.


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

Applications | User Support | Publications | Collaboration