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