|Message: Precision of geometry definition and tracking in replicas||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Hello all I ran into a problem with G4 and filling histograms using ROOT. The problem is the calculated position of a step during tracking and the corresponding volume the particle is in as defined by the G4Navigator. In detail: I have a detector block, which I divided into smaller voxels by replicating in all three directions (with G4PVReplica). I want to sum the energy deposit in each voxel. Iím doing this in two different way and getting different result. 1-way) Iím checking though the G4TouchableHistory which voxel was hit and add the energy into a 3dim array. // get info which detector box was hit G4Step aStep; G4int repDepth = aStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetDepth() G4int repNrX = aStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetReplicaNo(repDepth-1); G4int repNrY = aStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetReplicaNo(repDepth); G4int repNrZ = aStep->GetPreStepPoint()->GetTouchable()->GetHistory()->GetReplicaNo(repDepth-2); 2-way) Iím getting the position info at the G4PreStepPoint and use this position to fill a ROOT histogram with the energy. I thought this is a much more elegant way and avoids the subdivision of the detector. // store the energy deposit in the depEHist-Histogram G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition(); analysis->FillDepEHist(pos.getX()/cm, pos.getY()/cm, pos.getZ()/cm, eDep); The problem now shows up at the boundaries. Therefore two examples: Ex1) My detector voxel (2/2/0) should have a z dimension from 0cm to 10cm. The position of the G4PreStepPoint is -1.4e-15. G4 defines this point to be inside the volume so it increments the deposited energy of this voxel. The ROOT filling routine clearly sees this position as negative and does not collect it, since it is outside the histogram range. Position: (463.38536,252.86935,-1.4210855e-014), depE = 1.3747972 Pos: 46.338536, 25.286935, -1.4210855e-015 DetBox: 2, 2, 0 Ex2) At the boundary between voxel (2,2,0) and (2,2,1) two hits with the same position are put into two different voxels. ROOT again will put both energies into the same bin: Position: (435.55771,277.03582,100), depE = 7.0426665e-011 Pos: 43.555771, 27.703582, 10 DetBox: 2, 2, 0 Position: (435.55771,277.03582,100), depE = 0.040809802 Pos: 43.555771, 27.703582, 10 DetBox: 2, 2, 1 Sure this wrong energy is probably neglectable, but I guess it still shows the kind of problem. So my question now is, how can I decrease the precision during tracking, that these type of mismatches donít show up anymore? Also if I donít subdivide my detector by replicas anymore how can I make sure that G4 takes enough steps to get the precision of my histograming grid? The replicas have the nice feature to make a step at each boundary (even through this feature you sometimes get two steps at the same position in different volumes!) Help would be appreciated. Thanks. Matthias
|Inline Depth:||Outline Depth:||Add message:|