Message: Issues with G4AssemblyVolume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Issues with G4AssemblyVolume 

Forum: Geometry
Date: 12 Nov, 2012
From: Elliott Leonard <Elliott Leonard>

I am using the G4assemblyVolume class to construct a model of beta-DNA molecule. I had the first helix completed and as I was placing the second helix it appears that GEANT is no longer placing my volumes. I cannot see them in visualization (heperapp or DAWN) and when I try to force them with /vis/drawVolume I get "ERROR: Volume "lphosphate1" not found." I am not at the point of running physics but I have run an electron directly at a position where one would find a volume and I do not get any indication of a volume being there. Below is a piece of my ConstructDetector() function. I have commented out the physical volumes of the Ribose and phosphate as I used that to check their shape. The function sopped working when I increased the number of iterations in the for-loop from 1 to 10. 100 is the actual number that I need. I have checked the number of imprints with the GetImprintsCount() and it outputs 1.

Any help on this matter would be greatly appreciated.

        solidRibose1 = new G4Tubs("ribose1",
								.5*nm, //inner radius
								1.0*nm, //outer radius
								0.33/2*nm, //half height
								1*deg,//starting angle
								95.1*deg); //apature angle

	logicRibose1 = new G4LogicalVolume(solidRibose1,deoxyribose,"lribose1");

// physiRibose1 = new G4PVPlacement(0, // G4ThreeVector(0, 11*nm ,0), // "ribose1", // logicRibose1, // physiTarget, // false, // 0);

	solidPhosphate1 = new G4Tubs("phosphate1",
			1*nm, //inner radius
			1.185*nm, //outer radius
			0.33/2*nm, //half height
			32.75*deg,//starting angle (radians) 32.75 degrees
			29.6*deg); //apature angle (radians)

	logicPhosphate1 = new G4LogicalVolume(solidPhosphate1,phosphate,"lphosphate1");

// physiPhosphate1 = new G4PVPlacement(0, // G4ThreeVector(0, 11*nm ,0), // "phosphate1", // logicPhosphate1, // physiTarget, // false, // 0);

	backbone = new G4AssemblyVolume();

	//Rotation and translation inside the assembly
	G4RotationMatrix Ra, Rh; G4Transform3D Tr1, Tr2; G4ThreeVector Ta1, Ta2;
	G4double theta = 0., phi = 0., dy, dz,R=11.185*nm;
	//second strand is first stand offset by minor/major grove
	G4double mdy, mdz;

	for(G4int i=100; i < 1; i++){
		//first strand
		theta += 3.6*deg;
		dz = R*sin(theta);
		dy = R*cos(theta);
		Ta1.setY(dy); Ta1.setZ(dz);
		Tr1 = G4Transform3D(Ra,Ta1);

		backbone->AddPlacedVolume(logicPhosphate1, Tr1);
		backbone->AddPlacedVolume(logicRibose1, Tr1);

		//second strand same rotation just offset
		mdz = R*sin(phi);
		mdy = R*cos(phi);
		Ta2.setY(mdy); Ta2.setZ(mdz);
		Tr2 = G4Transform3D(Ra,Ta2);

		backbone->AddPlacedVolume(logicPhosphate1, Tr2);
		backbone->AddPlacedVolume(logicRibose1, Tr2);

	G4Transform3D Tr = G4Transform3D(G4RotationMatrix(),G4ThreeVector());
	backbone->MakeImprint(logicTarget, Tr);

	//assign regions
    G4Region* DNAStrand = new G4Region("DNA");

    G4Region* Target = new G4Region("Target");

	//Visualization attributes
	G4VisAttributes* worldVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0)); //white

	G4cout<<"----->Setting visualzation for the backbone"<<G4endl;
	G4VisAttributes* backboneVisAtt = new G4VisAttributes(G4Colour(0.0,0.0,1.0));

	return physiWorld;

Elliott Leonard

 Add Message Add Message
to: "Issues with G4AssemblyVolume"

 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 ]