Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 94396 2015-11-13 13:37:16Z 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 "G4RotationMatrix.hh"
39 
40 class G4LogicalVolume;
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  inline void *operator new(size_t);
54  inline void operator delete(void *aHit);
55  void *operator new(size_t,void*p){return p;}
56 #ifndef G4NOT_ISO_DELETES
57  void operator delete(void *,void*){}
58 #endif
59 
60  virtual void Draw();
61  virtual void Print();
62 
63  private:
64  G4double fEdep;
65  G4ThreeVector fPos;
66  G4int fCrystalNumber;
67  G4ThreeVector fStart;
68  G4RotationMatrix fRot;
69  const G4LogicalVolume* fLogV;
70 
71  public:
72  inline void SetEdep(G4double de)
73  { fEdep = de; };
74  inline void AddEdep(G4double de)
75  { fEdep += de; };
76  inline G4double GetEdep()
77  { return fEdep; };
78  inline void SetPos(G4ThreeVector xyz)
79  { fPos = xyz; };
81  { return fCrystalNumber; };
82  inline void SetCrystalNum(G4int num)
83  { fCrystalNumber=num; };
85  { return fPos; };
86  inline void SetStart(G4ThreeVector xyz)
87  { fStart = xyz; };
89  { return fStart; };
90 
91  inline void SetRot(G4RotationMatrix rmat)
92  { fRot = rmat; };
94  { return fRot; };
95  inline const G4LogicalVolume * GetLogV()
96  { return fLogV; };
97 };
98 
100 
102 
103 inline void* ExGflashHit::operator new(size_t)
104 {
106  return (void *) ExGflashHitAllocator->MallocSingle();
107 }
108 
109 inline void ExGflashHit::operator delete(void *aHit)
110 {
111  ExGflashHitAllocator->FreeSingle((ExGflashHit*) aHit);
112 }
113 
114 #endif
115 
116 
117 
118 
119 
G4ThreadLocal G4Allocator< ExGflashHit > * ExGflashHitAllocator
Definition: ExGflashHit.cc:42
G4ThreeVector GetStart()
Definition: ExGflashHit.hh:88
int operator==(const ExGflashHit &right) const
Definition: ExGflashHit.cc:92
G4int GetCrystalNum()
Definition: ExGflashHit.hh:80
const char * p
Definition: xmltok.h:285
void AddEdep(G4double de)
Definition: ExGflashHit.hh:74
virtual void Draw()
Definition: ExGflashHit.cc:102
Definition: G4VHit.hh:48
G4ThreeVector GetPos()
Definition: ExGflashHit.hh:84
void SetStart(G4ThreeVector xyz)
Definition: ExGflashHit.hh:86
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:82
const G4LogicalVolume * GetLogV()
Definition: ExGflashHit.hh:95
void SetRot(G4RotationMatrix rmat)
Definition: ExGflashHit.hh:91
G4double GetEdep()
Definition: ExGflashHit.hh:76
virtual void Print()
Definition: ExGflashHit.cc:121
G4THitsCollection< ExGflashHit > ExGflashHitsCollection
Definition: ExGflashHit.hh:99
G4RotationMatrix GetRot()
Definition: ExGflashHit.hh:93
const ExGflashHit & operator=(const ExGflashHit &right)
Definition: ExGflashHit.cc:77
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: ExGflashHit.hh:72
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:78