#include <AuxDetGeo.h>
Definition at line 24 of file AuxDetGeo.h.
gar::geo::AuxDetGeo::AuxDetGeo |
( |
std::vector< const TGeoNode * > & |
path, |
|
|
int |
depth |
|
) |
| |
Definition at line 30 of file AuxDetGeo.cxx.
35 TGeoVolume *vc = path[depth]->GetVolume();
39 throw cet::exception(
"AuxDetGeo") <<
"cannot find AuxDet volume\n";
48 fGeoMatrix =
new TGeoHMatrix(*path[0]->GetMatrix());
49 for(
int i = 1; i <= depth; ++i){
62 if( volName.find(
"Trap") != std::string::npos ) {
const TGeoVolume * fTotalVolume
Total volume of AuxDet, called vol*.
double fHalfWidth1
1st half width of volume, at -z/2 in local coordinates
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
double fHalfHeight
half height of volume
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
void FindAuxDetSensitive(std::vector< const TGeoNode * > &path, unsigned int depth)
cet::coded_exception< error, detail::translate > exception
double fLength
length of volume, along z direction in local
double fHalfWidth2
2nd half width (width1==width2 for boxes), at +z/2
gar::geo::AuxDetGeo::~AuxDetGeo |
( |
| ) |
|
Definition at line 86 of file AuxDetGeo.cxx.
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
double gar::geo::AuxDetGeo::DistanceToPoint |
( |
double * |
xyz | ) |
const |
Definition at line 181 of file AuxDetGeo.cxx.
185 return std::sqrt((Center[0]-xyz[0])*(Center[0]-xyz[0]) +
186 (Center[1]-xyz[1])*(Center[1]-xyz[1]) +
187 (Center[2]-xyz[2])*(Center[2]-xyz[2]));
void GetCenter(double *xyz, double localz=0.0) const
void gar::geo::AuxDetGeo::FindAuxDetSensitive |
( |
std::vector< const TGeoNode * > & |
path, |
|
|
unsigned int |
depth |
|
) |
| |
|
private |
Definition at line 93 of file AuxDetGeo.cxx.
99 if( pathName.find(
"Sensitive") != std::string::npos){
105 unsigned int deeper = depth+1;
106 if (deeper>=path.size()) {
107 throw cet::exception(
"ExceededMaxDepth") <<
"Exceeded maximum depth\n";
109 const TGeoVolume* v = path[depth]->GetVolume();
110 int nd = v->GetNdaughters();
111 for (
int i=0; i<nd; ++i) {
112 path[deeper] = v->GetNode(i);
void FindAuxDetSensitive(std::vector< const TGeoNode * > &path, unsigned int depth)
void MakeAuxDetSensitive(std::vector< const TGeoNode * > &path, int depth)
cet::coded_exception< error, detail::translate > exception
size_t gar::geo::AuxDetGeo::FindSensitiveVolume |
( |
double const |
worldLoc[3] | ) |
const |
Definition at line 191 of file AuxDetGeo.cxx.
193 double local[3] = {0.};
210 throw cet::exception(
"Geometry") <<
"Can't find AuxDetSensitive for position (" 211 << worldPos[0] <<
"," 212 << worldPos[1] <<
"," 213 << worldPos[2] <<
")\n";
double HalfWidth1() const
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
void WorldToLocal(const double *world, double *local) const
double HalfWidth2() const
double HalfHeight() const
cet::coded_exception< error, detail::translate > exception
void gar::geo::AuxDetGeo::GetCenter |
( |
double * |
xyz, |
|
|
double |
localz = 0.0 |
|
) |
| const |
Return the center position of an AuxDet
- Parameters
-
xyz | : 3-D array. The returned location. |
localz | : Distance along the length of the volume (z) (cm). Default is 0. |
Definition at line 164 of file AuxDetGeo.cxx.
166 double xyzLocal[3] = {0.,0.,localz};
void LocalToWorld(const double *local, double *world) const
void gar::geo::AuxDetGeo::GetNormalVector |
( |
double * |
xyzDir | ) |
const |
Definition at line 172 of file AuxDetGeo.cxx.
174 double normal[3]={0.,0.,1.};
void LocalToWorldVect(const double *local, double *world) const
double gar::geo::AuxDetGeo::HalfHeight |
( |
| ) |
const |
|
inline |
Definition at line 38 of file AuxDetGeo.h.
double fHalfHeight
half height of volume
double gar::geo::AuxDetGeo::HalfWidth1 |
( |
| ) |
const |
|
inline |
Definition at line 36 of file AuxDetGeo.h.
double fHalfWidth1
1st half width of volume, at -z/2 in local coordinates
double gar::geo::AuxDetGeo::HalfWidth2 |
( |
| ) |
const |
|
inline |
Definition at line 37 of file AuxDetGeo.h.
double fHalfWidth2
2nd half width (width1==width2 for boxes), at +z/2
double gar::geo::AuxDetGeo::Length |
( |
| ) |
const |
|
inline |
Definition at line 35 of file AuxDetGeo.h.
double fLength
length of volume, along z direction in local
void gar::geo::AuxDetGeo::LocalToWorld |
( |
const double * |
local, |
|
|
double * |
world |
|
) |
| const |
Transform a position from local frame to world frame
- Parameters
-
local | : 3D array. Position in the local frame Input. |
world | : 3D array. Position in the world frame. Returned. |
Definition at line 127 of file AuxDetGeo.cxx.
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
void gar::geo::AuxDetGeo::LocalToWorldVect |
( |
const double * |
local, |
|
|
double * |
world |
|
) |
| const |
Transform a 3-vector from local frame to world frame
- Parameters
-
local | : 3D array. Position in the local frame Input. |
world | : 3D array. Position in the world frame. Returned. |
Definition at line 136 of file AuxDetGeo.cxx.
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
void gar::geo::AuxDetGeo::MakeAuxDetSensitive |
( |
std::vector< const TGeoNode * > & |
path, |
|
|
int |
depth |
|
) |
| |
|
private |
Definition at line 118 of file AuxDetGeo.cxx.
120 fSensitive.push_back(
new AuxDetSensitiveGeo(path, depth));
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
Definition at line 48 of file AuxDetGeo.h.
const TGeoVolume * fTotalVolume
Total volume of AuxDet, called vol*.
size_t gar::geo::AuxDetGeo::NSensitiveVolume |
( |
| ) |
const |
|
inline |
Definition at line 56 of file AuxDetGeo.h.
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
AuxDetSensitiveGeo const & gar::geo::AuxDetGeo::PositionToSensitiveVolume |
( |
double const |
worldLoc[3], |
|
|
size_t & |
sv |
|
) |
| const |
Definition at line 219 of file AuxDetGeo.cxx.
AuxDetSensitiveGeo const & SensitiveVolume(size_t sv) const
size_t FindSensitiveVolume(double const worldLoc[3]) const
Definition at line 55 of file AuxDetGeo.h.
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
Definition at line 227 of file AuxDetGeo.cxx.
std::vector< AuxDetSensitiveGeo * > fSensitive
sensitive volumes in the detector
const TGeoVolume* gar::geo::AuxDetGeo::TotalVolume |
( |
| ) |
const |
|
inline |
Definition at line 39 of file AuxDetGeo.h.
const TGeoVolume * fTotalVolume
Total volume of AuxDet, called vol*.
void gar::geo::AuxDetGeo::WorldToLocal |
( |
const double * |
world, |
|
|
double * |
local |
|
) |
| const |
Transform a position from world frame to local frame
- Parameters
-
world | : 3D array. Position in the world frame. Input. |
local | : 3D array. Position in the local frame Returned. |
Definition at line 145 of file AuxDetGeo.cxx.
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
void gar::geo::AuxDetGeo::WorldToLocalVect |
( |
const double * |
world, |
|
|
double * |
local |
|
) |
| const |
Transform a 3-vector from world frame to local frame
- Parameters
-
world | : 3D array. Position in the world frame. Input. |
local | : 3D array. Position in the local frame Returned. |
Definition at line 154 of file AuxDetGeo.cxx.
TGeoHMatrix * fGeoMatrix
Transformation matrix to world frame.
TGeoHMatrix* gar::geo::AuxDetGeo::fGeoMatrix |
|
private |
Transformation matrix to world frame.
Definition at line 68 of file AuxDetGeo.h.
double gar::geo::AuxDetGeo::fHalfHeight |
|
private |
double gar::geo::AuxDetGeo::fHalfWidth1 |
|
private |
1st half width of volume, at -z/2 in local coordinates
Definition at line 70 of file AuxDetGeo.h.
double gar::geo::AuxDetGeo::fHalfWidth2 |
|
private |
2nd half width (width1==width2 for boxes), at +z/2
Definition at line 71 of file AuxDetGeo.h.
double gar::geo::AuxDetGeo::fLength |
|
private |
length of volume, along z direction in local
Definition at line 69 of file AuxDetGeo.h.
sensitive volumes in the detector
Definition at line 73 of file AuxDetGeo.h.
const TGeoVolume* gar::geo::AuxDetGeo::fTotalVolume |
|
private |
Total volume of AuxDet, called vol*.
Definition at line 67 of file AuxDetGeo.h.
The documentation for this class was generated from the following files: