HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hgeombrik.cc
Go to the documentation of this file.
1 //*-- AUTHOR : Ilse Koenig
2 //*-- Modified : 11/11/2003 by Ilse Koenig
3 //*-- Modified : 14/05/99 by Ilse Koenig
4 
5 //_HADES_CLASS_DESCRIPTION
6 /////////////////////////////////////////////////////////////
7 //
8 // HGeomBrik
9 //
10 // class for the GEANT shape BOX
11 //
12 // The intrisic coordinate system of a BOX in GEANT/ROOT has the
13 // same orientation as the volume described by its 8 points
14 // in the technical coordinate system
15 //
16 /////////////////////////////////////////////////////////////
17 
18 #include "hgeombrik.h"
19 #include "hgeomvolume.h"
20 #include "hgeomvector.h"
21 
23 
25  // constructor
26  fName="BOX ";
27  nPoints=8;
28  nParam=3;
29  param=new TArrayD(nParam);
30 }
31 
32 
34  // destructor
35  if (param) {
36  delete param;
37  param=0;
38  }
39  if (center) {
40  delete center;
41  center=0;
42  }
43  if (position) {
44  delete position;
45  position=0;
46  }
47 }
48 
49 
51  // calculates the parameters needed to create the shape
52  if (!volu) return 0;
53  HGeomVector v=*(volu->getPoint(5)) - *(volu->getPoint(3));
54  v.abs();
55  v*=(1/20.);
56  for(Int_t i=0;i<nParam;i++) param->AddAt(v(i),i);
57  return param;
58 }
59 
60 
62  const HGeomTransform& dTC,const HGeomTransform& mTR) {
63  // calls the function posInMother(...) to calculate the position of the
64  // volume in its mother
65  HGeomVector trans=*(volu->getPoint(5)) + *(volu->getPoint(3));
66  trans*=0.5;
67  center->clear();
68  center->setTransVector(trans);
69  posInMother(dTC,mTR);
70 }
71 
72 
73 
74 
75 
TArrayD * calcVoluParam(HGeomVolume *)
Definition: hgeombrik.cc:50
HGeomVector & abs()
Definition: hgeomvector.h:176
void calcVoluPosition(HGeomVolume *, const HGeomTransform &, const HGeomTransform &)
Definition: hgeombrik.cc:61
~HGeomBrik()
Definition: hgeombrik.cc:33
HGeomTransform * center
void posInMother(const HGeomTransform &, const HGeomTransform &)
void setTransVector(const HGeomVector &t)
ClassImp(HGeomBrik) HGeomBrik
Definition: hgeombrik.cc:22
HGeomVector * getPoint(const Int_t n)
Definition: hgeomvolume.h:52
HGeomTransform * position