Message: Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring? 

Forum: Physics List
Re: Question Can the physicslist of G4EmDNAPhysics be used for dose scoring? (Thuy Tran)
Re: Idea Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring? (Vladimir Ivanchenko)
Date: 29 Mar, 2016
From: Thuy Tran <Thuy Tran>

Hi Vladimir. Thanks for the response. I didnít use directly the G4EmDNAPhysics in the B1 example. I added files of PhysicsList.hh and PhysicsList.cc to the B1 example, and changed the exampleB1.cc (please see the files below). The way I registered the G4EmDNAPhysics is similar to the way that was used in the extended example of dnaphysics. I assume all the default processes and models will be used when the G4EmDNAphysics is registered. The example was built and run without errors, but the dose scored was 0. I still cannot find what is wrong or what is the correct way to register the G4EmDNAphysics. It would be appreciated if you could help. Thuy ----------------------------------

//file PhysicsList.hh

#ifndef PhysicsList_h
#define PhysicsList_h 1

#include "G4VModularPhysicsList.hh"
#include "globals.hh"

class G4VPhysicsConstructor;
class PhysicsList: public G4VModularPhysicsList
{
  public:
    PhysicsList();
    virtual ~PhysicsList();
};
#endif
---------------------------------

//file PhysicsList.cc

#include "PhysicsList.hh"
#include "G4SystemOfUnits.hh"
#include "G4EmDNAPhysics.hh"

PhysicsList::PhysicsList() 
: G4VModularPhysicsList()
{
  SetDefaultCutValue(1.0*micrometer);
  SetVerboseLevel(1);
  RegisterPhysics(new G4EmDNAPhysics());
}

PhysicsList::~PhysicsList() { }

------------------------------------

//file exampleB1.cc

#include "B1DetectorConstruction.hh"
#include "B1ActionInitialization.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
#include "G4RunManager.hh"
#endif

#include "G4UImanager.hh"

//#include "QBBC.hh"

#include "PhysicsList.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.hh"

#include "Randomize.hh"

int main(int argc,char** argv)
{
  // Detect interactive mode (if no arguments) and define UI session
  //
  G4UIExecutive* ui = 0;
  if ( argc == 1 ) {
    ui = new G4UIExecutive(argc, argv);
  }

  // Choose the Random engine
  G4Random::setTheEngine(new CLHEP::RanecuEngine);

  // Construct the default run manager
  //
#ifdef G4MULTITHREADED
  G4MTRunManager* runManager = new G4MTRunManager;
#else
  G4RunManager* runManager = new G4RunManager;
#endif

  // Set mandatory initialization classes
  //
  // Detector construction
  runManager->SetUserInitialization(new B1DetectorConstruction());

  // Physics list
  runManager->SetUserInitialization(new PhysicsList);

  /*G4VModularPhysicsList* physicsList = new QBBC;
  physicsList->SetVerboseLevel(1);
  runManager->SetUserInitialization(physicsList);*/

  // User action initialization
  runManager->SetUserInitialization(new B1ActionInitialization());

  // Initialize visualization
  //
  G4VisManager* visManager = new G4VisExecutive;
  // G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
  // G4VisManager* visManager = new G4VisExecutive("Quiet");
  visManager->Initialize();

  // Get the pointer to the User Interface manager
  G4UImanager* UImanager = G4UImanager::GetUIpointer();

  // Process macro or start UI session
  //
  if ( ! ui ) { 
    // batch mode
    G4String command = "/control/execute ";
    G4String fileName = argv[1];
    UImanager->ApplyCommand(command+fileName);
  }
  else { 
    // interactive mode
    UImanager->ApplyCommand("/control/execute init_vis.mac");
    ui->SessionStart();
    delete ui;
  }

  // Job termination
  // Free the store: user actions, physics_list and detector_description are
  // owned and deleted by the run manager, so they should not be deleted 
  // in the main() program !

  delete visManager;
  delete runManager;
}

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

1 Idea: Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring?   (Vladimir Ivanchenko - 03 Apr, 2016)
(_ Question: Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring?   (Thuy Tran - 04 Apr, 2016)
 Add Message Add Message
to: "Re: Can the physicslist of G4EmDNAPhysics be used for dose scoring?"

 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 ]