]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChain.h
Adding Pile-up rejection from AliAnalysisUtils to AliFemto code in AOD and ESD reader...
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoEventReaderESDChain.h
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoEventReaderESDChain - the reader class for the Alice ESD           //
4 // tailored for the Task framework                                            //
5 // Reads in AliESDfriend to create shared hit/quality information             //
6 // Authors: Adam Kisiel kisiel@mps.ohio-state.edu                             //
7 //                                                                            //
8 ////////////////////////////////////////////////////////////////////////////////
9 #ifndef ALIFEMTOEVENTREADERESDCHAIN_H
10 #define ALIFEMTOEVENTREADERESDCHAIN_H
11
12 #include "AliFemtoEventReader.h"
13 #include "AliFemtoEnumeration.h"
14 #include "AliFemtoV0.h"
15 #include "AliESDv0.h"
16
17 #include <string>
18 #include <vector>
19 #include "TTree.h"
20 #include "TGraph.h"
21 #include "AliESDEvent.h"
22 #include "AliESDfriend.h"
23 #include "AliPhysicsSelection.h"
24 #include "AliESDtrackCuts.h"
25 #include <list>
26
27 #include "AliESDpid.h"
28
29 class AliFemtoEvent;
30
31 class AliFemtoEventReaderESDChain : public AliFemtoEventReader 
32 {
33  public:
34   enum TrackType {kGlobal=0, kTPCOnly=1, kITSOnly=2, kSPDTracklet=3};
35   typedef enum TrackType ReadTrackType;
36
37   enum EventMult {kCentrality=0, kGlobalCount=1, kReferenceITSTPC=2, kReferenceITSSA=3, kReferenceTracklets=4, kSPDLayer1=5, kVZERO=6, kCentralityTRK=7, kCentralityZNA=8, kCentralityCL1=9, kCentralityCND=10, kCentralityV0A=11, kCentralityV0C=12, kCentralityZNC=13, kCentralityCL0=14, kCentralityFMD=15, kCentralityTKL=16, kCentralityNPA=17};
38   typedef enum EventMult EstEventMult;
39
40   AliFemtoEventReaderESDChain();
41   AliFemtoEventReaderESDChain(const AliFemtoEventReaderESDChain& aReader);
42   ~AliFemtoEventReaderESDChain();
43
44   AliFemtoEventReaderESDChain& operator=(const AliFemtoEventReaderESDChain& aReader);
45
46   AliFemtoEvent* ReturnHbtEvent();
47   AliFemtoString Report();
48   void SetConstrained(const bool constrained);
49   void SetReadTPCInner(const bool readinner);
50   void SetUseTPCOnly(const bool usetpconly);
51
52   virtual void CopyESDtoFemtoV0(AliESDv0 *tESDv0, AliFemtoV0 *tFemtoV0, AliESDEvent *fESDevent);
53   void SetReadV0(bool a);
54   void GetGlobalPositionAtGlobalRadiiThroughTPC(AliESDtrack *track, Float_t bfield, Float_t globalPositionsAtRadii[9][3]);
55   void SetMagneticFieldSign(int s);
56
57   void SetUseMultiplicity(EstEventMult aType);
58   void SetEventTrigger(UInt_t eventtrig); //trigger
59
60   bool GetConstrained() const;
61   bool GetReadTPCInner() const;
62   bool GetUseTPCOnly() const;
63   
64   void SetReadTrackType(ReadTrackType aType);
65
66   void SetESDSource(AliESDEvent *aESD);
67   //  void SetESDfriendSource(AliESDfriend *aFriend);
68   void SetESDPid(AliESDpid *esdPid) { fESDpid = esdPid; }
69
70   void CopyESDtoFemtoEvent(AliFemtoEvent *hbtEvent);
71   void SetpA2013(Bool_t pa2013);
72   void SetUseMVPlpSelection(Bool_t mvplp);
73   void SetIsPileUpEvent(Bool_t ispileup);
74
75  protected:
76
77  private:
78   string         fFileName;      //name of current ESD file
79   bool           fConstrained;   //flag to set which momentum from ESD file will be use
80   bool           fReadInner;     // flag to set if one wants to read TPC-only momentum
81                                  // and store it in the hidden info
82   bool           fUseTPCOnly;    // flag to set if one wants to replace the global parameters 
83                                  // by the TPC only ones
84   int            fNumberofEvent; //number of Events in ESD file
85   int            fCurEvent;      //number of current event
86   unsigned int   fCurFile;       //number of current file
87   AliESDEvent*   fEvent;         //ESD event
88   //  AliESDfriend*  fEventFriend;
89   ReadTrackType  fTrackType;     // Type of track read
90   EstEventMult   fEstEventMult;  // Type of the event multiplicity estimator
91   UInt_t         fEventTrig;     //event trigger
92
93
94 /*   list<Int_t>  **fSharedList;       //! Table (one list per padrow) of clusters which are shared */
95 /*   list<Int_t>  **fClusterPerPadrow; //! Table (one list per padrow) of clusters in each padrow */
96                 
97   Float_t GetSigmaToVertex(double *impact, double *covar);
98
99
100   AliESDpid *fESDpid;
101   Bool_t fIsPidOwner;
102   bool           fReadV0;           // Read V0 information from the AOD and put it into V0Collection
103   int    fMagFieldSign;
104
105   Bool_t fpA2013;
106   Bool_t fisPileUp;
107   Bool_t fMVPlp;
108
109
110 #ifdef __ROOT__
111   ClassDef(AliFemtoEventReaderESDChain, 1)
112 #endif
113
114     };
115   
116 #endif
117
118