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() {} |
27 | virtual void Init(); |
28 | virtual void Generate(); |
29 | |
30 | // Parameters that could be set for generation |
31 | virtual void SetParticle(Int_t ipart) {fIpart=ipart;}; |
32 | virtual void SetMomentum(Float_t ptot) {fPMin=ptot; fPMax=ptot;}; |
e7aaf179 |
33 | virtual void SetDirection(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz) |
68ca986e |
34 | {fPseudoRapidity=zpsrp; fCosx=cosx; fCosy=cosy; fCosz=cosz;}; |
35 | virtual void SetFermi(Int_t Fflag) {fFermiflag=Fflag;}; |
36 | virtual void SetDiv(Float_t bmdiv, Float_t bmcra, Int_t iflcr) |
37 | {fBeamDiv=bmdiv; fBeamCrossAngle=bmcra; fBeamCrossPlane=iflcr;}; |
38 | |
39 | // Getters |
40 | Double_t GetFermi2p(Int_t key) {return fProbintp[key];} |
41 | Double_t GetFermi2n(Int_t key) {return fProbintn[key];} |
866ab5a2 |
42 | Float_t GetInMomentum(Int_t key) {return fPInit[key];}; |
68ca986e |
43 | Float_t GetBoostMomentum(Int_t key) {return fBoostP[key];}; |
44 | Float_t GetDivMomentum(Int_t key) {return fDivP[key];}; |
866ab5a2 |
45 | Float_t GetTrackMomentum(Int_t key) {return fPTrack[key];}; |
68ca986e |
46 | |
47 | // Fermi smearing, beam divergence and crossing angle |
48 | virtual void FermiTwoGaussian(Double_t A, Float_t Z, Double_t* pp, |
49 | Double_t* probintp, Double_t* probintn); |
50 | virtual void ExtractFermi(Int_t id, Double_t* pp, Double_t* probintp, |
51 | Double_t* probintn, Double_t* pFermi); |
52 | virtual void BeamDivCross(Int_t icross, Float_t divergence, Float_t crossangle, |
53 | Int_t crossplane, Double_t* pLab); |
54 | virtual void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2, |
55 | Double_t phi2, Double_t* angle); |
56 | |
57 | protected: |
58 | Int_t fIpart; // Particle to generate |
59 | Float_t fCosx; // Cos x of particle |
60 | Float_t fCosy; // Cos y of particle |
61 | Float_t fCosz; // Cos z of particle |
62 | Float_t fPseudoRapidity; // Pseudo Rapidity of particle |
63 | Int_t fFermiflag; // Fermi momentum flag |
64 | Float_t fBeamDiv; // Beam divergence |
65 | Float_t fBeamCrossAngle; // Beam crossing angle |
66 | Int_t fBeamCrossPlane; // Beam crossing plane |
67 | Double_t fProbintp[201]; // for protons |
68 | Double_t fProbintn[201]; // for neutrons |
69 | Double_t fPp[201]; // for protons |
866ab5a2 |
70 | Double_t fP[3]; // temporary momentum |
71 | Float_t fPInit[3]; // initial momentum |
72 | Float_t fBoostP[3]; // boosted momentum |
73 | Float_t fDivP[3]; // divergence |
74 | Float_t fPTrack[3]; // track momentum |
68ca986e |
75 | |
76 | ClassDef(AliGenZDC,1) // Generator for AliZDC class |
77 | }; |
78 | |
79 | #endif |