]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnPairDef.h
coverity
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairDef.h
CommitLineData
06351446 1#ifndef ALIRSNPAIRDEF_H
2#define ALIRSNPAIRDEF_H
3
7356f978 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
2dab9030 13#include "AliRsnDaughter.h"
11ed73f6 14#include "AliRsnDaughterDef.h"
06351446 15
2a1c7696 16class AliRsnPairDef : public TObject {
17public:
06351446 18
2a1c7696 19 AliRsnPairDef();
c865cb1d 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);
2a1c7696 22 AliRsnPairDef(const AliRsnPairDef &copy);
23 const AliRsnPairDef& operator= (const AliRsnPairDef &copy);
24 virtual ~AliRsnPairDef() { }
06351446 25
c865cb1d 26 virtual const char* GetName() const {return Form("%s_%s", fDef1.GetName(), fDef2.GetName());}
2a1c7696 27 Int_t GetMotherPDG() const {return fMotherPDG;}
28 Double_t GetMotherMass() const {return fMotherMass;}
c865cb1d 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(AliRsnDaughterDef *def) {if (def) fDef1 = (*def);}
36 void SetDef2(AliRsnDaughterDef *def) {if (def) fDef2 = (*def);}
37 void SetDef(Int_t i, 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());}
06351446 41
2a1c7696 42private:
06351446 43
11ed73f6 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)
2a1c7696 48
49 // ROOT dictionary
50 ClassDef(AliRsnPairDef, 1)
06351446 51};
52
53#endif