Message: Example 4.7 in Guide for Application Developers Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Example 4.7 in Guide for Application Developers 

Forum: Documentation and Examples
Date: 13 Feb, 2009
From: Juan <Juan>

Deal all,

I'm trying to understand the G4AssemblyVolume class. I have wrote a code based on example Example 4.7 from Guide for Application Developers. I dont know if there is an error but when I write this :

  Ta.setX( worldX/4. ); Ta.setY( worldX/4. ); Ta.setZ( 0. );
  assemblyDetector->AddPlacedVolume( plateLV, G4Transform3D(Ta,Ra) );

It does not compile:
 error: no matching function for call to `G4AssemblyVolume::AddPlacedVolume(G4LogicalVolume*&, G4Transform3D)'
/usr/local/geant4/include/G4AssemblyVolume.hh:84: note: candidates are: void G4AssemblyVolume::AddPlacedVolume(G4LogicalVolume*, G4ThreeVector&, G4RotationMatrix*)
/usr/local/geant4/include/G4AssemblyVolume.hh:115: note:                 void G4AssemblyVolume::AddPlacedVolume(G4LogicalVolume*, G4Transform3D&)
make: *** [/home/cabrera/geant4/tmp/Linux-g++/template/GeometryConstruction.o] Error 1

Defining a G4Transform3D variable with input parameters (Ra and Ta) inverted, it works:
  Ta.setX(worldX/4.); Ta.setY(worldY/4.); Ta.setZ(0.);
  G4Transform3D trans = G4Transform3D(Ra,Ta);
  assemblyDetector->AddPlacedVolume(plateLV,trans);

Is there something wrong in my program or is it a typo in the Documentation?

Juan

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Example 4.7 in Guide for Application Developers   (Paul Nicholas Colin Gloster - 13 Feb, 2009)
2 None: Re: Example 4.7 in Guide for Application Developers   (Tatiana Nikitina - 23 Feb, 2009)
3 Note: Re: Example 4.7 in Guide for Application Developers   (Juan - 23 Feb, 2009)
1 Note: Re: Example 4.7 in Guide for Application Developers   (Juan - 23 Feb, 2009)
 Add Message Add Message
to: "Example 4.7 in Guide for Application Developers"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]