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/HepMC/HepMCEx02
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • 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.
Note: See TracChangeset for help on using the changeset viewer.