]>
Commit | Line | Data |
---|---|---|
7c3c85cd | 1 | //-*- Mode: C++ -*- |
2 | ||
3 | // $Id: AliHLTJETConeJetCandidate.h $ | |
4 | ||
5 | #ifndef ALIHLTJETCONEJETCANDIDATE_H | |
6 | #define ALIHLTJETCONEJETCANDIDATE_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 AliHLTJETConeJetCandidate.h | |
13 | @author Jochen Thaeder | |
14 | @date | |
15 | @brief Jet candidate of the cone finder | |
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 "TClonesArray.h" | |
25 | ||
26 | #include "AliHLTLogging.h" | |
27 | #include "AliHLTJETBase.h" | |
28 | ||
29 | class AliHLTJETConeEtaPhiCell; | |
30 | ||
31 | /** | |
32 | * @class AliHLTJETConeJetCandidate | |
33 | * This class is contstructed with a seed and contains a found jet | |
34 | * from the jet cone finder | |
35 | * Two options exist: | |
36 | * <ul> | |
37 | * <li>Add up the whole cell to the jet candidate<li> | |
38 | * <li>Add up only patricles inside the coneradius to the jet candidate<li> | |
39 | * </ul> | |
40 | * | |
41 | * @ingroup alihlt_jet_cone | |
42 | */ | |
43 | ||
44 | class AliHLTJETConeJetCandidate : public TObject, public AliHLTLogging { | |
45 | public: | |
46 | ||
47 | /* | |
48 | * --------------------------------------------------------------------------------- | |
49 | * Constructor / Destructor | |
50 | * --------------------------------------------------------------------------------- | |
51 | */ | |
52 | ||
53 | /** Constructor | |
54 | * @param aEtaPhi eta and phi of the seed | |
55 | * @param aGridIdx indeces in the grid | |
56 | * @param useWholeCell XXXXX | |
57 | */ | |
58 | AliHLTJETConeJetCandidate( const Float_t* aEtaPhi, const Int_t* aGridIdx, | |
59 | Float_t coneRadius, Bool_t useWholeCell = kTRUE); | |
60 | ||
61 | /** Destructor */ | |
62 | ~AliHLTJETConeJetCandidate(); | |
63 | ||
64 | /* | |
65 | * --------------------------------------------------------------------------------- | |
66 | * Getter | |
67 | * --------------------------------------------------------------------------------- | |
68 | */ | |
69 | ||
70 | // -- Sees properties | |
71 | ||
72 | /** Get cell eta index of seed*/ | |
73 | Int_t GetSeedEtaIdx() { return fSeedEtaIdx; } | |
74 | ||
75 | /** Get cell phi index of seed*/ | |
76 | Int_t GetSeedPhiIdx() { return fSeedPhiIdx; } | |
77 | ||
78 | /** Get pt of seed */ | |
79 | Float_t GetSeedPt() { return fSeedPt; } | |
80 | ||
81 | // -- Jet properties | |
82 | ||
83 | /** Get eta of jet */ | |
84 | Float_t GetEta() { return ( (!fNTracks) ? 0. : fEta / fNTracks); } | |
85 | ||
86 | /** Get phi of jet */ | |
87 | Float_t GetPhi() { return ( (!fNTracks) ? 0. : fPhi / fNTracks); } | |
88 | ||
89 | /** Get pt of jet */ | |
90 | Float_t GetPt() { return fPt; } | |
91 | ||
92 | /** Get Et of jet */ | |
93 | Float_t GetEt() { return fPt; } | |
94 | ||
95 | /* | |
96 | * --------------------------------------------------------------------------------- | |
97 | * Process | |
98 | * --------------------------------------------------------------------------------- | |
99 | */ | |
100 | ||
101 | /** Add cell to JetCandidate | |
102 | * @param cell ptr to cell | |
103 | * @return 0 on success, <0 on failure | |
104 | */ | |
105 | Int_t AddCell( AliHLTJETConeEtaPhiCell* cell ); | |
106 | ||
107 | ||
108 | ||
109 | /* XXXXXXXXXX | |
110 | void SetAll( Float_t pt, Float_t eta, Float_t phi, Int_t nTracks, Bool_t useWholeCell) { | |
111 | fPt = pt; | |
112 | fEta = eta*nTracks; | |
113 | fPhi = phi*nTracks; | |
114 | fNTracks = nTracks; | |
115 | fUseWholeCell = useWholeCell; | |
116 | } | |
117 | */ | |
118 | ||
119 | /* | |
120 | * --------------------------------------------------------------------------------- | |
121 | * Sort of JetCandidates | |
122 | * --------------------------------------------------------------------------------- | |
123 | */ | |
124 | ||
125 | /** Compare this class with an other instance of this class | |
126 | * used in a TClonesArray::Sort() | |
127 | * @param obj ptr to other instance | |
128 | * @return Returns 0 when equal, 1 when this is smaller | |
129 | * and -1 when bigger -- sorts descending | |
130 | */ | |
131 | Int_t Compare( const TObject* obj) const; | |
132 | ||
133 | ||
134 | /** Defines this class as being sortable in a TClonesArray | |
135 | * @return always kTRUE; | |
136 | */ | |
137 | Bool_t IsSortable() const { return kTRUE; } | |
138 | ||
139 | /////////////////////////////////////////////////////////////////////////////////// | |
140 | ||
141 | private: | |
142 | ||
143 | /** standard constructor prohibited */ | |
144 | AliHLTJETConeJetCandidate(); | |
145 | ||
146 | /** copy constructor prohibited */ | |
147 | AliHLTJETConeJetCandidate(const AliHLTJETConeJetCandidate&); | |
148 | ||
149 | /** assignment operator prohibited */ | |
150 | AliHLTJETConeJetCandidate& operator=(const AliHLTJETConeJetCandidate&); | |
151 | ||
152 | /* | |
153 | * --------------------------------------------------------------------------------- | |
154 | * Helper - private | |
155 | * --------------------------------------------------------------------------------- | |
156 | */ | |
157 | ||
158 | /** Get distance squared between two points in eta-phi | |
159 | * @param eta1 eta coordinate of first point | |
160 | * @param phi1 phi coordinate of first point | |
161 | * @param eta2 eta coordinate of second point | |
162 | * @param phi2 phi coordinate of second point | |
163 | * @return Distance squared | |
164 | */ | |
165 | Float_t GetDistance2( const Float_t eta1, const Float_t phi1, | |
166 | const Float_t eta2, const Float_t phi2); | |
167 | ||
168 | /** Check if particle is in side the cne | |
169 | * @param eta eta coordinate | |
170 | * @param phi phi coordinate | |
171 | * @return kTRUE if it is, otherwise kFALSE | |
172 | */ | |
173 | Bool_t InCone( Float_t eta, Float_t phi ); | |
174 | ||
175 | /* | |
176 | * --------------------------------------------------------------------------------- | |
177 | * Members - private | |
178 | * --------------------------------------------------------------------------------- | |
179 | */ | |
180 | ||
181 | // -- Seed cell index parameters | |
182 | ||
183 | /** Seed cell index */ | |
184 | Int_t fSeedCellIdx; // see above | |
185 | ||
186 | /** Seed cell eta index */ | |
187 | Int_t fSeedEtaIdx; // see above | |
188 | ||
189 | /** Seeed cell phi index */ | |
190 | Int_t fSeedPhiIdx; // see above | |
191 | ||
192 | // -- Seed parameters | |
193 | ||
194 | /** seed eta */ | |
195 | Float_t fSeedEta; // see above | |
196 | ||
197 | /** seed phi */ | |
198 | Float_t fSeedPhi; // see above | |
199 | ||
200 | /** seed pt */ | |
201 | Float_t fSeedPt; // see above | |
202 | ||
203 | // -- Summed variables | |
204 | ||
205 | /** Summed eta */ | |
206 | Float_t fEta; // see above | |
207 | ||
208 | /** Summed phi */ | |
209 | Float_t fPhi; // see above | |
210 | ||
211 | /** Summed pt */ | |
212 | Float_t fPt; // see above | |
213 | ||
214 | /** Number of tracks in JetCandidate */ | |
215 | UInt_t fNTracks; // see above | |
216 | ||
217 | /** Flag if whole cell should be added, or every track */ | |
218 | Bool_t fUseWholeCell; // see above | |
219 | ||
220 | /** Cone radius squared */ | |
221 | Float_t fConeRadius2; // see above | |
222 | ||
223 | ClassDef(AliHLTJETConeJetCandidate, 1) | |
224 | }; | |
225 | #endif |