|Message: Replicated touchable's copy/replica numbers always zero ??||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)|
I have created an array of silicon strip detectors with G4PVReplica as follows (I am replicating along the y-axis):
astrip = new Strip(arrayname, silicon, sensitive_detector); xarray = astrip->xlength(); yarray = nstrips * astrip->ylength(); // nstrips along y-axis zarray = astrip->zlength();
arraysolid = new G4Box(arrayname, xarray/2.0, ...); arraylog = new G4LogicalVolume(arraysolid, silicon, arrayname); replicated = new G4PVReplica(astrip->name(), astrip->logical(), arraylog, kYAxis, nstrips, ay/nstrips);
My Strip actually has 2 box solids: the active volume to which the 'sensitive_detector' is applied when creating its logical volume, and a larger volume in which the active volume is placed via a simple PVPlacement. The larger volume provides "dead" areas. The expressions, 'astrip->logical()', 'astrip->xlength()', etc., refer to the larger volume. It must since I must fill the mother array volume when replicating.
Visually, everything checks out. The sensitive detector also works. If I set nstrips = 2 and shoot my particle along the z-axis, I don't get any hits as expected. If I set nstrips = 3 and do the same, I get hits.
Next, I reprogram my gun to spray particles randomly over the cross-sectional area of the silicon array. Here I have made nstrips = 2 for my array, so I can see particles incident at both positive and negative y's. In my G4VSensitiveDetector sub-class ProcessHits() method, I extract both the copy and replica numbers.
spre = s->GetPreStepPoint(); ... newhit->SetCopyNo(spre->GetTouchableHandle()->GetCopyNumber()); newhit->SetRepNo(spre->GetTouchableHandle()->GetReplicaNumber());
I find they are always zero. I would have expected 0 or 1 depending on whether y is negative or positive.
I did a similar construction with G4PVParameterised and it worked as expected. In this case, my Strip detector was a single "active" solid. I constructed the "dead" areas by replicating the active solid inside an array solid whose dimensions were larger than nstrips times the dimensions of the active solid.
What am I missing between these 2 constructions? Btw, what is the difference when G4VSensitiveDetector::ProcessHits() returns true and false?
|Inline Depth:||Outline Depth:||Add message:|