New version of ZDC from E.Scomparin & C.Oppedisano
[u/mrichter/AliRoot.git] / ZDC / AliGenZDC.h
CommitLineData
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
21class AliGenZDC : public AliGenerator {
22
23public:
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;};
33 virtual void SetDir(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz)
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];}
42 Float_t GetMomentum(Int_t key) {return fP[key];};
43 Float_t GetBoostMomentum(Int_t key) {return fBoostP[key];};
44 Float_t GetDivMomentum(Int_t key) {return fDivP[key];};
45
46 // Fermi smearing, beam divergence and crossing angle
47 virtual void FermiTwoGaussian(Double_t A, Float_t Z, Double_t* pp,
48 Double_t* probintp, Double_t* probintn);
49 virtual void ExtractFermi(Int_t id, Double_t* pp, Double_t* probintp,
50 Double_t* probintn, Double_t* pFermi);
51 virtual void BeamDivCross(Int_t icross, Float_t divergence, Float_t crossangle,
52 Int_t crossplane, Double_t* pLab);
53 virtual void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2,
54 Double_t phi2, Double_t* angle);
55
56protected:
57 Int_t fIpart; // Particle to generate
58 Float_t fCosx; // Cos x of particle
59 Float_t fCosy; // Cos y of particle
60 Float_t fCosz; // Cos z of particle
61 Float_t fPseudoRapidity; // Pseudo Rapidity of particle
62 Int_t fFermiflag; // Fermi momentum flag
63 Float_t fBeamDiv; // Beam divergence
64 Float_t fBeamCrossAngle; // Beam crossing angle
65 Int_t fBeamCrossPlane; // Beam crossing plane
66 Double_t fProbintp[201]; // for protons
67 Double_t fProbintn[201]; // for neutrons
68 Double_t fPp[201]; // for protons
69 Double_t fP[3]; // momentum
70 Float_t fBoostP[3]; // boost vector
71 Float_t fDivP[3]; // divergence
72
73 ClassDef(AliGenZDC,1) // Generator for AliZDC class
74};
75
76#endif