source: huonglan/MYSIMULATION/Saved/Particle.C @ 15

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.1 KB
Line 
1#include "Particle.h"
2#include <cstdio>
3#include <math.h>
4
5using namespace std;
6
7Particle::Particle()
8{
9  MyVector3 v3(0,0,0);
10  MyVector4 v4(v3,0);
11  this-> m_v4 = v4;
12  this-> m_pdg = 0;
13  this-> m_stat = 0;
14  this-> m_pol = 0;
15}
16
17Particle::Particle(MyVector4 vec4, int pdg, short stat, short pol)
18{
19  this->m_v4 = vec4;
20  this->m_pdg = pdg;
21  this->m_stat = stat;
22  this->m_pol = pol;
23  this->m_bcode = 0;
24  this->m_mbcode = 0;
25}
26
27int Particle::PDG() const
28{
29  return this->m_pdg;
30}
31
32short Particle::STAT() const
33{
34  return this->m_stat;
35}
36
37short Particle::POL() const
38{
39  return this->m_pol;
40}
41
42int Particle::barcode(int b)
43{
44  this->m_bcode = b;
45}
46
47int Particle::barcode() const
48{
49  return m_bcode;
50}
51
52int Particle::motherbarcode(int mb)
53{
54  this->m_mbcode = mb;
55}
56
57int Particle::motherbarcode() const
58{
59  return m_mbcode;
60}
61
62MyVector4 Particle::vector4() const
63{
64  return this->m_v4;
65}
66
67std::ostream& operator<<(std::ostream& out, const Particle& par)
68{
69  out << par.vector4() << endl
70      << "pdg = " << par.PDG() 
71      << "; stat = " << par.STAT()
72      << "; pol = " << par.POL()
73      << std::endl;
74
75 return out;
76}
Note: See TracBrowser for help on using the repository browser.