]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA6/AliGenPythiaEventHeader.cxx
fWSN->Eval(0.001) to avoid fpe.
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythiaEventHeader.cxx
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 ClassImp(AliGenPythiaEventHeader)
20
21
22 void AliGenPythiaEventHeader::AddJet(Float_t px, Float_t py, Float_t pz, Float_t e)
23 {
24 //
25 //  Add a jet 
26 //
27     if (fNJets < 10) {
28         fJets[0][fNJets] = px;
29         fJets[1][fNJets] = py;
30         fJets[2][fNJets] = pz;
31         fJets[3][fNJets] = e;
32         fNJets++;
33     } else {
34         printf("\nWarning: More than 10 jets triggered !!\n");
35     }
36 }
37
38 void AliGenPythiaEventHeader::TriggerJet(Int_t i, Float_t p[4])
39 {
40 //
41 // Give back jet #i
42 //
43     if (i >= fNJets) {
44         printf("\nWarning: TriggerJet, index out of Range!!\n");
45     } else {
46         p[0] = fJets[0][i];
47         p[1] = fJets[1][i];
48         p[2] = fJets[2][i];
49         p[3] = fJets[3][i];
50     }
51 }