Geant4  10.00.p03
ExGflashHit.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 // $Id: ExGflashHit.hh 72372 2013-07-16 14:30:39Z gcosmo $
27 //
30 //
31 #ifndef ExGflashHit_h
32 #define ExGflashHit_h 1
33 
34 #include "G4VHit.hh"
35 #include "G4THitsCollection.hh"
36 #include "G4Allocator.hh"
37 #include "G4ThreeVector.hh"
38 #include "G4LogicalVolume.hh"
39 #include "G4Transform3D.hh"
40 #include "G4RotationMatrix.hh"
41 
42 class ExGflashHit : public G4VHit
43 {
44  public:
45 
46  ExGflashHit();
48  ~ExGflashHit();
50  const ExGflashHit& operator=(const ExGflashHit &right);
51  int operator==(const ExGflashHit &right) const;
52 
53 
54  inline void *operator new(size_t);
55  inline void operator delete(void *aHit);
56  void *operator new(size_t,void*p){return p;}
57 #ifndef G4NOT_ISO_DELETES
58  void operator delete(void *,void*){}
59 #endif
60 
61  void Draw();
62  void Print();
63 
64  private:
71 
72  public:
73  inline void SetEdep(G4double de)
74  { fEdep = de; };
75  inline void AddEdep(G4double de)
76  { fEdep += de; };
77  inline G4double GetEdep()
78  { return fEdep; };
79  inline void SetPos(G4ThreeVector xyz)
80  { fPos = xyz; };
82  { return fCrystalNumber; };
83  inline void SetCrystalNum(G4int num)
84  { fCrystalNumber=num; };
86  { return fPos; };
87  inline void SetStart(G4ThreeVector xyz)
88  { fStart = xyz; };
90  { return fStart; };
91 
92  inline void SetRot(G4RotationMatrix rmat)
93  { fRot = rmat; };
95  { return fRot; };
96  inline const G4LogicalVolume * GetLogV()
97  { return fLogV; };
98 
99 };
100 
102 
104 
105 inline void* ExGflashHit::operator new(size_t)
106 {
108  return (void *) ExGflashHitAllocator->MallocSingle();
109 }
110 
111 inline void ExGflashHit::operator delete(void *aHit)
112 {
113  ExGflashHitAllocator->FreeSingle((ExGflashHit*) aHit);
114 }
115 
116 #endif
117 
118 
119 
120 
121 
G4ThreadLocal G4Allocator< ExGflashHit > * ExGflashHitAllocator
Definition: ExGflashHit.cc:40
G4ThreeVector GetStart()
Definition: ExGflashHit.hh:89
int operator==(const ExGflashHit &right) const
Definition: ExGflashHit.cc:76
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
G4int GetCrystalNum()
Definition: ExGflashHit.hh:81
void AddEdep(G4double de)
Definition: ExGflashHit.hh:75
void Draw()
Definition: ExGflashHit.cc:84
Definition: G4VHit.hh:48
G4ThreeVector GetPos()
Definition: ExGflashHit.hh:85
G4ThreeVector fPos
Definition: ExGflashHit.hh:66
void SetStart(G4ThreeVector xyz)
Definition: ExGflashHit.hh:87
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
const G4LogicalVolume * fLogV
Definition: ExGflashHit.hh:70
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:83
const G4LogicalVolume * GetLogV()
Definition: ExGflashHit.hh:96
void SetRot(G4RotationMatrix rmat)
Definition: ExGflashHit.hh:92
G4double GetEdep()
Definition: ExGflashHit.hh:77
void Print()
Definition: ExGflashHit.cc:101
G4THitsCollection< ExGflashHit > ExGflashHitsCollection
Definition: ExGflashHit.hh:101
G4int fCrystalNumber
Definition: ExGflashHit.hh:67
G4RotationMatrix GetRot()
Definition: ExGflashHit.hh:94
const ExGflashHit & operator=(const ExGflashHit &right)
Definition: ExGflashHit.cc:64
G4double fEdep
Definition: ExGflashHit.hh:65
G4ThreeVector fStart
Definition: ExGflashHit.hh:68
double G4double
Definition: G4Types.hh:76
G4RotationMatrix fRot
Definition: ExGflashHit.hh:69
void SetEdep(G4double de)
Definition: ExGflashHit.hh:73
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:79