Geant4  10.02.p03
H02MuonHit Class Reference

#include <H02MuonHit.hh>

Inheritance diagram for H02MuonHit:
Collaboration diagram for H02MuonHit:

Public Member Functions

 H02MuonHit ()
 
 H02MuonHit (G4int imod, G4String aname, const G4ThreeVector &pxyz, const G4ThreeVector &xyz, G4double atof)
 
 ~H02MuonHit ()
 
 H02MuonHit (const H02MuonHit &right)
 
const H02MuonHitoperator= (const H02MuonHit &right)
 
G4int operator== (const H02MuonHit &right) const
 
void * operator new (size_t)
 
void operator delete (void *aHit)
 
void SetModuleID (G4int i)
 
G4int GetModuleID () const
 
void SetParticle (G4String aname)
 
G4String GetParticle () const
 
void SetMomentum (const G4ThreeVector &pxyz)
 
G4ThreeVector GetMomentum () const
 
void SetPosition (const G4ThreeVector &xyz)
 
G4ThreeVector GetPosition () const
 
void SetTOF (G4double atof)
 
G4double GetTOF () const
 
virtual void Draw ()
 
virtual void Print ()
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 
virtual const std::map< G4String, G4AttDef > * GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 

Private Attributes

G4int moduleID
 
G4String pname
 
G4ThreeVector momentum
 
G4ThreeVector position
 
G4double tof
 

Detailed Description

Definition at line 39 of file H02MuonHit.hh.

Constructor & Destructor Documentation

◆ H02MuonHit() [1/3]

H02MuonHit::H02MuonHit ( )

Definition at line 42 of file H02MuonHit.cc.

43  : moduleID(-1)
44 {
45 }
G4int moduleID
Definition: H02MuonHit.hh:74

◆ H02MuonHit() [2/3]

H02MuonHit::H02MuonHit ( G4int  imod,
G4String  aname,
const G4ThreeVector pxyz,
const G4ThreeVector xyz,
G4double  atof 
)

Definition at line 48 of file H02MuonHit.cc.

51  : moduleID(imod), pname(aname), momentum(pxyz),
52  position(xyz), tof(atof)
53 {
54 }
G4double tof
Definition: H02MuonHit.hh:78
G4ThreeVector position
Definition: H02MuonHit.hh:77
G4String pname
Definition: H02MuonHit.hh:75
G4int moduleID
Definition: H02MuonHit.hh:74
G4ThreeVector momentum
Definition: H02MuonHit.hh:76

◆ ~H02MuonHit()

H02MuonHit::~H02MuonHit ( )

Definition at line 57 of file H02MuonHit.cc.

58 {
59 }

◆ H02MuonHit() [3/3]

H02MuonHit::H02MuonHit ( const H02MuonHit right)

Definition at line 62 of file H02MuonHit.cc.

63  : G4VHit()
64 {
65  *this= right;
66 }
G4VHit()
Definition: G4VHit.cc:34

Member Function Documentation

◆ Draw()

void H02MuonHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 87 of file H02MuonHit.cc.

