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