Casting to eliminate constructor ambiguity
[u/mrichter/AliRoot.git] / STEER / AliGenerator.cxx
CommitLineData
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$
de6d59e3 18Revision 1.4 1999/09/29 09:24:29 fca
19Introduction of the Copyright and cvs Log
20
4c039060 21*/
22
fe4da5cc 23///////////////////////////////////////////////////////////////////
24// //
25// Generate the final state of the interaction as the input //
26// to the MonteCarlo //
27//
28//Begin_Html
29/*
1439f98e 30<img src="picts/AliGeneratorClass.gif">
fe4da5cc 31</pre>
32<br clear=left>
33<font size=+2 color=red>
34<p>The responsible person for this module is
35<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
36</font>
37<pre>
38*/
39//End_Html
40// //
41///////////////////////////////////////////////////////////////////
42
43#include "AliGenerator.h"
44#include "AliRun.h"
45
46ClassImp(AliGenerator)
47
48TGenerator* AliGenerator::fgMCEvGen=0;
49
50//____________________________________________________________
51AliGenerator::AliGenerator()
52{
de6d59e3 53 printf("\n AliGenerator Default Constructor\n\n");
4a3ba9d2 54
fe4da5cc 55 gAlice->SetGenerator(this);
de6d59e3 56 SetThetaRange(); ResetBit(kThetaRange);
57 SetPhiRange(); ResetBit(kPhiRange);
58 SetMomentumRange(); ResetBit(kMomentumRange);
59 SetPtRange(); ResetBit(kPtRange);
60 SetYRange(); ResetBit(kYRange);
fe4da5cc 61 SetNumberParticles();
4a3ba9d2 62 SetTrackingFlag();
de6d59e3 63
fe4da5cc 64 fOrigin.Set(3);
65 fOsigma.Set(3);
66 fOrigin[0]=fOrigin[1]=fOrigin[2]=0;
67 fOsigma[0]=fOsigma[1]=fOsigma[2]=0;
de6d59e3 68 fVMin.Set(3);
69 fVMin[0]=fVMin[1]=fVMin[2]=0;
70 fVMax.Set(3);
71 fVMax[0]=fVMax[1]=fVMax[2]=10000;
fe4da5cc 72}
73
74//____________________________________________________________
75AliGenerator::AliGenerator(Int_t npart)
76 : TNamed(" "," ")
77{
de6d59e3 78 printf("\n AliGenerator Constructor initializing number of particles \n\n");
fe4da5cc 79 gAlice->SetGenerator(this);
de6d59e3 80 SetThetaRange(); ResetBit(kThetaRange);
81 SetPhiRange(); ResetBit(kPhiRange);
82 SetMomentumRange(); ResetBit(kMomentumRange);
83 SetPtRange(); ResetBit(kPtRange);
84 SetYRange(); ResetBit(kYRange);
4a3ba9d2 85 SetTrackingFlag();
de6d59e3 86
fe4da5cc 87 fOrigin.Set(3);
88 fOsigma.Set(3);
89 fOrigin[0]=fOrigin[1]=fOrigin[2]=0;
90 fOsigma[0]=fOsigma[1]=fOsigma[2]=0;
91 fVMin.Set(3);
92 fVMin[0]=fVMin[1]=fVMin[2]=0;
93 fVMax.Set(3);
94 fVMax[0]=fVMax[1]=fVMax[2]=10000;
de6d59e3 95
96 SetNumberParticles(npart);
fe4da5cc 97}
98
99//____________________________________________________________
100AliGenerator::~AliGenerator()
101{
102 fOrigin.Set(0);
103 fOsigma.Set(0);
104 delete fgMCEvGen;
105}
106
107void AliGenerator::Init()
108{
109}
110
111