Message: changes in novice examples Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question changes in novice examples 

Keywords: changes novice examples detector construction and
Forum: Run Management
Date: 07 Feb, 2006
From: ozkansahin <ozkansahin>

i am new on geant4.7.1 to use it correctly.i changed  like this

#include "G4RunManager.hh"
#include "G4UImanager.hh"

#include "ExN01DetectorConstruction.hh"
#include "ExN01PhysicsList.hh"
#include "ExN01PrimaryGeneratorAction.hh"

#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
int main(int argc,char** argv) {
  // Construct the default run manager
  G4RunManager* runManager = new G4RunManager;

  // set mandatory initialization classes
  runManager->SetUserInitialization(new ExN01DetectorConstruction);
  runManager->SetUserInitialization(new ExN01PhysicsList);

#ifdef G4VIS_USE
  // Visualization, if you choose to have it!
  G4VisManager* visManager = new G4VisExecutive;

  // set mandatory user action class
  runManager->SetUserAction(new ExN01PrimaryGeneratorAction);

  // Initialize G4 kernel

  // get the pointer to the UI manager and set verbosities
  G4UImanager* UI = G4UImanager::GetUIpointer();
  // Define (G)UI terminal for interactive mode
    // G4UIterminal is a (dumb) terminal.
    G4UIsession * session = 0;
#ifdef G4UI_USE_TCSH
      session = new G4UIterminal(new G4UItcsh);
      session = new G4UIterminal();

    UI->ApplyCommand("/control/execute vis.mac");
    delete session;
  // Batch mode
    G4String command = "/control/execute ";
    G4String fileName = argv[1];

#ifdef G4VIS_USE
  delete visManager;
  delete runManager;

  return 0;


and detector construction to improve myself 
#include "ExN01DetectorConstruction.hh"

#include "G4Material.hh"
#include "G4Tubs.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "globals.hh"

 :  experimentalHall_log(0), tracker_log(0),
    experimentalHall_phys(0), tracker_phys(0)

G4VPhysicalVolume* ExN01DetectorConstruction::Construct()

 //------------------------------------------------------ materials

  G4double a;  // atomic mass
  G4double z;  // atomic number
  G4double density;

  G4Material* Ar =
  new G4Material("ArgonGas", z= 18., a= 39.95*g/mole, density= 1.782*mg/cm3);

  G4Material* Al =
  new G4Material("Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);

  G4Material* Pb =
  new G4Material("Lead", z= 82., a= 207.19*g/mole, density= 11.35*g/cm3);

  //------------------------------------------------------ volumes

  //------------------------------ experimental hall (world volume)
  //------------------------------ beam line along z axis

  G4double innerRadiusOfTheTube = 125.*mm;// 13.tower
  G4double outerRadiusOfTheTube = 169.*mm;
  G4double hightOfTheTube = 830.*mm;
  G4double startAngleOfTheTube = 350.*deg;
  G4double spanningAngleOfTheTube =20.*deg;
  G4Tubs* experimentalHall_tube1= new G4Tubs("expHall_tube",innerRadiusOfTheTube,
  experimentalHall_log = new G4LogicalVolume(experimentalHall_tube1,
  experimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),

  //------------------------------ a tracker tube

    G4Tubs* tracker_tube =new  G4Tubs("tracker_tube",0.3*mm,0.4*mm,825.*mm,0.*deg,360.*deg);
    tracker_log = new G4LogicalVolume(tracker_tube,Al,"tracker_log",0,0);

//for(G4int i=0;i<16;i=i+5) // loop for 19 layers
  G4double trackerPos_x =150.*mm;
  //G4double trackerPos_x = *100.*cm;
  G4double trackerPos_y = 2.*mm;
  G4double trackerPos_z = -175.*mm;
  tracker_phys = new G4PVPlacement(0,G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z),



 return experimentalHall_phys;
 1 but i havent got any dawn file or particle just opened with openglx.
 2 after that i returned  original files at the beginning .
 unfortunately when i run the program i dint see the detector scheme 
in the beginning what i missed i dont know.

could anyone help me please???????

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

1 None: Re: changes in novice examples   (Ryan Romero - 25 Jul, 2006)
(_ None: Re: changes in novice examples   (Eleni - 26 Jul, 2006)
 Add Message Add Message
to: "changes in novice examples"

 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 ]