/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/GeoFiberSensitiveDetectorHit.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/geo/include/RAT/GeoFiberSensitiveDetectorHit.hh Source File
Ratpac-two
GeoFiberSensitiveDetectorHit.hh
1 #ifndef __RAT_GeoFiberSensitiveDetectorHit__
2 #define __RAT_GeoFiberSensitiveDetectorHit__
3 
4 #include <G4Allocator.hh>
5 #include <G4LogicalVolume.hh>
6 #include <G4RotationMatrix.hh>
7 #include <G4THitsCollection.hh>
8 #include <G4ThreeVector.hh>
9 #include <G4Transform3D.hh>
10 #include <G4VHit.hh>
11 
12 namespace RAT {
13 
14 class GeoFiberSensitiveDetectorHit : public G4VHit {
15  public:
16  GeoFiberSensitiveDetectorHit(G4int i, G4double t, G4ThreeVector p);
19  const GeoFiberSensitiveDetectorHit &operator=(const GeoFiberSensitiveDetectorHit &right);
20  int operator==(const GeoFiberSensitiveDetectorHit &right) const;
21 
22  inline void *operator new(size_t);
23  inline void operator delete(void *aHit);
24 
25  void Draw();
26  void Print();
27 
28  private:
29  G4int id;
30  G4double time;
31  G4ThreeVector pos;
32  G4ThreeVector hit_pos;
33  G4RotationMatrix rot;
34  const G4LogicalVolume *pLogV;
35  std::string proc;
36 
37  public:
38  inline G4int GetID() const { return id; }
39  inline G4double GetTime() const { return time; }
40  inline void SetTime(G4double val) { time = val; }
41  inline void SetPos(G4ThreeVector xyz) { pos = xyz; }
42  inline G4ThreeVector GetPos() const { return pos; }
43  inline void SetHitPos(G4ThreeVector xyz) { hit_pos = xyz; }
44  inline G4ThreeVector GetHitPos() const { return hit_pos; }
45  inline void SetRot(G4RotationMatrix rmat) { rot = rmat; }
46  inline G4RotationMatrix GetRot() const { return rot; }
47  inline void SetLogV(G4LogicalVolume *val) { pLogV = val; }
48  inline const G4LogicalVolume *GetLogV() const { return pLogV; }
49 };
50 
51 typedef G4THitsCollection<GeoFiberSensitiveDetectorHit> GeoFiberSensitiveDetectorHitsCollection;
52 
53 extern G4Allocator<GeoFiberSensitiveDetectorHit> GeoFiberSensitiveDetectorHitAllocator;
54 
55 inline void *GeoFiberSensitiveDetectorHit::operator new(size_t) {
56  void *aHit;
57  aHit = (void *)GeoFiberSensitiveDetectorHitAllocator.MallocSingle();
58  return aHit;
59 }
60 
61 inline void GeoFiberSensitiveDetectorHit::operator delete(void *aHit) {
62  GeoFiberSensitiveDetectorHitAllocator.FreeSingle((GeoFiberSensitiveDetectorHit *)aHit);
63 }
64 
65 } // namespace RAT
66 
67 #endif
Definition: GeoFiberSensitiveDetectorHit.hh:14
Definition: CCCrossSecMessenger.hh:29