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