source: trunk/examples/extended/optical/LXe/include/LXePMTHit.hh @ 1229

Last change on this file since 1229 was 807, checked in by garnier, 16 years ago

update

File size: 3.3 KB
Line 
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
27#ifndef LXePMTHit_h
28#define LXePMTHit_h 1
29
30#include "G4VHit.hh"
31#include "G4THitsCollection.hh"
32#include "G4Allocator.hh"
33#include "G4ThreeVector.hh"
34#include "G4LogicalVolume.hh"
35#include "G4Transform3D.hh"
36#include "G4RotationMatrix.hh"
37#include "G4VPhysicalVolume.hh"
38
39class G4VTouchable;
40
41class LXePMTHit : public G4VHit
42{
43public:
44 
45  LXePMTHit();
46  ~LXePMTHit();
47  LXePMTHit(const LXePMTHit &right);
48
49  const LXePMTHit& operator=(const LXePMTHit &right);
50  G4int operator==(const LXePMTHit &right) const;
51
52  inline void *operator new(size_t);
53  inline void operator delete(void *aHit);
54 
55  void Draw();
56  void Print();
57
58  inline void SetDrawit(G4bool b){drawit=b;}
59  inline G4bool GetDrawit(){return drawit;}
60
61  inline void IncPhotonCount(){photons++;}
62  inline G4int GetPhotonCount(){return photons;}
63
64  inline void SetPMTNumber(G4int n) { pmtNumber = n; }
65  inline G4int GetPMTNumber() { return pmtNumber; }
66
67  inline void SetPMTPhysVol(G4VPhysicalVolume* physVol){this->physVol=physVol;}
68  inline G4VPhysicalVolume* GetPMTPhysVol(){return physVol;}
69
70  inline void SetPMTPos(G4double x,G4double y,G4double z){
71    pos=G4ThreeVector(x,y,z);
72  }
73 
74  inline G4ThreeVector GetPMTPos(){return pos;}
75
76private:
77  G4int pmtNumber;
78  G4int photons;
79  G4ThreeVector pos;
80  G4VPhysicalVolume* physVol;
81  G4bool drawit;
82
83};
84
85typedef G4THitsCollection<LXePMTHit> LXePMTHitsCollection;
86
87extern G4Allocator<LXePMTHit> LXePMTHitAllocator;
88
89inline void* LXePMTHit::operator new(size_t){
90  void *aHit;
91  aHit = (void *) LXePMTHitAllocator.MallocSingle();
92  return aHit;
93}
94
95inline void LXePMTHit::operator delete(void *aHit){
96  LXePMTHitAllocator.FreeSingle((LXePMTHit*) aHit);
97}
98
99#endif
100
101
Note: See TracBrowser for help on using the repository browser.