]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIHBTANALYSIS_H | |
2 | #define ALIHBTANALYSIS_H | |
3 | //_________________________________________________________ | |
4 | //////////////////////////////////////////////////////////////////////////// | |
5 | // | |
6 | // class AliHBTAnalysis | |
7 | // | |
8 | // Central Object Of HBTAnalyser: | |
9 | // This class performs main looping within HBT Analysis | |
10 | // User must plug a reader of Type AliReader | |
11 | // User plugs in coorelation and monitor functions | |
12 | // as well as monitor functions | |
13 | // | |
14 | // HBT Analysis Tool, which is integral part of AliRoot, | |
15 | // ALICE Off-Line framework: | |
16 | // | |
17 | // Piotr.Skowronski@cern.ch | |
18 | // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html | |
19 | // | |
20 | //////////////////////////////////////////////////////////////////////////// | |
21 | //_________________________________________________________ | |
22 | ||
23 | #include <AliAnalysis.h> | |
24 | ||
25 | class AliHBTCut; | |
26 | //class AliHBTPair; | |
27 | ||
28 | class AliHBTRun; | |
29 | class AliAOD; | |
30 | class AliReader; | |
31 | class AliEventBuffer; | |
32 | class AliEventCut; | |
33 | ||
34 | class AliHBTOnePairFctn; | |
35 | class AliHBTTwoPairFctn; | |
36 | ||
37 | class AliHBTMonOneParticleFctn; | |
38 | class AliHBTMonTwoParticleFctn; | |
39 | ||
40 | class TList; | |
41 | ||
42 | class AliHBTAnalysis: public AliAnalysis | |
43 | { | |
44 | public: | |
45 | AliHBTAnalysis(); | |
46 | AliHBTAnalysis(const AliHBTAnalysis& in); | |
47 | AliHBTAnalysis& operator=(const AliHBTAnalysis& /*right*/); | |
48 | virtual ~AliHBTAnalysis(); | |
49 | ||
50 | Int_t Init(); | |
51 | Int_t ProcessEvent(AliAOD* aodrec, AliAOD* aodsim = 0x0); | |
52 | Int_t Finish(); | |
53 | ||
54 | enum EProcessOption{kReconstructed,kSimulated,kSimulatedAndReconstructed}; | |
55 | void SetProcessOption(EProcessOption option){fProcessOption = option;}//Init must be called to make effect | |
56 | ||
57 | void Process(Option_t* option = "TracksAndParticles");//Stand alone HBT analysis | |
58 | ||
59 | void SetGlobalPairCut(AliAODPairCut* cut); | |
60 | ||
61 | void AddTrackFunction(AliHBTOnePairFctn* f); | |
62 | void AddParticleFunction(AliHBTOnePairFctn* f); | |
63 | void AddParticleAndTrackFunction(AliHBTTwoPairFctn* f); | |
64 | ||
65 | void AddParticleMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch. | |
66 | void AddTrackMonitorFunction(AliHBTMonOneParticleFctn* f); //z.ch. | |
67 | void AddParticleAndTrackMonitorFunction(AliHBTMonTwoParticleFctn* f);//z.ch. | |
68 | ||
69 | void AddResolutionFunction(AliHBTTwoPairFctn* f){AddParticleAndTrackFunction(f);} | |
70 | ||
71 | void SetReader(AliReader* r){fReader = r;} | |
72 | ||
73 | void WriteFunctions(); | |
74 | void SetOutputFileName(const char* fname); | |
75 | ||
76 | void SetBufferSize(Int_t buffsize){fBufferSize=buffsize;} | |
77 | void SetOwner(Bool_t owner=kTRUE){fIsOwner=owner;} | |
78 | Bool_t IsOwner() const {return fIsOwner;} | |
79 | Bool_t IsNonIdentAnalysis(); | |
80 | void ResetFunctions(); | |
81 | void SetDisplayInfo(Int_t howoften){fDisplayMixingInfo = howoften;}//defines every each line info about mixing is displayed | |
82 | ||
83 | void SetApparentVertex(Double_t x, Double_t y, Double_t z);//Sets apparent vertex | |
84 | ||
85 | static void PressAnyKey();//small utility function that helps to make comfortable macros | |
86 | ||
87 | protected: | |
88 | ||
89 | /**********************************************/ | |
90 | /* E V E N T P R O C E S S I N G */ | |
91 | /**********************************************/ | |
92 | // NEW AOD schema | |
93 | Int_t (AliHBTAnalysis::*fProcEvent)(AliAOD* aodrec, AliAOD* aodsim);//Pointer to the processing method | |
94 | ||
95 | virtual Int_t ProcessSim(AliAOD* /*aodrec*/, AliAOD* aodsim); | |
96 | virtual Int_t ProcessRec(AliAOD* aodrec, AliAOD* /*aodsim*/); | |
97 | virtual Int_t ProcessRecAndSim(AliAOD* aodrec, AliAOD* aodsim); | |
98 | ||
99 | virtual Int_t ProcessRecAndSimNonId(AliAOD* aodrec, AliAOD* aodsim); | |
100 | virtual Int_t ProcessSimNonId(AliAOD* /*aodrec*/, AliAOD* aodsim); | |
101 | virtual Int_t ProcessRecNonId(AliAOD* aodrec, AliAOD* /*aodsim*/); | |
102 | ||
103 | ||
104 | // OLD legacy schema | |
105 | ||
106 | void ProcessTracks(); | |
107 | void ProcessParticles(); | |
108 | void ProcessTracksAndParticles(); | |
109 | ||
110 | void ProcessTracksAndParticlesNonIdentAnal(); | |
111 | void ProcessParticlesNonIdentAnal(); | |
112 | void ProcessTracksNonIdentAnal(); | |
113 | ||
114 | Bool_t RunCoherencyCheck(); | |
115 | ||
116 | void FilterOut(AliAOD* outpart1, AliAOD* outpart2, AliAOD* inpart, | |
117 | AliAOD* outtrack1, AliAOD* outtrack2, AliAOD* intrack)const; | |
118 | void FilterOut(AliAOD* out1, AliAOD* out2, AliAOD* in)const; | |
119 | void DeleteFunctions(); | |
120 | ||
121 | ||
122 | AliReader* fReader;//! Pointer to reader | |
123 | ||
124 | UInt_t fNTrackFunctions; //! Number of Tracks functions | |
125 | UInt_t fNParticleFunctions; //! Number of particles functions | |
126 | UInt_t fNParticleAndTrackFunctions; //! Number of resolution functions | |
127 | ||
128 | UInt_t fNTrackMonitorFunctions; //! Number of Track Monitor functions | |
129 | UInt_t fNParticleMonitorFunctions; //! Number of Particles Monitor functions | |
130 | UInt_t fNParticleAndTrackMonitorFunctions; //! Number of Resolution Monitor functions | |
131 | ||
132 | AliHBTOnePairFctn** fTrackFunctions; //!array of pointers to functions that analyze rekonstructed tracks | |
133 | AliHBTOnePairFctn** fParticleFunctions; //!array of pointers to functions that analyze generated particles | |
134 | AliHBTTwoPairFctn** fParticleAndTrackFunctions; //!array of pointers to functions that analyze both | |
135 | //reconstructed tracks and generated particles | |
136 | //i.e. - resolution analyzers | |
137 | AliHBTMonOneParticleFctn** fParticleMonitorFunctions; //! array of pointers to monitoring functions | |
138 | AliHBTMonOneParticleFctn** fTrackMonitorFunctions; //! which are used for single particle analysis, | |
139 | AliHBTMonTwoParticleFctn** fParticleAndTrackMonitorFunctions; //! cut monitoring, etc. | |
140 | ||
141 | AliEventCut* fBkgEventCut;// We can narrow class of events used in | |
142 | ||
143 | AliEventBuffer* fPartBuffer;//Sim Particles event buffer | |
144 | AliEventBuffer* fTrackBuffer;//Rec Tracks event buffer | |
145 | ||
146 | /**********************************************/ | |
147 | /* Control parameters */ | |
148 | /**********************************************/ | |
149 | ||
150 | Int_t fBufferSize; //defines the size of buffer for mixed events; -1==MIX All | |
151 | Int_t fDisplayMixingInfo;//!defines every which particle mixing info is displayed | |
152 | Bool_t fIsOwner;//!defines of all functions are supposed to be deleted while by the way of analysis defaulr false | |
153 | ||
154 | EProcessOption fProcessOption;//Option that says waht analysis to do (Rec, Sim or SimAndRec) | |
155 | Bool_t fNoCorrfctns;//Internal flag indicating that no cfs are set by the user (only monitor ones) | |
156 | TString* fOutputFileName;//Fiele name where to dump results, if not specified reults are written to gDirectory | |
157 | ||
158 | Double_t fVertexX;//X position of apparent vertex | |
159 | Double_t fVertexY;//Y position of apparent vertex | |
160 | Double_t fVertexZ;//Z position of apparent vertex | |
161 | ||
162 | private: | |
163 | ||
164 | static const UInt_t fgkFctnArraySize;//! | |
165 | static const UInt_t fgkDefaultMixingInfo;//! | |
166 | static const Int_t fgkDefaultBufferSize;//! | |
167 | ||
168 | ClassDef(AliHBTAnalysis,0) | |
169 | }; | |
170 | #endif |