See second post
So I went to use the TGeoCompositeShape class and it is quite confusing why you would use the name of the TGeoVolume to do the boolean operation but not the name of the transformation matrix.
From the class documentation:
TGeoTranslation *t1 = new TGeoTranslation("T1",0,0,-20);
TGeoTranslation *t2 = new TGeoTranslation("T2",0,0, 20);
TGeoRotation *r1 = new TGeoRotation("R1"); // transformations need names
r1->SetAngles(90,30,90,120,0,0); // rotation with 30 degrees about Z
TGeoTube *a = new TGeoTube(0, 10,20);
a->SetName("A"); // shapes need names too
TGeoTube *b = new TGeoTube(0, 20,20);
b->SetName("B");
TGeoBBox *c = new TGeoBBox(10,10,50);
c->SetName("C");
TGeoBBox *d = new TGeoBBox(50,10,10);
d->SetName("D");
TGeoCompositeShape *cs;
cs = new TGeoCompositeShape("CS", "(A:t1+B:t2)\(C+D:r1)");
Seems to me, for consistency, the last line should read like this:
cs = new TGeoCompositeShape("CS", "(A:T1+B:T2)\(C+D:R1)");
That is instead of “t1” you should use the name “T1”.
I would assume this is why you would say that transformations need names?
This would be a nicer implementation because I can do a loop, creating different matrices and changing the name, and still easily use arrays of pointers.
Cheers,
Whit