9 #include "TGeoManager.h" 11 #include "TGeoMatrix.h" 24 : fTranslatedMatrix(0)
34 TGeoHMatrix parentMatrix = *n.front()->GetMatrix();
37 for(
int i = 1;
i < depth; ++
i){
38 parentMatrix.Multiply(n[
i]->GetMatrix());
51 std::cerr <<
"Warning: CellGeo::fgParentMatrices size exceeds " 52 << 64*14*12*2 <<
" expected." <<
std::endl;
127 TGeoRotation *rot =
new TGeoRotation(
"alignmentRot",phi,theta,psi);
129 TGeoTranslation *trans =
new TGeoTranslation(
"",dx,dy,dz);
130 TGeoCombiTrans *comb =
new TGeoCombiTrans(*trans,*rot);
161 static double xyzLocal[3] = {0,0,0};
162 xyzLocal[2] = localz;
174 xyz.SetXYZ(xyzArray[0], xyzArray[1], xyzArray[2]);
186 return this->
HalfL()-localz;
193 return ((TGeoBBox*)
fCellNode->GetVolume()->GetShape())->GetDX();
200 return ((TGeoBBox*)
fCellNode->GetVolume()->GetShape())->GetDZ();
207 return ((TGeoBBox*)
fCellNode->GetVolume()->GetShape())->GetDY();
void GetCenter(double *xyz, double localz=0.0) const
void WorldToLocal(const double *local, double *world) const
void LocalToWorld(const double *local, double *world) const
const TGeoNode * fCellNode
Pointer to the cell node.
void WorldToLocalVect(const double *local, double *world) const
CellUniqueId NodesToUniqueId(const std::vector< const TGeoNode * > &n, unsigned int depth)
CellGeo(const std::vector< const TGeoNode * > &n, int depth)
Construct a cell geometry.
Give every cell in the geometry a unique ID number based on the TGeo path to the node.
double DistToReadOut(double localz) const
void LocalToWorldVect(const double *local, double *world) const
static std::vector< TGeoHMatrix > fgParentMatrices
Collection of unique parent matrices seen.
void TranslateCell(double dx, double dy=0, double dz=0)
TGeoHMatrix GetGeoMatrix() const
Transformation matrix to world frame.
TGeoHMatrix * fTranslatedMatrix
Adjusted matrix, if TranslateCell() has been called.
int fParentMatrixIdx
Index into fgParentMatrices.
CellUniqueId fId
Node ID number.
void RestoreOriginal()
Restore geometry to original.