Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSPhotonDetHit.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 //
28 //
29 //
30 //
31 //
32 
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
34 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
35 
36 #ifndef WLSPhotonDetHit_h
37 #define WLSPhotonDetHit_h 1
38 
39 #include "G4VHit.hh"
40 #include "G4THitsCollection.hh"
41 #include "G4Allocator.hh"
42 
43 #include "G4ThreeVector.hh"
44 #include "G4Transform3D.hh"
45 #include "G4RotationMatrix.hh"
46 
47 #include "G4LogicalVolume.hh"
48 #include "G4VPhysicalVolume.hh"
49 
50 class G4VTouchable;
51 
52 //--------------------------------------------------
53 // WLSPhotonDetHit Class
54 //--------------------------------------------------
55 
56 class WLSPhotonDetHit : public G4VHit
57 {
58  public:
59 
61  WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive, G4double pTime);
63 
65  const WLSPhotonDetHit& operator=(const WLSPhotonDetHit& right);
66 
67  G4int operator==(const WLSPhotonDetHit& right) const;
68 
69  inline void *operator new(size_t);
70  inline void operator delete(void *aHit);
71 
72  void Draw();
73  void Print();
74 
75  inline void SetArrivalPos(G4ThreeVector xyz) { posArrive = xyz; }
76  inline G4ThreeVector GetArrivalPos() { return posArrive; }
77 
78  inline void SetExitPos(G4ThreeVector xyz) { posExit = xyz; }
79  inline G4ThreeVector GetExitPos() { return posExit; }
80 
81  inline void SetArrivalTime(G4double t) { arrivalTime = t; }
82  inline G4double GetArrivalTime() { return arrivalTime; }
83 
84  private:
85 
86  // the arrival time of the photon
87  G4double arrivalTime;
88  // where the photon hit the detector (detector's coordinate)
89  G4ThreeVector posArrive;
90  // where the photon exited the fiber (world's coordinate)
91  G4ThreeVector posExit;
92 
93 };
94 
95 //--------------------------------------------------
96 // Type Definitions
97 //--------------------------------------------------
98 
100 
102 
103 //--------------------------------------------------
104 // Operator Overloads
105 //--------------------------------------------------
106 
107 inline void* WLSPhotonDetHit::operator new(size_t)
108 {
109  void *aHit;
110  aHit = (void *) WLSPhotonDetHitAllocator.MallocSingle();
111  return aHit;
112 }
113 
114 inline void WLSPhotonDetHit::operator delete(void *aHit)
115 {
116  WLSPhotonDetHitAllocator.FreeSingle((WLSPhotonDetHit*) aHit);
117 }
118 
119 #endif