]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliGenZDC.h
Minor changes to avoid warnings during compilation
[u/mrichter/AliRoot.git] / ZDC / AliGenZDC.h
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   void Init();
28   void Generate();
29   
30   // Fermi smearing, beam divergence and crossing angle                
31   void FermiTwoGaussian(Float_t A, Double_t *pp, 
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  
40   
41   // Parameters that could be set for generation
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;};
49   void SetDebug() {fDebugOpt = 1;};
50   
51   // Getters 
52   Double_t GetFermi2p(Int_t key) {return fProbintp[key];}
53   Double_t GetFermi2n(Int_t key) {return fProbintn[key];}
54
55 protected:
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 
69   Double_t fPp[201];            // 
70   Int_t    fDebugOpt;           // Option for debugging 
71   
72    ClassDef(AliGenZDC,1)        // Generator for AliZDC class
73 };
74
75 #endif