Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JTrack3EY.hh
Go to the documentation of this file.
1#ifndef __JTRACK3EY__
2#define __JTRACK3EY__
3
4#include <istream>
5#include <ostream>
6
8
11
12
13/**
14 * \author mdejong, adomi
15 */
16
17namespace JGEOMETRY3D {}
18namespace JPP { using namespace JGEOMETRY3D; }
19
20namespace JGEOMETRY3D {
21
22 using JIO::JReader;
23 using JIO::JWriter;
24
25 /**
26 * 3D track with energy and Bjorken-y.
27 */
28 class JTrack3EY :
29 public JTrack3E,
30 public JBjorkenY,
31 {
32 public:
33 /**
34 * Default constructor.
35 */
37 JTrack3E(),
38 JBjorkenY()
39 {}
40
41
42 /**
43 * Constructor.
44 *
45 * \param track track
46 * \param Y Bjorken-y
47 */
48 JTrack3EY(const JTrack3E& track,
49 const JBjorkenY& Y) :
50 JTrack3E(track),
51 JBjorkenY(Y)
52 {}
53
54
55 /**
56 * Read track from input.
57 *
58 * \param in input stream
59 * \param track track
60 * \return input stream
61 */
62 friend inline std::istream& operator>>(std::istream& in, JTrack3EY& track)
63 {
64 in >> static_cast<JTrack3E&> (track);
65 in >> static_cast<JBjorkenY&>(track);
66
67 return in;
68 }
69
70
71 /**
72 * Write track to output.
73 *
74 * \param out output stream
75 * \param track track
76 * \return output stream
77 */
78 friend inline std::ostream& operator<<(std::ostream& out, const JTrack3EY& track)
79 {
80 out << static_cast<const JTrack3E&> (track);
81 out << ' ';
82 out << static_cast<const JBjorkenY&>(track);
83
84 return out;
85 }
86
87
88 /**
89 * Read track from input.
90 *
91 * \param in reader
92 * \param track track
93 * \return reader
94 */
95 friend inline JReader& operator>>(JReader& in, JTrack3EY& track)
96 {
97 in >> static_cast<JTrack3E&> (track);
98 in >> static_cast<JBjorkenY&>(track);
99
100 return in;
101 }
102
103
104 /**
105 * Write track to output.
106 *
107 * \param out writer
108 * \param track track
109 * \return writer
110 */
111 friend inline JWriter& operator<<(JWriter& out, const JTrack3EY& track)
112 {
113 out << static_cast<const JTrack3E&> (track);
114 out << static_cast<const JBjorkenY&>(track);
115
116 return out;
117 }
118 };
119}
120
121#endif
3D track with energy and Bjorken-y.
Definition JTrack3EY.hh:31
friend JWriter & operator<<(JWriter &out, const JTrack3EY &track)
Write track to output.
Definition JTrack3EY.hh:111
friend std::ostream & operator<<(std::ostream &out, const JTrack3EY &track)
Write track to output.
Definition JTrack3EY.hh:78
JTrack3EY()
Default constructor.
Definition JTrack3EY.hh:36
JTrack3EY(const JTrack3E &track, const JBjorkenY &Y)
Constructor.
Definition JTrack3EY.hh:48
friend JReader & operator>>(JReader &in, JTrack3EY &track)
Read track from input.
Definition JTrack3EY.hh:95
friend std::istream & operator>>(std::istream &in, JTrack3EY &track)
Read track from input.
Definition JTrack3EY.hh:62
3D track with energy.
Definition JTrack3E.hh:34
Interface for binary input.
Interface for binary output.
Auxiliary classes and methods for 3D geometrical objects and operations.
Definition JAngle3D.hh:19
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).