|Message: Quitting without error message when creating multiple Sensitive Detector volumes||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 need some help urgently!
In my Construct() method I am using a G4VSensitiveDetector class called CZTEcrdSD to set up a few volumes as sensitive regions. I want to use the same G4VHit class say CZTEcrdHit for storing hit collections for each sensitive detector. From reading previous posts I think this is OK. However, when I try to set up the sensitive regions in Construct() like this:
G4SDManager* SDman = G4SDManager::GetSDMpointer(); CZTEcrdSD* ecrdShieldSD = new CZTEcrdSD( "ECRD/Shield" ); SDman->AddNewDetector( ecrdShieldSD ); logicShield->SetSensitiveDetector( ecrdShieldSD ); CZTEcrdSD* ecrdHouseSD = new CZTEcrdSD( "ECRD/House" ); SDman->AddNewDetector( ecrdHouseSD ); logicHouse->SetSensitiveDetector( ecrdHouseSD ); CZTEcrdSD* ecrdAsicSD = new CZTEcrdSD( "ECRD/ASIC" ); SDman->AddNewDetector( ecrdAsicSD ); logicASIC->SetSensitiveDetector( ecrdAsicSD ); CZTEcrdSD* ecrdVoxelSD = new CZTEcrdSD( "ECRD/Voxel" ); SDman->AddNewDetector( ecrdVoxelSD ); logicVoxelElement->SetSensitiveDetector( ecrdVoxelSD );
I see that the CZTEcrdSD constructor gets executed twice, but after the second SD volume ecrdHouseSD = new CZTEcrdSD( "ECRD/House" ); constructor call my application quits. There is no error message given!
There does not appear to be any invocation of my
method, and the constructor exits seemlingly without error for the ecrdHouseSD, but my aplication never gets to the next line of code in Construct() which is the notification to the SDman:
SDman->AddNewDetector( ecrdHouseSD );
This line never gets executed, the application just halts without any given reason.
So I tried running under gdb. It said the error was a segmentation error, but I could not see what pointer address or assignment was causing the problem (I'm not very good at interpreting the gdb messages). Here is the gdb output:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -188163680 (LWP 4351)] 0xf6fc3bb5 in G4LogicalVolume::SetSensitiveDetector (this=0x0, pSDetector=0x93b9818) at G4LogicalVolume.icc:281 281 fSensitiveDetector = pSDetector; (gdb) backtrace #0 0xf6fc3bb5 in G4LogicalVolume::SetSensitiveDetector (this=0x0, pSDetector=0x93b9818) at G4LogicalVolume.icc:281 #1 0xf6fc0224 in CZTDetectorConstruction::Construct (this=0x9396518) at src/CZTDetectorConstruction.cc:704 #2 0xf56ff0a0 in G4RunManager::InitializeGeometry (this=0x9385220) at src/G4RunManager.cc:322 #3 0xf56ff001 in G4RunManager::Initialize (this=0x9385220) at src/G4RunManager.cc:308 #4 0x0804ab16 in main (argc=1, argv=0xfee335d4) at simpleCZT.cc:181
As far as I can tell me geometry is OK, there were no overaps, and the logicHouse volume should be fine, I have no reason to doubt that it's SetSensitiveDetector method would not work.
One thing I worry about is that my LogicHouse has daughter volumes that I also want to set up as SD volumes.
If someone could give my a hint at how to fix this problem I'd be most grateful.
|Inline Depth:||Outline Depth:||Add message:|