Loading...
Searching...
No Matches
H02MuonHit.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26/// \file eventgenerator/HepMC/HepMCEx02/include/H02MuonHit.hh
27/// \brief Definition of the H02MuonHit class
28//
29//
30#ifndef H02_MUON_HIT_H
31#define H02_MUON_HIT_H
32
33#include "G4VHit.hh"
34#include "G4THitsCollection.hh"
35#include "G4Allocator.hh"
36#include "G4ThreeVector.hh"
37
38class H02MuonHit : public G4VHit {
39public:
40 H02MuonHit();
41 H02MuonHit(G4int imod, G4String aname, const G4ThreeVector& pxyz,
42 const G4ThreeVector& xyz, G4double atof);
44
46 const H02MuonHit& operator=(const H02MuonHit& right);
47 G4bool operator==(const H02MuonHit& right) const;
48
49 void* operator new(size_t);
50 void operator delete(void* aHit);
51
52 // set/get functions...
53 void SetModuleID(G4int i);
54 G4int GetModuleID() const;
55
56 void SetParticle(G4String aname);
57 G4String GetParticle() const;
58
59 void SetMomentum(const G4ThreeVector& pxyz);
60 G4ThreeVector GetMomentum() const;
61
62 void SetPosition(const G4ThreeVector& xyz);
63 G4ThreeVector GetPosition() const;
64
65 void SetTOF(G4double atof);
66 G4double GetTOF() const;
67
68 // methods...
69 virtual void Draw();
70 virtual void Print();
71
72private:
73 G4int fModuleID;
75 G4ThreeVector fMomentum;
76 G4ThreeVector fPosition;
77 G4double fTof;
78};
79
80//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81inline void H02MuonHit::SetModuleID(G4int i) { fModuleID=i; }
82inline G4int H02MuonHit::GetModuleID() const { return fModuleID; }
83
84inline void H02MuonHit::SetParticle(G4String aname) { fPname=aname; }
85inline G4String H02MuonHit::GetParticle() const { return fPname; }
86
87inline void H02MuonHit::SetMomentum(const G4ThreeVector& pxyz)
88{ fMomentum=pxyz; }
89inline G4ThreeVector H02MuonHit::GetMomentum() const { return fMomentum; }
90
91inline void H02MuonHit::SetPosition(const G4ThreeVector& xyz) { fPosition=xyz; }
92inline G4ThreeVector H02MuonHit::GetPosition() const { return fPosition; }
93
94inline void H02MuonHit::SetTOF(G4double atof) { fTof=atof; }
95inline G4double H02MuonHit::GetTOF() const { return fTof; }
96
99
100inline void* H02MuonHit::operator new(size_t)
101{
102 void* aHit;
103 aHit= (void*)H02MuonHitAllocator.MallocSingle();
104 return aHit;
105}
106
107inline void H02MuonHit::operator delete(void* aHit)
108{
109 H02MuonHitAllocator.FreeSingle((H02MuonHit*) aHit);
110}
111
112#endif
G4THitsCollection< H02MuonHit > H02MuonHitsCollection
Definition H02MuonHit.hh:97
G4Allocator< H02MuonHit > H02MuonHitAllocator
Definition H02MuonHit.cc:38
G4ThreeVector GetPosition() const
Definition H02MuonHit.hh:92
G4ThreeVector GetMomentum() const
Definition H02MuonHit.hh:89
G4bool operator==(const H02MuonHit &right) const
Definition H02MuonHit.cc:81
G4ThreeVector fPosition
Definition H02MuonHit.hh:76
G4int fModuleID
Definition H02MuonHit.hh:73
G4String fPname
Definition H02MuonHit.hh:74
G4double fTof
Definition H02MuonHit.hh:77
G4String GetParticle() const
Definition H02MuonHit.hh:85
virtual void Print()
void SetModuleID(G4int i)
Definition H02MuonHit.hh:81
G4ThreeVector fMomentum
Definition H02MuonHit.hh:75
void SetTOF(G4double atof)
Definition H02MuonHit.hh:94
void SetParticle(G4String aname)
Definition H02MuonHit.hh:84
virtual void Draw()
Definition H02MuonHit.cc:87
G4int GetModuleID() const
Definition H02MuonHit.hh:82
void SetPosition(const G4ThreeVector &xyz)
Definition H02MuonHit.hh:91
const H02MuonHit & operator=(const H02MuonHit &right)
Definition H02MuonHit.cc:69
void SetMomentum(const G4ThreeVector &pxyz)
Definition H02MuonHit.hh:87
G4double GetTOF() const
Definition H02MuonHit.hh:95

Applications | User Support | Publications | Collaboration