ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified : 11/11/2003 by Ilse Koenig
//*-- Modified : 14/05/99 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION 
/////////////////////////////////////////////////////////////
//
// HGeomBrik
//
// class for the GEANT shape BOX
// 
// The intrisic coordinate system of a BOX in GEANT/ROOT has the
// same orientation as the volume described by its 8 points
// in the technical coordinate system 
// 
/////////////////////////////////////////////////////////////

#include "hgeombrik.h"
#include "hgeomvolume.h"
#include "hgeomvector.h"

ClassImp(HGeomBrik)

HGeomBrik::HGeomBrik() {
  // constructor
  fName="BOX ";
  nPoints=8;
  nParam=3;
  param=new TArrayD(nParam);
}


HGeomBrik::~HGeomBrik() {
  // destructor
  if (param) {
    delete param;
    param=0;
  }
  if (center) {
    delete center;
    center=0;
  }
  if (position) {
    delete position;
    position=0;
  }
}


TArrayD* HGeomBrik::calcVoluParam(HGeomVolume* volu) {
  // calculates the parameters needed to create the shape 
  if (!volu) return 0;
  HGeomVector v=*(volu->getPoint(5)) - *(volu->getPoint(3));
  v.abs();
  v*=(1/20.);
  for(Int_t i=0;i<nParam;i++) param->AddAt(v(i),i);
  return param;
} 


void HGeomBrik::calcVoluPosition(HGeomVolume* volu,
          const HGeomTransform& dTC,const HGeomTransform& mTR) {
  // calls the function posInMother(...) to calculate the position of the
  // volume in its mother 
  HGeomVector trans=*(volu->getPoint(5)) + *(volu->getPoint(3));
  trans*=0.5;
  center->clear();
  center->setTransVector(trans);
  posInMother(dTC,mTR);
}





 hgeombrik.cc:1
 hgeombrik.cc:2
 hgeombrik.cc:3
 hgeombrik.cc:4
 hgeombrik.cc:5
 hgeombrik.cc:6
 hgeombrik.cc:7
 hgeombrik.cc:8
 hgeombrik.cc:9
 hgeombrik.cc:10
 hgeombrik.cc:11
 hgeombrik.cc:12
 hgeombrik.cc:13
 hgeombrik.cc:14
 hgeombrik.cc:15
 hgeombrik.cc:16
 hgeombrik.cc:17
 hgeombrik.cc:18
 hgeombrik.cc:19
 hgeombrik.cc:20
 hgeombrik.cc:21
 hgeombrik.cc:22
 hgeombrik.cc:23
 hgeombrik.cc:24
 hgeombrik.cc:25
 hgeombrik.cc:26
 hgeombrik.cc:27
 hgeombrik.cc:28
 hgeombrik.cc:29
 hgeombrik.cc:30
 hgeombrik.cc:31
 hgeombrik.cc:32
 hgeombrik.cc:33
 hgeombrik.cc:34
 hgeombrik.cc:35
 hgeombrik.cc:36
 hgeombrik.cc:37
 hgeombrik.cc:38
 hgeombrik.cc:39
 hgeombrik.cc:40
 hgeombrik.cc:41
 hgeombrik.cc:42
 hgeombrik.cc:43
 hgeombrik.cc:44
 hgeombrik.cc:45
 hgeombrik.cc:46
 hgeombrik.cc:47
 hgeombrik.cc:48
 hgeombrik.cc:49
 hgeombrik.cc:50
 hgeombrik.cc:51
 hgeombrik.cc:52
 hgeombrik.cc:53
 hgeombrik.cc:54
 hgeombrik.cc:55
 hgeombrik.cc:56
 hgeombrik.cc:57
 hgeombrik.cc:58
 hgeombrik.cc:59
 hgeombrik.cc:60
 hgeombrik.cc:61
 hgeombrik.cc:62
 hgeombrik.cc:63
 hgeombrik.cc:64
 hgeombrik.cc:65
 hgeombrik.cc:66
 hgeombrik.cc:67
 hgeombrik.cc:68
 hgeombrik.cc:69
 hgeombrik.cc:70
 hgeombrik.cc:71
 hgeombrik.cc:72
 hgeombrik.cc:73
 hgeombrik.cc:74
 hgeombrik.cc:75