Message: Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation Not Logged In (login)

## Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation

Forum: Geometry
Re: Trouble with G4SubtractionSolid -- pipe at angle to wall (Michael H. Kelsey)
Re: Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation (Michael H. Kelsey)
Date: 15 Jan, 2011
From: Tom Roberts <Tom Roberts>

 I have not checked your values, but as the CLHEP routines have been used by many people for many years, it is unlikely that you have actually found a bug. More likely is that you are confused by their rotation conventions. So I urge you to study the documentation carefully. I remark that rotation conventions can be VERY confusing. I decided that CLHEP and Geant4 used an overly-confusing definition, so I invented my own convention and implemented it using a sequence of single CLHEP rotations: ``` In G4Beamline, all rotations are specified relative to the fixed coordinate axes of the parent volume into which a given element is being placed. This is the natural way to think of placing an object into a room, where the object is the element being placed, and the room is the parent volume into which it is placed.``` ``` -- http://www.muonsinc.com/g4beamline/G4beamlineUsersGuide.pdf section 2.5``` ``` A user specifies a rotation as a string like this: "X90,Y45" -- rotate the object 90 degrees around the parent's X axis, then 45 degrees around the parent's Y axis.``` Note this is completely different from CLHEP and Geant4, and my code is usually calling inverse() of rotation matrices, and using right multiplication to apply a sequence of rotations from the world through ancestor volumes to daughter volumes. In extensive testing of my code I found no errors in any CLHEP rotation routines, but I generate all rotations by calling only CLHEP::HepRotation{XYZ} and multiplying them together myself. G4beamline is open source, available at http://g4beamline.muonsinc.com. Rotations are implemented in files BLCommand.cc and BLCMDplace.cc -- most of the work is in BLCommand::stringToRotationMatrix(). Visualization is your friend when debugging rotations. but beware of bugs in visualization of boolean solid operations, so test the bare solids first.

 Inline Depth: Outline Depth: Add message:

1 Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation   (Mike Kelsey - 15 Jan, 2011)
Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation   (Joseph Perl - 15 Jan, 2011)
 to: "Re: Trouble with G4SubtractionSolid -- bug? in CLHEP::HepRotation"
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 ]