1 |
#ifndef TRootParticle_h
|
2 |
#define TRootParticle_h
|
3 |
|
4 |
#include <string>
|
5 |
#include <iostream>
|
6 |
|
7 |
#include "Rtypes.h"
|
8 |
#include "TLorentzVector.h"
|
9 |
#include "TVector3.h"
|
10 |
#include "TRef.h"
|
11 |
|
12 |
using namespace std;
|
13 |
|
14 |
class TRootParticle : public TLorentzVector
|
15 |
{
|
16 |
|
17 |
public:
|
18 |
|
19 |
TRootParticle() : TLorentzVector(), vertex_(), type_(0), charge_(0.), status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
20 |
TRootParticle(const TRootParticle& particle) : TLorentzVector(particle), vertex_(particle.vertex_),type_(particle.type_), charge_(particle.charge_), status_(particle.status_),nDau_(particle.nDau_),motherType_(particle.motherType_),grannyType_(particle.grannyType_), dauOneId_(particle.dauOneId_), dauTwoId_(particle.dauTwoId_), dauThreeId_(particle.dauThreeId_), dauFourId_(particle.dauFourId_), indexInList_(particle.indexInList_) {;}
|
21 |
TRootParticle(Double_t px, Double_t py, Double_t pz, Double_t e) : TLorentzVector(px,py,pz,e), vertex_(), type_(0),charge_(0.), status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
22 |
TRootParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) : TLorentzVector(px,py,pz,e), vertex_(vtx_x,vtx_y,vtx_z), type_(0), charge_(0.),status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
23 |
TRootParticle(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) : TLorentzVector(px,py,pz,e),vertex_(vtx_x,vtx_y,vtx_z), type_(type), charge_(charge), status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
24 |
TRootParticle(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) : TLorentzVector(px,py,pz,e),vertex_(vtx_x,vtx_y,vtx_z), type_(type), charge_(charge), status_(status), nDau_(nDau), motherType_(motherType), grannyType_(grannyType), dauOneId_(dauOneId), dauTwoId_(dauTwoId), dauThreeId_(dauThreeId), dauFourId_(dauFourId), indexInList_(indexInList) {;}
|
25 |
TRootParticle(const TLorentzVector &momentum) : TLorentzVector(momentum), vertex_(), type_(0), charge_(0.), status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
26 |
TRootParticle(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) : TLorentzVector(momentum), vertex_(vertex), type_(type), charge_(charge), status_(0), nDau_(0), motherType_(0), grannyType_(0), dauOneId_(0), dauTwoId_(0), dauThreeId_(0), dauFourId_(0), indexInList_(-1) {;}
|
27 |
TRootParticle(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) : TLorentzVector(momentum), vertex_(vertex), type_(type), charge_(charge), status_(status), nDau_(nDau), motherType_(motherType), grannyType_(grannyType), dauOneId_(dauOneId), dauTwoId_(dauTwoId), dauThreeId_(dauThreeId), dauFourId_(dauFourId), indexInList_(indexInList) {;}
|
28 |
~TRootParticle() {;}
|
29 |
|
30 |
Double_t vx() const { return vertex_.x(); }
|
31 |
Double_t vy() const { return vertex_.y(); }
|
32 |
Double_t vz() const { return vertex_.z(); }
|
33 |
Int_t type() const { return type_; }
|
34 |
Float_t charge() const { return charge_; }
|
35 |
Int_t status() const {return status_; }
|
36 |
Int_t nDau() const {return nDau_; }
|
37 |
Int_t motherType() const {return motherType_; }
|
38 |
Int_t grannyType() const {return grannyType_; }
|
39 |
Int_t dauOneId() const {return dauOneId_;}
|
40 |
Int_t dauTwoId() const {return dauTwoId_;}
|
41 |
Int_t dauThreeId() const {return dauThreeId_;}
|
42 |
Int_t dauFourId() const {return dauFourId_;}
|
43 |
Int_t indexInList() const {return indexInList_; }
|
44 |
|
45 |
// FIXME setVx, setVy and setVz must modify the TLorentzVector ?
|
46 |
void setVx(Double_t vx) { vertex_.SetX(vx); }
|
47 |
void setVy(Double_t vy) { vertex_.SetY(vy); }
|
48 |
void setVz(Double_t vz) { vertex_.SetZ(vz); }
|
49 |
void setType(Int_t type) { type_ = type; }
|
50 |
void setCharge(Int_t charge) { charge_ = charge; }
|
51 |
void setStatus(Int_t status) { status_ = status; }
|
52 |
void setnDau(Int_t nDau) { nDau_ = nDau; }
|
53 |
void setMotherType(Int_t motherType) { motherType_ = motherType; }
|
54 |
void setGrannyType(Int_t grannyType) { grannyType_ = grannyType; }
|
55 |
void setIndexInList(Int_t indexInList) {indexInList_ = indexInList; }
|
56 |
|
57 |
friend std::ostream& operator<< (std::ostream& stream, const TRootParticle& part) {
|
58 |
stream << "Type=" << part.type_ << " Charge=" << part.charge_ << " Status=" << part.status_ << " number of daughters=" <<
|
59 |
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() << ")"
|
60 |
<< " vertex(x,y,z)=("<< part.vx() <<","<< part.vy() <<","<< part.vz() << ")";
|
61 |
return stream;
|
62 |
};
|
63 |
|
64 |
|
65 |
protected:
|
66 |
|
67 |
TVector3 vertex_;
|
68 |
Int_t type_;
|
69 |
Float_t charge_;
|
70 |
Int_t status_;
|
71 |
Int_t nDau_;
|
72 |
Int_t motherType_;
|
73 |
Int_t grannyType_;
|
74 |
Int_t dauOneId_;
|
75 |
Int_t dauTwoId_;
|
76 |
Int_t dauThreeId_;
|
77 |
Int_t dauFourId_;
|
78 |
Int_t indexInList_;
|
79 |
|
80 |
ClassDef (TRootParticle,1);
|
81 |
};
|
82 |
|
83 |
#endif
|
84 |
|
85 |
|