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