]>
Commit | Line | Data |
---|---|---|
4c039060 | 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$ | |
aee8290b | 18 | Revision 1.5 2000/06/08 13:34:50 fca |
19 | Better control of momentum range in GenBox | |
20 | ||
de6d59e3 | 21 | Revision 1.4 1999/09/29 09:24:29 fca |
22 | Introduction of the Copyright and cvs Log | |
23 | ||
4c039060 | 24 | */ |
25 | ||
fe4da5cc | 26 | /////////////////////////////////////////////////////////////////// |
27 | // // | |
28 | // Generate the final state of the interaction as the input // | |
29 | // to the MonteCarlo // | |
30 | // | |
31 | //Begin_Html | |
32 | /* | |
1439f98e | 33 | <img src="picts/AliGeneratorClass.gif"> |
fe4da5cc | 34 | </pre> |
35 | <br clear=left> | |
36 | <font size=+2 color=red> | |
37 | <p>The responsible person for this module is | |
38 | <a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>. | |
39 | </font> | |
40 | <pre> | |
41 | */ | |
42 | //End_Html | |
43 | // // | |
44 | /////////////////////////////////////////////////////////////////// | |
45 | ||
46 | #include "AliGenerator.h" | |
47 | #include "AliRun.h" | |
48 | ||
49 | ClassImp(AliGenerator) | |
50 | ||
51 | TGenerator* AliGenerator::fgMCEvGen=0; | |
52 | ||
53 | //____________________________________________________________ | |
54 | AliGenerator::AliGenerator() | |
55 | { | |
aee8290b | 56 | // |
57 | // Default constructor | |
58 | // | |
de6d59e3 | 59 | printf("\n AliGenerator Default Constructor\n\n"); |
4a3ba9d2 | 60 | |
fe4da5cc | 61 | gAlice->SetGenerator(this); |
de6d59e3 | 62 | SetThetaRange(); ResetBit(kThetaRange); |
63 | SetPhiRange(); ResetBit(kPhiRange); | |
64 | SetMomentumRange(); ResetBit(kMomentumRange); | |
65 | SetPtRange(); ResetBit(kPtRange); | |
66 | SetYRange(); ResetBit(kYRange); | |
fe4da5cc | 67 | SetNumberParticles(); |
4a3ba9d2 | 68 | SetTrackingFlag(); |
de6d59e3 | 69 | |
fe4da5cc | 70 | fOrigin.Set(3); |
71 | fOsigma.Set(3); | |
72 | fOrigin[0]=fOrigin[1]=fOrigin[2]=0; | |
73 | fOsigma[0]=fOsigma[1]=fOsigma[2]=0; | |
de6d59e3 | 74 | fVMin.Set(3); |
75 | fVMin[0]=fVMin[1]=fVMin[2]=0; | |
76 | fVMax.Set(3); | |
77 | fVMax[0]=fVMax[1]=fVMax[2]=10000; | |
fe4da5cc | 78 | } |
79 | ||
80 | //____________________________________________________________ | |
81 | AliGenerator::AliGenerator(Int_t npart) | |
82 | : TNamed(" "," ") | |
83 | { | |
aee8290b | 84 | // |
85 | // Standard constructor | |
86 | // | |
de6d59e3 | 87 | printf("\n AliGenerator Constructor initializing number of particles \n\n"); |
fe4da5cc | 88 | gAlice->SetGenerator(this); |
de6d59e3 | 89 | SetThetaRange(); ResetBit(kThetaRange); |
90 | SetPhiRange(); ResetBit(kPhiRange); | |
91 | SetMomentumRange(); ResetBit(kMomentumRange); | |
92 | SetPtRange(); ResetBit(kPtRange); | |
93 | SetYRange(); ResetBit(kYRange); | |
4a3ba9d2 | 94 | SetTrackingFlag(); |
de6d59e3 | 95 | |
fe4da5cc | 96 | fOrigin.Set(3); |
97 | fOsigma.Set(3); | |
98 | fOrigin[0]=fOrigin[1]=fOrigin[2]=0; | |
99 | fOsigma[0]=fOsigma[1]=fOsigma[2]=0; | |
100 | fVMin.Set(3); | |
101 | fVMin[0]=fVMin[1]=fVMin[2]=0; | |
102 | fVMax.Set(3); | |
103 | fVMax[0]=fVMax[1]=fVMax[2]=10000; | |
de6d59e3 | 104 | |
105 | SetNumberParticles(npart); | |
fe4da5cc | 106 | } |
107 | ||
aee8290b | 108 | //____________________________________________________________ |
109 | AliGenerator::AliGenerator(const AliGenerator &gen) : TNamed(" "," ") | |
110 | { | |
111 | // | |
112 | // Copy constructor | |
113 | // | |
114 | gen.Copy(*this); | |
115 | } | |
116 | ||
117 | //____________________________________________________________ | |
118 | AliGenerator & AliGenerator::operator=(const AliGenerator &gen) | |
119 | { | |
120 | // | |
121 | // Assignment operator | |
122 | // | |
123 | gen.Copy(*this); | |
124 | return (*this); | |
125 | } | |
126 | ||
127 | //____________________________________________________________ | |
128 | void AliGenerator::Copy(AliGenerator &gen) const | |
129 | { | |
130 | // | |
131 | // Copy *this onto gen | |
132 | // | |
133 | Fatal("Copy","Not implemented!\n"); | |
134 | } | |
135 | ||
fe4da5cc | 136 | //____________________________________________________________ |
137 | AliGenerator::~AliGenerator() | |
138 | { | |
aee8290b | 139 | // |
140 | // Destructor | |
141 | // | |
fe4da5cc | 142 | fOrigin.Set(0); |
143 | fOsigma.Set(0); | |
144 | delete fgMCEvGen; | |
145 | } | |
146 | ||
147 | void AliGenerator::Init() | |
148 | { | |
aee8290b | 149 | // |
150 | // Dummy initialisation | |
151 | // | |
fe4da5cc | 152 | } |
153 | ||
154 |