GEAR  1.6.1
 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  TGeoGearDistanceProperties(TGeoManager *geoMgr);
25 
27  virtual ~TGeoGearDistanceProperties() { /* nop */; }
28 
33  virtual const std::vector<std::string>& getMaterialNames(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
34 
40  virtual const std::vector<double>& getMaterialThicknesses(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
41 
44  virtual const std::vector<std::string> getVolumeNames(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
45 
48  virtual double getNRadlen(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
49 
52  virtual double getNIntlen(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
53 
56  virtual double getBdL(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
57 
60  virtual double getEdL(const Vector3D & p0, const Vector3D & p1) const throw (NotImplementedException, std::exception );
61 
62 protected:
63  void beamOn(const Vector3D & p0, const Vector3D & p1)const throw (OutsideGeometryException, std::exception );
64  TGeoManager *_tgeomanager;
65  //two points to keep track of what has already been called and in memory at the moment
66  mutable Vector3D _p0;
67  mutable Vector3D _p1;
68  //containers for data evaluated during tracking in beamOn
69  //they have to be mutable in order to be changed by beamOn
70  //beamOn is const otherwise it could not be called,
71  //but should still be able to change the private variables
72  mutable std::vector<std::string> _volNames;
73  mutable std::vector<std::string> _matNames;
74  mutable std::vector<double> _distance;
75  mutable std::vector<double> _intLen;
76  mutable std::vector<double> _radLen;
77 
78 }; // class
79 } // namespace gear
80 #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.
NotImplementedException used for features that are not implemented.
Definition: GEAR.h:81
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...
OutsideGeometryException used if user asks for info from geometry tree where no node is defined...
Definition: GEAR.h:118
virtual double getBdL(const Vector3D &p0, const Vector3D &p1) const
The integrated magnetic field along the distance between [p0,p1] in Tesla*mm.