]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnReader.h
Package upgrade.
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnReader.h
CommitLineData
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 29class AliVEvent;
7c2974c8 30class AliESDEvent;
31class AliAODEvent;
32class AliMCEvent;
33class AliRsnEvent;
06351446 34class AliRsnPIDWeightsMgr;
b35947a8 35
36class AliRsnReader : public TObject
37{
38public:
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 59protected:
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 70private:
71
06351446 72 ClassDef(AliRsnReader, 1);
b35947a8 73};
74
75#endif