Line data Source code
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 0 : virtual ~AliGenZDC() {}
27 : void Init();
28 : void Generate();
29 :
30 : // Fermi smearing, beam divergence and crossing angle
31 : void FermiTwoGaussian(Float_t A);
32 : void ExtractFermi(Int_t id, Double_t *ddp);
33 : void BeamDivCross(Int_t icross, Double_t *pLab);
34 : void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2,
35 : Double_t phi2, Double_t *angle);
36 :
37 :
38 : // Parameters that could be set for generation
39 0 : void SetParticle(Int_t ipart) {fIpart=ipart;};
40 0 : void SetMomentum(Float_t ptot) {fPMin=ptot; fPMax=ptot;};
41 : void SetDirection(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz)
42 0 : {fPseudoRapidity=zpsrp; fCosx=cosx; fCosy=cosy; fCosz=cosz;};
43 0 : void SetFermi(Int_t Fflag) {fFermiflag=Fflag;};
44 : void SetDiv(Float_t bmdiv, Float_t bmcra, Int_t iflcr)
45 0 : {fBeamDiv=bmdiv; fBeamCrossAngle=bmcra; fBeamCrossPlane=iflcr;};
46 0 : void SetDebug(Int_t idebu) {fDebugOpt = idebu;};
47 :
48 : // Getters
49 0 : Double_t GetFermi2p(Int_t key) const {return fProbintp[key];}
50 0 : Double_t GetFermi2n(Int_t key) const {return fProbintn[key];}
51 :
52 : protected:
53 : Int_t fIpart; // Particle to be generated
54 : Float_t fCosx; // Director cos of the track - x direction
55 : Float_t fCosy; // Director cos of the track - y direction
56 : Float_t fCosz; // Director cos of the track - z direction
57 : Float_t fPseudoRapidity; // Pseudorapidity (!=0 -> eta of the particle)
58 : // (=0 -> director cos of the track)
59 : Int_t fFermiflag; // Fermi momentum flag (=1 -> Fermi smearing)
60 : Float_t fBeamDiv; // Beam divergence (angle in rad)
61 : Float_t fBeamCrossAngle; // Beam crossing angle (angle in rad)
62 : Int_t fBeamCrossPlane; // Beam crossing plane
63 : // (=1 -> horizontal, =2 -> vertical plane)
64 : Double_t fProbintp[201]; // Protons momentum distribution due to Fermi
65 : Double_t fProbintn[201]; // Neutrons momentum distribution due to Fermi
66 : Double_t fPp[201]; // Spectator momenta
67 : Int_t fDebugOpt; // Option for debugging [0->No debug, 1->Screen
68 : // prints, 2->ASCII data file]
69 :
70 : private:
71 : AliGenZDC(const AliGenZDC & gen);
72 : AliGenZDC & operator=(const AliGenZDC & gen);
73 :
74 12 : ClassDef(AliGenZDC,1) // Generator for AliZDC class
75 : };
76 :
77 : #endif
|