#ifndef ALIRSNPAIRDEF_H
#define ALIRSNPAIRDEF_H
#include "AliRsnDaughter.h"
#include "AliRsnDaughterDef.h"
class AliRsnPairDef : public TObject {
public:
AliRsnPairDef();
AliRsnPairDef(EPARTYPE type1, Char_t ch1, EPARTYPE type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
AliRsnPairDef(AliRsnDaughter::ESpecies type1, Char_t ch1, AliRsnDaughter::ESpecies type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
AliRsnPairDef(const AliRsnPairDef ©);
AliRsnPairDef &operator= (const AliRsnPairDef ©);
virtual ~AliRsnPairDef() { }
virtual const char *GetName() const {return Form("%s_%s", fDef1.GetName(), fDef2.GetName());}
Int_t GetMotherPDG() const {return fMotherPDG;}
Double_t GetMotherMass() const {return fMotherMass;}
AliRsnDaughterDef &GetDef1() {return fDef1;}
AliRsnDaughterDef &GetDef2() {return fDef2;}
AliRsnDaughterDef &GetDef(Int_t i) {if (i<1) return GetDef1(); else return GetDef2();}
void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;}
void SetMotherMass(Double_t mass) {fMotherMass = mass;}
void SetDef1(const AliRsnDaughterDef *def) {if (def) fDef1 = (*def);}
void SetDef2(const AliRsnDaughterDef *def) {if (def) fDef2 = (*def);}
void SetDef(Int_t i, const AliRsnDaughterDef *def) {if (!def) return; if (i<1) fDef1 = (*def); else fDef2 = (*def);}
Bool_t IsLikeSign() const {return (fDef1.GetChargeC() == fDef2.GetChargeC());}
Bool_t HasEqualPID() const {return (fDef1.GetPID() == fDef2.GetPID());}
private:
Double_t fMotherMass;
Int_t fMotherPDG;
AliRsnDaughterDef fDef1;
AliRsnDaughterDef fDef2;
ClassDef(AliRsnPairDef, 1)
};
#endif