I’ve recently begun “playing” with ROOT’s geometry capabilities. My goal is to create a region that models the intersection of 4 gaussian laser beams (can be modeled as hyperboloids). For this purpose I saw from the user’s manual one normally uses a composite shape. For this purpose I will provide the following code snippet (I have omitted the other combitrans objects because their declaration is very similar and I get an error with the very first one).
TGeoRotation *rot1 = new TGeoRotation( "rot1", 90. , 90. , 180. , 0. , 90. , 0. );
TGeoCombiTrans *combi1 = new TGeoCombiTrans( "combi1" , 5 , 0 , -1. , rot1 );
TGeoHype *beam = new TGeoHype( "beam" , 0 , 0 , w0 , angle , w0pos );
TGeoCompositeShape *4beams = new TGeoCompositeShape( "4beams" , "beam:combi1 + beam:combi2 + beam:combi3 + beam:combi4" );
TGeoVolume *molasses = new TGeoVolume( "molasses" , 4beams );
When running this I’m getting the following error:
Error in TGeoBoolNode::MakeBranch : transformation combi1 not found
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x00007f5110e8d36e in waitpid () from /lib/libc.so.6
#1 0x00007f5110e2b299 in ?? () from /lib/libc.so.6
#2 0x00007f5112f760b7 in TUnixSystem::StackTrace() ()
from /opt/root/lib/root/libCore.so.5.26
#3 0x00007f5112f76fb4 in TUnixSystem::DispatchSignals(ESignals) ()
from /opt/root/lib/root/libCore.so.5.26
#4
#5 0x00007f510f4a65c4 in TGeoUnion::ComputeBBox(double&, double&, double&, double*) () from /opt/root/lib/root/libGeom.so
#6 0x00007f510f4b1606 in TGeoCompositeShape::TGeoCompositeShape(char const*)
() from /opt/root/lib/root/libGeom.so
#7 0x00007f510f4a8321 in TGeoBoolNode::MakeBranch(char const*, bool) ()
from /opt/root/lib/root/libGeom.so
#8 0x00007f510f4a8686 in TGeoBoolNode::TGeoBoolNode(char const*, char const*)
() from /opt/root/lib/root/libGeom.so
#9 0x00007f510f4a8759 in TGeoUnion::TGeoUnion(char const*, char const*) ()
from /opt/root/lib/root/libGeom.so
#10 0x00007f510f4b0d49 in TGeoCompositeShape::MakeNode(char const*) ()
from /opt/root/lib/root/libGeom.so
#11 0x00007f510f4b15f7 in TGeoCompositeShape::TGeoCompositeShape(char const*)
() from /opt/root/lib/root/libGeom.so
#12 0x00007f510f4a8321 in TGeoBoolNode::MakeBranch(char const*, bool) ()
from /opt/root/lib/root/libGeom.so
#13 0x00007f510f4a8686 in TGeoBoolNode::TGeoBoolNode(char const*, char const*)
() from /opt/root/lib/root/libGeom.so
#14 0x00007f510f4a8759 in TGeoUnion::TGeoUnion(char const*, char const*) ()
from /opt/root/lib/root/libGeom.so
#15 0x00007f510f4b0d49 in TGeoCompositeShape::MakeNode(char const*) ()
from /opt/root/lib/root/libGeom.so
#16 0x00007f510f4b1402 in TGeoCompositeShape::TGeoCompositeShape(char const*, char const*) () from /opt/root/lib/root/libGeom.so
#17 0x00007f510f5edf43 in G__G__Geom1_225_0_4(G__value*, char const*, G__param*, int) () from /opt/root/lib/root/libGeom.so
#18 0x00007f5112396f4e in Cint::G__ExceptionWrapper(int ()(G__value , char const*, G__param*, int), G__value*, char*, G__param*, int) ()
from /opt/root/lib/root/libCint.so.5.26
#19 0x00007f51124370c1 in G__execute_call ()
from /opt/root/lib/root/libCint.so.5.26
#20 0x00007f5112438932 in G__call_cppfunc ()
from /opt/root/lib/root/libCint.so.5.26
#21 0x00007f511241656b in G__interpret_func ()
from /opt/root/lib/root/libCint.so.5.26
#22 0x00007f5112404b9c in G__getfunction ()
from /opt/root/lib/root/libCint.so.5.26
#23 0x00007f51124331bf in G__new_operator ()
from /opt/root/lib/root/libCint.so.5.26
#24 0x00007f51123e7277 in G__getexpr () from /opt/root/lib/root/libCint.so.5.26
#25 0x00007f51123d4362 in G__define_var ()
from /opt/root/lib/root/libCint.so.5.26
#26 0x00007f51124641ed in G__exec_statement ()
from /opt/root/lib/root/libCint.so.5.26
#27 0x00007f51124174fd in G__interpret_func ()
from /opt/root/lib/root/libCint.so.5.26
#28 0x00007f5112404bfb in G__getfunction ()
from /opt/root/lib/root/libCint.so.5.26
#29 0x00007f51123e164a in G__getitem () from /opt/root/lib/root/libCint.so.5.26
#30 0x00007f51123e6ea9 in G__getexpr () from /opt/root/lib/root/libCint.so.5.26
#31 0x00007f51123f0b38 in G__calc_internal ()
from /opt/root/lib/root/libCint.so.5.26
#32 0x00007f5112475f6c in G__process_cmd ()
from /opt/root/lib/root/libCint.so.5.26
#33 0x00007f5112f62166 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /opt/root/lib/root/libCore.so.5.26
#34 0x00007f5112f5db83 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /opt/root/lib/root/libCore.so.5.26
#35 0x00007f5112e9835a in TApplication::ExecuteFile(char const*, int*, bool) ()
from /opt/root/lib/root/libCore.so.5.26
#36 0x00007f5112e96448 in TApplication::ProcessLine(char const*, bool, int*) ()
from /opt/root/lib/root/libCore.so.5.26
#37 0x00007f5111d2da92 in TRint::Run(bool) ()
from /opt/root/lib/root/libRint.so.5.26
#38 0x000000000040119c in main ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs . Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
#5 0x00007f510f4a65c4 in TGeoUnion::ComputeBBox(double&, double&, double&, double*) () from /opt/root/lib/root/libGeom.so
#6 0x00007f510f4b1606 in TGeoCompositeShape::TGeoCompositeShape(char const*)
() from /opt/root/lib/root/libGeom.so
#7 0x00007f510f4a8321 in TGeoBoolNode::MakeBranch(char const*, bool) ()
from /opt/root/lib/root/libGeom.so
#8 0x00007f510f4a8686 in TGeoBoolNode::TGeoBoolNode(char const*, char const*)
() from /opt/root/lib/root/libGeom.so
#9 0x00007f510f4a8759 in TGeoUnion::TGeoUnion(char const*, char const*) ()
from /opt/root/lib/root/libGeom.so
#10 0x00007f510f4b0d49 in TGeoCompositeShape::MakeNode(char const*) ()
from /opt/root/lib/root/libGeom.so
#11 0x00007f510f4b15f7 in TGeoCompositeShape::TGeoCompositeShape(char const*)
() from /opt/root/lib/root/libGeom.so
#12 0x00007f510f4a8321 in TGeoBoolNode::MakeBranch(char const*, bool) ()
from /opt/root/lib/root/libGeom.so
#13 0x00007f510f4a8686 in TGeoBoolNode::TGeoBoolNode(char const*, char const*)
() from /opt/root/lib/root/libGeom.so
#14 0x00007f510f4a8759 in TGeoUnion::TGeoUnion(char const*, char const*) ()
from /opt/root/lib/root/libGeom.so
#15 0x00007f510f4b0d49 in TGeoCompositeShape::MakeNode(char const*) ()
from /opt/root/lib/root/libGeom.so
#16 0x00007f510f4b1402 in TGeoCompositeShape::TGeoCompositeShape(char const*, char const*) () from /opt/root/lib/root/libGeom.so
Root > Function chamber_geom() busy flag cleared
I don’t understand what I’m doing wrong! and what is that nonsense about not finding the combi1 transformation! Help is greatly appreciated
EDIT: I decided to try without using the transformation combination object (see code below).
TGeoCompositeShape *4beams = new TGeoCompositeShape( "4beams" , "( beam : rot1 ) : tr1 + ( beam : rot2 ) : tr2 + ( beam : rot3 ) : tr3 + ( beam : rot4 ) : tr4" );
Unfortunately I got similar errors:
Warning in TGeoCompositeShape::MakeNode : no geometrical transformation allowed at this level
Error in TGeoBoolNode::MakeBranch : transformation tr3 not found
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x00007f80a898736e in waitpid () from /lib/libc.so.6
#1 0x00007f80a8925299 in ?? () from /lib/libc.so.6
#2 0x00007f80aaa700b7 in TUnixSystem::StackTrace() ()
from /opt/root/lib/root/libCore.so.5.26
#3 0x00007f80aaa70fb4 in TUnixSystem::DispatchSignals(ESignals) ()
from /opt/root/lib/root/libCore.so.5.26
#4
#5 0x00007f80a6fa05c4 in TGeoUnion::ComputeBBox(double&, double&, double&, double*) () from /opt/root/lib/root/libGeom.so
#6 0x00007f80a6fab411 in TGeoCompositeShape::TGeoCompositeShape(char const*, char const*) () from /opt/root/lib/root/libGeom.so
#7 0x00007f80a70e7f43 in G__G__Geom1_225_0_4(G__value*, char const*, G__param*, int) () from /opt/root/lib/root/libGeom.so
#8 0x00007f80a9e90f4e in Cint::G__ExceptionWrapper(int ()(G__value , char const*, G__param*, int), G__value*, char*, G__param*, int) ()
from /opt/root/lib/root/libCint.so.5.26
#9 0x00007f80a9f310c1 in G__execute_call ()
from /opt/root/lib/root/libCint.so.5.26
#10 0x00007f80a9f32932 in G__call_cppfunc ()
from /opt/root/lib/root/libCint.so.5.26
#11 0x00007f80a9f1056b in G__interpret_func ()
from /opt/root/lib/root/libCint.so.5.26
#12 0x00007f80a9efeb9c in G__getfunction ()
from /opt/root/lib/root/libCint.so.5.26
#13 0x00007f80a9f2d1bf in G__new_operator ()
from /opt/root/lib/root/libCint.so.5.26
#14 0x00007f80a9ee1277 in G__getexpr () from /opt/root/lib/root/libCint.so.5.26
#15 0x00007f80a9ece362 in G__define_var ()
from /opt/root/lib/root/libCint.so.5.26
#16 0x00007f80a9f5e1ed in G__exec_statement ()
from /opt/root/lib/root/libCint.so.5.26
#17 0x00007f80a9f114fd in G__interpret_func ()
from /opt/root/lib/root/libCint.so.5.26
#18 0x00007f80a9efebfb in G__getfunction ()
from /opt/root/lib/root/libCint.so.5.26
#19 0x00007f80a9edb64a in G__getitem () from /opt/root/lib/root/libCint.so.5.26
#20 0x00007f80a9ee0ea9 in G__getexpr () from /opt/root/lib/root/libCint.so.5.26
#21 0x00007f80a9eeab38 in G__calc_internal ()
from /opt/root/lib/root/libCint.so.5.26
#22 0x00007f80a9f6ff6c in G__process_cmd ()
from /opt/root/lib/root/libCint.so.5.26
#23 0x00007f80aaa5c166 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /opt/root/lib/root/libCore.so.5.26
#24 0x00007f80aaa57b83 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /opt/root/lib/root/libCore.so.5.26
#25 0x00007f80aa99235a in TApplication::ExecuteFile(char const*, int*, bool) ()
from /opt/root/lib/root/libCore.so.5.26
#26 0x00007f80aa990448 in TApplication::ProcessLine(char const*, bool, int*) ()
from /opt/root/lib/root/libCore.so.5.26
#27 0x00007f80a9827a92 in TRint::Run(bool) ()
from /opt/root/lib/root/libRint.so.5.26
#28 0x000000000040119c in main ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs . Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
#5 0x00007f80a6fa05c4 in TGeoUnion::ComputeBBox(double&, double&, double&, double*) () from /opt/root/lib/root/libGeom.so
#6 0x00007f80a6fab411 in TGeoCompositeShape::TGeoCompositeShape(char const*, char const*) () from /opt/root/lib/root/libGeom.so
Root > Function chamber_geom() busy flag cleared
HELP!!!
agheata
September 23, 2010, 7:25am
2
Hi,
By default any transformation matrix is owned by the user and the geometry manager does not know about it. You have to call: matrix->RegisterYourself()
Note that you can also build-up a composite shape using the contructor with TGeoBoolNode. In this case your matrices do not need to be named as you provide pointers.
Cheers,
1 Like
Hello, sorry for the necroposting.
I just found myself in a similar issue in a similar scenario with same error:
Error in <TGeoBoolNode::MakeBranch>: transformation t1 not found
That reconduced me to the reference of TGeoCombiTrans , where the example provided is actually not working because matrices are not registered with matrix->RegisterYourself()
.
I just wanted to shout out to this old answer that fixed both bug in the reference and my issue.