]>
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" |
06351446 | 17 | |
e2bafbbc | 18 | class AliRsnDaughter; |
19 | ||
2a1c7696 | 20 | class AliRsnPairDef : public TObject { |
21 | public: | |
06351446 | 22 | |
2a1c7696 | 23 | AliRsnPairDef(); |
24 | AliRsnPairDef(AliPID::EParticleType type1, Char_t sign1, AliPID::EParticleType type2, Char_t sign2, Int_t motherPDG = 0, Double_t motherMass = 0.0); | |
25 | AliRsnPairDef(const AliRsnPairDef ©); | |
26 | const AliRsnPairDef& operator= (const AliRsnPairDef ©); | |
27 | virtual ~AliRsnPairDef() { } | |
06351446 | 28 | |
2a1c7696 | 29 | // getters |
30 | Int_t GetMotherPDG() const {return fMotherPDG;} | |
31 | Double_t GetMotherMass() const {return fMotherMass;} | |
32 | Double_t GetMass(Int_t i) const {if (i >= 0 && i < 2) return fMass[i]; else return 0.0;} | |
33 | Char_t GetCharge(Int_t i) const {if (i >= 0 && i < 2) return fCharge[i]; else return 0;} | |
34 | Short_t GetChargeShort(Int_t i) const {if (GetCharge(i) == '+') return 1; else if (GetCharge(i) == '-') return -1; else return 0;} | |
35 | AliPID::EParticleType GetPID(Int_t i) const {if (i >= 0 && i < 2) return fPID[i]; else return AliPID::kUnknown;} | |
36 | AliRsnDaughter::ERefType GetDaughterType(Int_t i) {if (i >= 0 && i < 2) return fDaughterType[i]; else return AliRsnDaughter::kNoType;} | |
37 | const char* GetPairName() const; | |
06351446 | 38 | |
2a1c7696 | 39 | // setters |
40 | void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;} | |
41 | void SetMotherMass(Double_t mass) {fMotherMass = mass;} | |
42 | Bool_t SetDaughter(Int_t i, AliPID::EParticleType pid, Char_t charge = 0); | |
43 | Bool_t SetDaughters(AliPID::EParticleType type1, Char_t sign1, AliPID::EParticleType type2, Char_t sign2); | |
06351446 | 44 | |
2a1c7696 | 45 | // pair information methods |
46 | Bool_t IsLikeSign() const {return (fCharge[0] == fCharge[1]);} | |
47 | Bool_t HasEqualPID() const {return (fPID[0] == fPID[1]);} | |
06351446 | 48 | |
2a1c7696 | 49 | private: |
06351446 | 50 | |
2a1c7696 | 51 | // pair parameters |
52 | Double_t fMotherMass; // nominal mass of true mother | |
53 | Int_t fMotherPDG; // PDG code of true mother (if known) | |
06351446 | 54 | |
2a1c7696 | 55 | Double_t fMass[2]; // mass of particles |
56 | Char_t fCharge[2]; // charge of particles | |
57 | AliPID::EParticleType fPID[2]; // PID of particles | |
58 | AliRsnDaughter::ERefType fDaughterType[2]; // object type (track/V0) | |
59 | ||
60 | // ROOT dictionary | |
61 | ClassDef(AliRsnPairDef, 1) | |
06351446 | 62 | }; |
63 | ||
64 | #endif |