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 AliRsnSelectorRL
8 // ------------------------
9 // Reader for conversion of ESD output into the internal format
10 // used for resonance study.
12 // author: A. Pulvirenti (email: alberto.pulvirenti@ct.infn.it)
14 // adapted for TSelector compliance
15 // by : R. Vernet (email: renaud.vernet@cern.ch)
16 //-------------------------------------------------------------------------
18 #ifndef ALIRSNSELECTORRL_H
19 #define ALIRSNSELECTORRL_H
22 #include "AliSelectorRL.h"
31 class AliRsnSelectorRL : public AliSelectorRL
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
42 AliRsnSelectorRL(TTree *tree = 0);
43 AliRsnSelectorRL(const AliRsnSelectorRL&);
44 virtual ~AliRsnSelectorRL();
45 AliRsnSelectorRL& operator=(const AliRsnSelectorRL&);
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();
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;}
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;}
85 Bool_t fStoreKineInfo;
86 Bool_t fCheckITSRefit;
90 // Workaround for AliSelectorRL:
91 Bool_t fIsRunLoaderOpen;
95 AliRsnEvent* fRsnEvent;
96 TBranch* fRsnEventBranch;
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
106 AliPID::EParticleType FindType(Int_t pdg);
108 // Rsn event reader implementation
109 ClassDef(AliRsnSelectorRL,1)