]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliGenerator.cxx
Fixing dimension of hits array
[u/mrichter/AliRoot.git] / STEER / AliGenerator.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.5  2000/06/08 13:34:50  fca
19 Better control of momentum range in GenBox
20
21 Revision 1.4  1999/09/29 09:24:29  fca
22 Introduction of the Copyright and cvs Log
23
24 */
25
26 ///////////////////////////////////////////////////////////////////
27 //                                                               //
28 //    Generate the final state of the interaction as the input   //
29 //    to the MonteCarlo                                          //
30 //
31 //Begin_Html
32 /*
33 <img src="picts/AliGeneratorClass.gif">
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 {
56   //
57   // Default constructor
58   //
59     printf("\n AliGenerator Default Constructor\n\n");
60     
61     gAlice->SetGenerator(this);
62     SetThetaRange(); ResetBit(kThetaRange);
63     SetPhiRange(); ResetBit(kPhiRange);
64     SetMomentumRange(); ResetBit(kMomentumRange);
65     SetPtRange(); ResetBit(kPtRange);
66     SetYRange(); ResetBit(kYRange);
67     SetNumberParticles();
68     SetTrackingFlag();
69
70     fOrigin.Set(3);
71     fOsigma.Set(3);
72     fOrigin[0]=fOrigin[1]=fOrigin[2]=0;
73     fOsigma[0]=fOsigma[1]=fOsigma[2]=0;
74     fVMin.Set(3);
75     fVMin[0]=fVMin[1]=fVMin[2]=0;
76     fVMax.Set(3);
77     fVMax[0]=fVMax[1]=fVMax[2]=10000;
78 }
79
80 //____________________________________________________________
81 AliGenerator::AliGenerator(Int_t npart)
82     : TNamed(" "," ")
83 {
84   //
85   // Standard constructor
86   //
87     printf("\n AliGenerator Constructor initializing number of particles \n\n");
88     gAlice->SetGenerator(this);
89     SetThetaRange(); ResetBit(kThetaRange);
90     SetPhiRange(); ResetBit(kPhiRange);
91     SetMomentumRange(); ResetBit(kMomentumRange);
92     SetPtRange(); ResetBit(kPtRange);
93     SetYRange(); ResetBit(kYRange);
94     SetTrackingFlag();
95
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;
104
105     SetNumberParticles(npart);
106 }
107
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
136 //____________________________________________________________
137 AliGenerator::~AliGenerator()
138 {
139   //
140   // Destructor
141   //
142   fOrigin.Set(0);
143   fOsigma.Set(0);
144   delete fgMCEvGen;
145 }
146
147 void AliGenerator::Init()
148 {   
149   //
150   // Dummy initialisation
151   //
152 }
153
154