ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
H02MuonHit.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file H02MuonHit.hh
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 //
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 
38 class H02MuonHit : public G4VHit {
39 public:
40  H02MuonHit();
41  H02MuonHit(G4int imod, G4String aname, const G4ThreeVector& pxyz,
42  const G4ThreeVector& xyz, G4double atof);
43  ~H02MuonHit();
44 
45  H02MuonHit(const H02MuonHit& right);
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 
72 private:
78 };
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
82 inline G4int H02MuonHit::GetModuleID() const { return fModuleID; }
83 
84 inline void H02MuonHit::SetParticle(G4String aname) { fPname=aname; }
85 inline G4String H02MuonHit::GetParticle() const { return fPname; }
86 
87 inline void H02MuonHit::SetMomentum(const G4ThreeVector& pxyz)
88 { fMomentum=pxyz; }
90 
91 inline void H02MuonHit::SetPosition(const G4ThreeVector& xyz) { fPosition=xyz; }
93 
94 inline void H02MuonHit::SetTOF(G4double atof) { fTof=atof; }
95 inline G4double H02MuonHit::GetTOF() const { return fTof; }
96 
99 
100 inline void* H02MuonHit::operator new(size_t)
101 {
102  void* aHit;
103  aHit= (void*)H02MuonHitAllocator.MallocSingle();
104  return aHit;
105 }
106 
107 inline void H02MuonHit::operator delete(void* aHit)
108 {
109  H02MuonHitAllocator.FreeSingle((H02MuonHit*) aHit);
110 }
111 
112 #endif