]>
Commit | Line | Data |
---|---|---|
b35947a8 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * See cxx source for full Copyright notice * | |
4 | **************************************************************************/ | |
5 | ||
7c2974c8 | 6 | // |
7 | // ==== Class AliRsnReader ======== | |
8 | // | |
9 | // This object reads a 'standard' event and converts it into the internal | |
10 | // format used for resonance analysis (AliRsnEvent). | |
11 | // 'Standard' event means ESD, standard AOD and MC event. | |
12 | // | |
13 | // The input-2-AliRsnEvent conversion is done through a class which reads | |
14 | // from AliAnalysisTaskSE, which is the standard analysis object. | |
15 | // This class creates the AliRsnEvent's before the input event is read, | |
16 | // so this class has not to 'create' a new outpu event, but instead it has | |
17 | // to 'fill' one which has already been created elsewhere. | |
18 | // Then, the methods provided here accept an AliRsnEvent as argument passed | |
19 | // by reference, and they 'fill' this object using the data from the inputs | |
20 | // passed to them. | |
b35947a8 | 21 | // |
7c2974c8 | 22 | // author: A. Pulvirenti |
23 | // email : alberto.pulvirenti@ct.infn.it | |
24 | // | |
b35947a8 | 25 | |
7c2974c8 | 26 | #ifndef ALIRSNREADER_H |
27 | #define ALIRSNREADER_H | |
b35947a8 | 28 | |
06351446 | 29 | class AliVEvent; |
7c2974c8 | 30 | class AliESDEvent; |
31 | class AliAODEvent; | |
32 | class AliMCEvent; | |
33 | class AliRsnEvent; | |
06351446 | 34 | class AliRsnPIDWeightsMgr; |
b35947a8 | 35 | |
36 | class AliRsnReader : public TObject | |
37 | { | |
38 | public: | |
06351446 | 39 | |
40 | enum ESource { | |
41 | kESD = 0, | |
42 | kESDTPC, | |
43 | kAOD, | |
44 | kMC, | |
45 | kSources | |
46 | }; | |
47 | ||
48 | AliRsnReader(ESource source = kESD, AliRsnPIDWeightsMgr *mgr = 0x0); | |
49 | AliRsnReader(const AliRsnReader& copy); | |
50 | AliRsnReader& operator=(const AliRsnReader& copy); | |
51 | virtual ~AliRsnReader() {} | |
7c2974c8 | 52 | |
06351446 | 53 | void SetWeightsMgr(AliRsnPIDWeightsMgr *mgr) {fWeightsMgr = mgr;} |
54 | void SetCheckSplit(Bool_t doit = kTRUE) {fCheckSplit = doit;} | |
55 | void SetRejectFakes(Bool_t doit = kTRUE) {fRejectFakes = doit;} | |
56 | ||
57 | Bool_t Fill(AliRsnEvent *rsn, AliVEvent *event, AliMCEvent *refMC = 0); | |
7c2974c8 | 58 | |
b35947a8 | 59 | protected: |
60 | ||
06351446 | 61 | Bool_t FillFromESD(AliRsnEvent *rsn, AliESDEvent *event, AliMCEvent *refMC = 0, Bool_t useTPCOnly = kFALSE); |
62 | Bool_t FillFromAOD(AliRsnEvent *rsn, AliAODEvent *event, AliMCEvent *refMC = 0); | |
63 | Bool_t FillFromMC(AliRsnEvent *rsn, AliMCEvent *mc); | |
64 | ||
65 | ESource fSource; // flag to choose what kind of data to be read | |
66 | Bool_t fCheckSplit; // flag to check and remove split tracks | |
67 | Bool_t fRejectFakes; // flag to reject fake tracks (negative label) | |
68 | AliRsnPIDWeightsMgr *fWeightsMgr; // manager for alternative PID weights | |
b35947a8 | 69 | |
7c2974c8 | 70 | private: |
71 | ||
06351446 | 72 | ClassDef(AliRsnReader, 1); |
b35947a8 | 73 | }; |
74 | ||
75 | #endif |