Message: Re: dose deposit problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

More Re: dose deposit problem 

Forum: Biasing and Scoring
Re: None dose deposit problem (Sun Liang)
Re: None Re: dose deposit problem (Tsukasa Aso)
Re: More Re: dose deposit problem (Sun Liang)
Re: None Re: dose deposit problem (Tsukasa Aso)
Date: 10 Sep, 2011
From: Sun Liang <Sun Liang>

yes, list my DC file as follow:

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

#include "CoDetectorConstruction.hh"
#include "G4Material.hh"

#include "G4Sphere.hh"
#include "G4Orb.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"

#include "G4SDManager.hh"

#include "G4GeometryTolerance.hh"
#include "G4GeometryManager.hh"

#include "G4UserLimits.hh"

#include "G4ios.hh"

#include "G4MultiFunctionalDetector.hh"
#include "G4VPrimitiveScorer.hh"
#include "G4PSEnergyDeposit.hh"
#include "G4PSDoseDeposit.hh"

#include "G4VisAttributes.hh"
#include "G4Colour.hh"

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

CoDetectorConstruction::CoDetectorConstruction()

{

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

CoDetectorConstruction::~CoDetectorConstruction() {

}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

G4VPhysicalVolume* CoDetectorConstruction::Construct() {

	G4NistManager* myair = G4NistManager::Instance();
	G4Material* AIR = myair->FindOrBuildMaterial("G4_AIR");

	G4double rmin,rmax , sphi,dphi,stheta,dtheta;

		//////////////////////////////////////////////////////////////////////////

	rmax = 10.0*m;

	G4GeometryManager::GetInstance()->SetWorldMaximumExtent(rmax);
	G4cout << "Computed tolerance = "
		<< G4GeometryTolerance::GetInstance()->GetSurfaceTolerance()/mm
		<< " mm" << G4endl;

    //////////////////////////////////////////////////////////////////////////

	// Print all the materials defined.
	//
	G4cout << G4endl << "The materials defined are : " << G4endl << G4endl;
	G4cout << *(G4Material::GetMaterialTable()) << G4endl;
    //////////////////////////////////////////////////////////////////////////
    rmax = 10.0*m;
	solidWorld = new G4Orb("world",rmax);

	logicWorld = new G4LogicalVolume(solidWorld,AIR,"World",0,0,0);
	physiWorld = new G4PVPlacement( 0,
									G4ThreeVector(),
									logicWorld,
									"World",
									0,
									false,
								    0 );

	rmin = 1.999*m; rmax = 2.001*m;
	sphi = 0.0*degree; dphi = 360.0*degree;
	stheta = 0.0*degree; dtheta = 180.0*degree;

	solidChamber = new G4Sphere("chamber",rmin,rmax,sphi,dphi,stheta,dtheta);
	logicChamber = new G4LogicalVolume(solidChamber,AIR,"Chamber",0,0,0);
	physiChamber = new G4PVPlacement(   0,
		G4ThreeVector(),
		logicChamber,
		"Chamber",
		logicWorld,
		false,
		0);

	solidInner = new G4Orb("inner",rmin);
	logicInner = new G4LogicalVolume(solidInner,AIR,"World",0,0,0);
	physiInner = new G4PVPlacement( 0,
		G4ThreeVector(),
		logicInner,
		"Inner",
		logicWorld,
		false,
		0 );

	//////////////////////////////////////////////////////////////////////////

	G4cout << "\nWorld Volume is: " << solidWorld->GetCubicVolume()/m3 << " m3 " 
		<< G4endl;
	G4cout << "\nChamber Volume is: " << solidChamber->GetCubicVolume()/cm3 << " cm3 " 
		<< G4endl;

//////////////////////////////////////////////////////////////////////////

	G4MultiFunctionalDetector* mydosescorer = new G4MultiFunctionalDetector("MyScorer");

	G4SDManager::GetSDMpointer()->AddNewDetector(mydosescorer);
	logicChamber->SetSensitiveDetector(mydosescorer);
	G4VPrimitiveScorer* totalenergy = new G4PSEnergyDeposit("TotalEnergy");

	G4VPrimitiveScorer* totaldose = new G4PSDoseDeposit("TotalDose",0);

	mydosescorer->RegisterPrimitive(totaldose);

  return physiWorld;
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

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

1 None: Re: dose deposit problem   (Tsukasa Aso - 11 Sep, 2011)
 Add Message Add Message
to: "Re: dose deposit problem"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews