]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnPairDef.h
EMCAL Space Frame now included in geometry
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairDef.h
CommitLineData
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
06351446 15#include "AliRsnPID.h"
16
e2bafbbc 17class AliRsnDaughter;
18
06351446 19class AliRsnPairDef : public TObject
20{
21public:
22
23 AliRsnPairDef();
e2bafbbc 24 AliRsnPairDef(Char_t ch1, AliRsnPID::EType pid1,
25 Char_t ch2, AliRsnPID::EType pid2, Int_t motherPDG = 0);
06351446 26 AliRsnPairDef(const AliRsnPairDef &copy);
27 const AliRsnPairDef& operator=(const AliRsnPairDef &copy);
28 virtual ~AliRsnPairDef() { }
29
30 // getters
31 Char_t GetCharge(Int_t i) const {if (i>=0&&i<2) return fCharge[i]; else return 0;}
32 AliRsnPID::EType GetType(Int_t i) const {if (i>=0&&i<2) return fType[i]; else return AliRsnPID::kUnknown;}
33 Double_t GetMass(Int_t i) const {if (i>=0&&i<2) return fMass[i]; else return 0.0;}
06351446 34 Int_t GetMotherPDG() const {return fMotherPDG;}
35
36 // setters
37 Bool_t SetPairElement(Int_t i, Char_t charge, AliRsnPID::EType pid);
e2bafbbc 38 Bool_t SetPair(Char_t ch1, AliRsnPID::EType pid1, Char_t ch2, AliRsnPID::EType pid2);
06351446 39 void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;}
06351446 40
41 // pair information methods
42 Bool_t IsLikeSign() {return (fCharge[0] == fCharge[1]);}
43 Bool_t HasEqualTypes() {return (fType[0] == fType[1]);}
44
45 // working routines
06351446 46 Double_t ComputeWeight(AliRsnDaughter *d0, AliRsnDaughter *d1);
47
48private:
49
50 // pair parameters
51 Int_t fMotherPDG; // PDG code of true mother (if known)
52 Double_t fMass[2]; // mass of particles
53 Char_t fCharge[2]; // charge of particles
54 AliRsnPID::EType fType[2]; // PID of particles
55
06351446 56 // ROOT dictionary
57 ClassDef(AliRsnPairDef, 1)
58};
59
60#endif