]>
Commit | Line | Data |
---|---|---|
68ca986e | 1 | #ifndef ALIGENZDC_H |
2 | #define ALIGENZDC_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //////////////////////////////////////////////////// | |
9 | // // | |
10 | // Test pc generator for ZDC (taking into account // | |
11 | // Fermi smearing, beam divergence and crossing) // | |
12 | // // | |
13 | //////////////////////////////////////////////////// | |
14 | ||
15 | ||
16 | #include <TMath.h> | |
17 | ||
18 | #include "AliGenerator.h" | |
19 | ||
20 | ||
21 | class AliGenZDC : public AliGenerator { | |
22 | ||
23 | public: | |
24 | AliGenZDC(); | |
25 | AliGenZDC(Int_t npart); | |
26 | virtual ~AliGenZDC() {} | |
5a881c97 | 27 | void Init(); |
28 | void Generate(); | |
29 | ||
30 | // Fermi smearing, beam divergence and crossing angle | |
f5cb71ad | 31 | void FermiTwoGaussian(Float_t A, Double_t *pp, |
5a881c97 | 32 | Double_t *probintp, Double_t *probintn); |
33 | void ExtractFermi(Int_t id, Double_t *pp, Double_t *probintp, | |
34 | Double_t *probintn, Double_t *pFermi); | |
35 | void BeamDivCross(Int_t icross, Float_t divergence, Float_t crossangle, | |
36 | Int_t crossplane, Double_t *pLab); | |
37 | void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2, | |
38 | Double_t phi2, Double_t *angle); | |
39 | ||
68ca986e | 40 | |
41 | // Parameters that could be set for generation | |
5a881c97 | 42 | void SetParticle(Int_t ipart) {fIpart=ipart;}; |
43 | void SetMomentum(Float_t ptot) {fPMin=ptot; fPMax=ptot;}; | |
44 | void SetDirection(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz) | |
45 | {fPseudoRapidity=zpsrp; fCosx=cosx; fCosy=cosy; fCosz=cosz;}; | |
46 | void SetFermi(Int_t Fflag) {fFermiflag=Fflag;}; | |
47 | void SetDiv(Float_t bmdiv, Float_t bmcra, Int_t iflcr) | |
48 | {fBeamDiv=bmdiv; fBeamCrossAngle=bmcra; fBeamCrossPlane=iflcr;}; | |
03cc1ceb | 49 | void SetDebug(Int_t idebu) {fDebugOpt = idebu;}; |
68ca986e | 50 | |
51 | // Getters | |
43e3307d | 52 | Double_t GetFermi2p(Int_t key) {return fProbintp[key];} |
53 | Double_t GetFermi2n(Int_t key) {return fProbintn[key];} | |
5a881c97 | 54 | |
68ca986e | 55 | protected: |
5a881c97 | 56 | Int_t fIpart; // Particle to be generated |
57 | Float_t fCosx; // Director cos of the track - x direction | |
58 | Float_t fCosy; // Director cos of the track - y direction | |
59 | Float_t fCosz; // Director cos of the track - z direction | |
60 | Float_t fPseudoRapidity; // Pseudorapidity (!=0 -> eta of the particle) | |
61 | // (=0 -> director cos of the track) | |
62 | Int_t fFermiflag; // Fermi momentum flag (=1 -> Fermi smearing) | |
63 | Float_t fBeamDiv; // Beam divergence (angle in rad) | |
64 | Float_t fBeamCrossAngle; // Beam crossing angle (angle in rad) | |
65 | Int_t fBeamCrossPlane; // Beam crossing plane | |
66 | // (=1 -> horizontal, =2 -> vertical plane) | |
67 | Double_t fProbintp[201]; // Protons momentum distribution due to Fermi | |
68 | Double_t fProbintn[201]; // Neutrons momentum distribution due to Fermi | |
8a2624cc | 69 | Double_t fPp[201]; // Spectator momenta |
03cc1ceb | 70 | Int_t fDebugOpt; // Option for debugging [0->No debug, 1->Screen |
71 | // prints, 2->ASCII data file] | |
68ca986e | 72 | |
13455904 | 73 | private: |
74 | AliGenZDC(const AliGenZDC & gen); | |
75 | AliGenZDC & operator=(const AliGenZDC & gen); | |
76 | ||
5a881c97 | 77 | ClassDef(AliGenZDC,1) // Generator for AliZDC class |
68ca986e | 78 | }; |
79 | ||
80 | #endif |