Made more robust
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALParton.cxx
CommitLineData
73e3f083 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
803d1ab0 16/* $Id$ */
73e3f083 17
18//*-- Author: Renan Cabrera (Creighton U.)
19
20#include "AliEMCALParton.h"
21#include "Ecommon.h"
5d3836c4 22#include <Riostream.h>
73e3f083 23ClassImp(AliEMCALParton)
24
25//____________________________________________________________________________
26AliEMCALParton::AliEMCALParton()
27{
28 // Default constructor
561356e3 29// fTrackEnergy = 0;
30// fTrackEta = 0;
31// fTrackPhi = 0;
32// fTrackPDG = 0;
d8ac6858 33 fNTracks = 0;
73e3f083 34}
35
36AliEMCALParton::AliEMCALParton(Float_t energy, Float_t phi, Float_t eta)
37{
38 // Constructor
39 fEnergy = energy;
40 fPhi = phi;
41 fEta = eta;
561356e3 42// fTrackEnergy = 0;
43// fTrackEta = 0;
44// fTrackPhi = 0;
45// fTrackPDG = 0;
d8ac6858 46 fNTracks = 0;
47}
48
49void AliEMCALParton::SetTrackList(Int_t NTracks, Float_t* Energy, Float_t* Eta, Float_t* Phi, Int_t* PDG)
50{
e7592837 51// Set the stored tracklist
d8ac6858 52 fNTracks = NTracks;
d8ac6858 53 for (Int_t i=0;i<NTracks;i++)
54 {
55 fTrackEnergy[i] = Energy[i] ;
56 fTrackEta[i] = Eta[i];
57 fTrackPhi[i] = Phi[i];
58 fTrackPDG[i] = PDG[i];
561356e3 59 }
d8ac6858 60}
61
1b080388 62void AliEMCALParton::GetTrackList(Float_t* Energy, Float_t* Eta, Float_t* Phi, Int_t* PDG) const
d8ac6858 63{
e7592837 64// retrieves the stored tracklist
d8ac6858 65 for (Int_t i=0;i<fNTracks;i++)
66 {
67 Energy[i] = fTrackEnergy[i] ;
68 Eta[i] = fTrackEta[i];
69 Phi[i] = fTrackPhi[i];
70 PDG[i] = fTrackPDG[i];
71 }
73e3f083 72}
73
d8ac6858 74
73e3f083 75//____________________________________________________________________________
76
77AliEMCALParton::~AliEMCALParton()
78{
79 // Destructor
d8ac6858 80
73e3f083 81}