How to properly use TGeoHMatrix

Hi

I was having my first forays into Root geometry by doing some CSG, I successfully setup my Boxes,

  double world_radius = 100.;
  // plane at 7cm in x, worldsize otherwise                                                                                                    
  TGeoBBox *b1 = new TGeoBBox("b1",world_radius,world_radius,world_radius);

So I tried to setup my rotation translation matrices, but …

  TGeoHMatrix *h1 = new TGeoHMatrix();
  h1->SetTranslation(-70,0,0);
  Error: Can't call TGeoHMatrix::SetTranslation(-70,0,0) in current scope plot.c:23:
  Possible candidates are...
  (in TGeoHMatrix)

So I tried

  TGeoTranslation *tr1 = new TGeoTranslation(world_radius - 70, 0., 0.);
  TGeoHMatrix *h1 = new TGeoHMatrix();
  h1->Add(tr1);
 Error: Can't call TGeoHMatrix::Add(tr1) in current scope plot.c:25:
 Possible candidates are...
 (in TGeoHMatrix)
 (in TGeoMatrix)

There is clearly something I’m missing, could someone spot my obvious mistake?

Thanks

Hi,

Any of the forms below should do:

TGeoHMatrix *h1 = new TGeoHMatrix(TGeoTranslation(1,2,3));
TGeoHMatrix *h1 = new TGeoHMatrix();
h1->SetDx(1.); h1->SetDy(2.); h1->SetDz(3.);
double tr[3] = {1.,2.,3.};
h1->SetTranslation(tr);

Best,