Message: Re: Problem with G4Polycone Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Problem with G4Polycone 

Forum: Geometry
Re: None Problem with G4Polycone (Filippo Ambroglini)
Re: Question Re: Problem with G4Polycone (Filippo Ambroglini)
Re: None Re: Problem with G4Polycone (John Apostolakis)
Date: 05 Dec, 2012
From: Filippo Ambroglini <Filippo Ambroglini>

Dear John,

the order of the Z was descendig then I have reverse to ascending but I 
still continue to have the problem.

I have tested the solid with these:
   if(physiVanAllenBelt->IsRegularStructure())
     G4cout<<"The solid is not a regular structure"<<std::endl;
   if(physiVanAllenBelt->CheckOverlaps())
     G4cout<<"The solid had some overlaps"<<std::endl;

but no error reported and trying to visualize it it seems ok.

In attach you can find the list of z Rmin and Rmax and also an image 
from visualization.


Thanks for the help.

Filippo

P.S.

The value fo Z Rmin and  Rmax are listed normalized to rplanet ( earth 
radius )


> Dear Filippo,
>
> Can you double check that your points are in ascending order - i.e.  z0 < z1 < z2 < z3 < z4 < z5 < z6 < z7 ...
>
> r_i < R_i  ( where r is r_min and R is r_max for location 'i' )
>
> If this is ok, can you give a well-formatted printout of the values of  < z, Rmin, Rmax > ?
>
> Also, have you tried to test the solid that you created ?
>
> Best regards,
> John
> ===================================================
> John Apostolakis, SFT (SoFTware) Group, PH Department, CERN
> Email:  john.apostolakis@cern.ch       Office Tel:  +41-22-767-7239
> ------------------------------------------------------------------------------------------
>
> On Dec 5, 2012, at 3:21 PM, Filippo Ambroglini wrote:
>
>> *** Discussion title: Geometry
>>
>> Dear all,
>>
>> please some one could try to help me on understand why I had the below
>> mentioned problem with G4Polycone?
>>
>> Best regards, Filippo On Thu, 15 Nov 2012 10:10:47 GMT, Filippo
>> Ambroglini wrote:
>>
>>> Dear G4 expert,
>>>
>>> I had a problem with a G4Polycone object that I create in order to
>>> simulate a complex volume like an elliptical torus with an elliptical
>>> hole in the central part.
>>>
>>> This is the implementation:
>>>
>>>   std::vector<G4double> tempZ, tempInner,tempOuter;
>>>
>>>      for(int j=0; j<9;j++){
>>>        tempZ.push_back((2-0.1*j)*rplanet);
>>> tempInner.push_back((2.5-sqrt(1-((1.9-0.1*j)*(1.9-0.1*j))/4)*2.5)*rplanet);
>>> tempOuter.push_back((2.5+sqrt(1-((1.9-0.1*j)*(1.9-0.1*j))/4)*2.5)*rplanet);
>>>      }
>>>      for(int j=0;j<23;j++){
>>>        tempZ.push_back((1.1-0.1*j)*rplanet);
>>> tempInner.push_back((sqrt(1-((1.1-0.1*j)*(1.1-0.1*j))/(1.2*1.2))*1.2)*rplanet);
>>> tempOuter.push_back((2.5+sqrt(1-((1.1-0.1*j)*(1.1-0.1*j))/4)*2.5)*rplanet);
>>>      }
>>>      for(int j=0; j<9;j++){
>>>        tempZ.push_back((-1.1-0.1*j)*rplanet);
>>> tempInner.push_back((2.5-sqrt(1-((1.1+0.1*j)*(1.1+0.1*j))/4)*2.5)*rplanet);
>>> tempOuter.push_back((2.5+sqrt(1-((1.1+0.1*j)*(1.1+0.1*j))/4)*2.5)*rplanet);
>>>      }
>>>      G4double rInner[41],rOuter[41],zPlane[41];
>>>      for(int i=0;i<41;i++){
>>>        rInner[i]=tempInner[i];
>>>        rOuter[i]=tempOuter[i];
>>>        zPlane[i]=tempZ[i];
>>>      }
>>>      G4Polycone* VanAllenBelt = new
>>> G4Polycone("VanAllenBelt",0,2*pi,41,zPlane,rInner,rOuter);
>>>      logicVanAllenBelt = new
>>> G4LogicalVolume(VanAllenBelt,Vacuum,"VanAllenBelt",0,0,0);
>>>
>>>    logicVanAllenBelt->SetVisAttributes(VisAttInvisible);
>>>    logicVanAllenBelt->SetUserLimits(theMagnetosphereUserLimits);
>>>
>>>    G4VPhysicalVolume* physiVanAllenBelt= new
>>> G4PVPlacement(0,G4ThreeVector(),"VanAllenBeltPV",logicVanAllenBelt,physiMagnetosphere,false,0);
>>>
>>> If I try to visualize it everything seams ok but when I try to use it in
>>> my program and I will try to transport a particle inside this volume
>>> accessing the volume name with
>>> aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName(); I always get
>>> the name of the mother volume.
>>>
>>> If instead of G4Polycone I will use this definition
>>>
>>>      G4Torus* outerInnerVAB = new
>>> G4Torus("ExternInnerVAB",0,1.25*rplanet,0.75*rplanet+ZpositionForAtmosphereBottom,0,2*pi);
>>>      G4Orb* innerInnerVAB = new
>>> G4Orb("InnerInnerVAB",0.2*rplanet+ZpositionForAtmosphereBottom);
>>>      G4SubtractionSolid* VanAllenBelt = new
>>> G4SubtractionSolid("VanAllenBelt",outerInnerVAB,innerInnerVAB);
>>>
>>> everything is ok.
>>>
>>> Someone could explain me why and where is my mistake?
>>>
>>> Best regards,
>>> Filippo
>>>
>> -------------------------------------------------------------
>> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:
>> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1242/1.html

