]>
Commit | Line | Data |
---|---|---|
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 | ||
16 | /* $Id: */ | |
17 | /* | |
18 | $Log$ | |
d8ac6858 | 19 | Revision 1.2 2002/10/14 14:55:35 hristov |
20 | Merging the VirtualMC branch to the main development branch (HEAD) | |
21 | ||
b9d0a01d | 22 | Revision 1.1.2.1 2002/08/28 15:06:50 alibrary |
23 | Updating to v3-09-01 | |
24 | ||
25 | Revision 1.1 2002/08/21 10:29:29 schutz | |
26 | New classes (by Renan) | |
27 | ||
73e3f083 | 28 | */ |
29 | ||
30 | //*-- Author: Renan Cabrera (Creighton U.) | |
31 | ||
32 | #include "AliEMCALParton.h" | |
33 | #include "Ecommon.h" | |
73e3f083 | 34 | ClassImp(AliEMCALParton) |
35 | ||
36 | //____________________________________________________________________________ | |
37 | AliEMCALParton::AliEMCALParton() | |
38 | { | |
39 | // Default constructor | |
d8ac6858 | 40 | fTrackEnergy = 0; |
41 | fTrackEta = 0; | |
42 | fTrackPhi = 0; | |
43 | fTrackPDG = 0; | |
44 | fNTracks = 0; | |
73e3f083 | 45 | } |
46 | ||
47 | AliEMCALParton::AliEMCALParton(Float_t energy, Float_t phi, Float_t eta) | |
48 | { | |
49 | // Constructor | |
50 | fEnergy = energy; | |
51 | fPhi = phi; | |
52 | fEta = eta; | |
d8ac6858 | 53 | fTrackEnergy = 0; |
54 | fTrackEta = 0; | |
55 | fTrackPhi = 0; | |
56 | fTrackPDG = 0; | |
57 | fNTracks = 0; | |
58 | } | |
59 | ||
60 | void AliEMCALParton::SetTrackList(Int_t NTracks, Float_t* Energy, Float_t* Eta, Float_t* Phi, Int_t* PDG) | |
61 | { | |
62 | ||
63 | if (fNTracks) | |
64 | { | |
65 | delete[] fTrackEnergy; | |
66 | delete[] fTrackEta; | |
67 | delete[] fTrackPhi; | |
68 | delete[] fTrackPDG; | |
69 | } | |
70 | fNTracks = NTracks; | |
71 | fTrackEnergy = new Float_t[NTracks]; | |
72 | fTrackEta = new Float_t[NTracks]; | |
73 | fTrackPhi = new Float_t[NTracks]; | |
74 | fTrackPDG = new Int_t[NTracks]; | |
75 | ||
76 | for (Int_t i=0;i<NTracks;i++) | |
77 | { | |
78 | fTrackEnergy[i] = Energy[i] ; | |
79 | fTrackEta[i] = Eta[i]; | |
80 | fTrackPhi[i] = Phi[i]; | |
81 | fTrackPDG[i] = PDG[i]; | |
82 | } | |
83 | } | |
84 | ||
85 | void AliEMCALParton::GetTrackList(Float_t* Energy, Float_t* Eta, Float_t* Phi, Int_t* PDG) | |
86 | { | |
87 | for (Int_t i=0;i<fNTracks;i++) | |
88 | { | |
89 | Energy[i] = fTrackEnergy[i] ; | |
90 | Eta[i] = fTrackEta[i]; | |
91 | Phi[i] = fTrackPhi[i]; | |
92 | PDG[i] = fTrackPDG[i]; | |
93 | } | |
73e3f083 | 94 | } |
95 | ||
d8ac6858 | 96 | |
73e3f083 | 97 | //____________________________________________________________________________ |
98 | ||
99 | AliEMCALParton::~AliEMCALParton() | |
100 | { | |
101 | // Destructor | |
d8ac6858 | 102 | delete[] fTrackEnergy; |
103 | delete[] fTrackEta; | |
104 | delete[] fTrackPhi; | |
105 | delete[] fTrackPDG; | |
106 | ||
73e3f083 | 107 | } |