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
10 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
11 //-------------------------------------------------------------------------
13 #ifndef AliRsnANALYSIS_H
14 #define AliRsnANALYSIS_H
24 class AliRsnDaughterCut;
26 class AliRsnAnalysis : public TObject
31 virtual ~AliRsnAnalysis() {Clear();}
33 void AddCutPair(AliRsnDaughterCut *cut);
34 void AddCutSingle(AliPID::EParticleType type, AliRsnDaughterCut *cut);
35 void AddMixPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2);
36 void AddPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Bool_t onlyTrue = kFALSE);
37 void Clear(Option_t *option = "");
38 Stat_t EventMix(Int_t nmix = 5, Int_t multDiffMax = 10, Double_t vzDiffMax = 0.01, Bool_t compareTotalMult = kFALSE);
40 void SetBins(Int_t nbins, Double_t min, Double_t max) {fNBins=nbins;fHistoMin=min;fHistoMax=max;}
41 void SetEventsTree(TTree *tree) {fEventsTree = tree;}
42 void SetRejectFakes(Bool_t doit=kTRUE) {fRejectFakes = doit;}
43 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
44 void WriteHistograms();
48 class AliPairDef : public TNamed
52 AliPairDef(AliPID::EParticleType p1, Char_t s1, AliPID::EParticleType p2, Char_t s2, Int_t pdg, Bool_t onlyTrue = kFALSE);
54 virtual ~AliPairDef() { }
56 Char_t GetSign1() {return fSign1;}
57 Char_t GetSign2() {return fSign2;}
58 Bool_t GetOnlyTrue() {return fOnlyTrue;}
59 AliPID::EParticleType GetParticle1() {return fParticle1;}
60 AliPID::EParticleType GetParticle2() {return fParticle2;}
61 Double_t GetMass1() {return fMass1;}
62 Double_t GetMass2() {return fMass2;}
64 void SetSign1(Char_t value) {fSign1 = value;}
65 void SetSign2(Char_t value) {fSign2 = value;}
66 void SetOnlyTrue(Bool_t value = kTRUE) {fOnlyTrue = value;}
67 void SetTrueMotherPDG(Int_t pdg) {fTrueMotherPDG = pdg;}
68 void SetParticle1(AliPID::EParticleType p) {fParticle1 = p;}
69 void SetParticle2(AliPID::EParticleType p) {fParticle2 = p;}
71 Text_t* ParticleName(AliPID::EParticleType part);
75 Bool_t fOnlyTrue; // flag to be used for spectra of true pairs
76 Int_t fTrueMotherPDG; // PDG code of true mother (if requested)
79 Char_t fSign1; // info about particle 1
80 AliPID::EParticleType fParticle1; //
83 Char_t fSign2; // info about particle 2
84 AliPID::EParticleType fParticle2; //
87 Stat_t Compute(AliPairDef *pd, TH1D* &h, AliRsnEvent *ev1, AliRsnEvent *ev2);
88 Bool_t SingleCutCheck(Int_t itype, AliRsnDaughter *track);
89 Bool_t PairCutCheck(AliRsnDaughter *track1, AliRsnDaughter *track2);
91 Bool_t fRejectFakes; // reject particles labeled as fake
93 Int_t fNBins; // number of histogram bins
94 Double_t fHistoMin; // minimum of the histograms
95 Double_t fHistoMax; // maximum of the histograms
97 Int_t fTrueMotherPDG; // PDG code of true mother (used to create 'true' histos)
99 TObjArray *fMixPairDefs; // list of pair definitions for histograms (event mixing)
100 TObjArray *fMixHistograms; //! list of invmass histograms created (event mixing)
102 TObjArray *fPairDefs; // list of pair definitions for histograms
103 TObjArray *fHistograms; //! list of invmass histograms created
105 TObjArray *fCuts[AliPID::kSPECIES]; //! list of single particle cuts for each particle type
106 TObjArray *fPairCuts; //! list of pair cuts
107 TTree *fEventsTree; //! TTree of events (can not be created here, must be passed)
109 // Rsn analysis implementation
110 ClassDef(AliRsnAnalysis,1)