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