Message: Ambiguous hit collection Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Ambiguous hit collection 

Forum: Biasing and Scoring
Date: 20 Jun, 2017
From: Noah Steinberg <Noah Steinberg>

Hello, I have looked through these forums and found several people asking this question but have found no solutions.

In my Geant4 simulation I have 2 different types of sensitive detector classes, TgtSD and ScintillatorSD. In my DetectorConstruction file I have created a target and scintillator bars, I attach a TgtSD to my target, and a ScintillatorSD to my scintillator bars like this:

    G4String TargetSDname = "g4PSI/" + label_;
    G4VSensitiveDetector* TargetSD = SDman->FindSensitiveDetector(TargetSDname);
    if (TargetSD == NULL) {
        TargetSD = SD_target_ = new g4PSITargetSD(TargetSDname, label_ + "_Collection", min_p_, min_theta_);
        SDman->AddNewDetector( TargetSD );

    if (target_log_) target_log_->SetSensitiveDetector( TargetSD );

    G4String ScintSDname = "g4PSI/ScintillatorPost" + label_;
    G4VSensitiveDetector* PostSD = SDman->FindSensitiveDetector(ScintSDname);
    if (PostSD == NULL) {
        PostSD = SD_post_ = new g4PSIScintillatorSD(ScintSDname, 4, label_ + "_Collection" );
        SDman->AddNewDetector( PostSD );

    if (scintplane_log_) scintplane_log_->SetSensitiveDetector( SD_post_);

Now everything works correctly, my sensitive detector info is correctly written out to a ROOT file with all appropriate information, but I get this message for every single event

    <TGT_Collection> is ambiguous.

I think this has something to do with me using the same hit_collection for both sensitive detectors, but I am not sure. Any help would be appreciated. Thank you.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Ambiguous hit collection   (Tim Meehan - 20 Sep, 2017)
 Add Message Add Message
to: "Ambiguous hit collection"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews