1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice *
4 **************************************************************************/
7 // ==== Class AliRsnReader ========
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.
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
22 // author: A. Pulvirenti
23 // email : alberto.pulvirenti@ct.infn.it
26 #ifndef ALIRSNREADER_H
27 #define ALIRSNREADER_H
34 class AliRsnPIDWeightsMgr;
36 class AliRsnReader : public TObject
48 AliRsnReader(ESource source = kESD, AliRsnPIDWeightsMgr *mgr = 0x0);
49 AliRsnReader(const AliRsnReader& copy);
50 AliRsnReader& operator=(const AliRsnReader& copy);
51 virtual ~AliRsnReader() {}
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;}
57 Bool_t Fill(AliRsnEvent *rsn, AliVEvent *event, AliMCEvent *refMC = 0);
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);
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
72 ClassDef(AliRsnReader, 1);