ROOT logo
#ifndef ALIRSNPAIRDEF_H
#define ALIRSNPAIRDEF_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

////////////////////////////////////////////////////////////////////////////////
//
//  Resonance decay tree definition.
//
////////////////////////////////////////////////////////////////////////////////

#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 &copy);
   AliRsnPairDef &operator= (const AliRsnPairDef &copy);
   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;  // nominal mass of true mother
   Int_t             fMotherPDG;   // PDG code of true mother (if known)
   AliRsnDaughterDef fDef1;        // definitions for daughter #1 (see class)
   AliRsnDaughterDef fDef2;        // definitions for daughter #2 (see class)

   // ROOT dictionary
   ClassDef(AliRsnPairDef, 1)
};

#endif
 AliRsnPairDef.h:1
 AliRsnPairDef.h:2
 AliRsnPairDef.h:3
 AliRsnPairDef.h:4
 AliRsnPairDef.h:5
 AliRsnPairDef.h:6
 AliRsnPairDef.h:7
 AliRsnPairDef.h:8
 AliRsnPairDef.h:9
 AliRsnPairDef.h:10
 AliRsnPairDef.h:11
 AliRsnPairDef.h:12
 AliRsnPairDef.h:13
 AliRsnPairDef.h:14
 AliRsnPairDef.h:15
 AliRsnPairDef.h:16
 AliRsnPairDef.h:17
 AliRsnPairDef.h:18
 AliRsnPairDef.h:19
 AliRsnPairDef.h:20
 AliRsnPairDef.h:21
 AliRsnPairDef.h:22
 AliRsnPairDef.h:23
 AliRsnPairDef.h:24
 AliRsnPairDef.h:25
 AliRsnPairDef.h:26
 AliRsnPairDef.h:27
 AliRsnPairDef.h:28
 AliRsnPairDef.h:29
 AliRsnPairDef.h:30
 AliRsnPairDef.h:31
 AliRsnPairDef.h:32
 AliRsnPairDef.h:33
 AliRsnPairDef.h:34
 AliRsnPairDef.h:35
 AliRsnPairDef.h:36
 AliRsnPairDef.h:37
 AliRsnPairDef.h:38
 AliRsnPairDef.h:39
 AliRsnPairDef.h:40
 AliRsnPairDef.h:41
 AliRsnPairDef.h:42
 AliRsnPairDef.h:43
 AliRsnPairDef.h:44
 AliRsnPairDef.h:45
 AliRsnPairDef.h:46
 AliRsnPairDef.h:47
 AliRsnPairDef.h:48
 AliRsnPairDef.h:49
 AliRsnPairDef.h:50
 AliRsnPairDef.h:51
 AliRsnPairDef.h:52
 AliRsnPairDef.h:53