]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderESDChainKine.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoEventReaderESDChainKine.h
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoEventReaderESDChainKine - the reader class for the Alice ESD and   //
4 // the model Kinematics information tailored for the Task framework and the   //
5 // Reads in AliESDfriend to create shared hit/quality information             //
6 // Authors: Adam Kisiel kisiel@mps.ohio-state.edu                             //
7 //                                                                            //
8 ////////////////////////////////////////////////////////////////////////////////
9 #ifndef ALIFEMTOEVENTREADERESDCHAINKINE_H
10 #define ALIFEMTOEVENTREADERESDCHAINKINE_H
11
12 #include "AliFemtoEventReader.h"
13 #include "AliFemtoEnumeration.h"
14
15 #include <string>
16 #include <vector>
17 #include <TTree.h>
18 #include <AliESDEvent.h>
19 #include <AliESDfriend.h>
20 #include <AliStack.h>
21 #include <list>
22 #include <AliGenEventHeader.h>
23
24 #include "AliESDv0.h"
25 #include "AliFemtoV0.h"
26 #include "AliESDtrackCuts.h"
27
28 #include "AliESDpid.h"
29
30 class AliFemtoEvent;
31
32 class AliFemtoEventReaderESDChainKine : public AliFemtoEventReader
33 {
34  public:
35   enum TrackType {kGlobal=0, kTPCOnly=1, kITSOnly=2, kSPDTracklet=3};
36   typedef enum TrackType ReadTrackType;
37
38   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};
39   typedef enum EventMult EstEventMult;
40
41   AliFemtoEventReaderESDChainKine();
42   AliFemtoEventReaderESDChainKine(const AliFemtoEventReaderESDChainKine& aReader);
43   ~AliFemtoEventReaderESDChainKine();
44
45   AliFemtoEventReaderESDChainKine& operator=(const AliFemtoEventReaderESDChainKine& aReader);
46
47   AliFemtoEvent* ReturnHbtEvent();
48   AliFemtoString Report();
49   void SetConstrained(const bool constrained);
50   bool GetConstrained() const;
51   void SetUseTPCOnly(const bool usetpconly);
52   bool GetUseTPCOnly() const;
53   void SetReadTPCInner(const bool readinner);
54   bool GetReadTPCInner() const;
55
56   void SetUseMultiplicity(EstEventMult aType);
57
58   void SetReadTrackType(ReadTrackType aType);
59
60   void SetESDSource(AliESDEvent *aESD);
61   void SetStackSource(AliStack *aStack);
62   void SetGenEventHeader(AliGenEventHeader *aGenHeader);
63   void SetRotateToEventPlane(short dorotate);
64
65   void SetESDPid(AliESDpid *esdPid) { fESDpid = esdPid; }
66
67   void SetReadV0(bool a);
68   void CopyESDtoFemtoV0(AliESDv0 *tESDv0, AliFemtoV0 *tFemtoV0, AliESDEvent *tESDevent);
69   void GetGlobalPositionAtGlobalRadiiThroughTPC(AliESDtrack *track, Float_t bfield, Float_t globalPositionsAtRadii[9][3]);
70   void SetMagneticFieldSign(int s);
71   void SetKaonAnalysis(Bool_t);
72   void SetProtonAnalysis(Bool_t);
73   void SetPionAnalysis(Bool_t);
74   void SetOnlyPrimaries(Bool_t);
75
76  protected:
77
78  private:
79   string         fFileName;      // name of current ESD file
80   bool           fConstrained;   // flag to set which momentum from ESD file will be use
81   bool           fReadInner;     // flag to set if one wants to read TPC-only momentum
82   bool           fUseTPCOnly;    // flog to set to read TPC only momentum instead of the full
83   int            fNumberofEvent; // number of Events in ESD file
84   int            fCurEvent;      // number of current event
85   unsigned int   fCurFile;       // number of current file
86   AliESDEvent*   fEvent;         // ESD event
87   AliStack      *fStack;         // Kinematics stack pointer
88   AliGenEventHeader *fGenHeader; // Link to the generator event header
89   ReadTrackType  fTrackType;     // Type of track read
90   EstEventMult   fEstEventMult;  // Type of the event multiplicity estimator
91
92   short          fRotateToEventPlane; // Rotate the event so that event plane is at x=0
93
94   Float_t GetSigmaToVertex(double *impact, double *covar);
95
96   AliESDpid *fESDpid;
97   Bool_t fIsPidOwner;
98
99   int            fMagFieldSign;     // Magnetic field sign
100   bool           fReadV0;
101   Bool_t isKaonAnalysis; // switch for Kaon analysis
102   Bool_t isProtonAnalysis; // switch for Proton analysis
103   Bool_t isPionAnalysis; // switch for Pion analysis
104   Bool_t fOnlyPrimaries; // switch to analyze only primaries
105
106 #ifdef __ROOT__
107   ClassDef(AliFemtoEventReaderESDChainKine, 1)
108 #endif
109
110     };
111
112 #endif