GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
TGeoGearDistanceProperties.h
1 #ifndef GEAR_TGeoGEARDISTANCEPROPERTIES_H
2 #define GEAR_TGeoGEARDISTANCEPROPERTIES_H 1
3 
4 #include <string>
5 #include <vector>
6 
7 #include "gear/GEAR.h"
8 #include "gear/GearDistanceProperties.h"
9 
10 //#include "TGeoManager.h"
11 class TGeoManager;
12 
13 namespace gear {
14 
22 
23 public:
24 
26  TGeoGearDistanceProperties& operator=( const TGeoGearDistanceProperties&) = delete ;
27 
28  TGeoGearDistanceProperties(TGeoManager *geoMgr);
29 
31  virtual ~TGeoGearDistanceProperties() { /* nop */; }
32 
37  virtual const std::vector<std::string>& getMaterialNames(const Vector3D & p0, const Vector3D & p1) const ;
38 
44  virtual const std::vector<double>& getMaterialThicknesses(const Vector3D & p0, const Vector3D & p1) const ;
45 
48  virtual const std::vector<std::string> getVolumeNames(const Vector3D & p0, const Vector3D & p1) const ;
49 
52  virtual double getNRadlen(const Vector3D & p0, const Vector3D & p1) const ;
53 
56  virtual double getNIntlen(const Vector3D & p0, const Vector3D & p1) const ;
57 
60  virtual double getBdL(const Vector3D & p0, const Vector3D & p1) const ;
61 
64  virtual double getEdL(const Vector3D & p0, const Vector3D & p1) const ;
65 
66 protected:
67  void beamOn(const Vector3D & p0, const Vector3D & p1)const ;
68  TGeoManager *_tgeomanager = nullptr ;
69  //two points to keep track of what has already been called and in memory at the moment
70  mutable Vector3D _p0{};
71  mutable Vector3D _p1{};
72  //containers for data evaluated during tracking in beamOn
73  //they have to be mutable in order to be changed by beamOn
74  //beamOn is const otherwise it could not be called,
75  //but should still be able to change the private variables
76  mutable std::vector<std::string> _volNames{};
77  mutable std::vector<std::string> _matNames{};
78  mutable std::vector<double> _distance{};
79  mutable std::vector<double> _intLen{};
80  mutable std::vector<double> _radLen{};
81 
82 }; // class
83 } // namespace gear
84 #endif /* ifndef GEAR_TGeoGEARDISTANCEPROPERTIES_H */
Abstract interface for a class that returns the (material) properties along a given distance between ...
virtual double getEdL(const Vector3D &p0, const Vector3D &p1) const
The integrated electric field along the distance between [p0,p1] in mVolt.
virtual double getNRadlen(const Vector3D &p0, const Vector3D &p1) const
The number of radiation lengths along the distance between [p0,p1] .
virtual double getNIntlen(const Vector3D &p0, const Vector3D &p1) const
The number of interaction lengths along the distance between [p0,p1] .
virtual const std::vector< std::string > & getMaterialNames(const Vector3D &p0, const Vector3D &p1) const
List of matrial names along the distance between [p0,p1]- WARNING: this method returns a reference to...
TGeo Implementation of the abstract interface that returns the (material) properties along a given di...
virtual const std::vector< std::string > getVolumeNames(const Vector3D &p0, const Vector3D &p1) const
List of traversed volumes by name.
Simple three dimensional vector providing the components for cartesian, cylindrical and spherical coo...
Definition: Vector3D.h:18
virtual const std::vector< double > & getMaterialThicknesses(const Vector3D &p0, const Vector3D &p1) const
List of matrial thicknesses in mm along the distance between [p0,p1] - runs parallel to the array ret...
virtual double getBdL(const Vector3D &p0, const Vector3D &p1) const
The integrated magnetic field along the distance between [p0,p1] in Tesla*mm.