ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/PollackPrograms/src/TCGenParticle.cc
Revision: 1.1
Committed: Tue Jul 24 20:24:55 2012 UTC (12 years, 9 months ago) by bpollack
Content type: text/plain
Branch: MAIN
Log Message:
adding a cleaned-up analyzer for 2012

File Contents

# User Rev Content
1 bpollack 1.1 #include "TCGenParticle.h"
2     #include <iostream>
3    
4     TCGenParticle::TCGenParticle() {
5     }
6    
7     TCGenParticle::~TCGenParticle() {
8     }
9    
10     // "get" methods -------------------------------------
11    
12     TVector3 TCGenParticle::Position() const {
13     return _position;
14     }
15    
16     TVector2 TCGenParticle::P2() const {
17     TVector2 v2(this->Px(), this->Py());
18     return v2;
19     }
20    
21     int TCGenParticle::Charge() const{
22     return charge;
23     }
24    
25     int TCGenParticle::GetStatus(){
26     return _status;
27     }
28    
29     int TCGenParticle::Mother() {
30     return mother;
31     }
32    
33     int TCGenParticle::Grandmother() {
34     return grandmother;
35     }
36    
37     int TCGenParticle::GetPDGId() {
38     return PDGID;
39     }
40    
41     //std::vector<int> TCGenParticle::GetDaughters() {
42     // return daughters;
43     //}
44    
45     // "set" methods ---------------------------------------------
46    
47     void TCGenParticle::SetPosition(float x, float y, float z) {
48     TVector3 p(x, y, z);
49     _position = p;
50     }
51    
52     void TCGenParticle::SetCharge(int c) {
53     charge = c;
54     }
55    
56     void TCGenParticle::SetStatus(int status){
57     _status = status;
58     }
59     //void TCGenParticle::AddDaughter(int d) {
60     // daughters.push_back(d);
61     //}
62    
63     void TCGenParticle::SetMother(int m) {
64     mother = m;
65     }
66    
67     void TCGenParticle::SetGrandmother(int g) {
68     grandmother = g;
69     }
70    
71     void TCGenParticle::SetPDGId(int pdg_id) {
72     PDGID = pdg_id;
73     }