Message: Warning concerning SD Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Warning concerning SD 

Forum: Geometry
Date: 06 Jan, 2015
From: filippo <filippo>


I get this warning at run time:

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : DET1010
      issued by : G4SDStructure::AddNewDetector()
SDCell had already been stored in /. Object pointer is overwitten.
It's users' responsibility to delete the old sensitive detector object.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

This is issued after a geometry change via messenger. Here is the structure of my DetectorConstruction:



	  _messenger = new DetectorMessenger(this);




	 delete _messenger;

void DetectorConstruction::SetRadius(G4double myradius){

//this function is used by Messenger to change _radius (private) which will be used in ConstructVolumes


G4cout<<" raggio= "<<_radius<<G4endl;


} //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

G4VPhysicalVolume* DetectorConstruction::Construct(){
	return ConstructVolumes();

G4VPhysicalVolume* DetectorConstruction::ConstructVolumes() {

	// Clean old geometry, if any

//material definition G4NistManager* man = G4NistManager::Instance(); man->SetVerbose(1);

G4Material* NistAir  = man->FindOrBuildMaterial("G4_AIR"); //air
G4Material* vuoto  = man->FindOrBuildMaterial("G4_Galactic"); //vuoto

//end of materials definition


//begin of geometry definition


//world of simulation

    	G4Box* ExpHall = new G4Box("ExpHall",30*m,30*m,30*m);
    	G4LogicalVolume* ExpHallLog = new G4LogicalVolume(ExpHall,vuoto,"ExpHallLog",0,0,0);
    	G4VPhysicalVolume* ExpHallPhys = new G4PVPlacement(0,G4ThreeVector(),"ExpHallPhys",ExpHallLog,NULL,false,1);

    	ExpHallLog->SetVisAttributes (G4VisAttributes::Invisible);

//and so on with many other volumes

return ExpHallPhys; }

void DetectorConstruction::ConstructSDandField() {

    G4String trackerChamberSDname = "SDCell";

    aTrackerSD = new SensitiveDetector(trackerChamberSDname); 
    (this is a private variable)

    //Volumi interessati dall' SD

   SetSensitiveDetector("germ_l", aTrackerSD, true);

   //and many other volumes....

#include "G4RunManager.hh"

void DetectorConstruction::UpdateGeometry() //this function can be called using my messenger {



In my macro I issue:

/(my_command_directory)/radius 1.0 (this changes the radius of a cylinder...) /(my_command_directory)/update (this calls void DetectorConstruction::UpdateGeometry()) /runBeamOn 1000

and I get the warning above.

The simulation works fine but how can avoid that message? How can I delete the "old sensitive detector object" and refresh it?

Thank you!!!

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

1 Idea: Re: Warning concerning SD   (C Mos - 08 Jan, 2015)
 Add Message Add Message
to: "Warning concerning SD"

 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 ]