ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMCParticle.h
(Generate patch)

Comparing UserCode/Morgan/interface/TRootMCParticle.h (file contents):
Revision 1.2 by lethuill, Tue Apr 7 17:09:06 2009 UTC vs.
Revision 1.3 by lethuill, Wed Jun 10 11:17:05 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines