Belle II Software development
GenerateHist Class Reference
Inheritance diagram for GenerateHist:

Public Member Functions

def initialize (self)
 
def event (self)
 

Static Public Attributes

TH1F edep_hist = TH1F("CDC_edep", "Energy deposition from CDCSimHits", 100, 0.0, 10e-6)
 histogram for SimHit energy deposition
 
TH3F pos_hist
 histogram for SimHit positions
 

Detailed Description

Generate some histograms to pass to the display.

Definition at line 22 of file histogram_monitor.py.

Member Function Documentation

◆ event()

def event (   self)
reimplementation of Module::event().

Definition at line 38 of file histogram_monitor.py.

38 def event(self):
39 """reimplementation of Module::event()."""
40
41 displayData = Belle2.PyStoreObj("DisplayData")
42 displayData.create()
43
44 cdcsimhits = Belle2.PyStoreArray("CDCSimHits")
45 for hit in cdcsimhits:
46 self.edep_hist.Fill(hit.getEnergyDep())
47 p = hit.getPosWire()
48 self.pos_hist.Fill(p.X(), p.Y(), p.Z())
49
50 displayData.obj().addHistogram("CDC_edep", self.edep_hist)
51 displayData.obj().addHistogram("CDC_pos", self.pos_hist)
52
53
54# register necessary modules
A (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:72
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ initialize()

def initialize (   self)
reimplementation of Module::initialize().

Definition at line 33 of file histogram_monitor.py.

33 def initialize(self):
34 """reimplementation of Module::initialize()."""
35
36 Belle2.PyStoreObj("DisplayData").registerInDataStore()
37

Member Data Documentation

◆ edep_hist

TH1F edep_hist = TH1F("CDC_edep", "Energy deposition from CDCSimHits", 100, 0.0, 10e-6)
static

histogram for SimHit energy deposition

Definition at line 26 of file histogram_monitor.py.

◆ pos_hist

TH3F pos_hist
static
Initial value:
= TH3F("CDC_pos", "Positions of CDCSimHits",
100, -150.0, 150.0,
100, -150.0, 150.0,
100, -150.0, 150.0)

histogram for SimHit positions

Definition at line 28 of file histogram_monitor.py.


The documentation for this class was generated from the following file: