new analysis classes, not yet in build system
[u/mrichter/AliRoot.git] / HLT / JET / analysis / AliHLTJETAnalysisJets.h
CommitLineData
4f9ef8d0 1//-*- Mode: C++ -*-
2
3// $Id: AliHLTJETAnalysisJets.h $
4
5#ifndef ALIHLTJETANALYSISJETS_H
6#define ALIHLTJETANALYSISJETS_H
7
8/* This file is property of and copyright by the ALICE HLT Project *
9 * ALICE Experiment at CERN, All rights reserved. *
10 * See cxx source for full Copyright notice */
11
12/** @file AliHLTJETAnalysisJets.h
13 @author Jochen Thaeder
14 @date
15 @brief Container holding analysis objects
16*/
17
18// see below for class documentation
19// or
20// refer to README to build package
21// or
22// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
23
24//#include "TH1.h"
25//#include "TClonesArray.h"
26
27class TH1;
28class TClonesArray;
29
30class AliAODJet;
31class AliMCEvent;
32
33#include "AliHLTLogging.h"
34#include "AliHLTMCEvent.h"
35
36#include "AliHLTJETBase.h"
37#include "AliHLTJETJets.h"
38
39#include "AliHLTJETAnalysisBase.h"
40
41/**
42 * @class AliHLTJETAnalysisJets
43 * This class is a container which holds TClonesArrys of
44 * histograms needed for the Jet Analysis.
45 *
46 * It need a ptr to MC information (pythia jets) and
47 * reconstructed jets in the form of AliHLTJETJets.
48 *
49 * @ingroup alihlt_jet
50 * @ingroup alihlt_jet_analysis
51 */
52
53class AliHLTJETAnalysisJets : public TObject, public AliHLTLogging {
54public:
55
56 /*
57 * ---------------------------------------------------------------------------------
58 * Constructor / Destructor
59 * ---------------------------------------------------------------------------------
60 */
61
62 /** Constructor */
63 AliHLTJETAnalysisJets();
64
65 /** Destructor */
66 ~AliHLTJETAnalysisJets();
67
68 /*
69 * ---------------------------------------------------------------------------------
70 * Initialize / Setup / Reset - public
71 * ---------------------------------------------------------------------------------
72 */
73
74 /** Setup analysis class
75 * @return 0 on success, <0 on failure
76 */
77 Int_t Initialize();
78
79 /** Reset input for current event */
80 void ResetEvent();
81
82 /*
83 * ---------------------------------------------------------------------------------
84 * Setter - public
85 * ---------------------------------------------------------------------------------
86 */
87
88 /** Set pythia jets in HLT environment
89 * @param mcEvent Ptr to AliHLTMCEvent
90 */
91 void SetHLTMC( AliHLTMCEvent* mcEvent );
92
93 /** Set pythia jets in Off-line environment
94 * @param mcEvent Ptr to AliMCEvent
95 */
96 void SetMC( AliMCEvent* mcEvent );
97
98 /** Set reconstructed jets
99 * @param jets Ptr to AliHLTJETJets
100 */
101 void SetJets( AliHLTJETJets* jets );
102
103 /*
104 * ---------------------------------------------------------------------------------
105 * Getter - public
106 * ---------------------------------------------------------------------------------
107 */
108
109 /** Returns histogram dependent of histogram type and plot type
110 * @param histIdx histogram type (Ptr to TClonesArray),
111 * @see AliHLTJETAnalysisBase
112 * @param plotIdx plot type (Entry Idx in TClonesArray),
113 * @see AliHLTJETAnalysisBase
114 * @return Ptr to TH1 on success, NULL on failure
115 */
116 TH1* GetHistogram ( Int_t histIdx, Int_t plotIdx );
117
118 /*
119 * ---------------------------------------------------------------------------------
120 * Analysis - public
121 * ---------------------------------------------------------------------------------
122 */
123
124 /** Anlayze Data Set
125 * -Fill unmatched jets into histograms
126 * -Match jets
127 * -Fill matched jets into histograms
128 * @return 0 on success, <0 on failure
129 */
130 Int_t Analyze();
131
132 ///////////////////////////////////////////////////////////////////////////////////
133
134 private:
135
136 /** copy constructor prohibited */
137 AliHLTJETAnalysisJets(const AliHLTJETAnalysisJets&);
138
139 /** assignment operator prohibited */
140 AliHLTJETAnalysisJets& operator=(const AliHLTJETAnalysisJets&);
141
142 /*
143 * ---------------------------------------------------------------------------------
144 * Setup / Reset - private
145 * ---------------------------------------------------------------------------------
146 */
147
148 /** Setup Delta histograms */
149 void SetupDeltaHistograms();
150
151 /** Setup Spectra histograms */
152 void SetupSpectraHistograms();
153
154 /** Setup matched histograms */
155 void SetupMatchedHistograms();
156
157 /*
158 * ---------------------------------------------------------------------------------
159 * Analysis - private
160 * ---------------------------------------------------------------------------------
161 */
162
163 /** Match Pythia and Reconstructed Jets
164 * @return 0 on success, <0 on failure
165 */
166 Int_t MatchJets();
167
168 /*
169 * ---------------------------------------------------------------------------------
170 * Fill - private
171 * ---------------------------------------------------------------------------------
172 */
173
174 /** Fill basic Spectra histogram */
175 void FillBasicSpectraHistograms();
176
177 /** Fill unmatched Delta histogram */
178 void FillUnmatchedDeltaHistograms();
179
180 /** Fill matched Delta histogram */
181 void FillMatchedDeltaHistograms();
182
183 /** Fill matched Spectra histogram */
184 void FillMatchedSpectraHistograms();
185
186 /** Fill matched histogram */
187 void FillMatchedHistograms();
188
189 /*
190 * ---------------------------------------------------------------------------------
191 * Helper - private
192 * ---------------------------------------------------------------------------------
193 */
194
195 /** Setup histogram with common parameters
196 * @param hist Ptr to histogram
197 */
198 void SetupHist( TH1* hist );
199
200 /** Fill 1D histogram, in a TClonesArray
201 * @param array Ptr to TClonesArray of histograms
202 * @param idx Index in the TClonesArray
203 * @param valueX x value
204 */
205 void FillHist( TClonesArray* array, Int_t idx, Float_t valueX );
206
207 /** Fill 2D histogram, in a TClonesArray
208 * @param array Ptr to TClonesArray of histograms
209 * @param idx Index in the TClonesArray
210 * @param valueX x value
211 * @param valueY y value
212 */
213 void FillHist( TClonesArray* array, Int_t idx, Float_t valueX,Float_t valueY );
214
215 /** Get Distance^2 in eta phi space of 2 jets
216 * @param jet1 Ptr to jet 1
217 * @param jet2 Ptr to jet 2
218 * @return Distance^2
219 */
220 Float_t GetDistance2( AliAODJet *jet1, AliAODJet *jet2);
221
222 /*
223 * ---------------------------------------------------------------------------------
224 * Members - private
225 * ---------------------------------------------------------------------------------
226 */
227
228 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
229 // ++ Data Members
230 // ++
231 // ++-> replaced every event
232 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
233
234 // ---------------------------------------------------
235 // -- Members filled per event
236 // ---------------------------------------------------
237
238 /** jets */
239 AliHLTJETJets *fJets; //! transient
240
241 /** MC jets */
242 AliHLTJETJets *fJetsMC; //! transient
243
244 /** Array of indices of the matched reconstructed jets */
245 TArrayI *fMatchedJets; //! transient
246
247 /** Array of indices of the matched MC jets */
248 TArrayI *fMatchedJetsMC; //! transient
249
250 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
251 // ++ Analysis Output
252 // ++
253 // ++ -> Created once
254 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
255
256 // ---------------------------------------------------
257 // -- Difference in reconstruction
258 // ---------------------------------------------------
259
260 /** Matched Jets - delta Et */
261 TClonesArray *fDeltaEt; // see above
262
263 /** Delta eta ( pythia - jetfinder ) */
264 TClonesArray *fDeltaEta; // see above
265
266 /** Delta phi ( pythia - jetfinder ) */
267 TClonesArray *fDeltaPhi; // see above
268
269 /** Delta eta, delta phi( pythia - jetfinder ) */
270 TClonesArray *fDeltaEtaDeltaPhi; // see above
271
272 // ---------------------------------------------------
273 // -- Jet spectra
274 // ---------------------------------------------------
275
276 /** Jet spectra in Et */
277 TClonesArray *fSpectraEt; // see above
278
279 /** Jet spectra in eta */
280 TClonesArray *fSpectraEta; // see above
281
282 /** Jet spectra in phi */
283 TClonesArray *fSpectraPhi; // see above
284
285 // ---------------------------------------------------
286 // -- Correlations
287 // ---------------------------------------------------
288
289 /** Correleation pythia vs jet finder */
290 TClonesArray *fCorrelationsJetEt; // see above
291
292 // ---------------------------------------------------
293 // -- Resolutions
294 // ---------------------------------------------------
295
296 /** Resolutions for Et for jetfinder - pythia fixed */
297 TClonesArray *fResolutionsJetEt; // see above
298
299 /** Resolutions for Et for jetfinder - nearside fixed */
300 TClonesArray *fResolutionsDiJetEt; // see above
301
302 ClassDef(AliHLTJETAnalysisJets, 2);
303};
304#endif