1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
6 //-------------------------------------------------------------------------
7 // Class AliRsnAnalysis
8 // Reconstruction and analysis of K* Rsn
9 // ........................................
10 // ........................................
11 // ........................................
12 // ........................................
14 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
15 //-------------------------------------------------------------------------
17 #ifndef AliRsnANALYSIS_H
18 #define AliRsnANALYSIS_H
29 class AliRsnDaughterCut;
31 class AliRsnAnalysis : public TObject
36 AliRsnAnalysis(const AliRsnAnalysis ©);
37 AliRsnAnalysis& operator=(const AliRsnAnalysis & /*copy*/) { return (*this); }
38 virtual ~AliRsnAnalysis() {Clear();}
40 void AddCutPair(AliRsnDaughterCutPair *cut);
41 void AddCutSingle(AliPID::EParticleType type, AliRsnDaughterCut *cut);
42 void AddMixPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2);
43 void AddPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Bool_t onlyTrue = kFALSE);
44 void Clear(Option_t *option = "");
45 Stat_t EventMix(Int_t nmix = 5, Int_t multDiffMax = 10, Double_t vzDiffMax = 0.01, Bool_t compareTotalMult = kFALSE);
47 void SetBins(Int_t nbins, Double_t min, Double_t max) {fNBins=nbins;fHistoMin=min;fHistoMax=max;}
48 void SetEventsTree(TTree *tree) {fEventsTree = tree;}
49 void SetRejectFakes(Bool_t doit=kTRUE) {fRejectFakes = doit;}
50 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
51 void WriteHistograms() const;
55 class AliPairDef : public TNamed
59 AliPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Int_t pdg, Bool_t onlyTrue = kFALSE);
61 virtual ~AliPairDef() { }
63 Char_t GetSign1() const {return fSign1;}
64 Char_t GetSign2() const {return fSign2;}
65 Bool_t GetOnlyTrue() const {return fOnlyTrue;}
66 AliPID::EParticleType GetParticle1() const {return fParticle1;}
67 AliPID::EParticleType GetParticle2() const {return fParticle2;}
68 Double_t GetMass1() const {return fMass1;}
69 Double_t GetMass2() const {return fMass2;}
71 void SetSign1(Char_t value) {fSign1 = value;}
72 void SetSign2(Char_t value) {fSign2 = value;}
73 void SetOnlyTrue(Bool_t value = kTRUE) {fOnlyTrue = value;}
74 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
75 void SetParticle1(AliPID::EParticleType p) {fParticle1 = p;}
76 void SetParticle2(AliPID::EParticleType p) {fParticle2 = p;}
78 Text_t* ParticleName(AliPID::EParticleType part) const;
82 Bool_t fOnlyTrue; // flag to be used for spectra of true pairs
83 Int_t fTrueMotherPDG; // PDG code of true mother (if requested)
85 Double_t fMass1; // info
86 Char_t fSign1; // about
87 AliPID::EParticleType fParticle1; // particle 1
89 Double_t fMass2; // info
90 Char_t fSign2; // about
91 AliPID::EParticleType fParticle2; // particle 2
94 Stat_t Compute(AliPairDef *pd, TH1D* &h, AliRsnEvent *ev1, AliRsnEvent *ev2);
95 Bool_t SingleCutCheck(Int_t itype, AliRsnDaughter *track) const;
96 Bool_t PairCutCheck(AliRsnDaughter *track1, AliRsnDaughter *track2) const;
98 Bool_t fRejectFakes; // reject particles labeled as fake
100 Int_t fNBins; // number of histogram bins
101 Double_t fHistoMin; // minimum of the histograms
102 Double_t fHistoMax; // maximum of the histograms
104 Int_t fTrueMotherPDG; // PDG code of true mother (used to create 'true' histos)
106 TObjArray *fMixPairDefs; // list of pair definitions for histograms (event mixing)
107 TObjArray *fMixHistograms; //! list of invmass histograms created (event mixing)
109 TObjArray *fPairDefs; // list of pair definitions for histograms
110 TObjArray *fHistograms; //! list of invmass histograms created
112 TObjArray *fCuts[AliPID::kSPECIES]; //! list of single particle cuts for each particle type
113 TObjArray *fPairCuts; //! list of pair cuts
114 TTree *fEventsTree; //! TTree of events (can not be created here, must be passed)
116 // Rsn analysis implementation
117 ClassDef(AliRsnAnalysis,1)