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

#include <Doxymodules_eventgenerator.h>

Inheritance diagram for H02MuonHit:
G4VHit

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)
 
G4bool 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 ()
 

Private Attributes

G4int fModuleID
 
G4String fPname
 
G4ThreeVector fMomentum
 
G4ThreeVector fPosition
 
G4double fTof
 

Detailed Description

Definition at line 73 of file Doxymodules_eventgenerator.h.

Constructor & Destructor Documentation

◆ H02MuonHit() [1/3]

H02MuonHit::H02MuonHit ( )

Definition at line 41 of file H02MuonHit.cc.

42 : G4VHit(),
43 fModuleID(-1), fPname(), fMomentum(), fPosition(), fTof(0.)
44{
45}
G4ThreeVector fPosition
Definition H02MuonHit.hh:76
G4int fModuleID
Definition H02MuonHit.hh:73
G4String fPname
Definition H02MuonHit.hh:74
G4double fTof
Definition H02MuonHit.hh:77
G4ThreeVector fMomentum
Definition H02MuonHit.hh:75

◆ 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 : fModuleID(imod), fPname(aname), fMomentum(pxyz),
52 fPosition(xyz), fTof(atof)
53{
54}

◆ ~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}

Member Function Documentation

◆ operator=()

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

Definition at line 69 of file H02MuonHit.cc.

70{
71 fModuleID= right.fModuleID;
72 fPname= right.fPname;
73 fMomentum= right.fMomentum;
74 fPosition= right.fPosition;
75 fTof= right.fTof;
76
77 return *this;
78}

◆ operator==()

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

Definition at line 81 of file H02MuonHit.cc.

82{
83 return (this==&right) ? true : false;
84}

◆ operator new()

void * H02MuonHit::operator new ( size_t  )
inline

Definition at line 100 of file H02MuonHit.hh.

101{
102 void* aHit;
103 aHit= (void*)H02MuonHitAllocator.MallocSingle();
104 return aHit;
105}
G4Allocator< H02MuonHit > H02MuonHitAllocator
Definition H02MuonHit.cc:38

◆ operator delete()

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

Definition at line 107 of file H02MuonHit.hh.

108{
109 H02MuonHitAllocator.FreeSingle((H02MuonHit*) aHit);
110}

◆ SetModuleID()

void H02MuonHit::SetModuleID ( G4int  i)
inline

Definition at line 81 of file H02MuonHit.hh.

81{ fModuleID=i; }

◆ GetModuleID()

G4int H02MuonHit::GetModuleID ( ) const
inline

Definition at line 82 of file H02MuonHit.hh.

82{ return fModuleID; }

◆ SetParticle()

void H02MuonHit::SetParticle ( G4String  aname)
inline

Definition at line 84 of file H02MuonHit.hh.

84{ fPname=aname; }

◆ GetParticle()

G4String H02MuonHit::GetParticle ( ) const
inline

Definition at line 85 of file H02MuonHit.hh.

85{ return fPname; }

◆ SetMomentum()

void H02MuonHit::SetMomentum ( const G4ThreeVector &  pxyz)
inline

Definition at line 87 of file H02MuonHit.hh.

88{ fMomentum=pxyz; }

◆ GetMomentum()

G4ThreeVector H02MuonHit::GetMomentum ( ) const
inline

Definition at line 89 of file H02MuonHit.hh.

89{ return fMomentum; }

◆ SetPosition()

void H02MuonHit::SetPosition ( const G4ThreeVector &  xyz)
inline

Definition at line 91 of file H02MuonHit.hh.

91{ fPosition=xyz; }

◆ GetPosition()

G4ThreeVector H02MuonHit::GetPosition ( ) const
inline

Definition at line 92 of file H02MuonHit.hh.

92{ return fPosition; }

◆ SetTOF()

void H02MuonHit::SetTOF ( G4double  atof)
inline

Definition at line 94 of file H02MuonHit.hh.

94{ fTof=atof; }

◆ GetTOF()

G4double H02MuonHit::GetTOF ( ) const
inline

Definition at line 95 of file H02MuonHit.hh.

95{ return fTof; }

◆ Draw()

void H02MuonHit::Draw ( )
virtual

Definition at line 87 of file H02MuonHit.cc.

88{
89 const G4double pt_min=20.*GeV;
90
91 G4VVisManager* pVVisManager= G4VVisManager::GetConcreteInstance();
92 if(pVVisManager) {
93 G4Circle circle(fPosition);
94 circle.SetScreenSize(5.);
95 circle.SetFillStyle(G4Circle::filled);
96
97 G4Color color, goodColor(1.,0.,0.), badColor(0.,0.,1.);
98 if(fMomentum.perp()>pt_min) color=goodColor;
99 else color=badColor;
100
101 G4VisAttributes attribs(color);
102 circle.SetVisAttributes(attribs);
103 pVVisManager->Draw(circle);
104 }
105}

◆ Print()

void H02MuonHit::Print ( )
virtual

Definition at line 108 of file H02MuonHit.cc.

109{
110 G4int id= fModuleID;
111 G4String tag="B";
112 if(fModuleID >=10) {
113 id -=10;
114 tag="E";
115 }
116 G4cout << tag << id << " :" << std::setw(12) << fPname.c_str()
117 << " : pT=" << std::setprecision(3) << fMomentum.perp()/GeV
118 << " : TOF=" << std::setprecision(3) << fTof/ns
119 << " : x=" << std::setprecision(3) << fPosition*(1./m)
120 << G4endl;
121}

Member Data Documentation

◆ fModuleID

G4int H02MuonHit::fModuleID
private

Definition at line 73 of file H02MuonHit.hh.

◆ fPname

G4String H02MuonHit::fPname
private

Definition at line 74 of file H02MuonHit.hh.

◆ fMomentum

G4ThreeVector H02MuonHit::fMomentum
private

Definition at line 75 of file H02MuonHit.hh.

◆ fPosition

G4ThreeVector H02MuonHit::fPosition
private

Definition at line 76 of file H02MuonHit.hh.

◆ fTof

G4double H02MuonHit::fTof
private

Definition at line 77 of file H02MuonHit.hh.


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

Applications | User Support | Publications | Collaboration