88 {
89  const G4double pt_min=20.*GeV;
90 
92  if(pVVisManager) {
93  G4Circle circle(position);
94  circle.SetScreenSize(5.);
95  circle.SetFillStyle(G4Circle::filled);
96 
97  G4Color color, goodColor(1.,0.,0.), badColor(0.,0.,1.);
98  if(momentum.perp()>pt_min) color=goodColor;
99  else color=badColor;
100 
101  G4VisAttributes attribs(color);
102  circle.SetVisAttributes(attribs);
103  pVVisManager->Draw(circle);
104  }
105 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
static G4VVisManager * GetConcreteInstance()
static const double GeV
Definition: G4SIunits.hh:214
double perp() const
double G4double
Definition: G4Types.hh:76
G4ThreeVector momentum
Definition: H02MuonHit.hh:76
Here is the call graph for this function:

◆ GetModuleID()

G4int H02MuonHit::GetModuleID ( ) const
inline

Definition at line 83 of file H02MuonHit.hh.

83 { return moduleID; }
G4int moduleID
Definition: H02MuonHit.hh:74

◆ GetMomentum()

G4ThreeVector H02MuonHit::GetMomentum ( ) const
inline

Definition at line 90 of file H02MuonHit.hh.

90 { return momentum; }
G4ThreeVector momentum
Definition: H02MuonHit.hh:76

◆ GetParticle()

G4String H02MuonHit::GetParticle ( ) const
inline

Definition at line 86 of file H02MuonHit.hh.

86 { return pname; }
G4String pname
Definition: H02MuonHit.hh:75

◆ GetPosition()

G4ThreeVector H02MuonHit::GetPosition ( ) const
inline

Definition at line 93 of file H02MuonHit.hh.

93 { return position; }
G4ThreeVector position
Definition: H02MuonHit.hh:77

◆ GetTOF()

G4double H02MuonHit::GetTOF ( ) const
inline

Definition at line 96 of file H02MuonHit.hh.

96 { return tof; }
G4double tof
Definition: H02MuonHit.hh:78

◆ operator delete()

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

Definition at line 108 of file H02MuonHit.hh.

109 {
110  H02MuonHitAllocator.FreeSingle((H02MuonHit*) aHit);
111 }
G4Allocator< H02MuonHit > H02MuonHitAllocator
Definition: H02MuonHit.cc:39
Here is the call graph for this function:

◆ operator new()

void * H02MuonHit::operator new ( size_t  )
inline

Definition at line 101 of file H02MuonHit.hh.

102 {
103  void* aHit;
104  aHit= (void*)H02MuonHitAllocator.MallocSingle();
105  return aHit;
106 }
G4Allocator< H02MuonHit > H02MuonHitAllocator
Definition: H02MuonHit.cc:39
Here is the call graph for this function:

◆ operator=()

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

Definition at line 69 of file H02MuonHit.cc.

70 {
71  moduleID= right.moduleID;
72  pname= right.pname;
73  momentum= right.momentum;
74  position= right.position;
75  tof= right.tof;
76 
77  return *this;
78 }
G4double tof
Definition: H02MuonHit.hh:78
G4ThreeVector position
Definition: H02MuonHit.hh:77
G4String pname
Definition: H02MuonHit.hh:75
G4int moduleID
Definition: H02MuonHit.hh:74
G4ThreeVector momentum
Definition: H02MuonHit.hh:76

◆ operator==()

G4int H02MuonHit::operator== ( const H02MuonHit right) const

Definition at line 81 of file H02MuonHit.cc.

82 {
83  return (this==&right) ? 1 : 0;
84 }

◆ Print()

void H02MuonHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 108 of file H02MuonHit.cc.

109 {
110  G4int id= moduleID;
111  G4String tag="B";
112  if(moduleID >=10) {
113  id -=10;
114  tag="E";
115  }
116  G4cout << tag << id << " :" << std::setw(12) << pname.c_str()
117  << " : pT=" << std::setprecision(3) << momentum.perp()/GeV
118  << " : TOF=" << std::setprecision(3) << tof/ns
119  << " : x=" << std::setprecision(3) << position*(1./m)
120  << G4endl;
121 }
G4double tof
Definition: H02MuonHit.hh:78
Definition: xmlparse.cc:187
int G4int
Definition: G4Types.hh:78
G4String pname
Definition: H02MuonHit.hh:75
G4GLOB_DLL std::ostream G4cout
static const double GeV
Definition: G4SIunits.hh:214
double perp() const
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:128
G4int moduleID
Definition: H02MuonHit.hh:74
#define ns
Definition: xmlparse.cc:614
G4ThreeVector momentum
Definition: H02MuonHit.hh:76
Here is the call graph for this function:

◆ SetModuleID()

void H02MuonHit::SetModuleID ( G4int  i)
inline

Definition at line 82 of file H02MuonHit.hh.

82 { moduleID=i; }
G4int moduleID
Definition: H02MuonHit.hh:74

◆ SetMomentum()

void H02MuonHit::SetMomentum ( const G4ThreeVector pxyz)
inline

Definition at line 88 of file H02MuonHit.hh.

89 { momentum=pxyz; }
G4ThreeVector momentum
Definition: H02MuonHit.hh:76

◆ SetParticle()

void H02MuonHit::SetParticle ( G4String  aname)
inline

Definition at line 85 of file H02MuonHit.hh.

85 { pname=aname; }
G4String pname
Definition: H02MuonHit.hh:75

◆ SetPosition()

void H02MuonHit::SetPosition ( const G4ThreeVector xyz)
inline

Definition at line 92 of file H02MuonHit.hh.

92 { position=xyz; }

◆ SetTOF()

void H02MuonHit::SetTOF ( G4double  atof)
inline

Definition at line 95 of file H02MuonHit.hh.

95 { tof=atof; }
G4double tof
Definition: H02MuonHit.hh:78

Member Data Documentation

◆ moduleID

G4int H02MuonHit::moduleID
private

Definition at line 74 of file H02MuonHit.hh.

◆ momentum

G4ThreeVector H02MuonHit::momentum
private

Definition at line 76 of file H02MuonHit.hh.

◆ pname

G4String H02MuonHit::pname
private

Definition at line 75 of file H02MuonHit.hh.

◆ position

G4ThreeVector H02MuonHit::position
private

Definition at line 77 of file H02MuonHit.hh.

◆ tof

G4double H02MuonHit::tof
private

Definition at line 78 of file H02MuonHit.hh.


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