]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVGEN/AliGenFixed.cxx
Coding convention rules obeyed
[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$
6c2f0383 18Revision 1.1 2000/06/09 20:24:00 morsch
19Same class as previously in AliSimpleGen.cxx
20All coding rule violations except RS3 corrected (AM)
21
790bbabf 22*/
23
24///////////////////////////////////////////////////////////////////
25// //
26// Generate the final state of the interaction as the input //
27// to the MonteCarlo //
28//
29//Begin_Html
30/*
31<img src="picts/AliGeneratorClass.gif">
32</pre>
33<br clear=left>
34<font size=+2 color=red>
35<p>The responsible person for this module is
36<a href="mailto:andreas.morsch@cern.ch">Andreas Morsch</a>.
37</font>
38<pre>
39*/
40//End_Html
41// //
42///////////////////////////////////////////////////////////////////
43
44#include "AliGenFixed.h"
45#include "AliRun.h"
790bbabf 46#include "AliPDG.h"
790bbabf 47
48ClassImp(AliGenFixed)
49
50//_____________________________________________________________________________
51AliGenFixed::AliGenFixed()
52 :AliGenerator()
53{
54 //
55 // Default constructor
56 //
57 fIpart = 0;
58}
59
60//_____________________________________________________________________________
61AliGenFixed::AliGenFixed(Int_t npart)
62 :AliGenerator(npart)
63{
64 //
65 // Standard constructor
66 //
67 fName="Fixed";
68 fTitle="Fixed Particle Generator";
69 // Generate Proton by default
70 fIpart=kProton;
71}
72
73//_____________________________________________________________________________
74void AliGenFixed::Generate()
75{
76 //
77 // Generate one trigger
78 //
79 Float_t polar[3]= {0,0,0};
80 Float_t p[3] = {fPMin*TMath::Cos(fPhiMin)*TMath::Sin(fThetaMin),
81 fPMin*TMath::Sin(fPhiMin)*TMath::Sin(fThetaMin),
82 fPMin*TMath::Cos(fThetaMin)};
83 Int_t i, nt;
84 //
85 for(i=0;i<fNpart;i++) {
86 gAlice->SetTrack(fTrackIt,-1,fIpart,p,fOrigin.GetArray(),polar,0,"Primary",nt);
87 }
88}
89
90//_____________________________________________________________________________
91void AliGenFixed::SetSigma(Float_t sx, Float_t sy, Float_t sz)
92{
93 //
94 // Set the interaction point sigma
95 //
96 printf("Vertex smearing not implemented for fixed generator\n");
97}