3 // $Id: AliHLTJETConeGrid.h $
5 #ifndef ALIHLTJETCONEGRID_H
6 #define ALIHLTJETCONEGRID_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 AliHLTJETConeGrid.h
13 @author Jochen Thaeder
15 @brief Eta-Phi grid of the cone finder
18 // see below for class documentation
20 // refer to README to build package
22 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
25 #include "TClonesArray.h"
26 #include "TParticle.h"
28 #include "AliESDtrack.h"
30 #include "AliHLTLogging.h"
31 #include "AliHLTJETBase.h"
34 * @class AliHLTJETConeGrid
35 * Eta-Phi grid of the cone finder
37 * @ingroup alihlt_jet_cone
40 class AliHLTJETConeGrid : public AliHLTLogging, public TObject {
45 * ---------------------------------------------------------------------------------
46 * Constructor / Destructor
47 * ---------------------------------------------------------------------------------
50 /** standard constructor */
54 virtual ~AliHLTJETConeGrid();
57 * ---------------------------------------------------------------------------------
59 * ---------------------------------------------------------------------------------
62 /** Fill particle into grid -> into cell
63 * retrieve the grid indeces and get (eta,phi,pt) of the particle
64 * @param esdTrack ptr to track
65 * @param aEtaPhi array to be filled with (eta,phi,pt) of the particle
66 * @param aGridIdx array to be filled with grid indeces
67 * @return 0 on sucess, < 0 for error
69 Int_t FillTrack( TParticle* particle, const Float_t* aEtaPhi, Int_t* aGridIdx );
71 /** Fill track into grid -> into cell
72 * retrieve the grid indeces and get (eta,phi,pt) of the track
73 * @param esdTrack ptr to track
74 * @param aEtaPhi array to be filled with (eta,phi,pt) of the track
75 * @param aGridIdx array to be filled with grid indeces
76 * @return 0 on sucess, < 0 for error
78 Int_t FillTrack( AliESDtrack* esdTrack, const Float_t* aEtaPhi, Int_t* aGridIdx );
81 * ---------------------------------------------------------------------------------
83 * ---------------------------------------------------------------------------------
87 * @return 0 on sucess, < 0 for error
95 * ---------------------------------------------------------------------------------
97 * ---------------------------------------------------------------------------------
100 /** Set eta range parameters */
101 void SetEtaRange( Float_t etaMin, Float_t etaMax, Float_t etaRange )
102 { fEtaMin = etaMin; fEtaMax = etaMax; fEtaRange = etaRange; }
104 /** Set eta range parameters */
105 void SetPhiRange( Float_t phiMin, Float_t phiMax, Float_t phiRange )
106 { fPhiMin = phiMin; fPhiMax = phiMax; fPhiRange = phiRange; }
109 void SetBinning( Float_t etaBinning, Float_t phiBinning )
110 { fEtaBinning = etaBinning; fPhiBinning = phiBinning; }
112 /** Set cone radius */
113 void SetConeRadius( Float_t coneRadius) { fConeRadius = coneRadius; }
116 * ---------------------------------------------------------------------------------
118 * ---------------------------------------------------------------------------------
122 * Returns idx for the next cell in around seed
123 * @return idx, -1 if false
127 /** Seed cell iterator
128 * Sets cell iterator for the NextCell method for
130 * @param etaIdx Eta index of seed
131 * @param phiIdx Phi index of seed
133 void SetCellIter( const Int_t etaIdx, const Int_t phiIdx );
136 /** Check if there is an object at cellIdx in fGrid
137 * @param cellIdx CellIdx where there coulf be an object
138 * @return ptr to cell, NULL if empty
140 TObject* UncheckedAt( Int_t cellIdx ) { return fGrid->UncheckedAt(cellIdx); }
143 // reinterpret_cast<AliHLTJETConeEtaPhiCell*>((*fGrid)[cellIdx])
144 //if ( ( iResult = jet->AddCell(fGrid->GetCell(cellIdx)) ) ) {
148 ///////////////////////////////////////////////////////////////////////////////////
152 /** copy constructor prohibited */
153 AliHLTJETConeGrid (const AliHLTJETConeGrid&);
155 /** assignment operator prohibited */
156 AliHLTJETConeGrid& operator= (const AliHLTJETConeGrid&);
159 * ---------------------------------------------------------------------------------
161 * ---------------------------------------------------------------------------------
164 /** Get Cell index out of eta and phi
165 * @param aEtaPhi input structure containing eta,phi
168 * @param aGridIdx output structure containing grid index
169 * [0] = 1D index in primary region
170 * [1] = 1D index in outter region
171 * [2] = eta index in primary region
172 * [3] = phi index in primary region
173 * [4] = phi index in outter region
174 * @return 0 on sucess, 1 for outter phi present, <0 for error
176 Int_t GetCellIndex( const Float_t* aEtaPhi, Int_t* aGridIdx );
179 * ---------------------------------------------------------------------------------
181 * ---------------------------------------------------------------------------------
187 TClonesArray* fGrid; //! transient
189 // -- Grid boundaries in eta and phi - set via setter
192 Float_t fEtaMin; // see above
195 Float_t fEtaMax; // see above
198 Float_t fPhiMin; // see above
201 Float_t fPhiMax; // see above
203 /** Total eta range */
204 Float_t fEtaRange; // see above
207 * abs(phimin)+phiMax + 2*coneRadius;
209 Float_t fPhiRange; // see above
211 // -- Grid parameter - set via setter
213 /** Binning in eta */
214 Float_t fEtaBinning; // see above
216 /** Binning in phi */
217 Float_t fPhiBinning; // see above
219 // -- Number of bins in eta and phi - set via Initialize()
221 /** Number of grid bins in eta */
222 Int_t fEtaNGridBins; // see above
224 /** Number of grid bins in phi */
225 Int_t fPhiNGridBins; // see above
227 /** Total number of bins */
228 Int_t fNBins; // see above
230 // -- Bins around R - set via Initialize()
232 /** Number of grid bins in eta in R */
233 Int_t fEtaNRBins; // see above
235 /** Number of grid bins in phi in R */
236 Int_t fPhiNRBins; // see above
238 // -- Cell iterator - set in SetCellIter()
240 /** Eta Idx - current */
241 Int_t fEtaIdxCurrent; // see above
244 Int_t fEtaIdxMin; // see above
247 Int_t fEtaIdxMax; // see above
249 /** Phi Idx - current */
250 Int_t fPhiIdxCurrent; // see above
253 Int_t fPhiIdxMin; // see above
256 Int_t fPhiIdxMax; // see above
258 // -- Cone radius - set via setter
261 Float_t fConeRadius; // see above
263 ClassDef(AliHLTJETConeGrid, 1)