|Message: Question about getcopyNo() and getcopyNumber()||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'm doing some simulation about an imaging system which consists of 20 stacks of 50-strip silicon detectors, and I want to calculate the energy spectra and count distribution in each strip. In the detectorconstruction class, I define a layer silicon detector which consists of 50 strips and other insensitive region with the G4VPVParameterisation method, and then I use for loop to copy one layer for 20 times. I use sensitivedetector to extract information. I tried two methods to identify each strip of all 1000 strips by using the touchable: the first is like: G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); G4TouchableHistory* theTouchable = (G4TouchableHistory*)(preStepPoint->GetTouchable());
G4VPhysicalVolume* thePhysical = theTouchable->GetVolume(); G4int copyNo = theTouchable->GetCopyNumber(); G4int mothercopyNo = theTouchable->GetCopyNumber(1);
and the second is like:
G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); G4TouchableHistory* theTouchable = (G4TouchableHistory*)(preStepPoint->GetTouchable());
G4VPhysicalVolume* thePhysical = theTouchable->GetVolume(); G4int copyNo = theTouchable->GetVolume()->GetCopyNo(); G4int mothercopyNo = theTouchable->GetVolume(1)->GetCopyNo();
The only difference is just to use GetcopyNo() or GetcopyNumber(), but the result is greatly different, and I don't know which method is right.
Though it's mentioned in geant4 bookFAQ as:
G4Step* aStep = ..; G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle(); G4int copyNo = theTouchable->GetCopyNumber(); G4int motherCopyNo = theTouchable->GetCopyNumber(1); where Copyhere stays for any duplicated instance of a physical volume, either if it is a G4PVPlacement (multiple placements of the same logical volume) or a G4PVReplica/G4PVParameterised. The method GetCopyNo()is meant to return only the serial number of placements not duplicated in the geom-etry tree.
But I still don't understand the difference and which is the right one for my simulation. Would you please help me and also explain the difference to my?
Thank you so much.
|Inline Depth:||Outline Depth:||Add message:|