Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXePMTHit.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: LXePMTHit.hh 72250 2013-07-12 08:59:26Z gcosmo $
27 //
28 /// \file optical/LXe/include/LXePMTHit.hh
29 /// \brief Definition of the LXePMTHit class
30 //
31 //
32 #ifndef LXePMTHit_h
33 #define LXePMTHit_h 1
34 
35 #include "G4VHit.hh"
36 #include "G4THitsCollection.hh"
37 #include "G4Allocator.hh"
38 #include "G4ThreeVector.hh"
39 #include "G4LogicalVolume.hh"
40 #include "G4Transform3D.hh"
41 #include "G4RotationMatrix.hh"
42 #include "G4VPhysicalVolume.hh"
43 
44 #include "tls.hh"
45 
46 class G4VTouchable;
47 
48 class LXePMTHit : public G4VHit
49 {
50  public:
51 
52  LXePMTHit();
53  virtual ~LXePMTHit();
54  LXePMTHit(const LXePMTHit &right);
55 
56  const LXePMTHit& operator=(const LXePMTHit &right);
57  G4int operator==(const LXePMTHit &right) const;
58 
59  inline void *operator new(size_t);
60  inline void operator delete(void *aHit);
61 
62  virtual void Draw();
63  virtual void Print();
64 
65  inline void SetDrawit(G4bool b){fDrawit=b;}
66  inline G4bool GetDrawit(){return fDrawit;}
67 
68  inline void IncPhotonCount(){fPhotons++;}
69  inline G4int GetPhotonCount(){return fPhotons;}
70 
71  inline void SetPMTNumber(G4int n) { fPmtNumber = n; }
72  inline G4int GetPMTNumber() { return fPmtNumber; }
73 
74  inline void SetPMTPhysVol(G4VPhysicalVolume* physVol){this->fPhysVol=physVol;}
75  inline G4VPhysicalVolume* GetPMTPhysVol(){return fPhysVol;}
76 
78  fPos=G4ThreeVector(x,y,z);
79  }
80 
81  inline G4ThreeVector GetPMTPos(){return fPos;}
82 
83  private:
84 
85  G4int fPmtNumber;
86  G4int fPhotons;
87  G4ThreeVector fPos;
88  G4VPhysicalVolume* fPhysVol;
89  G4bool fDrawit;
90 
91 };
92 
94 
96 
97 inline void* LXePMTHit::operator new(size_t){
100  return (void *) LXePMTHitAllocator->MallocSingle();
101 }
102 
103 inline void LXePMTHit::operator delete(void *aHit){
104  LXePMTHitAllocator->FreeSingle((LXePMTHit*) aHit);
105 }
106 
107 #endif
CLHEP::Hep3Vector G4ThreeVector
void SetPMTNumber(G4int n)
Definition: LXePMTHit.hh:71
G4double z
Definition: TRTMaterials.hh:39
virtual void Print()
Definition: LXePMTHit.cc:97
G4int GetPhotonCount()
Definition: LXePMTHit.hh:69
virtual void Draw()
Definition: LXePMTHit.cc:79
void SetDrawit(G4bool b)
Definition: LXePMTHit.hh:65
Definition: G4VHit.hh:48
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
G4VPhysicalVolume * GetPMTPhysVol()
Definition: LXePMTHit.hh:75
bool G4bool
Definition: G4Types.hh:79
G4int operator==(const LXePMTHit &right) const
Definition: LXePMTHit.cc:73
G4ThreeVector GetPMTPos()
Definition: LXePMTHit.hh:81
virtual ~LXePMTHit()
Definition: LXePMTHit.cc:49
void IncPhotonCount()
Definition: LXePMTHit.hh:68
const G4int n
G4bool GetDrawit()
Definition: LXePMTHit.hh:66
G4ThreadLocal G4Allocator< LXePMTHit > * LXePMTHitAllocator
Definition: LXePMTHit.cc:40
void SetPMTPhysVol(G4VPhysicalVolume *physVol)
Definition: LXePMTHit.hh:74
G4THitsCollection< LXePMTHit > LXePMTHitsCollection
Definition: LXePMTHit.hh:93
void SetPMTPos(G4double x, G4double y, G4double z)
Definition: LXePMTHit.hh:77
double G4double
Definition: G4Types.hh:76
G4int GetPMTNumber()
Definition: LXePMTHit.hh:72
const LXePMTHit & operator=(const LXePMTHit &right)
Definition: LXePMTHit.cc:63