The Gaudi Framework  v36r16 (ea80daf8)
TupleEx2.TupleEx2 Class Reference
Inheritance diagram for TupleEx2.TupleEx2:
Collaboration diagram for TupleEx2.TupleEx2:

Public Member Functions

def __init__ (self, name="TupleEx2")
 
def execute (self)
 

Detailed Description

Simple algorithm for advanced N-Tuple columns

Definition at line 49 of file TupleEx2.py.

Constructor & Destructor Documentation

◆ __init__()

def TupleEx2.TupleEx2.__init__ (   self,
  name = "TupleEx2" 
)
Constructor

Definition at line 55 of file TupleEx2.py.

55  def __init__(self, name="TupleEx2"):
56  """Constructor"""
57  TupleAlgo.__init__(self, name)
58 

Member Function Documentation

◆ execute()

def TupleEx2.TupleEx2.execute (   self)
The major method 'execute', it is invoked for each event

Definition at line 60 of file TupleEx2.py.

60  def execute(self):
61  """The major method 'execute', it is invoked for each event"""
62 
63  gauss = Rndm.Numbers(self.randSvc(), Rndm.Gauss(0.0, 1.0))
64 
65  # N-tuple with 4D-vectors
66  tup = self.nTuple("Vectors-4D", "N-tuple with 4D-vectors")
67  for i in range(0, 100):
68 
69  lv1 = Math.PxPyPzEVector()
70 
71  lv1.SetPx(gauss())
72  lv1.SetPy(gauss())
73  lv1.SetPz(gauss())
74  lv1.SetE(gauss())
75 
76  tup.column("lv1", lv1)
77 
78  tup.write()
79 
80  # N-tuple with 3D-vectors
81  tup = self.nTuple("Vectors-3D", "N-tuple with 3D-vectors")
82  for i in range(0, 100):
83 
84  v1 = Math.XYZVector()
85  v1.SetX(gauss())
86  v1.SetY(gauss())
87  v1.SetZ(gauss())
88 
89  tup.column("v1", v1)
90 
91  tup.write()
92 
93  # N-tuple with 3D-points
94  tup = self.nTuple("Points-3D", "N-tuple with 3D-points")
95  for i in range(0, 100):
96 
97  p1 = Math.XYZPoint()
98  p1.SetX(gauss())
99  p1.SetY(gauss())
100  p1.SetZ(gauss())
101 
102  tup.column("p1", p1)
103 
104  tup.write()
105 
106  return SUCCESS
107 
108 
109 # =============================================================================
110 # job configuration
111 #
112 # @author Vanya BELYAEV ibelyaev@physics.syr.edu
113 # @date 2006-11-26
114 
115 

The documentation for this class was generated from the following file:
Rndm::Gauss
Parameters for the Gauss random number generation.
Definition: RndmGenerators.h:32
Rndm::Numbers
Random number accessor This small class encapsulates the use of the random number generator.
Definition: RndmGenerators.h:359
GaudiPython.Pythonizations.execute
execute
Definition: Pythonizations.py:588
HistoUtilsEx.gauss
gauss
Definition: HistoUtilsEx.py:66
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition: FunctionalDetails.h:102