ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/devildog/SWonAnalysis3/Thesis/src/TGenParticle.cc
Revision: 1.2
Committed: Wed Jun 15 22:12:57 2011 UTC (13 years, 10 months ago) by devildog
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -3 lines
Error occurred while calculating annotation data.
Log Message:
Removed custom copy constructor

File Contents

# Content
1 /*
2 * File: TGenParticle.cc
3 * Author: S. Won
4 */
5
6 #include "TGenParticle.h"
7 #include <iostream>
8
9 TGenParticle::TGenParticle() {
10 }
11
12 TGenParticle::~TGenParticle() {
13 }
14
15 // "get" methods -------------------------------------
16
17 TVector3 TGenParticle::Position() const {
18 return _position;
19 }
20
21 TLorentzVector TGenParticle::P4() const {
22 return _p4;
23 }
24
25 TVector2 TGenParticle::P2() const {
26 TVector2 v2(_p4.Px(), _p4.Py());
27 return v2;
28 }
29
30 float TGenParticle::Et() const {
31 return _p4.Et();
32 }
33
34 float TGenParticle::Pt() const {
35 return _p4.Pt();
36 }
37
38 int TGenParticle::Charge() const{
39 return charge;
40 }
41
42 int TGenParticle::Mother() {
43 return mother;
44 }
45
46 int TGenParticle::GetPDGId() {
47 return PDGID;
48 }
49
50 //std::vector<int> TGenParticle::GetDaughters() {
51 // return daughters;
52 //}
53
54 // "set" methods ---------------------------------------------
55
56 void TGenParticle::SetPosition(float x, float y, float z) {
57 TVector3 p(x, y, z);
58 _position = p;
59 }
60
61 void TGenParticle::SetP4(TLorentzVector p4) {
62 _p4 = p4;
63 }
64
65 void TGenParticle::SetP4(float px, float py, float pz, float e) {
66 TLorentzVector p4(px, py, pz, e);
67 _p4 = p4;
68 }
69
70 void TGenParticle::SetCharge(int c) {
71 charge = c;
72 }
73
74 //void TGenParticle::AddDaughter(int d) {
75 // daughters.push_back(d);
76 //}
77
78 void TGenParticle::SetMother(int m) {
79 mother = m;
80 }
81
82 void TGenParticle::SetPDGId(int pdg_id) {
83 PDGID = pdg_id;
84 }