2 // $Id: AliHLTJETConeEtaPhiCell.cxx $
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de> *
8 //* for The ALICE HLT Project. *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /** @file AliHLTJETConeEtaPhiCell.cxx
20 @author Jochen Thaeder
22 @brief Cell in eta-phi space of the cone finder
25 // see header file for class documentation
27 // refer to README to build package
29 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
31 #include "AliHLTJETConeEtaPhiCell.h"
35 /** ROOT macro for the implementation of ROOT specific class methods */
36 ClassImp(AliHLTJETConeEtaPhiCell)
39 * ---------------------------------------------------------------------------------
40 * Constructor / Destructor
41 * ---------------------------------------------------------------------------------
44 //##################################################################################
45 AliHLTJETConeEtaPhiCell::AliHLTJETConeEtaPhiCell() :
54 // see header file for class documentation
56 // refer to README to build package
58 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
61 //##################################################################################
62 AliHLTJETConeEtaPhiCell::AliHLTJETConeEtaPhiCell( Int_t etaIdx, Int_t phiIdx,
63 AliESDtrack* track ) :
70 fTrackList( new TObjArray(20)), // XXXXXX 20
71 fTrackType( kTrackESD ) {
72 // see header file for class documentation
74 HLTDebug("New cell for ESD etaIdx %d - phiIdx %d", etaIdx, phiIdx );
79 //##################################################################################
80 AliHLTJETConeEtaPhiCell::AliHLTJETConeEtaPhiCell( Int_t etaIdx, Int_t phiIdx,
81 TParticle* particle ) :
88 fTrackList( new TObjArray(20)), // XXXXXX 20
89 fTrackType( kTrackMC ) {
90 // see header file for class documentation
92 HLTDebug("New cell for MC etaIdx %d - phiIdx %d", etaIdx, phiIdx );
98 //##################################################################################
99 AliHLTJETConeEtaPhiCell::~AliHLTJETConeEtaPhiCell() {
100 // see header file for class documentation
107 //##################################################################################
108 void AliHLTJETConeEtaPhiCell::Clear( Option_t* /*option*/ ) {
109 // see header file for class documentation
119 * ---------------------------------------------------------------------------------
121 * ---------------------------------------------------------------------------------
124 //##################################################################################
125 void AliHLTJETConeEtaPhiCell::AddTrack( AliESDtrack* track ){
126 // see header file for class documentation
128 Float_t weight = 1.0; // ** XXXX
130 fEta += (weight * track->Eta());
131 fPhi += (weight * track->Phi());
132 fPt += (weight * TMath::Abs(track->Pt()));
134 fTrackList->Add( (TObject*) track );
140 //##################################################################################
141 void AliHLTJETConeEtaPhiCell::AddTrack( TParticle* particle ){
142 // see header file for class documentation
144 Float_t weight = 1.0; // ** XXXX
146 fEta += (weight * particle->Eta());
147 fPhi += (weight * particle->Phi());
148 fPt += (weight * TMath::Abs( particle->Pt()));
150 fTrackList->Add( (TObject*) particle );