/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/stable/src/util/include/RAT/LightPathCalculator.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/stable/src/util/include/RAT/LightPathCalculator.hh Source File
Ratpac-two
LightPathCalculator.hh
1 #ifndef __RAT_LIGHTPATHCALCULATOR_HH__
2 #define __RAT_LIGHTPATHCALCULATOR_HH__
3 
4 #include <G4Material.hh>
5 #include <G4Navigator.hh>
6 #include <G4String.hh>
7 #include <G4ThreeVector.hh>
8 #include <G4VPhysicalVolume.hh>
9 #include <memory>
10 #include <vector>
11 
12 namespace RAT {
13 
15  public:
16  struct Segment {
17  G4ThreeVector startPos;
18  G4ThreeVector endPos;
19  G4double length;
20  const G4Material* material;
21  G4String volumeName;
22  };
23 
24  virtual ~LightPathCalculator() = default;
25  virtual std::vector<Segment> Navigate(const G4ThreeVector& start, const G4ThreeVector& end) const = 0;
26  virtual void SetWorldVolume(G4VPhysicalVolume*) {}
27 };
28 
30  public:
31  G4LightPathCalculator() = default;
32 
34 
35  std::vector<Segment> Navigate(const G4ThreeVector& start, const G4ThreeVector& end) const override;
36 
37  void SetWorldVolume(G4VPhysicalVolume* world) override;
38 
39  // No copying (we own a navigator).
41  G4LightPathCalculator& operator=(const G4LightPathCalculator&) = delete;
42 
43  private:
44  std::unique_ptr<G4Navigator> fNavigator;
45 };
46 
47 } // namespace RAT
48 
49 #endif
Definition: LightPathCalculator.hh:29
Definition: LightPathCalculator.hh:14
Definition: CCCrossSecMessenger.hh:29
Definition: LightPathCalculator.hh:16