]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnPairDef.h
Package upgrade.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairDef.h
CommitLineData
06351446 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
5
6//-------------------------------------------------------------------------
7// Class AliRsnAnalysis
8// Reconstruction and analysis of K* Rsn
9// ........................................
10// ........................................
11// ........................................
12// ........................................
13//
14// author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
15//-------------------------------------------------------------------------
16
17#ifndef ALIRSNPAIRDEF_H
18#define ALIRSNPAIRDEF_H
19
20class AliRsnDaughter;
21#include "AliRsnPID.h"
22
23class AliRsnPairDef : public TObject
24{
25public:
26
27 AliRsnPairDef();
28 AliRsnPairDef(Char_t sign1, AliRsnPID::EType type1, Char_t sign2, AliRsnPID::EType type2,
29 Int_t nbins, Double_t min, Double_t max);
30 AliRsnPairDef(const AliRsnPairDef &copy);
31 const AliRsnPairDef& operator=(const AliRsnPairDef &copy);
32 virtual ~AliRsnPairDef() { }
33
34 // getters
35 Char_t GetCharge(Int_t i) const {if (i>=0&&i<2) return fCharge[i]; else return 0;}
36 AliRsnPID::EType GetType(Int_t i) const {if (i>=0&&i<2) return fType[i]; else return AliRsnPID::kUnknown;}
37 Double_t GetMass(Int_t i) const {if (i>=0&&i<2) return fMass[i]; else return 0.0;}
38 Int_t GetNBins() const {return fNBins;}
39 Double_t GetMin() const {return fMin;}
40 Double_t GetMax() const {return fMax;}
41 Int_t GetMotherPDG() const {return fMotherPDG;}
42
43 // setters
44 Bool_t SetPairElement(Int_t i, Char_t charge, AliRsnPID::EType pid);
45 Bool_t SetPair(Char_t charge1, AliRsnPID::EType pid1, Char_t charge2, AliRsnPID::EType pid2);
46 void SetMotherPDG(Int_t pdg) {fMotherPDG = pdg;}
47 void SetNBins(Int_t value) {fNBins = value;}
48 void SetMin(Double_t value) {fMin = value; CheckEdges();}
49 void SetMax(Double_t value) {fMax = value; CheckEdges();}
50 void SetBins(Int_t nbins, Double_t min, Double_t max) {fNBins=nbins; fMin=min; fMax=max; CheckEdges();}
51
52 // pair information methods
53 Bool_t IsLikeSign() {return (fCharge[0] == fCharge[1]);}
54 Bool_t HasEqualTypes() {return (fType[0] == fType[1]);}
55
56 // working routines
57 void CheckEdges();
58 Double_t ComputeWeight(AliRsnDaughter *d0, AliRsnDaughter *d1);
59
60private:
61
62 // pair parameters
63 Int_t fMotherPDG; // PDG code of true mother (if known)
64 Double_t fMass[2]; // mass of particles
65 Char_t fCharge[2]; // charge of particles
66 AliRsnPID::EType fType[2]; // PID of particles
67
68 // histogram parameters
69 Int_t fNBins; // number of histogram bins
70 Double_t fMin; // lower edge
71 Double_t fMax; // upper edge
72
73 // ROOT dictionary
74 ClassDef(AliRsnPairDef, 1)
75};
76
77#endif