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

Detailed Description

Definition at line 39 of file H02MuonHit.hh.

Constructor & Destructor Documentation

H02MuonHit::H02MuonHit ( )

Definition at line 42 of file H02MuonHit.cc.

43  : moduleID(-1)
44 {
45 }
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 }
#define position
Definition: xmlparse.cc:622
string pname
Definition: eplot.py:33
H02MuonHit::~H02MuonHit ( )

Definition at line 57 of file H02MuonHit.cc.

58 {
59 }
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

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 constexpr double GeV
Definition: G4SIunits.hh:217
double G4double
Definition: G4Types.hh:76
double perp() const

Here is the call graph for this function:

G4int H02MuonHit::GetModuleID ( ) const
inline

Definition at line 83 of file H02MuonHit.hh.

83 { return moduleID; }
G4ThreeVector H02MuonHit::GetMomentum ( ) const
inline

Definition at line 90 of file H02MuonHit.hh.

90 { return momentum; }
G4String H02MuonHit::GetParticle ( ) const
inline

Definition at line 86 of file H02MuonHit.hh.

86 { return pname; }
string pname
Definition: eplot.py:33
G4ThreeVector H02MuonHit::GetPosition ( ) const
inline

Definition at line 93 of file H02MuonHit.hh.

93 { return position; }
#define position
Definition: xmlparse.cc:622
G4double H02MuonHit::GetTOF ( ) const
inline

Definition at line 96 of file H02MuonHit.hh.

96 { return tof; }
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:

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:

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 }
string pname
Definition: eplot.py:33
G4int H02MuonHit::operator== ( const H02MuonHit right) const

Definition at line 81 of file H02MuonHit.cc.

82 {
83  return (this==&right) ? 1 : 0;
84 }
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 }
Definition: xmlparse.cc:187
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
static constexpr double m
Definition: G4SIunits.hh:129
string pname
Definition: eplot.py:33
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
double perp() const
#define ns
Definition: xmlparse.cc:614

Here is the call graph for this function:

void H02MuonHit::SetModuleID ( G4int  i)
inline

Definition at line 82 of file H02MuonHit.hh.

82 { moduleID=i; }
void H02MuonHit::SetMomentum ( const G4ThreeVector pxyz)
inline

Definition at line 88 of file H02MuonHit.hh.

89 { momentum=pxyz; }
void H02MuonHit::SetParticle ( G4String  aname)
inline

Definition at line 85 of file H02MuonHit.hh.

85 { pname=aname; }
string pname
Definition: eplot.py:33
void H02MuonHit::SetPosition ( const G4ThreeVector xyz)
inline

Definition at line 92 of file H02MuonHit.hh.

92 { position=xyz; }
void H02MuonHit::SetTOF ( G4double  atof)
inline

Definition at line 95 of file H02MuonHit.hh.

95 { tof=atof; }

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