AuxDetSensitiveGeo.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file AuxDetSensitiveGeo.h
3 /// \brief Encapsulate the geometry of the sensitive portion of an auxiliary detector
4 ///
5 /// \author brebel@fnal.gov
6 ////////////////////////////////////////////////////////////////////////
7 
8 #ifndef GEO_AuxDetSensitiveGeo_H
9 #define GEO_AuxDetSensitiveGeo_H
10 #include <vector>
11 #include "TGeoVolume.h"
12 
13 class TGeoNode;
14 class TGeoHMatrix;
15 class TGeoMatrix;
16 
17 namespace gar {
18  namespace geo {
19 
21  public:
22  AuxDetSensitiveGeo(std::vector<const TGeoNode*>& path,
23  int depth);
24  AuxDetSensitiveGeo(const TGeoVolume* volume,
25  TGeoHMatrix* rotation);
27 
28  void GetCenter(double* xyz,
29  double localz=0.0) const;
30  void GetNormalVector(double* xyzDir) const;
31 
32  //box geometry
33  double Length() const { return fLength; }
34  double HalfWidth1() const { return fHalfWidth1; }
35  double HalfWidth2() const { return fHalfWidth2; }
36  double HalfHeight() const { return fHalfHeight; }
37  const TGeoVolume* TotalVolume() const { return fTotalVolume; }
38 
39  double DistanceToPoint(double * xyz) const;
40 
41  void LocalToWorld (const double* local, double* world) const;
42  void LocalToWorldVect(const double* local, double* world) const;
43  void WorldToLocal (const double* world, double* local) const;
44  void WorldToLocalVect(const double* world, double* local) const;
45 
46  private:
47 
48  TGeoHMatrix* fGeoMatrix; ///< Transformation matrix to world frame
49  const TGeoVolume* fTotalVolume; ///< Total volume of AuxDet, called vol*
50  double fLength; ///< length of volume, along z direction in local
51  double fHalfWidth1; ///< 1st half width of volume, at -z/2 in local coordinates
52  double fHalfWidth2; ///< 2nd half width (width1==width2 for boxes), at +z/2
53  double fHalfHeight; ///< half height of volume
54  };
55  }
56 
57 } // gar
58 #endif
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
void GetCenter(double *xyz, double localz=0.0) const
static const std::string volume[nvol]
double fHalfHeight
half height of volume
AuxDetSensitiveGeo(std::vector< const TGeoNode * > &path, int depth)
void WorldToLocal(const double *world, double *local) const
const TGeoVolume * fTotalVolume
Total volume of AuxDet, called vol*.
void LocalToWorld(const double *local, double *world) const
const TGeoVolume * TotalVolume() const
void LocalToWorldVect(const double *local, double *world) const
double fHalfWidth2
2nd half width (width1==width2 for boxes), at +z/2
General GArSoft Utilities.
double DistanceToPoint(double *xyz) const
void WorldToLocalVect(const double *world, double *local) const
LArSoft geometry interface.
Definition: ChannelGeo.h:16
double fLength
length of volume, along z direction in local
double fHalfWidth1
1st half width of volume, at -z/2 in local coordinates
void GetNormalVector(double *xyzDir) const