Re: TGeoCompositeShape boolean expression

From: Andrei Gheata <Andrei.Gheata_at_cern.ch>
Date: Sat, 13 Nov 2010 14:22:48 +0100


Hi Akira,
As explained in the docs, the shape identifiers have to be in the form SHAPE_NAME:MATRIX_NAME. You are allowed to use. (sph:tr)*(pg:tr) but not (sph:tr):tr
The parser will never try to multiply matrices but just to identify them.

I will try to add a protection for the misuse cases. Cheers, Andrei

On 13/11/2010 05:43, OKUMURA, Akira wrote:
> Hello ROOTers,
>
> Is it possible to use TGeoTranslation or TGeoRotation several times in an expression of TGeoCompositeShape?
>
> For example, if I modify the following line in tutorial/geom/geodemo.C
>
> TGeoCompositeShape *cs = new TGeoCompositeShape("mir", "sph:tr*pg");
>
> to
>
> TGeoCompositeShape *cs = new TGeoCompositeShape("mir", "((sph:tr*pg):tr):tr");
>
> ROOT causes a seg fault. Is this an invalid expression?
>
> Info in<TGeoManager::TGeoManager>: Geometry xtru, poza12 created
> Info in<TGeoManager::SetTopVolume>: Top volume is TOP. Master volume is TOP
> Warning in<TGeoCompositeShape::MakeNode>: no geometrical transformation allowed at this level
> Error in<TGeoManager::Parse>: paranthesys does not match
> Error in<TGeoBoolNode::MakeBranch>: invalid expresion
>
> *** Break *** segmentation violation
>
>
>
> ===========================================================
> There was a crash.
> This is the entire stack trace of all threads:
> ===========================================================
>
> Thread 1 (process 73462):
> #0 0x00007fff832a7c90 in wait4 ()
> #1 0x00007fff832bc23e in system ()
> #2 0x000000010010d5f5 in TUnixSystem::StackTrace ()
> #3 0x000000010010b691 in TUnixSystem::DispatchSignals ()
> #4<signal handler called>
> #5 0x0000000103c1e693 in TGeoIntersection::ComputeBBox ()
> #6 0x0000000103c278e3 in TGeoCompositeShape::TGeoCompositeShape ()
> #7 0x0000000103d73866 in G__G__Geom1_230_0_4 ()
> #8 0x00000001008735a6 in Cint::G__ExceptionWrapper ()
> #9 0x000000010092de8c in G__execute_call ()
> #10 0x0000000100934d0b in G__call_cppfunc ()
> #11 0x000000010090af73 in G__interpret_func ()
> #12 0x00000001008f8e02 in G__getfunction ()
> #13 0x000000010092a4d0 in G__new_operator ()
> #14 0x00000001008d3afc in G__getexpr ()
> #15 0x00000001008bcf07 in G__define_var ()
> #16 0x000000010095e783 in G__exec_statement ()
> #17 0x000000010090c6ed in G__interpret_func ()
> #18 0x00000001008f8fa4 in G__getfunction ()
> #19 0x00000001008cab9a in G__getitem ()
> #20 0x00000001008cf49b in G__getexpr ()
> #21 0x0000000100961d15 in G__exec_statement ()
> #22 0x00000001008b651d in G__exec_tempfile_core ()
> #23 0x00000001008b6836 in G__exec_tempfile_fp ()
> #24 0x000000010096bf61 in G__process_cmd ()
> #25 0x000000010001f32e in TCint::ProcessLine ()
> #26 0x0000000100066c7b in TApplication::ProcessLine ()
> #27 0x0000000101714e57 in TControlBarButton::Action ()
> #28 0x000000010334cf9c in TRootControlBar::ProcessMessage ()
> #29 0x000000010329c349 in TGFrame::HandleClientMessage ()
> #30 0x000000010329d45b in TGMainFrame::HandleClientMessage ()
> #31 0x000000010329e00d in TGFrame::HandleEvent ()
> #32 0x000000010326dc90 in TGClient::HandleEvent ()
> #33 0x000000010326e58b in TGClient::ProcessOneEvent ()
> #34 0x000000010326e5fe in TGClient::HandleInput ()
> #35 0x000000010326e61d in TGInputHandler::Notify ()
> #36 0x000000010010bd1c in TUnixSystem::DispatchOneEvent ()
> #37 0x00000001000a40bd in TSystem::InnerLoop ()
> #38 0x00000001000a6cc3 in TSystem::Run ()
> #39 0x00000001000654a7 in TApplication::Run ()
> #40 0x00000001011df76b in TRint::Run ()
> #41 0x00000001000019a0 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
> http://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 0x0000000103c1e693 in TGeoIntersection::ComputeBBox ()
> #6 0x0000000103c278e3 in TGeoCompositeShape::TGeoCompositeShape ()
> ===========================================================
>
>
>
> Regards,
>
> --
> OKUMURA, Akira oxon@{astro.isas.jaxa.jp,stanford.edu}
> Institute of Space and Astronautical Science (ISAS/JAXA)
> Now at KIPAC/SLAC/Stanford
> Varian Physics #306, 382 Via Pueblo Mall, MC 4060
> Stanford, CA 94305-4060
> TEL 650-736-0971/FAX 650-724-5065
> Skype : okumura.akira
>
Received on Sat Nov 13 2010 - 14:23:08 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 15 2010 - 11:50:01 CET