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