Message: Re: Generating point on surface of a polycone generating invalid points Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Generating point on surface of a polycone generating invalid points 

Forum: Geometry
Re: None Generating point on surface of a polycone generating invalid points. (Henrik)
Re: None Re: Generating point on surface of a polycone generating invalid points (Tatiana Nikitina)
Date: 13 Feb, 2008
From: Henrik <SI@wcreplays.com>

Hi, I'm using geant 4.9.1, without the update that was released last week.

To generate the polycone, I am using

	G4VSolid*	SolidPumpPort	=	new	G4Tubs("PumpPort temp tube", 0 * mm, 1750 / 2 * mm, (11161 - 4500) / 2 * mm-1*mm, 0, 360 * deg);

	G4double	zPlanes[]	=	{-11640.*mm,	-11640.*mm,	-11570.722*mm,	-9766.005*mm,	
						-4487.828*mm,	4487.828*mm,	9766.005*mm,	11570.722*mm,	
						11640.*mm,	11640.*mm,	11580.*mm,	9750.*mm,
						4500.*mm,	-4500.*mm,	-9750.*mm,	-11580.*mm,
						-11640.*mm};

	G4double	radius[]	=	{250.*mm, 	305.*mm,	305.*mm,	2770.461*mm,
						4932.*mm,	4932.*mm,	2770.461*mm,	305.*mm,
						305.*mm,	250.*mm,	250.*mm,	2750.*mm,
						4900.*mm,	4900.*mm,	2750.*mm,	250.*mm,
						250.*mm};

	G4VSolid*	MainSpectrometer	=	new G4Polycone(	"Main Spectrometer", 
			0*deg, 
			360 * deg, 
			16,
			radius,
			zPlanes
			);
	for (int i=0;i<3;i++)
	{
		G4RotationMatrix*	Rot	=	new G4RotationMatrix();
		Rot->rotateZ(45*(-i-1) * deg );
		G4double	X	=	std::cos(45*(i+1)*deg)*-(3050+4750)/2*mm;
		G4double	Y	=	std::sin(45*(i+1)*deg)*-(3050+4750)/2*mm;
//		MainSpectrometer	=	new G4SubtractionSolid("Main Spectrometer", MainSpectrometer, SolidPumpPort/*SolidPumpPortCut*/, Rot, G4ThreeVector(X, Y,(11161+4500)/2*mm - 100 * mm));
	}

	G4LogicalVolume*	MainSpectrometerLog	=	new G4LogicalVolume(MainSpectrometer, matsteel, "Main Spectrometer", 0, 0, 0);
	new G4PVPlacement(0, 0, MainSpectrometerLog, "Main Spectrometer", experimentalHall_log, 0, 0);

(Note the subtraction is currently commented)

Then in my particle generater I am calling PointOnSurface, then SurfaceNormal with that point.

cheers

-Henrik

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

 Add Message Add Message
to: "Re: Generating point on surface of a polycone generating invalid points"

 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 ]