VMC Examples Version 6.6
Loading...
Searching...
No Matches
Ex03PostDetConstruction.cxx
Go to the documentation of this file.
1//------------------------------------------------
2// The Virtual Monte Carlo examples
3// Copyright (C) 2007 - 2015 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
10/// \file Ex03PostDetConstruction.cxx
11/// \brief Implementation of the Ex03PostDetConstruction class
12///
13/// Geant4 ExampleN03 adapted to Virtual Monte Carlo \n
14///
15/// \author I. Hrivnacova; IPN, Orsay
16
17#include "Ex03PostDetConstruction.h"
18
19#include "TG4GeometryManager.h"
20
21#include "G4Mag_UsualEqRhs.hh"
22#include "G4NystromRK4.hh"
23
24//_____________________________________________________________________________
28
29//_____________________________________________________________________________
31
32//_____________________________________________________________________________
34{
35 // Create "user" equation of motion;
36 // G4Mag_UsualEqRhs eqution and G4NystromRK4 stepper should be replaced with
37 // users own objects
38 G4cout << "Create user defined equation of motion and stepper" << G4endl;
39 G4Mag_EqRhs* equation = new G4Mag_UsualEqRhs(0);
40 G4MagIntegratorStepper* stepper = new G4NystromRK4(equation);
41
42 TG4GeometryManager::Instance()->SetUserEquationOfMotion(equation);
43 TG4GeometryManager::Instance()->SetUserStepper(stepper);
44}
45
46//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......