]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnSelectorRL.h
make TPDDigitDump component functional
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnSelectorRL.h
CommitLineData
62c607bd 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
24class TH3D;
25class TH1D;
26class TOrdCollection;
27class TTree;
28class TBranch;
29class AliRunLoader;
30
31class AliRsnSelectorRL : public AliSelectorRL
32{
33public:
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);
307afb16 43 AliRsnSelectorRL(const AliRsnSelectorRL& obj);
62c607bd 44 virtual ~AliRsnSelectorRL();
307afb16 45 AliRsnSelectorRL& operator=(const AliRsnSelectorRL& obj);
62c607bd 46
47 // TSelector-inherited member functions
48 virtual Int_t Version() const {return 1;}
307afb16 49 virtual void Begin(TTree *tree) const;
62c607bd 50 virtual void SlaveBegin(TTree *tree);
51 virtual void Init(TTree *tree);
62c607bd 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;}
307afb16 57 virtual void SlaveTerminate() ;
62c607bd 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 = "");
307afb16 70 Double_t* GetPIDprobabilities(AliRsnDaughter track) const;
62c607bd 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
307afb16 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
62c607bd 88
89 // Workaround for AliSelectorRL:
307afb16 90 Bool_t fIsRunLoaderOpen; // flag to check if run loader is open
62c607bd 91
92 // IO tree
307afb16 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
62c607bd 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