Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

Location:
trunk/examples/extended/eventgenerator
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/History

    r807 r1337  
    1 $Id: History,v 1.12 2006/11/22 15:09:21 gcosmo Exp $
     1$Id: History,v 1.14 2010/06/06 04:51:10 perl Exp $
    22-------------------------------------------------------------------
    33
     
    1515     * Reverse chronological order (last date on top), please *
    1616     ----------------------------------------------------------
     17
     18June 4th 2010 J.Perl
     19- Updated vis usage
     20
     21May 12th 2010 J.Allison
     22- Introduced GUIExecutive.
    1723
    1824November, 22nd 2006 G.Cosmo
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/hepmcEx01.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: hepmcEx01.cc,v 1.5 2006/07/05 11:06:36 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: hepmcEx01.cc,v 1.6 2010/05/12 12:58:17 allison Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
     
    3535#include "G4RunManager.hh"
    3636#include "G4UImanager.hh"
    37 #include "G4UIterminal.hh"
    38 #include "G4UItcsh.hh"
    3937
    4038#include "ExN04DetectorConstruction.hh"
     
    5048#ifdef G4VIS_USE
    5149#include "G4VisExecutive.hh"
     50#endif
     51
     52#ifdef G4UI_USE
     53#include "G4UIExecutive.hh"
    5254#endif
    5355
     
    7173  runManager->SetUserInitialization(physics);
    7274 
    73 #ifdef G4VIS_USE
    74   // Visualization, if you choose to have it!
    75   G4VisManager* visManager = new G4VisExecutive;
    76   visManager->Initialize();
    77 #endif
    78 
    7975  runManager->Initialize();
    8076
     
    9995  runManager->SetUserAction(stepping_action);
    10096 
     97#ifdef G4VIS_USE
     98  // Visualization, if you choose to have it!
     99  G4VisManager* visManager = new G4VisExecutive;
     100  visManager->Initialize();
     101#endif
     102
    101103  //get the pointer to the User Interface manager   
    102104  G4UImanager* UImanager = G4UImanager::GetUIpointer(); 
    103105
    104   if(argc==1)
    105   {
    106     // G4UIterminal is a (dumb) terminal
    107     //
    108 #ifdef G4UI_USE_TCSH
    109     G4UIsession* session = new G4UIterminal(new G4UItcsh);     
    110 #else
    111     G4UIsession* session = new G4UIterminal();
    112 #endif   
    113     UImanager->ApplyCommand("/control/execute vis.mac");
    114     session->SessionStart();
    115     delete session;
    116   }
    117   else   // Batch mode
    118   {
    119     G4String command = "/control/execute ";
    120     G4String fileName = argv[1];
    121     UImanager->ApplyCommand(command+fileName);
    122   }
     106  if (argc!=1)   // batch mode
     107    {
     108#ifdef G4VIS_USE
     109      visManager->SetVerboseLevel("quiet");
     110#endif
     111      G4String command = "/control/execute ";
     112      G4String fileName = argv[1];
     113      UImanager->ApplyCommand(command+fileName);   
     114    }
     115  else
     116    {  // interactive mode : define UI session
     117#ifdef G4UI_USE
     118      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     119      ui->SessionStart();
     120      delete ui;
     121#endif
     122    }
    123123
    124124  // Free the store: user actions, physics_list and detector_description are
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/include/ExN04RunAction.hh

    r807 r1337  
    2626//
    2727// $Id: ExN04RunAction.hh,v 1.3 2006/07/05 11:06:36 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/include/ExN04SteppingVerbose.hh

    r807 r1337  
    2626//
    2727// $Id: ExN04SteppingVerbose.hh,v 1.2 2006/06/29 17:05:06 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//   This class manages the verbose outputs in G4SteppingManager.
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04EventAction.cc

    r807 r1337  
    3535#include "G4HCofThisEvent.hh"
    3636#include "G4VHitsCollection.hh"
    37 #include "G4TrajectoryContainer.hh"
    38 #include "G4Trajectory.hh"
    39 #include "G4VVisManager.hh"
    4037#include "G4SDManager.hh"
    4138#include "G4UImanager.hh"
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04RunAction.cc

    r807 r1337  
    2626//
    2727// $Id: ExN04RunAction.cc,v 1.3 2006/07/05 11:06:36 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04SteppingVerbose.cc

    r807 r1337  
    2626//
    2727// $Id: ExN04SteppingVerbose.cc,v 1.4 2006/06/29 17:06:23 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/vis.mac

    r807 r1337  
    88/run/verbose 2
    99#
    10 # create empty scene
     10# Use this open statement to create an OpenGL view:
     11/vis/open OGL 600x600-0+0
    1112#
    12 /vis/scene/create
     13# Use this open statement to create a .prim file suitable for
     14# viewing in DAWN:
     15#/vis/open DAWNFILE
    1316#
    14 # Create a scene handler for a specific graphics system
    15 # (Edit the next line(s) to choose another graphic system)
     17# Use this open statement to create a .heprep file suitable for
     18# viewing in HepRApp:
     19#/vis/open HepRepFile
    1620#
    17 /vis/open OGLIX
     21# Use this open statement to create a .wrl file suitable for
     22# viewing in a VRML viewer:
     23#/vis/open VRML2FILE
    1824#
    19 ####/vis/open DAWNFILE
     25# Disable auto refresh and quieten vis messages whilst scene and
     26# trajectories are established:
     27/vis/viewer/set/autoRefresh false
     28/vis/verbose errors
    2029#
    21 # draw scene
     30# Draw geometry:
     31/vis/drawVolume
    2232#
    23 /vis/viewer/set/viewpointThetaPhi 90 180 deg
     33# Specify view angle:
     34/vis/viewer/set/viewpointThetaPhi 90. 180.
     35#
     36# Specify zoom value:
    2437/vis/viewer/zoom 1.4
    25 /vis/viewer/flush
    2638#
    27 # for drawing the tracks
    28 # Draw trajectories at end of event, showing trajectory points as
    29 # markers of size 2 pixels
    30 /vis/scene/add/trajectories
     39# Specify style (surface or wireframe):
     40#/vis/viewer/set/style wireframe
     41#
     42# Draw coordinate axes:
     43#/vis/scene/add/axes 0 0 0 1 m
     44#
     45# Draw smooth trajectories at end of event, showing trajectory points
     46# as markers 2 pixels wide:
     47/vis/scene/add/trajectories smooth
    3148/vis/modeling/trajectories/create/drawByCharge
    3249/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
    3350/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
    34 # (if too many tracks cause core dump => storeTrajectory 0)
    35 
     51# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
     52#
     53# Draw hits at end of event:
     54#/vis/scene/add/hits
     55#
     56# To draw only gammas:
     57#/vis/filtering/trajectories/create/particleFilter
     58#/vis/filtering/trajectories/particleFilter-0/add gamma
     59#
     60# To invert the above, drawing all particles except gammas,
     61# keep the above two lines but also add:
     62#/vis/filtering/trajectories/particleFilter-0/invert true
     63#
     64# Many other options are available with /vis/modeling and /vis/filtering.
     65# For example, to select colour by particle ID:
     66#/vis/modeling/trajectories/create/drawByParticleID
     67#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
     68#
     69# To superimpose all of the events from a given run:
    3670/vis/scene/endOfEventAction accumulate
    3771#
    38 # Refresh ready for run
    39 /vis/viewer/refresh
     72# Re-establish auto refreshing and verbosity:
     73/vis/viewer/set/autoRefresh true
     74/vis/verbose warnings
     75#
     76# For file-based drivers, use this to create an empty detector view:
     77#/vis/viewer/flush
    4078#
    4179# Now ready for /run/beamOn.
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/History

    r807 r1337  
    1 $Id: History,v 1.8 2006/11/22 15:09:07 gcosmo Exp $
     1$Id: History,v 1.9 2010/05/24 05:33:12 kmura Exp $
    22-------------------------------------------------------------------
    33
     
    1515     * Reverse chronological order (last date on top), please *
    1616     ----------------------------------------------------------
     17
     18May 24, 2010 K.Murakami
     19- use QGSP physics list instead of old flag physics list
     20- introduce G4UIExective
     21- modify for HepMC ver.2 (2.06.00)
    1722
    1823Nov, 22nd, 2006 G.Cosmo
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/README

    r807 r1337  
    1 $Id: README,v 1.1 2002/05/28 14:20:36 murakami Exp $
     1$Id: README,v 1.2 2010/05/24 05:32:50 kmura Exp $
    22-------------------------------------------------------------------
    33
     
    34343. Physics List
    3535
    36   Full set of "ordinary" physics processes, which is the same one as
    37 ExN04PhysicsList.
     36  QGSP predefined physics list
    3837
    39384. User actions
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/hepmcEx02.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: hepmcEx02.cc,v 1.5 2006/07/05 12:04:07 gcosmo Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: hepmcEx02.cc,v 1.6 2010/05/24 05:32:22 kmura Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
     
    3939
    4040#include "H02DetectorConstruction.hh"
    41 #include "H02PhysicsList.hh"
     41#include "QGSP.hh"
    4242#include "H02PrimaryGeneratorAction.hh"
    4343#include "H02EventAction.hh"
     
    4646#ifdef G4VIS_USE
    4747#include "G4VisExecutive.hh"
     48#endif
     49
     50#ifdef G4UI_USE
     51#include "G4UIExecutive.hh"
    4852#endif
    4953
     
    5761  runManager-> SetUserInitialization(detector);
    5862  //
    59   G4VUserPhysicsList* physics = new H02PhysicsList;
     63  G4VUserPhysicsList* physics = new QGSP;
    6064  runManager-> SetUserInitialization(physics);
    6165
     
    8185#endif
    8286
    83   if(argc==1)  // G4UIterminal is a (dumb) terminal
    84   {
    85 #ifdef QERAUOY
    86     G4UItcsh* tcsh= new
    87       G4UItcsh("[40;01;36mhepmcEx02[40;33m(%s)[40;32m[%/][00;30m:");
    88     G4UIterminal* session= new G4UIterminal(tcsh);
    89     tcsh-> SetLsColor(RED, GREEN);
    90 #else
    91     G4UItcsh* tcsh= new G4UItcsh("hepmcEx01(%s)[%/]:");
    92     G4UIterminal* session= new G4UIterminal(tcsh);
     87 //get the pointer to the User Interface manager   
     88  G4UImanager* UImanager = G4UImanager::GetUIpointer(); 
     89
     90  if (argc!=1) { // batch mode
     91#ifdef G4VIS_USE
     92    visManager-> SetVerboseLevel("quiet");
    9393#endif
    94     session->SessionStart();
    95     delete session;
    96 
    97   }
    98   else  // Batch mode
    99   {
    100     G4UImanager* UImanager= G4UImanager::GetUIpointer();
    101     G4String command= "/control/execute ";
    102     G4String fileName= argv[1];
    103     UImanager-> ApplyCommand(command+fileName);
     94    G4String command = "/control/execute ";
     95    G4String fileName = argv[1];
     96    UImanager-> ApplyCommand(command+fileName);   
     97  } else {  // interactive mode : define UI session
     98#ifdef G4UI_USE
     99    G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     100    ui-> SessionStart();
     101    delete ui;
     102#endif
    104103  }
    105104
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/include/HepMCG4AsciiReader.hh

    r807 r1337  
    2727//
    2828//   HepMCG4AsciiReader.hh
    29 //   $Id: HepMCG4AsciiReader.hh,v 1.4 2006/06/29 17:10:08 gunter Exp $
     29//   $Id: HepMCG4AsciiReader.hh,v 1.5 2010/05/24 05:31:10 kmura Exp $
    3030//
    3131// ====================================================================
     
    3434
    3535#include "HepMCG4Interface.hh"
    36 #include "HepMC/IO_Ascii.h"
     36#include "HepMC/IO_AsciiParticles.h"
    3737
    3838class HepMCG4AsciiReaderMessenger;
     
    4141protected:
    4242  G4String filename;
    43   HepMC::IO_Ascii* asciiInput;
     43  HepMC::IO_AsciiParticles* asciiInput;
    4444
    4545  G4int verbose;
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4AsciiReader.cc

    r807 r1337  
    2727//
    2828//   HepMCG4AsciiReader.cc
    29 //   $Id: HepMCG4AsciiReader.cc,v 1.5 2006/06/29 17:12:09 gunter Exp $
     29//   $Id: HepMCG4AsciiReader.cc,v 1.6 2010/05/24 05:29:44 kmura Exp $
    3030//
    3131// ====================================================================
     
    4141////////////////////////////////////////
    4242{
    43   asciiInput= new HepMC::IO_Ascii(filename.c_str(), std::ios::in);
     43  asciiInput= new HepMC::IO_AsciiParticles(filename.c_str(), std::ios::in);
    4444
    4545  messenger= new HepMCG4AsciiReaderMessenger(this);
     
    6060  delete asciiInput;
    6161
    62   asciiInput= new HepMC::IO_Ascii(filename.c_str(), std::ios::in);
     62  asciiInput= new HepMC::IO_AsciiParticles(filename.c_str(), std::ios::in);
    6363  asciiInput-> print();
    6464}
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4Interface.cc

    r807 r1337  
    2727//
    2828//   HepMCG4Interface.cc
    29 //   $Id: HepMCG4Interface.cc,v 1.4 2006/06/29 17:12:24 gunter Exp $
     29//   $Id: HepMCG4Interface.cc,v 1.5 2010/05/24 05:29:44 kmura Exp $
    3030//
    3131// ====================================================================
     
    9191
    9292    // check world boundary
    93     G4LorentzVector xvtx= (*vitr)-> position();
     93    HepMC::FourVector pos= (*vitr)-> position();
     94    G4LorentzVector xvtx(pos.x(), pos.y(), pos.z(), pos.t());
    9495    if (! CheckVertexInsideWorld(xvtx.vect()*mm)) continue;
    9596
     
    106107
    107108      G4int pdgcode= (*vpitr)-> pdg_id();
    108       G4LorentzVector p= (*vpitr)-> momentum();
     109      pos= (*vpitr)-> momentum();
     110      G4LorentzVector p(pos.px(), pos.py(), pos.pz(), pos.e());
    109111      G4PrimaryParticle* g4prim=
    110112        new G4PrimaryParticle(pdgcode, p.x()*GeV, p.y()*GeV, p.z()*GeV);
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4PythiaInterface.cc

    r807 r1337  
    2727//
    2828//   HepMCG4PythiaInterface.cc
    29 //   $Id: HepMCG4PythiaInterface.cc,v 1.6 2006/07/05 12:04:13 gcosmo Exp $
     29//   $Id: HepMCG4PythiaInterface.cc,v 1.7 2010/05/24 05:29:44 kmura Exp $
    3030//
    3131// ====================================================================
     
    3737
    3838#include "HepMC/GenEvent.h"
    39 #include "HepMC/PythiaWrapper6_152.h"
     39#include "HepMC/PythiaWrapper6_4.h"
    4040
    4141// additional pythia calls
  • trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/vis.mac

    r807 r1337  
    11#
    2 # Macro file for the initialization phase
     2# Macro file for the initialization phase of "exampleN02.cc"
    33# when runing in interactive mode
    44#
     
    88/run/verbose 2
    99#
    10 # create empty scene
     10# Use this open statement to create an OpenGL view:
     11/vis/open OGL 600x600-0+0
    1112#
    12 /vis/scene/create
     13# Use this open statement to create a .prim file suitable for
     14# viewing in DAWN:
     15#/vis/open DAWNFILE
    1316#
    14 # Create a scene handler for a specific graphics system
    15 # (Edit the next line(s) to choose another graphic system)
     17# Use this open statement to create a .heprep file suitable for
     18# viewing in HepRApp:
     19#/vis/open HepRepFile
    1620#
    17 /vis/open OGLIX
     21# Use this open statement to create a .wrl file suitable for
     22# viewing in a VRML viewer:
     23#/vis/open VRML2FILE
    1824#
    19 ####/vis/open DAWNFILE
     25# Disable auto refresh and quieten vis messages whilst scene and
     26# trajectories are established:
     27/vis/viewer/set/autoRefresh false
     28/vis/verbose errors
    2029#
    21 # draw scene
     30# Draw geometry:
     31/vis/drawVolume
    2232#
    23 /vis/viewer/set/viewpointThetaPhi 90 180 deg
     33# Specify view angle:
     34/vis/viewer/set/viewpointThetaPhi 90. 180.
     35#
     36# Specify zoom value:
    2437/vis/viewer/zoom 1.4
    25 /vis/viewer/flush
    2638#
    27 # for drawing the tracks
    28 # (if too many tracks cause core dump => storeTrajectory 0)
    29 /tracking/storeTrajectory 1
    30 /vis/scene/add/trajectories
     39# Specify style (surface or wireframe):
     40#/vis/viewer/set/style wireframe
     41#
     42# Draw coordinate axes:
     43#/vis/scene/add/axes 0 0 0 1 m
     44#
     45# Draw smooth trajectories at end of event, showing trajectory points
     46# as markers 2 pixels wide:
     47/vis/scene/add/trajectories smooth
     48/vis/modeling/trajectories/create/drawByCharge
     49/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
     50/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
     51# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
     52#
     53# Draw hits at end of event:
     54#/vis/scene/add/hits
     55#
     56# To draw only gammas:
     57#/vis/filtering/trajectories/create/particleFilter
     58#/vis/filtering/trajectories/particleFilter-0/add gamma
     59#
     60# To invert the above, drawing all particles except gammas,
     61# keep the above two lines but also add:
     62#/vis/filtering/trajectories/particleFilter-0/invert true
     63#
     64# Many other options are available with /vis/modeling and /vis/filtering.
     65# For example, to select colour by particle ID:
     66#/vis/modeling/trajectories/create/drawByParticleID
     67#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
     68#
     69# To superimpose all of the events from a given run:
    3170/vis/scene/endOfEventAction accumulate
    32 
     71#
     72# Re-establish auto refreshing and verbosity:
     73/vis/viewer/set/autoRefresh true
     74/vis/verbose warnings
     75#
     76# For file-based drivers, use this to create an empty detector view:
     77#/vis/viewer/flush
     78#
     79# Now ready for /run/beamOn.
  • trunk/examples/extended/eventgenerator/HepMC/History

    r807 r1337  
    1 $Id: History,v 1.18 2006/11/22 15:09:43 gcosmo Exp $
     1$Id: History,v 1.21 2010/06/06 04:51:10 perl Exp $
    22-------------------------------------------------------------------
    33
     
    1515     * Reverse chronological order (last date on top), please *
    1616     ----------------------------------------------------------
     17
     18June 4, 2010 J. Perl (exHepMC-V09-03-02)
     19
     20May 24, 2010 K. Murakami (exHepMC-V09-03-01)
     21- HepMCEx02: Introdiced G4UIExecutive.
     22             update for latest HepMC (2.06.00)
     23             use QGSP physics list
     24
     25May 12, 2010  J.Allison (exHepMC-V09-03-00)
     26- HepMCEx01: Introduced GUIExecutive.
    1727
    1828Nov 22, 2006  G.Cosmo (exHepMC-V08-01-05)
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/DetectorConstruction.hh

    r807 r1337  
    2626//
    2727// $Id: DetectorConstruction.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthConfig.hh

    r807 r1337  
    2626//
    2727// $Id: MCTruthConfig.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthEventAction.hh

    r807 r1337  
    2626//
    2727// $Id: MCTruthEventAction.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthManager.hh

    r807 r1337  
    2626//
    2727// $Id: MCTruthManager.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthTrackInformation.hh

    r807 r1337  
    2626//
    2727// $Id: MCTruthTrackInformation.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthTrackingAction.hh

    r807 r1337  
    2626//
    2727// $Id: MCTruthTrackingAction.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/PhysicsList.hh

    r807 r1337  
    2626//
    2727// $Id: PhysicsList.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/PrimaryGeneratorAction.hh

    r807 r1337  
    2626//
    2727// $Id: PrimaryGeneratorAction.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/DetectorConstruction.cc

    r807 r1337  
    2626//
    2727// $Id: DetectorConstruction.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthConfig.cc

    r807 r1337  
    2626//
    2727// $Id: MCTruthConfig.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthEventAction.cc

    r807 r1337  
    2626//
    2727// $Id: MCTruthEventAction.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthManager.cc

    r807 r1337  
    2626//
    2727// $Id: MCTruthManager.cc,v 1.2 2006/12/13 15:42:36 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthTrackInformation.cc

    r807 r1337  
    2626//
    2727// $Id: MCTruthTrackInformation.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthTrackingAction.cc

    r807 r1337  
    2626//
    2727// $Id: MCTruthTrackingAction.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/PhysicsList.cc

    r807 r1337  
    2626//
    2727// $Id: PhysicsList.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/PrimaryGeneratorAction.cc

    r807 r1337  
    2626//
    2727// $Id: PrimaryGeneratorAction.cc,v 1.1 2006/11/22 14:51:31 gcosmo Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
  • trunk/examples/extended/eventgenerator/HepMC/README

    r807 r1337  
    1010-------------------------------------------
    1111HepMC:
    12   tested version : 1.27.02
    13   http://lcgapp.cern.ch/project/spi/extsoft/packages.php?pkg=HepMC
    14   http://cern.ch/mdobbs/HepMC/
     12  tested version : 2.06.00
     13  http://lcgapp.cern.ch/project/simu/HepMC/
    1514
    1615  Note: examples were tested only on Linux with gcc.
  • trunk/examples/extended/eventgenerator/exgps/GNUmakefile

    r1230 r1337  
    1 # $Id: GNUmakefile,v 1.5 2008/12/02 21:42:48 flei Exp $
     1# $Id: GNUmakefile,v 1.6 2010/01/11 16:33:59 gcosmo Exp $
    22# --------------------------------------------------------------
    33# GNUmakefile for tests module.  Gabriele Cosmo, 27/06/98.
     
    99
    1010ifndef G4INSTALL
    11   G4INSTALL = ../../..
     11  G4INSTALL = ../../../..
    1212endif
    1313
     
    1616
    1717include $(G4INSTALL)/config/binmake.gmk
    18 
    19 #G4VIS_BUILD_OPENGLX_DRIVER = 0
    20 #G4VIS_USE_OPENGLX = 0
    21 #LDFLAGS += -static
    22 
  • trunk/examples/extended/eventgenerator/exgps/History

    r807 r1337  
    1212     * Reverse chronological order (last date on top), please *
    1313     ----------------------------------------------------------
     14
     1503/06/2010 - J.Perl (exgps-V09-03-01)
     16- Updated vis usage
     17
     1812/05/2010 J.Allison (exgps-V09-03-00)
     19- Introduced GUIExecutive.
     20
     2108/12/2008 G.Barrand
     22- correct / compleete the part concerning AIDA in the README file.
     23
     2406/12/2008 F.Lei (exgps-V09-01-02)
     25- updated g4mac files in ./macros
     26
     2705/12/2008 G.Barrand
     28- exGPSAnalysisManager : have a comment in case the
     29  AIDA_createAnalysisFactory or the AIDA::ITree creation
     30  fails ; which is something that may happen.
     31- exGPSAnalysisManager : have the creation of the AIDA::IPlotter
     32  on the same footing than other AIDA objects. Remove then
     33  the createPlotter method.
     34- exGPSAnalysisManager : have t,hFactories local in BeginOfRun
     35  and then rm getHistogram,getTupleFactories.
     36
     3704/12/2008 F.Lei (exgps-V09-01-01)
     38- updated README
     39- tag Guy's changes
     40
     4104/12/2008 G.Barrand
     42- exGPSAnalysisManager.hh : have the destructor private.
     43- exGPS.cc : then use the exGPSAnalysisManager::dispose() method.
     44- exGPS.cc : rm the aMgr which is no more used.
     45- exGPSAnalysisManager::createPlotter : rm the "Plotter" string
     46  and then ask to the AIDA implementation the default plotter.
     47- exGPSAnalysisManager::EndOfRun : reset the variable after the deletions.
     48- exGPS.cc and exGPSEventAction : use #ifdef G4VIS_USE in case
     49  somone want to build without the G4 vis system.
     50- exGPSAnalysisManager.cc : revisit : createPlotter : delete
     51  of plotterFactory and plotter where lacking. (Seen with the
     52  OpenScientist object decount).
     53- exGPSRunAction : #ifdef G4VIS_USE.
     54
     5502/12/2008 F.Lei (exgps-V09-01-00)
     56- updated exGPSAnalysisManager class to improve the AIDA output
     57- removed AIDA setup from GNUmakefile (use G4 default one)
     58- removed the ROOT file option
     59
     6021/12/2006 F.Lei (exgps-V08-02-00)
     61-  Added the option for output results in .root file
     62-  Changed particle_name to PDGcode in the ntuple
     63
    146419/07/2005 F.Lei (exgps-V07-01-00)
    1565-  Changing in GNUmakefile
  • trunk/examples/extended/eventgenerator/exgps/README

    r807 r1337  
    3535 
    3636     Visualisation of the geometry and the tracks is possible with many of the G4 visualisation packages. An
    37      example of displaying the geometry and tracks using VRML is given in the macro file display_vrml.mac. 
     37     example of displaying the geometry and tracks using VRML is given in the macro file vis.mac. 
    3838
    3939  6. ANALYSIS:
    4040
    4141     This example implements an AIDA-compliant analysis manager which creates histograms and ntuples.
    42      If user has an AIDA-compliant tool such as AIDAJNI, ANAPHE, or PI installed on his/her system,
    43      the analysis part of this example can be activated by:
     42     If user has an AIDA-compliant tool such as AIDAJNI, ANAPHE, OpenScientist or PI installed on his/her system. Some URLs :
     43       http://aida.freehep.org/
     44       http://java.freehep.org/aidajni
     45       http://www.cern.ch/PI   
     46       http://OpenScientist.lal.in2p3.fr
     47 
     48     The analysis part of this example can be activated by doing a "source
     49     aida-setup" of the AIDA compliant tool (to activate the aida-config
     50     program) and by raising some environment variabless so that the
     51     G4 GNUmakefile system can take into account the AIDA tool.
     52     This can be done, for example on a UNIX under a csh like shell, with :
     53        csh> source <path_where_the_AIDA_tool_is_installed>/aida-setup.csh
     54        csh> aida-config # to check that this program is up and running
     55     G4 related part :
     56        csh> setenv G4ANALYSIS_USE 1
     57        csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --include`
     58        csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --lib`
    4459
    45         setenv G4ANALYSIS_USE 1
     60     (It may be usefull to note that in the G4 GNUmakefile system,
     61     the upper variables are used in the file config/analysis.gmk).
    4662
    4763     This needs to be done before building the executable. 
    4864
    4965     At the end of an excution, an xml file "exgps.aida" is created by default which contains
    50      histograms and ntuples. User can change the name and type of this output file with the commands
     66     histograms and ntuples. User can change the name and format of this output file with the commands
    5167       
    5268        /analysis/filetype new-type
     
    5571        e.g.
    5672
    57         /analysis/filetype hbook
    58         /analysis/filename exgps.hbook
     73        /analysis/filetype root
     74        /analysis/filename myfile.root
    5975
    60      these change the output file type to "hbook" and name to "exgps.hbbok"
     76     these change the output file format to ROOT and output file name to "myfile.root". There are three file
     77     formats to choose from: xml, root or hbook.
    6178
    6279     The output file conatins 6 histograms and one ntuple:
     
    7491     In the ntuple the following data are recorded for each incident particle: 
    7592
    76         Particle Name
     93        Particle ID
    7794        Incident Position (x,y,z);
    7895        Incident Angle (theta,phi);
    7996        Particle weight;
    80 
    8197
    8298  7. GETTING STARTED:
     
    86102
    87103        setenv G4ANALYSIS_USE 1
     104     
     105     otherwise do 
     106 
     107        unsetenv G4ANALYSIS_USE
    88108
    89      otherwise make sure the G4ANALYSIS_USE is not defined:
    90  
    91         unsetenv G4ANALYSIS_USE
     109     to remove the generation of an output file.
    92110 
    93111     ii) Build the exGPS executable:
     
    106124         $G4BIN/$G4SYSTEM/exGPS exrgps.in
    107125
    108      If G4ANALYSIS_USE is defined, one should see a display of the six histograms. If JAIDA is used, one has
    109      to close the plotter window in order to terminate the execution. After the termination one will find
    110      the "exgps.aida", as well as a vrml file "g4_00.wrl" in the directory.
     126     If G4ANALYSIS_USE is defined, and dpends on the particular AIDA system used, e.g. JAIDA, one could see
     127     a display window of the six histograms. It may be neccessary to close the plotter window in order to
     128     terminate the execution. After the termination one will find the "exgps.aida", as well as a vrml file
     129     "g4_00.wrl" in the directory.
    111130
    112131 8. FURTHER EXAMPLES of MACRO FILES:
     
    119138
    120139
    121  
    122140
    123 
    124  
  • trunk/examples/extended/eventgenerator/exgps/exGPS.cc

    r1230 r1337  
    2626#include "G4RunManager.hh"
    2727#include "G4UImanager.hh"
    28 #include "G4UIterminal.hh"
    29 #include "G4UItcsh.hh"
    3028
    3129#ifdef G4UI_USE_XM
     
    3937#ifdef G4VIS_USE
    4038#include "G4VisExecutive.hh"
     39#endif
     40
     41#ifdef G4UI_USE
     42#include "G4UIExecutive.hh"
    4143#endif
    4244
     
    7274  runManager->SetUserAction(eventAction);
    7375 
    74   G4UIsession* session=0;
    75  
    76   if (argc==1)   // Define UI session for interactive mode.
    77     {
    78       // G4UIterminal is a (dumb) terminal.
    79 #ifdef G4UI_USE_XM
    80       session = new G4UIXm(argc,argv);
    81 #else           
    82 #ifdef G4UI_USE_TCSH
    83       session = new G4UIterminal(new G4UItcsh);     
    84 #else
    85       session = new G4UIterminal();
    86 #endif
    87 #endif
    88     }
    89  
     76  //Initialize G4 kernel
     77  runManager->Initialize();
     78   
    9079  // visualization manager
    9180#ifdef G4VIS_USE
     
    9483#endif
    9584   
    96   //Initialize G4 kernel
    97   runManager->Initialize();
    98    
    9985  // get the pointer to the User Interface manager
    100   G4UImanager* UI = G4UImanager::GetUIpointer(); 
     86  G4UImanager* UImanager = G4UImanager::GetUIpointer(); 
    10187  // UI->ApplyCommand("/control/execute display.mac");   
    10288
    103   if (session)   // Define UI session for interactive mode.
     89  if (argc!=1)   // batch mode
    10490    {
    105       // G4UIterminal is a (dumb) terminal.
    106       session->SessionStart();
    107       delete session;
    108     }
    109   else           // Batch mode
    110     {
    11191      G4String command = "/control/execute ";
    11292      G4String fileName = argv[1];
    113       UI->ApplyCommand(command+fileName);
     93      UImanager->ApplyCommand(command+fileName);   
    11494    }
    115  
     95  else
     96    {  // interactive mode : define UI session
     97#ifdef G4UI_USE
     98      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     99      ui->SessionStart();
     100      delete ui;
     101#endif
     102    }
     103
    116104  // job termination
    117105
  • trunk/examples/extended/eventgenerator/exgps/exgps.in

    r807 r1337  
    2626# commands below are independent of gps
    2727#
    28 #/analysis/filename focus.aida
     28#/analysis/filename exgps.root
     29#/analysis/filetype root
    2930/analysis/maxeng 800 MeV
    3031/analysis/mineng 200 MeV
     
    3435#/tracking/verbose 1
    3536#
    36 /control/execute display_vrml.mac
     37/control/execute macros/display.mac
    3738#
    38 /run/beamOn 20
     39/run/beamOn 2000
    3940
  • trunk/examples/extended/eventgenerator/exgps/include/exGPSEventActionMessenger.hh

    r1230 r1337  
    3232//
    3333// $Id: exGPSEventActionMessenger.hh,v 1.4 2006/06/29 17:14:26 gunter Exp $
    34 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     34// GEANT4 tag $Name: geant4-09-04-beta-01 $
    3535//
    3636//
  • trunk/examples/extended/eventgenerator/exgps/macros/display.mac

    r1230 r1337  
     1# Use this open statement to create an OpenGL view:
     2#/vis/open OGL 600x600-0+0
    13#
    2 /vis/scene/create
    3 /vis/sceneHandler/create VRML2FILE
    4 /vis/viewer/create
     4# Use this open statement to create a .prim file suitable for
     5# viewing in DAWN:
     6#/vis/open DAWNFILE
     7#
     8# Use this open statement to create a .heprep file suitable for
     9# viewing in HepRApp:
     10#/vis/open HepRepFile
     11#
     12# Use this open statement to create a .wrl file suitable for
     13# viewing in a VRML viewer:
     14/vis/open VRML2FILE
     15#
     16# Disable auto refresh and quieten vis messages whilst scene and
     17# trajectories are established:
     18/vis/viewer/set/autoRefresh false
     19/vis/verbose errors
     20#
     21# Draw geometry:
    522/vis/drawVolume
    6 #/vis/viewer/viewpointThetaPhi 30 30
    7 #/vis/viewer/update
    8 /vis/scene/endOfEventAction accumulate
    9 /tracking/storeTrajectory 1
    10 
    1123#
    12 
     24# Specify view angle:
     25#/vis/viewer/set/viewpointThetaPhi 90. 0.
     26#
     27# Specify zoom value:
     28#/vis/viewer/zoom 2.
     29#
     30# Specify style (surface or wireframe):
     31#/vis/viewer/set/style wireframe
     32#
     33# Draw coordinate axes:
     34#/vis/scene/add/axes 0 0 0 1 m
     35#
     36# Draw smooth trajectories at end of event, showing trajectory points
     37# as markers 2 pixels wide:
     38/vis/scene/add/trajectories smooth
     39/vis/modeling/trajectories/create/drawByCharge
     40/vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
     41/vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
     42# (if too many tracks cause core dump => /tracking/storeTrajectory 0)
     43#
     44# Draw hits at end of event:
     45#/vis/scene/add/hits
     46#
     47# To draw only gammas:
     48#/vis/filtering/trajectories/create/particleFilter
     49#/vis/filtering/trajectories/particleFilter-0/add gamma
     50#
     51# To invert the above, drawing all particles except gammas,
     52# keep the above two lines but also add:
     53#/vis/filtering/trajectories/particleFilter-0/invert true
     54#
     55# Many other options are available with /vis/modeling and /vis/filtering.
     56# For example, to select colour by particle ID:
     57#/vis/modeling/trajectories/create/drawByParticleID
     58#/vis/modeling/trajectories/drawByParticleID-0/set e- blue
     59#
     60# To superimpose all of the events from a given run:
     61#/vis/scene/endOfEventAction accumulate
     62#
     63# Re-establish auto refreshing and verbosity:
     64/vis/viewer/set/autoRefresh true
     65/vis/verbose warnings
     66#
     67# For file-based drivers, use this to create an empty detector view:
     68#/vis/viewer/flush
  • trunk/examples/extended/eventgenerator/exgps/macros/test1.g4mac

    r807 r1337  
     1# test1
    12/gps/particle proton
    23/gps/pos/type Point
     
    1516/analysis/maxpos 5 cm
    1617/analysis/minpos -5 cm
    17 /event/printModulo 10000
     18/event/printModulo 1000
    1819#/control/execute display.mac
    1920/run/beamOn 10000
    20 
    21 
  • trunk/examples/extended/eventgenerator/exgps/macros/test33.g4mac

    r807 r1337  
    3434#/tracking/verbose 1
    3535#
    36 /control/execute display_vrml.mac
     36/control/execute display.mac
    3737#
    3838/run/beamOn 20
  • trunk/examples/extended/eventgenerator/exgps/macros/test34.g4mac

    r807 r1337  
    1818/gps/ang/type cos
    1919
    20 # the proton energy is in gaussian profile centered at 4 MeV
     20# the proton energy is in gaussian profile centered at 2.5 MeV
    2121/gps/ene/type Gauss
    22 /gps/ene/mono 4 MeV
     22/gps/ene/mono 2.5 MeV
    2323/gps/ene/sigma 0.5 MeV
    2424#
     
    4949# commands below are independent of gps
    5050#
     51#/analysis/filetype root
    5152/analysis/filename test34.aida
    5253/analysis/maxeng 5 MeV
     
    5455/analysis/maxpos 10 cm
    5556/analysis/minpos -10 cm
    56 #/event/printModulo 10000
     57/event/printModulo 10000
    5758#
    58 /control/execute display_vrml.mac
     59#/control/execute display.mac
    5960#
    6061#/tracking/verbose 1
    61 /run/beamOn 100
     62/run/beamOn 2000
    6263
  • trunk/examples/extended/eventgenerator/exgps/src/exGPSEventAction.cc

    r1230 r1337  
    3535#include "G4Event.hh"
    3636#include "G4EventManager.hh"
    37 #include "G4TrajectoryContainer.hh"
    38 #include "G4Trajectory.hh"
    39 #include "G4VVisManager.hh"
    4037#include "G4ios.hh"
    4138#include "G4UnitsTable.hh"
     
    107104#endif
    108105
    109 #ifdef G4VIS_USE
    110   // extract the trajectories and draw them
    111   if (G4VVisManager::GetConcreteInstance())
    112     {
    113      G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();
    114      G4int n_trajectories = 0;
    115      if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
    116      
    117      for (G4int i=0; i<n_trajectories; i++)
    118        { G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
    119        if (drawFlag == "all") trj->DrawTrajectory(0);
    120        else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))
    121          trj->DrawTrajectory(0);
    122        else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))
    123          trj->DrawTrajectory(0);                                   
    124        }
    125    }             
    126 #endif
    127106}
    128107
  • trunk/examples/extended/eventgenerator/exgps/src/exGPSEventActionMessenger.cc

    r1230 r1337  
    3232//
    3333// $Id: exGPSEventActionMessenger.cc,v 1.3 2006/06/29 17:14:43 gunter Exp $
    34 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     34// GEANT4 tag $Name: geant4-09-04-beta-01 $
    3535//
    3636//
Note: See TracChangeset for help on using the changeset viewer.