1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 //======================================================================
19 // Fill Unit Array class
20 // Base class used by AliJetESDReader to fill a UnitArray from the information extracted
21 // from the particle tracks or emcal cells
22 // Author: magali.estienne@subatech.in2p3.fr
23 //======================================================================
26 #include "AliJetFillUnitArray.h"
28 // --- ROOT system ---
35 // --- AliRoot header files ---
38 class AliJetESDReader;
39 class AliJetESDReaderHeader;
40 class AliJetUnitArray;
42 ClassImp(AliJetFillUnitArray)
44 //_____________________________________________________________________________
45 AliJetFillUnitArray::AliJetFillUnitArray()
46 : TTask("AliJetFillUnitArray","Fill Unit Array with tpc/its and emcal information"),
80 //_____________________________________________________________________________
81 AliJetFillUnitArray::~AliJetFillUnitArray()
86 //_____________________________________________________________________________
87 void AliJetFillUnitArray::GetEtaPhiFromIndex(Int_t index, Float_t &eta, Float_t &phi)
89 // Get the eta,phi position from the index
91 for(Int_t j=0; j<fNphi+1; j++) {
92 for(Int_t i=0; i<fNeta+1; i++) {
95 //-------------------------------------
97 if(j*(fNeta+1)+i == index) {
104 //-------------------------------------
107 if(i>0 && i<(fEtaBinInTPCAcc-fEtaBinInEMCalAcc)/2) ii = i;
108 if(i>=(fEtaBinInTPCAcc+fEtaBinInEMCalAcc)/2 && i<fNeta+1) ii = i-fEtaBinInEMCalAcc;
111 if(j<(fNbinPhi+1) && j*(fNeta+1)+i == index) {
116 if((j>=(fNbinPhi+1) && j<(fNbinPhi+1+fPhiBinInEMCalAcc)) &&
117 ((fNbinPhi+1)*(fNeta+1) + (j-fNbinPhi-1)*(fEtaBinInTPCAcc-fEtaBinInEMCalAcc) + ii)== index ) {
118 if(ii==0) {Int_t ind = 0; eta = fEta2->At(ind);}
119 else eta = fEta2->At(i);
123 if(j>=(fNbinPhi+1+fPhiBinInEMCalAcc) && ((fNbinPhi+1)*(fNeta+1)+fPhiBinInEMCalAcc*((fEtaBinInTPCAcc-fEtaBinInEMCalAcc))+(j-(fNbinPhi+1+fPhiBinInEMCalAcc))*(fNeta+1)+i == index)) {
132 //_____________________________________________________________________________
133 Float_t AliJetFillUnitArray::EtaToTheta(Float_t arg)
135 return 2.*atan(exp(-arg));