Message: Re: How to re-install sensitive detector after modified geometry? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How to re-install sensitive detector after modified geometry? 

Forum: Hits, Digitization and Pileup
Re: Question How to re-install sensitive detector after modified geometry? (Poer)
Date: 29 Nov, 2013
From: Tsukasa Aso <Tsukasa Aso>

Hi,

 The G4SDManager  maintains the objects of sensitive detector.
Therefore, you can ask SDManager about your sensitive detector by using its name,
and reuse it if it is available. If not you have to create it again.

 For example.

  G4SDManager *sdm = G4SDManager::GetSDMpointer();
  MySD* sd = dynamic_cast<MySD*>(sdm->FindSensitiveDetector("MySDName",false));
  if ( !sd ) {
      sd = new MySD("MySDName");
      sdm->AddNewDetector(sd);
  }
  log->SetSensitiveDetector(sd);

Best regards,
Tsukasa Aso

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

1 Idea: Re: How to re-install sensitive detector after modified geometry?   (Poer - 29 Nov, 2013)
 Add Message Add Message
to: "Re: How to re-install sensitive detector after modified geometry?"

 Subscribe Subscribe

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


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]