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/exoticphysics/monopole
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/exoticphysics/monopole/History

    r807 r1337  
    1 $Id: History,v 1.2 2007/08/16 12:57:59 vnivanch Exp $
     1$Id: History,v 1.10 2010/06/07 05:40:46 perl Exp $
    22-------------------------------------------------------------------
    33
     
    66     =========================================================
    77
    8                     monopol History file
    9                     --------------------
     8                    Monopole Example History file
     9                    -----------------------------
    1010This file should be used by the G4 example coordinator to briefly
    1111summarize all major modifications introduced in the code and keep
     
    1616     ----------------------------------------------------------
    1717
     186 June 10: J.Perl (monopole-V09-03-05)
     19- Remove unused variable in EventAction
     20
     214 June 10: J.Perl (monopole-V09-03-04)
     22- Updated vis usage
     23
     2404 June 10: V.Ivant (monopole-V09-03-03)
     25- Substituted QGSP by QGSP_BERT
     26- (J. Apostolakis, B. Bozsogi)  Added new classes for monopole
     27  G4MonopoleEquation, G4MonopoleFieldSetup, G4MonopoleTransportation
     28
     2912 May 10: J.Allison (monopole-V09-03-02)
     30- Introduced GUIExecutive.
     31
     3231 March 10: V.Ivant (monopole-V09-03-01)
     33- Removed obsolete header G4MultipleScattering.hh
     34
     3523 March 10: V.Ivant (monopole-V09-03-00)
     36- Cleanup and add test on ionisation of heavy highly charged particle
     37
     3814 July 09: V.Ivant (monopole-V09-02-00)
     39- Added messenger to define mass and change of the monopole
     40
     4111 June 08: V.Ivant (monopole-V09-01-00)
     42- Remove AIDA from GNUmakefile
     43- Fixed compillation warnings
     44
    184516 August 07: V.Ivant (monopole-V09-00-00)
    1946- First release
  • trunk/examples/extended/exoticphysics/monopole/README

    r807 r1337  
    1 $Id: README,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
     1$Id: README,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    22-------------------------------------------------------------------
    33
     
    4646    Physics Lists include standard QGSP physics and additional builder
    4747                for monopole physics.
     48    To define monopole parameters an extra string should be provided
     49      a) interactive mode by UI command:
     50         /monopole/setup 2 0 200 GeV (magnetic number, electric number, mass)
     51      b) batch mode:
     52         $G4BIN/$G4SYSTEM/monopole file.mac '2 0 200 GeV' 
    4853
    4954 3- AN EVENT : THE PRIMARY GENERATOR
  • trunk/examples/extended/exoticphysics/monopole/include/DetectorConstruction.hh

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: DetectorConstruction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: DetectorConstruction.hh,v 1.3 2010/06/04 19:03:36 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4141class G4UniformMagField;
    4242class DetectorMessenger;
     43class G4MonopoleFieldSetup;
    4344
    4445//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    8384  G4double            maxStepSize;
    8485  G4Material*         absorMaterial;
     86
    8587  G4UniformMagField*  magField;
     88  G4MonopoleFieldSetup* fMFieldSetup;
     89
    8690  G4LogicalVolume*    lAbsor;
    8791               
  • trunk/examples/extended/exoticphysics/monopole/include/DetectorMessenger.hh

    r1230 r1337  
    2525//
    2626// $Id: DetectorMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/EventAction.hh

    r1230 r1337  
    2525//
    2626// $Id: EventAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/EventActionMessenger.hh

    r1230 r1337  
    2525//
    2626// $Id: EventActionMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/G4Monopole.hh

    r1230 r1337  
    7777  static G4Monopole* Monopole();
    7878
    79   static G4double MagneticCharge() {return magCharge;};
     79  G4double MagneticCharge() const;
    8080
    8181private:
  • trunk/examples/extended/exoticphysics/monopole/include/G4MonopolePhysics.hh

    r1230 r1337  
    2525//
    2626//
    27 // $Id: G4MonopolePhysics.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4MonopolePhysics.hh,v 1.3 2010/03/23 14:12:08 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4040
    4141class G4MonopolePhysicsMessenger;
     42class G4Monopole;
    4243
    4344class G4MonopolePhysics : public G4VPhysicsConstructor
     
    6364
    6465  // hide assignment operator
    65   //  G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
    66   // G4MonopolePhysics(const G4MonopolePhysics&);
     66  G4MonopolePhysics & operator=(const G4MonopolePhysics &right);
     67  G4MonopolePhysics(const G4MonopolePhysics&);
    6768
    6869  G4int    magCharge;
     
    7172
    7273  G4MonopolePhysicsMessenger*  theMessenger;
     74  G4Monopole* mpl;
    7375
    7476};
  • trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorAction.hh

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorAction.hh,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/PrimaryGeneratorMessenger.hh

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/RunAction.hh

    r1230 r1337  
    2525//
    2626// $Id: RunAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/RunActionMessenger.hh

    r1230 r1337  
    2525//
    2626// $Id: RunActionMessenger.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/SteppingAction.hh

    r1230 r1337  
    2525//
    2626// $Id: SteppingAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/include/TrackingAction.hh

    r1230 r1337  
    2525//
    2626// $Id: TrackingAction.hh,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/monopole.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: monopole.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: monopole.cc,v 1.6 2010/06/06 04:53:49 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3232#include "G4RunManager.hh"
    3333#include "G4UImanager.hh"
    34 #include "G4UIterminal.hh"
    35 #include "G4UItcsh.hh"
    3634#include "Randomize.hh"
    3735#include "globals.hh"
     
    3937#include "DetectorConstruction.hh"
    4038#include "G4MonopolePhysics.hh"
    41 #include "QGSP.hh"
     39#include "QGSP_BERT.hh"
    4240#include "PrimaryGeneratorAction.hh"
    4341
     
    4947#ifdef G4VIS_USE
    5048#include "G4VisExecutive.hh"
     49#endif
     50
     51#ifdef G4UI_USE
     52#include "G4UIExecutive.hh"
    5153#endif
    5254
     
    6264
    6365  //create physicsList
    64   QGSP* phys = new QGSP();
     66  QGSP_BERT* phys = new QGSP_BERT();
    6567  G4MonopolePhysics * theMonopole = new G4MonopolePhysics();
    6668  phys->RegisterPhysics(theMonopole);
    67 
     69   
     70        // visualization manager
     71#ifdef G4VIS_USE
     72        G4VisManager* visManager = new G4VisExecutive;
     73        visManager->Initialize();
     74#endif
     75       
    6876  //get the pointer to the User Interface manager
    69   G4UImanager* UI = G4UImanager::GetUIpointer();
     77  G4UImanager* UImanager = G4UImanager::GetUIpointer();
    7078
    7179  // Setup monopole
    7280  G4String s = "";
    73   if(argc > 2) s = argv[2];
    74   UI->ApplyCommand("/control/verbose 1");
    75   UI->ApplyCommand("/monopole/setup "+s);
     81  if(argc > 2) { s = argv[2]; }
     82  UImanager->ApplyCommand("/control/verbose 1");
     83  UImanager->ApplyCommand("/monopole/setup "+s);
    7684
    7785  // mandator user classes
     
    8492  runManager->SetUserAction(kin);
    8593
    86 #ifdef G4VIS_USE
    87   //visualization manager
    88   G4VisManager* visManager = 0;
    89 #endif
    90 
    9194  //user action classes
    9295  RunAction* run;
     
    97100  runManager->SetUserAction(new SteppingAction(det, run));
    98101
    99   if (argc == 1)   // Define UI terminal for interactive mode
    100     {
    101       visManager = new G4VisExecutive();
    102       visManager->Initialize();
    103       G4UIsession* session = 0;
    104 #ifdef G4UI_USE_TCSH
    105       session = new G4UIterminal(new G4UItcsh);
    106 #else
    107       session = new G4UIterminal();
    108 #endif
    109       session->SessionStart();
    110       delete session;
    111     }
    112   else           // Batch mode
     102  if (argc!=1)   // batch mode
    113103    {
    114104      G4String command = "/control/execute ";
    115105      G4String fileName = argv[1];
    116       UI->ApplyCommand(command+fileName);
     106      UImanager->ApplyCommand(command+fileName);   
     107    }
     108  else
     109    {  // interactive mode : define UI session
     110#ifdef G4UI_USE
     111      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     112      ui->SessionStart();
     113      delete ui;
     114#endif
    117115    }
    118116
  • trunk/examples/extended/exoticphysics/monopole/monopole.in

    r807 r1337  
    1818/run/initialize
    1919#
    20 /process/eLoss/verbose 0
     20/process/eLoss/verbose 1
    2121/testex/event/printModulo 10
    2222#
  • trunk/examples/extended/exoticphysics/monopole/src/DetectorConstruction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: DetectorConstruction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: DetectorConstruction.cc,v 1.2 2010/06/04 19:03:36 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4848#include "G4NistManager.hh"
    4949
     50#include "G4MonopoleFieldSetup.hh"
     51#include "G4FieldManager.hh"
     52#include "G4TransportationManager.hh"
     53
    5054//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5155
     
    6064  magField = 0;
    6165  lAbsor   = 0;
     66  fMFieldSetup = 0;
    6267
    6368  DefineMaterials();
     
    6873}
    6974
    70 
    71 
    7275DetectorConstruction::~DetectorConstruction()
    73 {delete detectorMessenger;}
    74 
     76{
     77  delete detectorMessenger;
     78}
    7579
    7680G4VPhysicalVolume* DetectorConstruction::Construct()
    77 { return ConstructVolumes();}
    78 
     81{
     82  return ConstructVolumes();
     83}
    7984
    8085void DetectorConstruction::DefineMaterials()
     
    116121  G4LogicalVolumeStore::GetInstance()->Clean();
    117122  G4SolidStore::GetInstance()->Clean();
    118 
    119 
    120123
    121124  /****************************    World   *****************************/
     
    199202
    200203//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    201 #include "G4FieldManager.hh"
    202 #include "G4TransportationManager.hh"
    203204
    204205void DetectorConstruction::SetMagField(G4double fieldValue)
    205206{
    206207  //apply a global uniform magnetic field along Z axis
    207   G4FieldManager * fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager();
     208  G4FieldManager * fieldMgr =
     209    G4TransportationManager::GetTransportationManager()->GetFieldManager();
    208210   
    209   if (magField) delete magField;        //delete the existing magn field
     211  if (magField) { delete magField; }    //delete the existing magn field
     212
     213  //fMFieldSetup = G4MonopoleFieldSetup::GetMonopoleFieldSetup(); // create the field
     214
    210215 
    211216  if (fieldValue != 0.)                 // create a new one if non nul
     
    222227}
    223228
    224 
    225 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     229//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     230
    226231void DetectorConstruction::SetMaxStepSize(G4double step_)
    227232{
  • trunk/examples/extended/exoticphysics/monopole/src/DetectorMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: DetectorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/EventAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: EventAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: EventAction.cc,v 1.3 2010/06/07 05:40:46 perl Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    3535
    3636#include "G4Event.hh"
    37 #include "G4TrajectoryContainer.hh"
    38 #include "G4Trajectory.hh"
    39 #include "G4VVisManager.hh"
    4037
    4138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    6663//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    6764
    68 void EventAction::EndOfEventAction(const G4Event* evt)
     65void EventAction::EndOfEventAction(const G4Event*)
    6966{
    70   if (G4VVisManager::GetConcreteInstance())
    71   {
    72    G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
    73    G4int n_trajectories = 0;
    74    if (trajectoryContainer) n_trajectories = trajectoryContainer->entries(); 
    75    for(G4int i=0; i<n_trajectories; i++)
    76       {
    77         G4Trajectory* trj = (G4Trajectory*) ((*(evt->GetTrajectoryContainer()))[i]);
    78         if (drawFlag == "all")
    79           trj->DrawTrajectory(1000);
    80         else
    81           if ((drawFlag == "charged") && (trj->GetCharge() != 0.))
    82             trj->DrawTrajectory(1000);
    83       }
    84   }
    8567}
    8668
  • trunk/examples/extended/exoticphysics/monopole/src/EventActionMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: EventActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/G4Monopole.cc

    r1230 r1337  
    106106G4Monopole* G4Monopole::Monopole()
    107107{   
    108   if(!theMonopole) theMonopole = MonopoleDefinition();
     108  if(!theMonopole) { theMonopole = MonopoleDefinition(); }
    109109  return theMonopole;
    110110}
     
    112112//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
    113113
     114G4double G4Monopole::MagneticCharge() const
     115{
     116  return magCharge;
     117}
     118
     119//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
     120
  • trunk/examples/extended/exoticphysics/monopole/src/G4MonopolePhysics.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 //
    27 // $Id: G4MonopolePhysics.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: G4MonopolePhysics.cc,v 1.5 2010/06/04 19:03:36 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2928//
    3029//---------------------------------------------------------------------------
     
    5150#include "G4StepLimiter.hh"
    5251#include "G4Transportation.hh"
    53 #include "G4MultipleScattering.hh"
     52#include "G4MonopoleTransportation.hh"
     53#include "G4hMultipleScattering.hh"
    5454#include "G4mplIonisation.hh"
    5555#include "G4hhIonisation.hh"
     
    7373void G4MonopolePhysics::ConstructParticle()
    7474{
    75   G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
     75  mpl = G4Monopole::MonopoleDefinition(monopoleMass, magCharge, elCharge);
    7676}
    7777
    78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    7978void G4MonopolePhysics::ConstructProcess()
    8079{
     
    8281    G4cout << "G4MonopolePhysics::ConstructProcess" << G4endl;
    8382  }
    84   G4Monopole* mpl = G4Monopole::Monopole();
    8583 
    8684  G4ProcessManager* pmanager = new G4ProcessManager(mpl);
     
    10199  nbin *= 10;
    102100 
    103   pmanager->AddProcess( new G4Transportation(), -1, 0, 0);
     101  if(magn == 0.0) {
     102    pmanager->AddProcess( new G4Transportation(), -1, 0, 0);
     103  } else {
     104    pmanager->AddProcess( new G4MonopoleTransportation(mpl), -1, 0, 0);
     105  }
     106
     107  G4int idx = 1;
     108  if(mpl->GetPDGCharge() != 0.0) {
     109    //G4hMultipleScattering* hmsc = new G4hMultipleScattering();
     110    //pmanager->AddProcess(hmsc,  -1, idx, idx);
     111    //++idx;
     112    G4hhIonisation* hhioni = new G4hhIonisation();
     113    hhioni->SetDEDXBinning(nbin);
     114    hhioni->SetMinKinEnergy(emin);
     115    hhioni->SetMaxKinEnergy(emax);
     116    pmanager->AddProcess(hhioni,  -1, idx, idx);
     117    ++idx;
     118  }
    104119  if(magn != 0.0) {
    105120    G4mplIonisation* mplioni = new G4mplIonisation(magn);
     
    107122    mplioni->SetMinKinEnergy(emin);
    108123    mplioni->SetMaxKinEnergy(emax);
    109     pmanager->AddProcess(mplioni, -1, 1, 1);
     124    pmanager->AddProcess(mplioni, -1, idx, idx);
     125    ++idx;
    110126  }
    111   if(mpl->GetPDGCharge() != 0.0) {
    112     G4hhIonisation* hhioni = new G4hhIonisation();
    113     hhioni->SetDEDXBinning(nbin);
    114     hhioni->SetMinKinEnergy(emin);
    115     hhioni->SetMaxKinEnergy(emax);
    116     pmanager->AddProcess(hhioni,  -1, 2, 2);
    117   }
    118   pmanager->AddProcess( new G4StepLimiter(),  -1, -1, 3);
     127  pmanager->AddProcess( new G4StepLimiter(),  -1, -1, idx);
    119128
    120129}
  • trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: PrimaryGeneratorAction.cc,v 1.2 2009/07/15 10:19:47 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: PrimaryGeneratorAction.cc,v 1.3 2010/03/23 14:12:08 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    4747{
    4848  particleGun  = new G4ParticleGun(1);
    49   G4ParticleDefinition* particle =
    50     G4ParticleTable::GetParticleTable()->FindParticle("monopole");
    51   particleGun->SetParticleDefinition(particle);
     49  //G4ParticleDefinition* particle =
     50  //  G4ParticleTable::GetParticleTable()->FindParticle("monopole");
     51  //particleGun->SetParticleDefinition(particle);
    5252  particleGun->SetParticleEnergy(100 * GeV);
    5353  particleGun->SetParticleMomentumDirection(G4ThreeVector(1., 0., 0.));
  • trunk/examples/extended/exoticphysics/monopole/src/PrimaryGeneratorMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: PrimaryGeneratorMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/RunAction.cc

    r1230 r1337  
    2424// ********************************************************************
    2525//
    26 // $Id: RunAction.cc,v 1.2 2008/06/11 14:34:19 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: RunAction.cc,v 1.4 2010/06/04 19:03:36 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     
    5050//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
    5151
    52 RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin):detector(det), kinematic(kin), af(0), tree(0)
     52RunAction::RunAction(DetectorConstruction* det, PrimaryGeneratorAction* kin)
     53  :detector(det), kinematic(kin), af(0), tree(0)
    5354{
    54   verboseLevel = 0;
     55  verboseLevel = 1;
    5556  binLength = offsetX = 0.;
    5657  histo[0] = 0;
     
    6061  // Creating the analysis factory
    6162  af = AIDA_createAnalysisFactory();
    62         ftype   = "hbook";
     63  ftype   = "root";
    6364  fname   = "monopole";
    6465#endif
     
    6869}
    6970
    70 
    71 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     71//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     72
    7273RunAction::~RunAction()
    7374{
     
    7778}
    7879
    79 
    80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     80//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     81
    8182void RunAction::bookHisto()
    8283{
    8384  G4double length  = detector->GetAbsorSizeX();
    84   if(!binLength) binLength = 5 * mm;
    85         if(binLength > detector->GetMaxStepSize()) binLength = detector->GetMaxStepSize();
     85  if(!binLength) { binLength = 5 * mm; }
     86  if(binLength > detector->GetMaxStepSize()) {
     87    binLength = detector->GetMaxStepSize();
     88  }
    8689  offsetX   = 0.5 * length;
    8790 
    8891#ifdef G4ANALYSIS_USE
    89   if(GetVerbose() > 0) G4cout << "\n----> Histogram Tree opened" << G4endl;
    90 
    91   G4int nbBins = (int)(0.5 + length / binLength);
     92  if(GetVerbose() > 0) { G4cout << "\n----> Histogram Tree opened" << G4endl; }
     93
     94  G4int nbBins = (G4int)(0.5 + length / binLength);
    9295
    9396  // Create the tree factory
     
    120123}
    121124
    122 
    123 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     125//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     126
    124127void RunAction::saveHisto()
    125128{
     
    133136}
    134137
    135 
    136 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     138//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
     139
    137140void RunAction::SetBinSize(G4double size)
    138141{
     
    180183  G4Material* material = detector->GetAbsorMaterial();
    181184  G4double density = material->GetDensity();
    182    
    183   G4String particle = kinematic->GetParticleGun()->GetParticleDefinition()->GetParticleName();   
     185  const G4ParticleDefinition* part =
     186    kinematic->GetParticleGun()->GetParticleDefinition();
     187  G4String particle = part->GetParticleName();   
    184188  G4double energy = kinematic->GetParticleGun()->GetParticleEnergy();
    185189
     
    209213  calc.SetVerbose(0);
    210214  G4int i;
    211   for(i = 0; i < 100; i++) {
     215  for(i = 0; i < 100; ++i) {
    212216    ekin[i] = std::pow(10., 0.1*G4double(i)) * keV;
    213217    dedxproton[i] = calc.ComputeElectronicDEDX(ekin[i], "proton",  material->GetName());
     
    215219  }
    216220
    217   if(GetVerbose() > 1){
     221  if(GetVerbose() > 0){
    218222    G4cout << "### Stopping Powers" << G4endl;
    219223    for(i=0; i<100; i++) {
     
    223227    }
    224228  };
    225 
     229  G4cout << "### End of stopping power table" << G4endl;
    226230#ifdef G4ANALYSIS_USE
    227231  // normalize histogram
     
    234238        };
    235239
    236 
    237   for(i=0; i<100; i++) {
     240  for(i=0; i<100; ++i) {
    238241    G4double e = std::log10(ekin[i] / MeV) + 0.05;
    239242    histo[1]->fill(e, dedxproton[i]);
  • trunk/examples/extended/exoticphysics/monopole/src/RunActionMessenger.cc

    r1230 r1337  
    2525//
    2626// $Id: RunActionMessenger.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/SteppingAction.cc

    r1230 r1337  
    2525//
    2626// $Id: SteppingAction.cc,v 1.2 2007/12/10 16:28:17 gunter Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
  • trunk/examples/extended/exoticphysics/monopole/src/TrackingAction.cc

    r1230 r1337  
    2525//
    2626// $Id: TrackingAction.cc,v 1.1 2007/08/16 10:32:04 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2828//
    2929//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset for help on using the changeset viewer.