The Gaudi Framework
v26r1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
MyTrack.h
Go to the documentation of this file.
1
// $Id: MyTrack.h,v 1.4 2006/01/26 18:11:06 mato Exp $
2
#ifndef GAUDIEXAMPLES_MYTRACK_H
3
#define GAUDIEXAMPLES_MYTRACK_H
4
5
// Include files
6
#include "GaudiKernel/SmartRef.h"
7
#include "GaudiKernel/StreamBuffer.h"
8
#include "GaudiKernel/ContainedObject.h"
9
#include "GaudiKernel/KeyedContainer.h"
10
11
#include "
Event.h
"
12
13
class
MyVertex
;
14
15
16
// External declaration
17
static
const
CLID
& CLID_MyTrack = 9999;
18
19
27
class
MyTrack
:
public
KeyedObject
<int> {
28
private
:
30
float
m_px
,
m_py
,
m_pz
;
32
SmartRef<Event>
m_event
;
33
SmartRef<MyVertex>
m_decay
;
34
public
:
36
MyTrack
() :
m_px
(0.0),
m_py
(0.0),
m_pz
(0.0) {
37
}
39
MyTrack
(
float
x,
float
y,
float
z) :
m_px
(x),
m_py
(y),
m_pz
(z) {
40
}
42
virtual
~MyTrack
() {
43
}
45
virtual
const
CLID
&
clID
()
const
{
return
classID
(); }
46
static
const
CLID
&
classID
() {
return
CLID_MyTrack; }
48
float
px
()
const
{
return
m_px
; }
50
float
py
()
const
{
return
m_py
; }
52
float
pz
()
const
{
return
m_pz
; }
54
void
setPx
(
float
px
) {
m_px
=
px
; }
56
void
setPy
(
float
py
) {
m_py
=
py
; }
58
void
setPz
(
float
pz
) {
m_pz
=
pz
; }
59
61
const
Event
*
event
()
const
{
62
return
m_event
;
63
}
65
void
setEvent
(
Event
*
evt
) {
66
m_event
=
evt
;
67
}
68
70
const
MyVertex
*
decayVertex
()
const
;
71
73
void
setDecayVertex
(
MyVertex
* decay);
74
75
std::ostream&
fillStream
( std::ostream&
s
)
const
{
76
s <<
"px: "
<<
px
() <<
"py: "
<<
py
() <<
"px: "
<<
pz
();
77
return
s
;
78
}
79
80
81
};
82
83
#include "
MyVertex.h
"
85
inline
const
MyVertex
*
MyTrack::decayVertex
()
const
{
86
return
m_decay
;
87
}
88
90
inline
void
MyTrack::setDecayVertex
(
MyVertex
* decay) {
91
m_decay
= decay;
92
}
93
94
// Definition of all container types of MCParticle
95
typedef
KeyedContainer<MyTrack>
MyTrackVector
;
96
97
#endif // RIO_EXAMPLE1_MYTRACK_H
GaudiPython
src
Test
MyTrack.h
Generated on Mon Feb 16 2015 11:56:57 for The Gaudi Framework by
1.8.2