3 |
|
// |
4 |
|
// GenericParticle |
5 |
|
// |
6 |
< |
// General GenericParticle class. It provides an abstract interface to kinematical quantities |
7 |
< |
// computed by derived classes. |
6 |
> |
// General particle class to be filled and used at analysis time. |
7 |
> |
// It provides an abstract interface to kinematical quantities computed by derived classes. |
8 |
|
// |
9 |
< |
// Authors: C.Loizides |
9 |
> |
// Authors: G.Ceballos, C.Loizides |
10 |
|
//-------------------------------------------------------------------------------------------------- |
11 |
|
|
12 |
|
#ifndef MITANA_DATATREE_GENERICPARTICLE_H |
21 |
|
{ |
22 |
|
public: |
23 |
|
GenericParticle(): fQ(0), fObjType(kGenericParticle) {} |
24 |
< |
GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t c) : |
25 |
< |
fMom(FourVector(px,py,pz,e)), fQ(c), fObjType(kGenericParticle) {} |
26 |
< |
GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e) : |
27 |
< |
fMom(FourVector(px,py,pz,e)), fQ(0), fObjType(kGenericParticle) {} |
28 |
< |
GenericParticle(FourVector &m, Double_t c) : fMom(m), fQ(c), fObjType(kGenericParticle) {} |
29 |
< |
GenericParticle(FourVector &m) : fMom(m), fQ(0), fObjType(kGenericParticle) {} |
24 |
> |
GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t c, |
25 |
> |
EObjType type=kGenericParticle) : |
26 |
> |
fMom(FourVector(px,py,pz,e)), fQ(c), fObjType(type) {} |
27 |
> |
GenericParticle(Double_t px, Double_t py, Double_t pz, Double_t e, |
28 |
> |
EObjType type=kGenericParticle) : |
29 |
> |
fMom(FourVector(px,py,pz,e)), fQ(0), fObjType(type) {} |
30 |
> |
GenericParticle(const FourVector &m, Double_t c, EObjType type=kGenericParticle) : |
31 |
> |
fMom(m), fQ(c), fObjType(type) {} |
32 |
> |
GenericParticle(const FourVectorM &m, Double_t c, EObjType type=kGenericParticle) : |
33 |
> |
fMom(m), fQ(c), fObjType(type) {} |
34 |
|
|
31 |
– |
EObjType ObjType() const { return fObjType; } |
35 |
|
void Print(Option_t *opt="") const; |
36 |
< |
|
36 |
> |
EObjType RecoObjType() const { return fObjType; } |
37 |
> |
void SetCharge(Double_t c) { fQ = c; ClearCharge(); } |
38 |
|
void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e); |
39 |
< |
void SetCharge(Double_t c) { fQ = c; } |
36 |
< |
void SetObjType(EObjType t) { fObjType = t; } |
39 |
> |
void SetRecoObjType(EObjType t) { fObjType = t; } |
40 |
|
|
41 |
|
protected: |
42 |
|
Double_t GetCharge() const { return fQ; } |
47 |
|
Double_t fQ; //charge value |
48 |
|
EObjType fObjType; //object type |
49 |
|
|
50 |
< |
ClassDef(GenericParticle, 1) // Generic GenericParticle class |
50 |
> |
ClassDef(GenericParticle, 1) // Generic particle class |
51 |
|
}; |
52 |
|
} |
53 |
|
|
57 |
|
// Set four vector. |
58 |
|
|
59 |
|
fMom.SetXYZT(px, py, pz, e); |
60 |
+ |
ClearMom(); |
61 |
|
} |
62 |
|
|
63 |
|
//-------------------------------------------------------------------------------------------------- |
64 |
|
inline void mithep::GenericParticle::GetMom() const |
65 |
|
{ |
66 |
< |
// Get momentum values |
66 |
> |
// Get momentum values. |
67 |
|
|
68 |
|
fCachedMom = fMom; |
69 |
|
} |