|Message: segmentation fault(core dumped) when G4PVReplica is used||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)|
Hi all, I am trying to replicate some detectors in a tube and then record which detector is passed for each particle. The geometry looks ok and but when I run it, it always show segmentation fault(core dumped). Could you help me to check the problem? many thanks. I pasted the geometry part and voxelscoring code in below: geometry code G4int num_detectors = (int)(40/0.2); G4double interval=0.2*deg;
G4double innerSD=100.*cm; G4double outerSD=101.*cm; G4double highSD=5*cm;; G4double startangleSD=-20.*deg; G4double spanningangleSD=40.*deg;
G4Tubs* SD_CT =new G4Tubs("SD_CT", innerSD, outerSD, highSD, startangleSD, spanningangleSD);
G4LogicalVolume* SDlog = new G4LogicalVolume(SD_CT, air, "SD_l", 0, 0, 0);
G4VPhysicalVolume *SDPhysical=new G4PVPlacement (0, G4ThreeVector (-50*cm,0,5.*cm), SDlog, "SD_phy", labLogical, false, 0);
G4VisAttributes* SDVIS = new G4VisAttributes(G4Colour(0.9,0.9,0.0)); SDVIS->SetForceWireframe(true); SDlog->SetVisAttributes(SDVIS); // divide it into many small intervals //G4int interval=0.2*deg;
G4Tubs* detector =new G4Tubs("detector", innerSD, outerSD, highSD, -20.*deg, 0.2*deg);
G4LogicalVolume* detector_log=new G4LogicalVolume (detector, air, "detector_l", 0, 0, 0);
G4VPhysicalVolume* detector_phy= new G4PVReplica("detector_phy", detector_log, SDlog, kPhi, (num_detectors-1), interval);
// // Pass the voxel to the sensitive manager // G4SDManager *sensitiveManager = G4SDManager::GetSDMpointer();
VoxelScoring *voxelScoring = new VoxelScoring( "voxelScoring" ); sensitiveManager->AddNewDetector(voxelScoring); detector_log->SetSensitiveDetector(voxelScoring);
and the voxelscoring code: G4bool VoxelScoring::ProcessHits( G4Step *step, G4TouchableHistory *ROhist) G4int which=ROhist->GetReplicaNumber();
|Inline Depth:||Outline Depth:||Add message:|