]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnPairDef.h
Minor upgrades to the cut and to the mini-event. Added a non-streamed temp data membe...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairDef.h
1 #ifndef ALIRSNPAIRDEF_H
2 #define ALIRSNPAIRDEF_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6  
7 ////////////////////////////////////////////////////////////////////////////////
8 //
9 //  Resonance decay tree definition.
10 //
11 ////////////////////////////////////////////////////////////////////////////////
12
13 #include "AliRsnDaughter.h"
14 #include "AliRsnDaughterDef.h"
15
16 class AliRsnPairDef : public TObject {
17 public:
18
19    AliRsnPairDef();
20    AliRsnPairDef(EPARTYPE type1, Char_t ch1, EPARTYPE type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
21    AliRsnPairDef(AliRsnDaughter::ESpecies type1, Char_t ch1, AliRsnDaughter::ESpecies type2, Char_t ch2, Int_t motherPDG = 0, Double_t motherMass = 0.0);
22    AliRsnPairDef(const AliRsnPairDef &copy);
23    const AliRsnPairDef& operator= (const AliRsnPairDef &copy);
24    virtual ~AliRsnPairDef() { }
25
26    virtual const char*      GetName()       const {return Form("%s_%s", fDef1.GetName(), fDef2.GetName());}
27    Int_t                    GetMotherPDG()  const {return fMotherPDG;}
28    Double_t                 GetMotherMass() const {return fMotherMass;}
29    AliRsnDaughterDef&       GetDef1()             {return fDef1;}
30    AliRsnDaughterDef&       GetDef2()             {return fDef2;}
31    AliRsnDaughterDef&       GetDef(Int_t i)       {if (i<1) return GetDef1(); else return GetDef2();}
32
33    void SetMotherPDG(Int_t pdg)                 {fMotherPDG = pdg;}
34    void SetMotherMass(Double_t mass)            {fMotherMass = mass;}
35    void SetDef1(const AliRsnDaughterDef *def)   {if (def) fDef1 = (*def);}
36    void SetDef2(const AliRsnDaughterDef *def)   {if (def) fDef2 = (*def);}
37    void SetDef(Int_t i, const AliRsnDaughterDef *def) {if (!def) return; if (i<1) fDef1 = (*def); else fDef2 = (*def);}
38
39    Bool_t IsLikeSign()  const {return (fDef1.GetChargeC() == fDef2.GetChargeC());}
40    Bool_t HasEqualPID() const {return (fDef1.GetPID() == fDef2.GetPID());}
41
42 private:
43
44    Double_t          fMotherMass;  // nominal mass of true mother
45    Int_t             fMotherPDG;   // PDG code of true mother (if known)
46    AliRsnDaughterDef fDef1;        // definitions for daughter #1 (see class)
47    AliRsnDaughterDef fDef2;        // definitions for daughter #2 (see class)
48
49    // ROOT dictionary
50    ClassDef(AliRsnPairDef, 1)
51 };
52
53 #endif