3 // $Id: AliHLTJETAnalysisJets.h $
5 #ifndef ALIHLTJETANALYSISJETS_H
6 #define ALIHLTJETANALYSISJETS_H
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 */
12 /** @file AliHLTJETAnalysisJets.h
13 @author Jochen Thaeder <jochen@thaeder.de>
15 @brief Container holding analysis objects
18 // see below for class documentation
20 // refer to README to build package
22 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
30 #include "AliHLTLogging.h"
31 #include "AliHLTMCEvent.h"
32 #include "AliHLTJets.h"
34 #include "AliHLTJETBase.h"
36 #include "AliHLTJETAnalysisBase.h"
39 * @class AliHLTJETAnalysisJets
40 * This class is a container which holds TClonesArrys of
41 * histograms needed for the Jet Analysis.
43 * It need a ptr to MC information (pythia jets) and
44 * reconstructed jets in the form of AliHLTJets.
47 * @ingroup alihlt_jet_analysis
50 class AliHLTJETAnalysisJets : public TObject, public AliHLTLogging {
54 * ---------------------------------------------------------------------------------
55 * Constructor / Destructor
56 * ---------------------------------------------------------------------------------
60 AliHLTJETAnalysisJets();
63 ~AliHLTJETAnalysisJets();
66 * ---------------------------------------------------------------------------------
67 * Initialize / Setup / Reset - public
68 * ---------------------------------------------------------------------------------
71 /** Setup analysis class
72 * @return 0 on success, <0 on failure
76 /** Reset input for current event */
80 * ---------------------------------------------------------------------------------
82 * ---------------------------------------------------------------------------------
85 /** Set reconstructed jets
86 * @param jets Ptr to AliHLTJets
88 void SetJetsRec( AliHLTJets* jets );
91 * Filled in order of presence
92 * @param hltMcEvent Ptr to AliHLTMCEvent, sets pythia jets in HLT environment
93 * @param mcEvent Ptr to AliMCEvent, sets pythia jets in Off-line environment
94 * @param jets Ptr to AliHLTJets
96 void SetJetsCmp( AliHLTMCEvent* hltMcEvent, AliMCEvent* mcEvent, AliHLTJets* jets );
99 * ---------------------------------------------------------------------------------
101 * ---------------------------------------------------------------------------------
104 /** Returns histogram dependent of histogram type and plot type
105 * @param histIdx histogram type (Ptr to TClonesArray),
106 * @see AliHLTJETAnalysisBase
107 * @param plotIdx plot type (Entry Idx in TClonesArray),
108 * @see AliHLTJETAnalysisBase
109 * @return Ptr to TH1 on success, NULL on failure
111 TH1* GetHistogram ( Int_t histIdx, Int_t plotIdx );
114 * ---------------------------------------------------------------------------------
116 * ---------------------------------------------------------------------------------
120 * -Fill unmatched jets into histograms
122 * -Fill matched jets into histograms
123 * @return 0 on success, <0 on failure
127 ///////////////////////////////////////////////////////////////////////////////////
131 /** copy constructor prohibited */
132 AliHLTJETAnalysisJets(const AliHLTJETAnalysisJets&);
134 /** assignment operator prohibited */
135 AliHLTJETAnalysisJets& operator=(const AliHLTJETAnalysisJets&);
138 * ---------------------------------------------------------------------------------
139 * Setup / Reset - private
140 * ---------------------------------------------------------------------------------
143 /** Setup Delta histograms */
144 void SetupDeltaHistograms();
146 /** Setup Spectra histograms */
147 void SetupSpectraHistograms();
149 /** Setup matched histograms */
150 void SetupMatchedHistograms();
153 * ---------------------------------------------------------------------------------
155 * ---------------------------------------------------------------------------------
158 /** Match Pythia and Reconstructed Jets
159 * @return 0 on success, <0 on failure
164 * ---------------------------------------------------------------------------------
166 * ---------------------------------------------------------------------------------
169 /** Fill basic Spectra histogram */
170 void FillBasicSpectraHistograms();
172 /** Fill unmatched Delta histogram */
173 void FillUnmatchedDeltaHistograms();
175 /** Fill matched Delta histogram */
176 void FillMatchedDeltaHistograms();
178 /** Fill matched Spectra histogram */
179 void FillMatchedSpectraHistograms();
181 /** Fill matched histogram */
182 void FillMatchedHistograms();
185 * ---------------------------------------------------------------------------------
187 * ---------------------------------------------------------------------------------
190 /** Setup histogram with common parameters
191 * @param hist Ptr to histogram
193 void SetupHist( TH1* hist );
195 /** Fill 1D histogram, in a TClonesArray
196 * @param array Ptr to TClonesArray of histograms
197 * @param idx Index in the TClonesArray
198 * @param valueX x value
200 void FillHist( TClonesArray* array, Int_t idx, Float_t valueX );
202 /** Fill 2D histogram, in a TClonesArray
203 * @param array Ptr to TClonesArray of histograms
204 * @param idx Index in the TClonesArray
205 * @param valueX x value
206 * @param valueY y value
208 void FillHist( TClonesArray* array, Int_t idx, Float_t valueX, Float_t valueY );
210 /** Get Distance^2 in eta phi space of 2 jets
211 * @param jet1 Ptr to jet 1
212 * @param jet2 Ptr to jet 2
215 Float_t GetDistance2( AliAODJet *jet1, AliAODJet *jet2);
218 * ---------------------------------------------------------------------------------
220 * ---------------------------------------------------------------------------------
223 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
226 // ++-> replaced every event
227 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
229 /** MC jets are filled in fJetsCmp */
230 Bool_t fHasMC; // see above
232 // ---------------------------------------------------
233 // -- Members filled per event
234 // ---------------------------------------------------
236 /** reconstructed jets */
237 AliHLTJets *fJetsRec; //! transient
239 /** compare jets - rec or MC */
240 AliHLTJets *fJetsCmp; //! transient
242 /** Array of indices of the matched reconstructed jets */
243 TArrayI *fMatchedJetsRec; //! transient
245 /** Array of indices of the matched compae jets */
246 TArrayI *fMatchedJetsCmp; //! transient
249 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
250 // ++ Analysis Parameter
252 // ++ -> Created once
253 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
255 Float_t fMatchingThreshold; // see above
257 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
258 // ++ Analysis Output
260 // ++ -> Created once
261 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
263 // ---------------------------------------------------
264 // -- Difference in reconstruction
265 // ---------------------------------------------------
267 /** Matched Jets - delta Et */
268 TClonesArray *fDeltaEt; // see above
270 /** Delta eta ( jetRec - jetCmp ) */
271 TClonesArray *fDeltaEta; // see above
273 /** Delta phi ( jetRec - jetCmp ) */
274 TClonesArray *fDeltaPhi; // see above
276 /** Delta eta, delta phi ( jetRec - jetCmp ) */
277 TClonesArray *fDeltaEtaDeltaPhi; // see above
279 // ---------------------------------------------------
281 // ---------------------------------------------------
283 /** Jet spectra in Et */
284 TClonesArray *fSpectraEt; // see above
286 /** Jet spectra in eta */
287 TClonesArray *fSpectraEta; // see above
289 /** Jet spectra in phi */
290 TClonesArray *fSpectraPhi; // see above
292 // ---------------------------------------------------
294 // ---------------------------------------------------
296 /** Correleation jetRec vs jetCmp finder */
297 TClonesArray *fCorrelationsJetEt; // see above
299 // ---------------------------------------------------
301 // ---------------------------------------------------
303 /** Resolutions for Et for jetRec - jetCmp fixed */
304 TClonesArray *fResolutionsJetEt; // see above
306 /** Resolutions for Et for jetfinder - nearside fixed */
307 TClonesArray *fResolutionsDiJetEt; // see above
309 ClassDef(AliHLTJETAnalysisJets, 3);