The Gaudi Framework  v36r10 (fc05264c)
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 53 of file TupleEx2.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 59 of file TupleEx2.py.

59  def __init__(self, name="TupleEx2"):
60  """Constructor"""
61  TupleAlgo.__init__(self, name)
62 

Member Function Documentation

◆ execute()

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

Definition at line 64 of file TupleEx2.py.

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

The documentation for this class was generated from the following file:
Rndm::Flat
Parameters for the flat random number generation within boundaries [minimum, maximum].
Definition: RndmGenerators.h:253
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
Rndm::BreitWigner
Parameters for the BreitWigner distributed random number generation.
Definition: RndmGenerators.h:94
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