//*-- 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);
}






Last change: Sat May 22 12:56:11 2010
Last generated: 2010-05-22 12:56

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.