]>
Commit | Line | Data |
---|---|---|
06351446 | 1 | // |
e2bafbbc | 2 | // Class AliRsnPairDef |
3 | // | |
4 | // Defines a decay channel for a resonance, | |
5 | // resulting in a specified PDG code for the mother, | |
6 | // and the particle type for the daughters, defined | |
7 | // according to the internal PID format of the package | |
8 | // | |
9 | // author: A. Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
10 | // | |
06351446 | 11 | |
12 | #ifndef ALIRSNPAIRDEF_H | |
13 | #define ALIRSNPAIRDEF_H | |
14 | ||
5eb970a4 | 15 | #include "AliPID.h" |
2dab9030 | 16 | #include "AliRsnDaughter.h" |
11ed73f6 | 17 | #include "AliRsnDaughterDef.h" |
06351446 | 18 | |
11ed73f6 | 19 | class AliRsnMother; |
e2bafbbc | 20 | |
2a1c7696 | 21 | class AliRsnPairDef : public TObject { |
22 | public: | |
06351446 | 23 | |
2a1c7696 | 24 | AliRsnPairDef(); |
11ed73f6 | 25 | AliRsnPairDef(EPARTYPE type1, Char_t sign1, EPARTYPE type2, Char_t sign2, Int_t motherPDG = 0, Double_t motherMass = 0.0); |
2a1c7696 | 26 | AliRsnPairDef(const AliRsnPairDef ©); |
27 | const AliRsnPairDef& operator= (const AliRsnPairDef ©); | |
28 | virtual ~AliRsnPairDef() { } | |
06351446 | 29 | |
2a1c7696 | 30 | // getters |
31 | Int_t GetMotherPDG() const {return fMotherPDG;} | |
32 | Double_t GetMotherMass() const {return fMotherMass;} | |
11ed73f6 | 33 | const char* GetPairName() const; |
99261e24 | 34 | virtual const char* GetName() const {return GetPairName();} |
11ed73f6 | 35 | |
36 | AliRsnDaughterDef* GetDef1() {return &fDef1;} | |
37 | Double_t GetMass1() const {return fDef1.GetMass();} | |
38 | Char_t GetCharge1() const {return fDef1.GetCharge();} | |
39 | Short_t GetChargeShort1() const {return fDef1.GetChargeShort();} | |
40 | AliPID::EParticleType GetPID1() const {return fDef1.GetPID();} | |
41 | AliRsnDaughter::ERefType GetDaughterType1() const {return fDef1.GetDaughterType();} | |
42 | ||
43 | AliRsnDaughterDef* GetDef2() {return &fDef2;} | |
44 | Double_t GetMass2() const {return fDef2.GetMass();} | |
45 | Char_t GetCharge2() const {return fDef2.GetCharge();} | |
46 | Short_t GetChargeShort2() const {return fDef2.GetChargeShort();} | |
47 | AliPID::EParticleType GetPID2() const {return fDef2.GetPID();} | |
48 | AliRsnDaughter::ERefType GetDaughterType2() const {return fDef2.GetDaughterType();} | |
49 | ||
50 | AliRsnDaughterDef* GetDef(Int_t i) {if (i<1) return GetDef1(); else return GetDef2();} | |
51 | Double_t GetMass(Int_t i) const {if (i<1) return GetMass1(); else return GetMass2();} | |
52 | Char_t GetCharge(Int_t i) const {if (i<1) return GetCharge1(); else return GetCharge2();} | |
53 | Short_t GetChargeShort(Int_t i) const {if (i<1) return GetChargeShort1(); else return GetChargeShort2();} | |
54 | AliPID::EParticleType GetPID(Int_t i) const {if (i<1) return GetPID1(); else return GetPID2();} | |
55 | AliRsnDaughter::ERefType GetDaughterType(Int_t i) const {if (i<1) return GetDaughterType1(); else return GetDaughterType2();} | |
06351446 | 56 | |
2a1c7696 | 57 | // setters |
11ed73f6 | 58 | void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;} |
59 | void SetMotherMass(Double_t mass) {fMotherMass = mass;} | |
60 | Bool_t SetDef1(AliPID::EParticleType pid, Char_t charge) {return fDef1.SetDaughter(pid, charge);} | |
61 | Bool_t SetDef2(AliPID::EParticleType pid, Char_t charge) {return fDef2.SetDaughter(pid, charge);} | |
62 | Bool_t SetDefs(AliPID::EParticleType pid1, Char_t ch1, AliPID::EParticleType pid2, Char_t ch2) {return (SetDef1(pid1, ch1) && SetDef2(pid2, ch2));} | |
06351446 | 63 | |
11ed73f6 | 64 | // checkers |
65 | Bool_t IsLikeSign() const {return (GetCharge1() == GetCharge2());} | |
66 | Bool_t HasEqualPID() const {return (GetPID1() == GetPID2());} | |
06351446 | 67 | |
2a1c7696 | 68 | private: |
06351446 | 69 | |
11ed73f6 | 70 | Double_t fMotherMass; // nominal mass of true mother |
71 | Int_t fMotherPDG; // PDG code of true mother (if known) | |
72 | AliRsnDaughterDef fDef1; // definitions for daughter #1 (see class) | |
73 | AliRsnDaughterDef fDef2; // definitions for daughter #2 (see class) | |
2a1c7696 | 74 | |
75 | // ROOT dictionary | |
76 | ClassDef(AliRsnPairDef, 1) | |
06351446 | 77 | }; |
78 | ||
79 | #endif |