]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnSelectorRL.h
Simple Test macro to check conversion of survey data to AlignObj
[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&);
44         virtual              ~AliRsnSelectorRL();
45         AliRsnSelectorRL&     operator=(const AliRsnSelectorRL&);
46         
47         // TSelector-inherited member functions
48         virtual Int_t   Version() const {return 1;}
49         virtual void    Begin(TTree *tree);
50         virtual void    SlaveBegin(TTree *tree);
51         virtual void    Init(TTree *tree);
52 //      virtual Bool_t  Notify();
53         virtual Bool_t  Process(Long64_t entry);
54         virtual void    SetOption(const char *option) {fOption = option;}
55         virtual void    SetObject(TObject *obj) {fObject = obj;}
56         virtual void    SetInputList(TList *input) {fInput = input;}
57         virtual TList  *GetOutputList() const {return fOutput;}
58         virtual void    SlaveTerminate();
59         virtual void    Terminate();
60         
61         // Parameter/flag setting
62         void            SetDebugFlag(Bool_t flag)     {fDebugFlag=flag;}
63         void            SetOutputFile(char* file)     {fOutputPath=new TString(file);}
64         void            SetStoreKineInfo(Bool_t flag) {fStoreKineInfo=flag;}
65         void            SetCheckITSRefit(Bool_t b)    {fCheckITSRefit=b;}
66         void            SetRejectFakes(Bool_t b)      {fRejectFakes=b;}
67         void            SetCopyMomentum(Bool_t b)     {fCopyMomentum=b;}
68         
69         // Other
70         void            Clear(const Option_t *option = "");
71         Double_t*       GetPIDprobabilities(AliRsnDaughter track);
72         void            Identify(AliRsnDaughter &track);
73         void            SetMaxRadius(Double_t value) {fMaxRadius=value;}
74         void            SetPIDMethod(AliRsnSelectorRL::EPIDMethod pm) {fPIDMethod=pm;}
75         void            SetPriorProbabilities(Double_t *prior);
76         void            SetPriorProbability(AliPID::EParticleType type, Double_t p);
77         void            SetProbabilityThreshold(Double_t p) {fProbThreshold=p;}
78         void            SetPtLimit4PID(Double_t value) {fPtLimit4PID=value;}
79         
80  protected:
81  
82         // Parameters/flags
83         TString*      fOutputPath;
84         Bool_t        fDebugFlag;
85         Bool_t        fStoreKineInfo;
86         Bool_t        fCheckITSRefit;
87         Bool_t        fRejectFakes;
88         Bool_t        fCopyMomentum;
89         
90         // Workaround for AliSelectorRL:
91         Bool_t        fIsRunLoaderOpen;
92         
93         // IO tree
94         TTree*        fRsnEventTree;
95         AliRsnEvent*  fRsnEvent;
96         TBranch*      fRsnEventBranch;
97         
98         // PID
99         EPIDMethod    fPIDMethod;                //  PID method
100         Double_t      fPrior[AliPID::kSPECIES];  //  prior probabilities (in case of REAL pid)
101         Double_t      fPtLimit4PID;              //  maximum transverse momentum to accept realistic PID
102         Double_t      fProbThreshold;            //  minimum required probability to accept realistic PID
103         Double_t      fMaxRadius;                //  maximum allowed distance from primary vertex
104         
105         // Functions
106         AliPID::EParticleType FindType(Int_t pdg);
107         
108         // Rsn event reader implementation
109         ClassDef(AliRsnSelectorRL,1)
110 };
111
112 #endif
113