add detector as argumento of Action Initialization

parent dedf6f49
...@@ -71,7 +71,8 @@ int main(int argc,char** argv) ...@@ -71,7 +71,8 @@ int main(int argc,char** argv)
// Set mandatory initialization classes // Set mandatory initialization classes
// //
// Detector construction // Detector construction
runManager->SetUserInitialization(new B1DetectorConstruction()); B1DetectorConstruction* detector = new B1DetectorConstruction();
runManager->SetUserInitialization(detector);
// Physics list - FTFP_BERT - p/shower // Physics list - FTFP_BERT - p/shower
// added verbose to the physics list // added verbose to the physics list
...@@ -80,7 +81,7 @@ int main(int argc,char** argv) ...@@ -80,7 +81,7 @@ int main(int argc,char** argv)
runManager->SetUserInitialization(physicsList); runManager->SetUserInitialization(physicsList);
// User action initialization // User action initialization
runManager->SetUserInitialization(new B1ActionInitialization()); runManager->SetUserInitialization(new B1ActionInitialization(detector));
// Initialize visualization // Initialize visualization
// (if you don't want the image, just delete the G4VisManager objetc and everything that concerns it) // (if you don't want the image, just delete the G4VisManager objetc and everything that concerns it)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment