Message: G4VPVParameterisation of G4Sphere Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None G4VPVParameterisation of G4Sphere 

Forum: Geometry
Date: 04 Aug, 2011
From: Alex Leatherland <Alex Leatherland>

I just want to check something that I'm doing with a parametrisation of G4Sphere is suitable as I currently have a tracking problem.

in my detector construction I declare the solid to be passed into the paramerisation as: -

G4VSolid* sphereSolid = new G4Sphere("Score_Solid",   // Name
                                       5*m,   // Inner radius
                                       10*m,   // Outer radius
                                       0.*deg,        // Starting phi
                                       360.*deg,      // Delta phi    
                                       0.*deg,       // Starting theta
                                       180.*deg);     // Delta theta

Then inside Compute Dimensions I do the following: -

void ParameterisedATM::ComputeDimensions
(G4Sphere& trackerChamber, const G4int copyNo, const G4VPhysicalVolume*) const
{
	//G4cout << "ComputeDimensions for " << copyNo << G4endl;
	trackerChamber.SetStartPhiAngle( Reader::GetInstance()->Getdata(copyNo,0) );		// Longitude
	trackerChamber.SetStartThetaAngle( Reader::GetInstance()->Getdata(copyNo,1) );	// Latitude
	trackerChamber.SetInnerRadius( Reader::GetInstance()->Getdata(copyNo,2) );		// Minimum Radius
	trackerChamber.SetOuterRadius( Reader::GetInstance()->Getdata(copyNo,3) );		// Maximum Radius
	trackerChamber.SetDeltaPhiAngle( Reader::GetInstance()->Getdata(copyNo,4) );		// Delta Longitude 
	trackerChamber.SetDeltaThetaAngle( Reader::GetInstance()->Getdata(copyNo,5) );	// Delta Latitude
}

Where the inner radii, theta and phi are such that over all copy numbers a spherical volume made of many segments generated with no gap.

The errors I'm getting is represented by the following: -

Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
    0 3.802e+09 -7.541e+08 9.867e+08 4.334e+04 0.000e+00 0.000e+00 0.000e+00   marsWorld initStep
    1 3.336e+09 -6.616e+08 8.657e+08 4.334e+04 1.594e-17 4.906e+08 4.906e+08   Atm_1_1_0 Transportation
    2 3.279e+09 -6.503e+08 8.509e+08 4.334e+04 6.229e-03 6.000e+07 5.506e+08   Atm_0_1_0 Transportation
Atm_0_1_0       Atm_0_1_0       Atm_0_1_0       40      215     2       6.2289826800035796e-03  6.0000159370542713e+07
    3 3.279e+09 -6.503e+08 8.509e+08 4.334e+04 2.920e-02 1.482e+05 5.507e+08   Atm_0_1_0 hIoni
Atm_0_1_0       Atm_0_1_0       Atm_0_1_0       40      215     0       2.9202802997675206e-02  1.4819816099380105e+05
    4 3.279e+09 -6.502e+08 8.508e+08 4.334e+04 2.852e-02 2.256e+05 5.510e+08   Atm_0_1_0 hIoni

..... .....

Sur_13_1_0      Sur_13_1_0      marsWorld       40      215     2       7.2537957598481189e+00  1.0000008761008752e+01
  613 3.222e+09 -6.390e+08 8.361e+08 4.314e+04 0.000e+00 0.000e+00 6.106e+08  Sur_14_1_0 Transportation
  614 3.222e+09 -6.390e+08 8.361e+08 4.314e+04 6.932e+00 1.000e+01 6.106e+08   marsWorld Transportation
Sur_14_1_0      Sur_14_1_0      marsWorld       40      215     2       6.9321820070803826e+00  1.0000009227568572e+01
  615 3.222e+09 -6.390e+08 8.361e+08 4.314e+04 0.000e+00 0.000e+00 6.106e+08  Sur_15_1_0 Transportation
  616 3.222e+09 -6.390e+08 8.361e+08 4.314e+04 8.472e-01 9.801e-01 6.106e+08  Sur_15_1_0 hIoni
Sur_15_1_0      Sur_15_1_0      Sur_15_1_0      30      215     0       8.4723977399023109e-01  9.8010456951002067e-01
  617 3.222e+09 -6.390e+08 8.361e+08 4.313e+04 4.835e-02 5.790e-02 6.106e+08  Sur_15_1_0 hIoni

This is made from a combination of the verbose tracking 1 output and G4cout from my sensitive class which is assigned to every spherical segment, which prints according to the following: -

	G4cout << astep->GetTrack()->GetVolume()->GetName();
	G4cout << "\t" << astep->GetPreStepPoint()->GetTouchableHandle()->GetVolume()->GetName();
	G4cout << "\t" << astep->GetPostStepPoint()->GetTouchableHandle()->GetVolume()->GetName();
	G4cout << "\t" << location << "\t" << bin << "\t" << value << "\t" << energyDeposit/MeV;
	G4cout << "\t" << astep->GetStepLength()/mm;

Tracks are seemingly at random skipping into the world volume for a zero distance or minimal distance step while moving between segments.

Also the sensitive detector seems to be associating data not to the volume it was generated for but to the next volume.

Alex

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

1 None: Re: G4VPVParameterisation of G4Sphere   (Alex Leatherland - 10 Aug, 2011)
2 None: Re: G4VPVParameterisation of G4Sphere   (Makoto Asai - 10 Aug, 2011)
1 None: Re: G4VPVParameterisation of G4Sphere   (Alex Leatherland - 17 Aug, 2011)
 Add Message Add Message
to: "G4VPVParameterisation of G4Sphere"

 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 ]