Last change
on this file since 15 was
15,
checked in by huonglan, 13 years ago
|
fast simulation of t't'bar pair production from my stage
|
File size:
1.0 KB
|
Line | |
---|
1 | #include <iostream> |
---|
2 | #include <math.h> |
---|
3 | #include "MyVector3.h" |
---|
4 | |
---|
5 | using namespace std; |
---|
6 | |
---|
7 | |
---|
8 | int main() |
---|
9 | { |
---|
10 | MyVector3 vec1(1,2,3,M_PI/2); |
---|
11 | MyVector3 vec2(4,5,6,M_PI/2); |
---|
12 | |
---|
13 | |
---|
14 | cout << "vec1: (" << vec1.X() << ", " << vec1.Y() << ", " << vec1.Z() << ")" << endl; |
---|
15 | cout << "vec1(theta,phi,perp,eta) : (" << vec1.theta() << ", " << vec1.phi() << ", " << vec1.perp() << ", " << vec1.eta() << ")" << endl; |
---|
16 | cout << "vec2: (" << vec2.X() << ", " << vec2.Y() << ", " << vec2.Z() << ")" << endl; |
---|
17 | cout << "vec2(theta,phi,perp,eta) : (" << vec2.theta() << ", " << vec2.phi() << ", " << vec2.perp() << ", " << vec2.eta() << ")" << endl; |
---|
18 | |
---|
19 | vec1 += vec2; |
---|
20 | |
---|
21 | MyVector3 vect; |
---|
22 | vect = vec1 + vec2; |
---|
23 | |
---|
24 | |
---|
25 | cout << "SUM: (" << vec1.X() << ", " << vec1.Y() << ", " << vec1.Z() << ")" << endl; |
---|
26 | cout << "VECT: (" << vect.X() << ", " << vect.Y() << ", " << vect.Z() << ")" << endl; |
---|
27 | |
---|
28 | cout << "Product: SUM*VECT = " << vec1*vect << endl; |
---|
29 | |
---|
30 | |
---|
31 | MyVector3 v100 = vec1*100; |
---|
32 | cout << "SUM: (" << v100.X() << ", " << v100.Y() << ", " << v100.Z() << ")" << endl; |
---|
33 | |
---|
34 | |
---|
35 | return 0; |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.