EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythiaEventHeader.cxx
CommitLineData
8d2cd130 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
88cb7938 16/* $Id$ */
8d2cd130 17
18#include "AliGenPythiaEventHeader.h"
925e6570 19ClassImp(AliGenPythiaEventHeader)
8d2cd130 20
21
e8a8adcd 22AliGenPythiaEventHeader::AliGenPythiaEventHeader():
23 fProcessType(0),
24 fTrials(0),
25 fNJets(0),
26 fNUQJets(0),
27 fXJet(-1.),
28 fYJet(-1.),
29 fPtHard(0.)
127a43fc 30{
31// Default Constructor
45df8471 32 for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
127a43fc 33}
34
e8a8adcd 35AliGenPythiaEventHeader::AliGenPythiaEventHeader(const char* name):
36 AliGenEventHeader(name),
37 fProcessType(0),
38 fTrials(0),
39 fNJets(0),
40 fNUQJets(0),
41 fXJet(-1.),
42 fYJet(-1.),
43 fPtHard(0.)
127a43fc 44{
45// Constructor
45df8471 46 for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
127a43fc 47}
48
8d2cd130 49void AliGenPythiaEventHeader::AddJet(Float_t px, Float_t py, Float_t pz, Float_t e)
50{
51//
52// Add a jet
53//
54 if (fNJets < 10) {
55 fJets[0][fNJets] = px;
56 fJets[1][fNJets] = py;
57 fJets[2][fNJets] = pz;
58 fJets[3][fNJets] = e;
59 fNJets++;
60 } else {
61 printf("\nWarning: More than 10 jets triggered !!\n");
62 }
63}
64
45df8471 65void AliGenPythiaEventHeader::AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e)
66{
67//
68// Add a jet
69//
70 if (fNUQJets < 10) {
71 fUQJets[0][fNUQJets] = px;
72 fUQJets[1][fNUQJets] = py;
73 fUQJets[2][fNUQJets] = pz;
74 fUQJets[3][fNUQJets] = e;
75 fNUQJets++;
76 } else {
77 printf("\nWarning: More than 10 jets triggered !!\n");
78 }
79}
80
81void AliGenPythiaEventHeader::SetZQuench(Double_t z[4])
82{
83 //
84 // Set quenching fraction
85 //
86 for (Int_t i = 0; i < 4; i++) fZquench[i] = z[i];
87}
88
89void AliGenPythiaEventHeader::GetZQuench(Double_t z[4])
90{
91 //
92 // Get quenching fraction
93 //
94 for (Int_t i = 0; i < 4; i++) z[i] = fZquench[i];
95}
96
8d2cd130 97void AliGenPythiaEventHeader::TriggerJet(Int_t i, Float_t p[4])
98{
99//
100// Give back jet #i
101//
102 if (i >= fNJets) {
103 printf("\nWarning: TriggerJet, index out of Range!!\n");
104 } else {
105 p[0] = fJets[0][i];
106 p[1] = fJets[1][i];
107 p[2] = fJets[2][i];
108 p[3] = fJets[3][i];
109 }
110}
45df8471 111
112void AliGenPythiaEventHeader::UQJet(Int_t i, Float_t p[4])
113{
114//
115// Give back jet #i
116//
117 if (i >= fNUQJets) {
118 printf("\nWarning: Unquenched Jets, index out of Range!!\n");
119 } else {
120 p[0] = fUQJets[0][i];
121 p[1] = fUQJets[1][i];
122 p[2] = fUQJets[2][i];
123 p[3] = fUQJets[3][i];
124 }
125}
126
127void AliGenPythiaEventHeader::SetXYJet(Double_t x, Double_t y)
128{
129
130//
131// Add jet production point
132//
133 fXJet = x;
134 fYJet = y;
135}