]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FEMTOSCOPY/AliFemto/AliFemtoEventReaderAODChain.cxx
flat friends update
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / AliFemto / AliFemtoEventReaderAODChain.cxx
1 ////////////////////////////////////////////////////////////////////////////////
2 //                                                                            //
3 // AliFemtoEventReaderAODChain - the reader class for the Alice AOD from Chain//
4 // Reads in AOD information and converts it into internal AliFemtoEvent       //
5 // Authors: Adam Kisiel kisiel@mps.ohio-state.edu                             //
6 //                                                                            //
7 ////////////////////////////////////////////////////////////////////////////////
8
9 #include "AliFemtoEventReaderAODChain.h"
10
11 #include "TFile.h"
12 #include "TTree.h"
13 #include "AliAODEvent.h"
14 #include "AliAODTrack.h"
15 #include "AliAODVertex.h"
16
17 #include "AliFmPhysicalHelixD.h"
18 #include "AliFmThreeVectorF.h"
19
20 #include "SystemOfUnits.h"
21
22 #include "AliFemtoEvent.h"
23 #include "AliFemtoModelHiddenInfo.h"
24
25
26
27 ClassImp(AliFemtoEventReaderAODChain)
28
29 #if !(ST_NO_NAMESPACES)
30   using namespace units;
31 #endif
32
33 using namespace std;
34 //____________________________
35 //constructor with 0 parameters , look at default settings 
36 AliFemtoEventReaderAODChain::AliFemtoEventReaderAODChain():
37   AliFemtoEventReaderAOD()
38 {
39   // default constructor
40 }
41
42 AliFemtoEventReaderAODChain::AliFemtoEventReaderAODChain(const AliFemtoEventReaderAODChain &aReader) :
43   AliFemtoEventReaderAOD(aReader)
44 {
45   // copy constructor
46 }
47 //__________________
48 //Destructor
49 AliFemtoEventReaderAODChain::~AliFemtoEventReaderAODChain()
50 {
51   // destructor
52 }
53
54 //__________________
55 AliFemtoEventReaderAODChain& AliFemtoEventReaderAODChain::operator=(const AliFemtoEventReaderAODChain& aReader)
56 {
57   // assignment operator
58   if (this == &aReader)
59     return *this;
60
61   *this = aReader;
62
63   return *this;
64 }
65 //__________________
66 AliFemtoString AliFemtoEventReaderAODChain::Report()
67 {
68   // create reader report
69   AliFemtoString temp = "\n This is the AliFemtoEventReaderAODChain\n";
70   return temp;
71 }
72
73 AliFemtoEvent* AliFemtoEventReaderAODChain::ReturnHbtEvent()
74 {
75   // read in a next hbt event from the chain
76   // convert it to AliFemtoEvent and return
77   // for further analysis
78   if (!fEvent) return 0;
79
80   AliFemtoEvent *hbtEvent = 0;
81
82   // Get the PWG2 specific information if it exists
83 //   fPWG2AODTracks = (TClonesArray *) fEvent->GetList()->FindObject("pwg2aodtracks");
84
85 //   if (fPWG2AODTracks) {
86 //     cout << "Found additional PWG2 specific information in the AOD!" << endl;
87 //     cout << "Reading only tracks with the additional information" << endl;
88 //   }
89
90   // cout<<"starting to read event "<<fCurEvent<<endl;
91
92   //hbtEvent = new AliFemtoEvent;
93   hbtEvent = CopyAODtoFemtoEvent();
94
95   fCurEvent++;
96   return hbtEvent;
97 }
98
99 //___________________
100 void AliFemtoEventReaderAODChain::SetAODSource(AliAODEvent *aAOD)
101 {
102   // The chain loads the AOD for us
103   // You must provide the address where it can be found
104   fEvent = aAOD;
105 }
106
107
108
109