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