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
9 // author: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
12 #ifndef ALIRSNPAIRDEF_H
13 #define ALIRSNPAIRDEF_H
16 #include "AliRsnDaughter.h"
17 #include "AliRsnDaughterDef.h"
21 class AliRsnPairDef : public TObject {
25 AliRsnPairDef(EPARTYPE type1, Char_t sign1, EPARTYPE type2, Char_t sign2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
26 AliRsnPairDef(const AliRsnPairDef ©);
27 const AliRsnPairDef& operator= (const AliRsnPairDef ©);
28 virtual ~AliRsnPairDef() { }
31 Int_t GetMotherPDG() const {return fMotherPDG;}
32 Double_t GetMotherMass() const {return fMotherMass;}
33 const char* GetPairName() const;
34 virtual const char* GetName() const {return GetPairName();}
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();}
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();}
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();}
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));}
65 Bool_t IsLikeSign() const {return (GetCharge1() == GetCharge2());}
66 Bool_t HasEqualPID() const {return (GetPID1() == GetPID2());}
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)
76 ClassDef(AliRsnPairDef, 1)