Geant4-11
Data Structures | Functions
root_test Namespace Reference

Data Structures

class  MyEventAction
 
class  MyPrimaryGeneratorAction
 
class  MyRunAction
 
class  MySteppingAction
 

Functions

def hini ()
 
def hshow ()
 
def init_root ()
 

Function Documentation

◆ hini()

def root_test.hini ( )

Definition at line 43 of file root_test.py.

43def hini():
44# ------------------------------------------------------------------
45 global hist1
46 hist1= ROOT.TH1D("dE/dx/step", "dE/dx", 100, 0., 2000.)
47 hist1.SetXTitle("(keV)")
48
49
50# ------------------------------------------------------------------
def hini()
Definition: root_test.py:43

Referenced by root_test.MySteppingAction.UserSteppingAction().

◆ hshow()

def root_test.hshow ( )

Definition at line 51 of file root_test.py.

51def hshow():
52# ------------------------------------------------------------------
53 hist1.Draw()
54
55# ==================================================================
56# Geant4 PART #
57# ==================================================================
58
59# ==================================================================
60# user actions in python
61# ==================================================================
def hshow()
Definition: root_test.py:51

Referenced by root_test.MySteppingAction.UserSteppingAction().

◆ init_root()

def root_test.init_root ( )

Definition at line 17 of file root_test.py.

17def init_root():
18# ------------------------------------------------------------------
19 ROOT.gROOT.Reset()
20
21 # plot style
22 ROOT.gStyle.SetTextFont(82)
23 ROOT.gStyle.SetTitleFont(82, "X")
24 ROOT.gStyle.SetLabelFont(82, "X")
25 ROOT.gStyle.SetTitleFont(82, "Y")
26 ROOT.gStyle.SetLabelFont(82, "Y")
27
28 #ROOT.gStyle.SetOptTitle(0)
29 ROOT.gStyle.SetErrorX(0)
30
31 canvas= ROOT.TCanvas("g4py_plots",
32 "Geant4Py Sample Plots",
33 620, 30, 600, 400)
34
35 #canvas.Divide(2,2);
36 #canvas.SetFillColor(29)
37
38 canvas.SetGrid()
39
40 return canvas
41
42# ------------------------------------------------------------------
def init_root()
Definition: root_test.py:17

Referenced by root_test.MySteppingAction.UserSteppingAction().