Message: Inconsistency between G4Box* and G4TesselatedSolid* Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Inconsistency between G4Box* and G4TesselatedSolid* 

Forum: Geometry
Date: 27 Nov, 2013
From: Joel Klinger <Joel Klinger>

Dear G4 Geometry experts,

I would like to make a G4TesselatedSolid object in order to model a large volume with a very uneven surface profile. I have seem some odd behaviour of my volume, so I decided to break the problem up in to basic steps. Firstly I am trying to check that a G4Box object and a G4TesselatedSolid object with *identical* dimensions display the same properties. I implement the following code:

>> G4Box* solid = new G4Box(name, halfX, halfY, depth);
>> G4LogicalVolume* logicalBox = new G4LogicalVolume(solid, material, boxName);
>> G4cout << logicalBox->GetMass() << G4endl;

This prints a value from GetMass() of 3.12922e+39

Now if I try what I believe is the equivalent by building a box out of 6 G4VFacets:

>> G4TessellatedSolid* solid2 = new G4TessellatedSolid(name2);
>> G4QuadrangularFacet *facet1 = new G4QuadrangularFacet (G4ThreeVector(-halfX,-halfY,depth),
>>                                                       G4ThreeVector(-halfX,halfY, depth),
>>                                                       G4ThreeVector(halfX,halfY, depth),
>>                                                       G4ThreeVector(halfX,-halfY,  depth)
>>                                                       ABSOLUTE);
>>G4QuadrangularFacet *facet2 = new G4QuadrangularFacet (G4ThreeVector(-halfX,halfY, -depth)
>>                                                       G4ThreeVector(halfX,halfY,  -depth)
>>                                                       G4ThreeVector(halfX,-halfY, -depth)
>>                                                       G4ThreeVector(-halfX,-halfY,-depth)
>>                                                       ABSOLUTE);
>>G4QuadrangularFacet *facet3 = new G4QuadrangularFacet (G4ThreeVector(-halfX,-halfY,depth),
>>                                                       G4ThreeVector(-halfX,halfY, depth),
>>                                                       G4ThreeVector(-halfX,halfY, -depth)
>>                                                       G4ThreeVector(-halfX,-halfY,-depth)
>>                                                       ABSOLUTE);
>>G4QuadrangularFacet *facet4 = new G4QuadrangularFacet (G4ThreeVector(halfX,-halfY,-depth),
>>                                                       G4ThreeVector(halfX,halfY, -depth),
>>                                                       G4ThreeVector(halfX,halfY, depth),
>>                                                       G4ThreeVector(halfX,-halfY,depth),
>>                                                       ABSOLUTE);
>>G4QuadrangularFacet *facet5 = new G4QuadrangularFacet (G4ThreeVector(-halfX,halfY,depth),
>>                                                       G4ThreeVector(halfX,halfY, depth),
>>                                                       G4ThreeVector(halfX,halfY, -depth),
>>                                                       G4ThreeVector(-halfX,halfY,-depth),
>>                                                       ABSOLUTE);
>>G4QuadrangularFacet *facet6 = new G4QuadrangularFacet (G4ThreeVector(-halfX,-halfY,depth),
>>                                                       G4ThreeVector(halfX,-halfY, depth),
>>                                                       G4ThreeVector(halfX,-halfY, -depth),
>>                                                       G4ThreeVector(-halfX,-halfY,-depth),
>>                                                       ABSOLUTE);
>>
>>solid2->AddFacet((G4VFacet*) facet1);
>>solid2->AddFacet((G4VFacet*) facet2);
>>solid2->AddFacet((G4VFacet*) facet3);
>>solid2->AddFacet((G4VFacet*) facet4);
>>solid2->AddFacet((G4VFacet*) facet5);
>>solid2->AddFacet((G4VFacet*) facet6);
>>solid2->SetSolidClosed(true);
>> G4LogicalVolume* logicalBox2 = new G4LogicalVolume(solid2, material, boxName2);
>> G4cout << logicalBox2->GetMass() << G4endl;

This prints a value from GetMass() of 1.41469e+39

Could someone explain why these values of GetMass() are different, even though the solids have the same volume? A further detail is that if I pass a beam of (2 TeV) muons through either geometry I see very different survival probabilities. The G4Box method yields approx 70% muon survival for a depth of ~1km, whereas the the G4TesselatedSolid method yields 100%.

Thank you for your help and your time,

Joel Klinger

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

1 None: Re: Inconsistency between G4Box* and G4TesselatedSolid*   (Joel Klinger - 27 Nov, 2013)
 Add Message Add Message
to: "Inconsistency between G4Box* and G4TesselatedSolid*"

 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 ]