Z[0] = -2; rInner[0] = 1.71938; rOuter[0] = 3.28062
Z[1] = -1.9; rInner[1] = 1.41028; rOuter[1] = 3.58972
Z[2] = -1.8; rInner[2] = 1.18304; rOuter[2] = 3.81696
Z[3] = -1.7; rInner[3] = 1; rOuter[3] = 4
Z[4] = -1.6; rInner[4] = 0.846405; rOuter[4] = 4.15359
Z[5] = -1.5; rInner[5] = 0.714643; rOuter[5] = 4.28536
Z[6] = -1.4; rInner[6] = 0.600164; rOuter[6] = 4.39984
Z[7] = -1.3; rInner[7] = 0.5; rOuter[7] = 4.5
Z[8] = -1.2; rInner[8] = 0.412088; rOuter[8] = 4.58791
Z[9] = -1.1; rInner[9] = 0.479583; rOuter[9] = 4.58791
Z[10] = -1; rInner[10] = 0.663325; rOuter[10] = 4.66506
Z[11] = -0.9; rInner[11] = 0.793725; rOuter[11] = 4.73257
Z[12] = -0.8; rInner[12] = 0.894427; rOuter[12] = 4.79129
Z[13] = -0.7; rInner[13] = 0.974679; rOuter[13] = 4.84187
Z[14] = -0.6; rInner[14] = 1.03923; rOuter[14] = 4.88485
Z[15] = -0.5; rInner[15] = 1.09087; rOuter[15] = 4.92061
Z[16] = -0.4; rInner[16] = 1.13137; rOuter[16] = 4.94949
Z[17] = -0.3; rInner[17] = 1.1619; rOuter[17] = 4.97171
Z[18] = -0.2; rInner[18] = 1.18322; rOuter[18] = 4.98747
Z[19] = -0.1; rInner[19] = 1.19583; rOuter[19] = 4.99687
Z[20] = 0; rInner[20] = 1.2; rOuter[20] = 5
Z[21] = 0.1; rInner[21] = 1.19583; rOuter[21] = 4.99687
Z[22] = 0.2; rInner[22] = 1.18322; rOuter[22] = 4.98747
Z[23] = 0.3; rInner[23] = 1.1619; rOuter[23] = 4.97171
Z[24] = 0.4; rInner[24] = 1.13137; rOuter[24] = 4.94949
Z[25] = 0.5; rInner[25] = 1.09087; rOuter[25] = 4.92061
Z[26] = 0.6; rInner[26] = 1.03923; rOuter[26] = 4.88485
Z[27] = 0.7; rInner[27] = 0.974679; rOuter[27] = 4.84187
Z[28] = 0.8; rInner[28] = 0.894427; rOuter[28] = 4.79129
Z[29] = 0.9; rInner[29] = 0.793725; rOuter[29] = 4.73257
Z[30] = 1; rInner[30] = 0.663325; rOuter[30] = 4.66506
Z[31] = 1.1; rInner[31] = 0.479583; rOuter[31] = 4.58791
Z[32] = 1.2; rInner[32] = 0.412088; rOuter[32] = 4.58791
Z[33] = 1.3; rInner[33] = 0.5; rOuter[33] = 4.5
Z[34] = 1.4; rInner[34] = 0.600164; rOuter[34] = 4.39984
Z[35] = 1.5; rInner[35] = 0.714643; rOuter[35] = 4.28536
Z[36] = 1.6; rInner[36] = 0.846405; rOuter[36] = 4.15359
Z[37] = 1.7; rInner[37] = 1; rOuter[37] = 4
Z[38] = 1.8; rInner[38] = 1.18304; rOuter[38] = 3.81696
Z[39] = 1.9; rInner[39] = 1.41028; rOuter[39] = 3.58972
Z[40] = 2; rInner[40] = 1.71938; rOuter[40] = 3.28062


   Attachment:
     http://hypernews.slac.stanford.edu/HyperNews/geant4/get/AUX/2012/12/05/07.57-51810-VolumeView.jpg

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

1 None: Re: Problem with G4Polycone   (Filippo Ambroglini - 14 Jan, 2013)
(_ None: Re: Problem with G4Polycone   (John Allison - 14 Jan, 2013)
(_ None: Re: Problem with G4Polycone   (Filippo Ambroglini - 15 Jan, 2013)
(_ None: Re: Problem with G4Polycone   (John Allison - 15 Jan, 2013)
 Add Message Add Message
to: "Re: Problem with G4Polycone"

 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 ]