]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PYTHIA6/AliGenPythiaEventHeader.cxx
Classed imported from EVGEN.
[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 /*
17 $Log$
18 Revision 1.2  2002/11/15 00:40:21  morsch
19 Information about trigger jets added.
20
21 Revision 1.1  2001/07/13 09:34:53  morsch
22 Event header class for Pythia added.
23
24 */
25
26 #include "AliGenPythiaEventHeader.h"
27 ClassImp(AliGenPythiaEventHeader)
28
29
30 void AliGenPythiaEventHeader::AddJet(Float_t px, Float_t py, Float_t pz, Float_t e)
31 {
32 //
33 //  Add a jet 
34 //
35     if (fNJets < 10) {
36         fJets[0][fNJets] = px;
37         fJets[1][fNJets] = py;
38         fJets[2][fNJets] = pz;
39         fJets[3][fNJets] = e;
40         fNJets++;
41     } else {
42         printf("\nWarning: More than 10 jets triggered !!\n");
43     }
44 }
45
46 void AliGenPythiaEventHeader::TriggerJet(Int_t i, Float_t p[4])
47 {
48 //
49 // Give back jet #i
50 //
51     if (i >= fNJets) {
52         printf("\nWarning: TriggerJet, index out of Range!!\n");
53     } else {
54         p[0] = fJets[0][i];
55         p[1] = fJets[1][i];
56         p[2] = fJets[2][i];
57         p[3] = fJets[3][i];
58     }
59 }