Message: Wich dimension for slices of sensitive detector? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Wich dimension for slices of sensitive detector? 

Keywords: sensitive detector, dimension, slices
Forum: Geometry
Date: 09 Aug, 2006
From: Diana Massai <>

Hi, I have a problem on the setting of the dimension of slices. I run 
a proton beam at 120 MeV with 20000 events and I built a water phantom
(Sensitive Detector) with slices of 0.01 mm, and doing it, the total 
energy deposited in water seems to be OK. But when I increase 
the thickness at 0.1 or 1 mm, it is impossible to follow the right 
In the, inside the definition of function I inserted the code: 

//Slice (200x200x0.01 mm)
  S_x = 200*mm;
  S_y = 200*mm;
  S_z = 0.01*mm;   

Then, inside the definition of function Construct(), I inserted 
the code: 

 S_box = new G4Box("Slice",S_x/2,S_y/2,S_z/2);  
 S_log = new G4LogicalVolume(S_box,Acqua,"Slicelog",0,0,0);  
 Spost = Spostf + S_z/2;

 for (int i = 0; i < 30000; i++)
   S_phys = new G4PVPlacement(0,
   Spost += S_z;
//Set sensitive detector to be slice
    G4SDManager* SDman = G4SDManager::GetSDMpointer();
    G4String sliceSDname = "/mydet/slice";
    sliceSD = new D1SliceSD(sliceSDname);
//Set sensitive detector to logic Chamber class

Then I defined the class called D1SliceSD, introducing this code:

D1SliceSD::D1SliceSD(G4String name):G4VSensitiveDetector(name)
//Intialise pointer to zero or owned memory
  sliceCollection = 0;  
  G4String HCname;
  collectionName.insert(HCname = "sliceCollection");


void D1SliceSD::Initialize(G4HCofThisEvent* HCE)
  static int HCID = -1;  
  sliceCollection = new

if(HCID < 0)
    HCID = GetCollectionID(0); 

After that I created the class D1SliceHit. At the end I put in

  DC = D1DC;
  sliceID = -1;


void D1EventAction::BeginOfEventAction(const G4Event* evt)
  eventNumber = evt->GetEventID();
  if (eventNumber % 1 == 0) 
    G4cout << "Begin of Event " << eventNumber << G4endl;
  G4SDManager* sensitiveSliceManager = G4SDManager::GetSDMpointer();
  if (sliceID == -1) 
    sliceID = sensitiveSliceManager->GetCollectionID("sliceCollection");

Why the thickness of every slice must be less or equal to 0.01 mm to 
control the energy deposition in the water phantom? 
Could anybody help me about this?

Thanks, Diana Massai

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

1 None: Re: Wich dimension for slices of sensitive detector?   (Vladimir IVANTCHENKO - 09 Aug, 2006)
 Add Message Add Message
to: "Wich dimension for slices of sensitive detector?"

 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 ]