]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenFixed.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / EVGEN / AliGenFixed.cxx
CommitLineData
790bbabf 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$
88cb7938 18Revision 1.7.4.1 2003/04/14 17:33:49 hristov
19Merging with v3-09-08 (part1)
20
21Revision 1.8 2003/01/14 10:50:18 alibrary
22Cleanup of STEER coding conventions
23
116cbefd 24Revision 1.7 2001/10/30 11:27:35 morsch
25fExplicit member data correctly initialized.
26
49c4fdc3 27Revision 1.6 2001/07/27 17:09:36 morsch
28Use local SetTrack, KeepTrack and SetHighWaterMark methods
29to delegate either to local stack or to stack owned by AliRun.
30(Piotr Skowronski, A.M.)
31
a99cf51f 32Revision 1.5 2001/02/24 11:41:59 morsch
33SetGun allows specify completely the particle kinematics and position in one go. (FCA)
34
f1f30542 35Revision 1.4 2000/12/21 16:24:06 morsch
36Coding convention clean-up
37
675e9664 38Revision 1.3 2000/11/30 07:12:50 alibrary
39Introducing new Rndm and QA classes
40
65fb704d 41Revision 1.2 2000/10/02 15:17:54 morsch
42Unused includes removed.
43
6c2f0383 44Revision 1.1 2000/06/09 20:24:00 morsch
45Same class as previously in AliSimpleGen.cxx
46All coding rule violations except RS3 corrected (AM)
47
790bbabf 48*/
49
675e9664 50
51
52// Simple particle gun.
53// Momentum, phi and theta of the partice as well as the particle type can be set.
54// andreas.morsch@cern.ch
790bbabf 55//Begin_Html
56/*
57<img src="picts/AliGeneratorClass.gif">
58</pre>
59<br clear=left>
60<font size=+2 color=red>
61<p>The responsible person for this module is
62<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
63</font>
64<pre>
65*/
66//End_Html
67// //
68///////////////////////////////////////////////////////////////////
69
116cbefd 70#include "TPDGCode.h"
71
790bbabf 72#include "AliGenFixed.h"
73#include "AliRun.h"
790bbabf 74
75ClassImp(AliGenFixed)
76
77//_____________________________________________________________________________
78AliGenFixed::AliGenFixed()
79 :AliGenerator()
80{
81 //
82 // Default constructor
83 //
84 fIpart = 0;
f1f30542 85 fExplicit = kFALSE;
790bbabf 86}
87
88//_____________________________________________________________________________
89AliGenFixed::AliGenFixed(Int_t npart)
90 :AliGenerator(npart)
91{
92 //
93 // Standard constructor
94 //
95 fName="Fixed";
96 fTitle="Fixed Particle Generator";
97 // Generate Proton by default
98 fIpart=kProton;
49c4fdc3 99 fExplicit = kFALSE;
790bbabf 100}
101
102//_____________________________________________________________________________
103void AliGenFixed::Generate()
104{
105 //
106 // Generate one trigger
107 //
108 Float_t polar[3]= {0,0,0};
f1f30542 109 if(!fExplicit) {
110 fP[0] = fPMin*TMath::Cos(fPhiMin)*TMath::Sin(fThetaMin);
111 fP[1] = fPMin*TMath::Sin(fPhiMin)*TMath::Sin(fThetaMin);
112 fP[2] = fPMin*TMath::Cos(fThetaMin);
113 }
790bbabf 114 Int_t i, nt;
115 //
f1f30542 116 for(i=0;i<fNpart;i++)
a99cf51f 117 SetTrack(fTrackIt,-1,fIpart,fP,fOrigin.GetArray(),polar,0,kPPrimary,nt);
790bbabf 118}
119
120//_____________________________________________________________________________
121void AliGenFixed::SetSigma(Float_t sx, Float_t sy, Float_t sz)
122{
123 //
124 // Set the interaction point sigma
125 //
126 printf("Vertex smearing not implemented for fixed generator\n");
127}