ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMCParticle.h
Revision: 1.1
Committed: Wed Dec 17 16:36:44 2008 UTC (16 years, 4 months ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: pat_2_2_5_01, pat_2_1_12_02
Log Message:
Add reference (TRef) to mcParticle

File Contents

# User Rev Content
1 lethuill 1.1 #ifndef TRootMCParticle_h
2     #define TRootMCParticle_h
3    
4     #include <string>
5     #include <iostream>
6    
7     #include "../interface/TRootParticle.h"
8    
9     using namespace std;
10    
11     class TRootMCParticle : public TRootParticle
12     {
13    
14     public:
15    
16     TRootMCParticle() :
17     TRootParticle()
18     ,status_(0)
19     ,nDau_(0)
20     ,motherType_(0)
21     ,grannyType_(0)
22     ,dauOneId_(0)
23     ,dauTwoId_(0)
24     ,dauThreeId_(0)
25     ,dauFourId_(0)
26     ,indexInList_(-1)
27     {;}
28    
29     TRootMCParticle(const TRootMCParticle& particle) :
30     TRootParticle(particle)
31     ,status_(particle.status_)
32     ,nDau_(particle.nDau_)
33     ,motherType_(particle.motherType_)
34     ,grannyType_(particle.grannyType_)
35     ,dauOneId_(particle.dauOneId_)
36     ,dauTwoId_(particle.dauTwoId_)
37     ,dauThreeId_(particle.dauThreeId_)
38     ,dauFourId_(particle.dauFourId_)
39     ,indexInList_(particle.indexInList_)
40     {;}
41    
42     TRootMCParticle(Double_t px, Double_t py, Double_t pz, Double_t e) :
43     TRootParticle(px,py,pz,e)
44     ,status_(0)
45     ,nDau_(0)
46     ,motherType_(0)
47     ,grannyType_(0)
48     ,dauOneId_(0)
49     ,dauTwoId_(0)
50     ,dauThreeId_(0)
51     ,dauFourId_(0)
52     ,indexInList_(-1)
53     {;}
54    
55     TRootMCParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) :
56     TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z)
57     ,status_(0)
58     ,nDau_(0)
59     ,motherType_(0)
60     ,grannyType_(0)
61     ,dauOneId_(0)
62     ,dauTwoId_(0)
63     ,dauThreeId_(0)
64     ,dauFourId_(0)
65     ,indexInList_(-1)
66     {;}
67    
68     TRootMCParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z,Int_t type, Float_t charge) :
69     TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z,type,charge)
70     ,status_(0)
71     ,nDau_(0)
72     ,motherType_(0)
73     ,grannyType_(0)
74     ,dauOneId_(0)
75     ,dauTwoId_(0)
76     ,dauThreeId_(0)
77     ,dauFourId_(0)
78     ,indexInList_(-1)
79     {;}
80    
81     TRootMCParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z,Int_t type, Float_t charge, Int_t status, Int_t nDau, Int_t motherType, Int_t grannyType, Int_t dauOneId, Int_t dauTwoId, Int_t dauThreeId, Int_t dauFourId, Int_t indexInList) :
82     TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z,type,charge)
83     ,status_(status)
84     ,nDau_(nDau)
85     ,motherType_(motherType)
86     ,grannyType_(grannyType)
87     ,dauOneId_(dauOneId)
88     ,dauTwoId_(dauTwoId)
89     ,dauThreeId_(dauThreeId)
90     ,dauFourId_(dauFourId)
91     ,indexInList_(indexInList)
92     {;}
93    
94     TRootMCParticle(const TLorentzVector &momentum) :
95     TRootParticle(momentum)
96     ,status_(0)
97     ,nDau_(0)
98     ,motherType_(0)
99     ,grannyType_(0)
100     ,dauOneId_(0)
101     ,dauTwoId_(0)
102     ,dauThreeId_(0)
103     ,dauFourId_(0)
104     ,indexInList_(-1)
105     {;}
106    
107     TRootMCParticle(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
108     TRootParticle(momentum, vertex, type, charge)
109     ,status_(0)
110     ,nDau_(0)
111     ,motherType_(0)
112     ,grannyType_(0)
113     ,dauOneId_(0)
114     ,dauTwoId_(0)
115     ,dauThreeId_(0)
116     ,dauFourId_(0)
117     ,indexInList_(-1)
118     {;}
119    
120     TRootMCParticle(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge, Int_t status, Int_t nDau, Int_t motherType, Int_t grannyType, Int_t dauOneId, Int_t dauTwoId, Int_t dauThreeId, Int_t dauFourId, Int_t indexInList) :
121     TRootParticle(momentum, vertex, type, charge)
122     ,status_(status)
123     ,nDau_(nDau)
124     ,motherType_(motherType)
125     ,grannyType_(grannyType)
126     ,dauOneId_(dauOneId)
127     ,dauTwoId_(dauTwoId)
128     ,dauThreeId_(dauThreeId)
129     ,dauFourId_(dauFourId)
130     ,indexInList_(indexInList)
131     {;}
132    
133     ~TRootMCParticle() {;}
134    
135    
136     Int_t status() const {return status_; }
137     Int_t nDau() const {return nDau_; }
138     Int_t motherType() const {return motherType_; }
139     Int_t grannyType() const {return grannyType_; }
140     Int_t dauOneId() const {return dauOneId_;}
141     Int_t dauTwoId() const {return dauTwoId_;}
142     Int_t dauThreeId() const {return dauThreeId_;}
143     Int_t dauFourId() const {return dauFourId_;}
144     Int_t indexInList() const {return indexInList_; }
145     virtual TString typeName() const { return "TRootMCParticle"; }
146    
147    
148     void setStatus(Int_t status) { status_ = status; }
149     void setnDau(Int_t nDau) { nDau_ = nDau; }
150     void setMotherType(Int_t motherType) { motherType_ = motherType; }
151     void setGrannyType(Int_t grannyType) { grannyType_ = grannyType; }
152     void setDauOneId (Int_t dauOneId) { dauOneId_ = dauOneId; }
153     void setDauTwoId (Int_t dauTwoId) { dauTwoId_ = dauTwoId; }
154     void setDauThreeId (Int_t dauThreeId) { dauThreeId_ = dauThreeId; }
155     void setDauFourId (Int_t dauFourId) { dauFourId_ = dauFourId; }
156     void setIndexInList(Int_t indexInList) {indexInList_ = indexInList; }
157    
158    
159     friend std::ostream& operator<< (std::ostream& stream, const TRootMCParticle& part) {
160     stream << "Type=" << part.type_ << " Charge=" << part.charge_ << " Status=" << part.status_ << " number of daughters=" <<
161     part.nDau_ << " mother ID=" << part.motherType_ << " granny ID=" << part.grannyType_ << " index in the MC list=" << part.indexInList_ << " (Et,eta,phi)=("<< part.Et() <<","<< part.Eta() <<","<< part.Phi() << ")"
162     << " vertex(x,y,z)=("<< part.vx() <<","<< part.vy() <<","<< part.vz() << ")";
163     return stream;
164     };
165    
166    
167     protected:
168    
169     Int_t status_;
170     Int_t nDau_;
171     Int_t motherType_;
172     Int_t grannyType_;
173     Int_t dauOneId_;
174     Int_t dauTwoId_;
175     Int_t dauThreeId_;
176     Int_t dauFourId_;
177     Int_t indexInList_;
178    
179     ClassDef (TRootMCParticle,1);
180     };
181    
182     #endif