]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnSelectorRL.h
make TPDDigitDump component functional
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnSelectorRL.h
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 AliRsnSelectorRL
8 // ------------------------
9 // Reader for conversion of ESD output into the internal format
10 // used for resonance study.
11 // ---
12 // author: A. Pulvirenti             (email: alberto.pulvirenti@ct.infn.it)
13 // ---
14 // adapted for TSelector compliance
15 // by    : R. Vernet                 (email: renaud.vernet@cern.ch)
16 //-------------------------------------------------------------------------
17
18 #ifndef ALIRSNSELECTORRL_H
19 #define ALIRSNSELECTORRL_H
20
21 #include "AliPID.h"
22 #include "AliSelectorRL.h"
23
24 class TH3D;
25 class TH1D;
26 class TOrdCollection;
27 class TTree;
28 class TBranch;
29 class AliRunLoader;
30
31 class AliRsnSelectorRL : public AliSelectorRL
32 {
33 public:
34
35         enum EPIDMethod {
36         kNoPID = 0,                  // no PID performed
37                 kPerfectPID = 1,             // use Kinematics to simulate a 100% PID efficiency
38                 kESDPID = 2,                 // use experimental ESD weights
39                 kPerfectPIDwithRecSign = 3   // get particle type from Kine and charge sign from reconstruction
40         };
41         
42                               AliRsnSelectorRL(TTree *tree = 0);
43                               AliRsnSelectorRL(const AliRsnSelectorRL& obj);
44         virtual              ~AliRsnSelectorRL();
45         AliRsnSelectorRL&     operator=(const AliRsnSelectorRL& obj);
46         
47         // TSelector-inherited member functions
48         virtual Int_t   Version() const {return 1;}
49         virtual void    Begin(TTree *tree) const;
50         virtual void    SlaveBegin(TTree *tree);
51         virtual void    Init(TTree *tree);
52         virtual Bool_t  Process(Long64_t entry);
53         virtual void    SetOption(const char *option) {fOption = option;}
54         virtual void    SetObject(TObject *obj) {fObject = obj;}
55         virtual void    SetInputList(TList *input) {fInput = input;}
56         virtual TList  *GetOutputList() const {return fOutput;}
57         virtual void    SlaveTerminate() ;
58         virtual void    Terminate();
59         
60         // Parameter/flag setting
61         void            SetDebugFlag(Bool_t flag)     {fDebugFlag=flag;}
62         void            SetOutputFile(char* file)     {fOutputPath=new TString(file);}
63         void            SetStoreKineInfo(Bool_t flag) {fStoreKineInfo=flag;}
64         void            SetCheckITSRefit(Bool_t b)    {fCheckITSRefit=b;}
65         void            SetRejectFakes(Bool_t b)      {fRejectFakes=b;}
66         void            SetCopyMomentum(Bool_t b)     {fCopyMomentum=b;}
67         
68         // Other
69         void            Clear(const Option_t *option = "");
70         Double_t*       GetPIDprobabilities(AliRsnDaughter track) const;
71         void            Identify(AliRsnDaughter &track);
72         void            SetMaxRadius(Double_t value) {fMaxRadius=value;}
73         void            SetPIDMethod(AliRsnSelectorRL::EPIDMethod pm) {fPIDMethod=pm;}
74         void            SetPriorProbabilities(Double_t *prior);
75         void            SetPriorProbability(AliPID::EParticleType type, Double_t p);
76         void            SetProbabilityThreshold(Double_t p) {fProbThreshold=p;}
77         void            SetPtLimit4PID(Double_t value) {fPtLimit4PID=value;}
78         
79  protected:
80  
81         // Parameters/flags
82         TString*      fOutputPath;       //! path where output tree will be stored
83         Bool_t        fDebugFlag;        //  flag for debug
84         Bool_t        fStoreKineInfo;    //  store MC information
85         Bool_t        fCheckITSRefit;    //  accept tracks only if flag AliESDtrack::kITSrefit
86         Bool_t        fRejectFakes;      //  reject fake tracks
87         Bool_t        fCopyMomentum;     //  store MC momentum instead of reconstructed momentum
88         
89         // Workaround for AliSelectorRL:
90         Bool_t        fIsRunLoaderOpen;  //  flag to check if run loader is open
91         
92         // IO tree
93         TTree*        fRsnEventTree;     //  output tree which should contain AliRsnEvents
94         AliRsnEvent*  fRsnEvent;         //  pointer on AliRsnEvent to store
95         TBranch*      fRsnEventBranch;   //  tree branch to store AliRsnEvents in
96         
97         // PID
98         EPIDMethod    fPIDMethod;                //  PID method
99         Double_t      fPrior[AliPID::kSPECIES];  //  prior probabilities (in case of REAL pid)
100         Double_t      fPtLimit4PID;              //  maximum transverse momentum to accept realistic PID
101         Double_t      fProbThreshold;            //  minimum required probability to accept realistic PID
102         Double_t      fMaxRadius;                //  maximum allowed distance from primary vertex
103         
104         // Functions
105         AliPID::EParticleType FindType(Int_t pdg);
106         
107         // Rsn event reader implementation
108         ClassDef(AliRsnSelectorRL,1)
109 };
110
111 #endif
112