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
28 class AliRsnDaughterCut;
30 class AliRsnAnalysis : public TObject
35 AliRsnAnalysis(const AliRsnAnalysis ©) : TObject(copy) { }
36 AliRsnAnalysis& operator=(const AliRsnAnalysis & /*copy*/) { return (*this); }
37 virtual ~AliRsnAnalysis() {Clear();}
39 void AddCutPair(AliRsnDaughterCut *cut);
40 void AddCutSingle(AliPID::EParticleType type, AliRsnDaughterCut *cut);
41 void AddMixPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2);
42 void AddPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Bool_t onlyTrue = kFALSE);
43 void Clear(Option_t *option = "");
44 Stat_t EventMix(Int_t nmix = 5, Int_t multDiffMax = 10, Double_t vzDiffMax = 0.01, Bool_t compareTotalMult = kFALSE);
46 void SetBins(Int_t nbins, Double_t min, Double_t max) {fNBins=nbins;fHistoMin=min;fHistoMax=max;}
47 void SetEventsTree(TTree *tree) {fEventsTree = tree;}
48 void SetRejectFakes(Bool_t doit=kTRUE) {fRejectFakes = doit;}
49 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
50 void WriteHistograms() const;
54 class AliPairDef : public TNamed
58 AliPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Int_t pdg, Bool_t onlyTrue = kFALSE);
60 virtual ~AliPairDef() { }
62 Char_t GetSign1() const {return fSign1;}
63 Char_t GetSign2() const {return fSign2;}
64 Bool_t GetOnlyTrue() const {return fOnlyTrue;}
65 AliPID::EParticleType GetParticle1() const {return fParticle1;}
66 AliPID::EParticleType GetParticle2() const {return fParticle2;}
67 Double_t GetMass1() const {return fMass1;}
68 Double_t GetMass2() const {return fMass2;}
70 void SetSign1(Char_t value) {fSign1 = value;}
71 void SetSign2(Char_t value) {fSign2 = value;}
72 void SetOnlyTrue(Bool_t value = kTRUE) {fOnlyTrue = value;}
73 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
74 void SetParticle1(AliPID::EParticleType p) {fParticle1 = p;}
75 void SetParticle2(AliPID::EParticleType p) {fParticle2 = p;}
77 Text_t* ParticleName(AliPID::EParticleType part) const;
81 Bool_t fOnlyTrue; // flag to be used for spectra of true pairs
82 Int_t fTrueMotherPDG; // PDG code of true mother (if requested)
84 Double_t fMass1; // info
85 Char_t fSign1; // about
86 AliPID::EParticleType fParticle1; // particle 1
88 Double_t fMass2; // info
89 Char_t fSign2; // about
90 AliPID::EParticleType fParticle2; // particle 2
93 Stat_t Compute(AliPairDef *pd, TH1D* &h, AliRsnEvent *ev1, AliRsnEvent *ev2);
94 Bool_t SingleCutCheck(Int_t itype, AliRsnDaughter *track) const;
95 Bool_t PairCutCheck(AliRsnDaughter *track1, AliRsnDaughter *track2) const;
97 Bool_t fRejectFakes; // reject particles labeled as fake
99 Int_t fNBins; // number of histogram bins
100 Double_t fHistoMin; // minimum of the histograms
101 Double_t fHistoMax; // maximum of the histograms
103 Int_t fTrueMotherPDG; // PDG code of true mother (used to create 'true' histos)
105 TObjArray *fMixPairDefs; // list of pair definitions for histograms (event mixing)
106 TObjArray *fMixHistograms; //! list of invmass histograms created (event mixing)
108 TObjArray *fPairDefs; // list of pair definitions for histograms
109 TObjArray *fHistograms; //! list of invmass histograms created
111 TObjArray *fCuts[AliPID::kSPECIES]; //! list of single particle cuts for each particle type
112 TObjArray *fPairCuts; //! list of pair cuts
113 TTree *fEventsTree; //! TTree of events (can not be created here, must be passed)
115 // Rsn analysis implementation
116 ClassDef(AliRsnAnalysis,1)