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