]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenSlowNucleons.h
- Adding alternate versions of methods for handling regional structures and
[u/mrichter/AliRoot.git] / EVGEN / AliGenSlowNucleons.h
1 #ifndef ALIGENSLOWNUCLEONS_H
2 #define ALIGENSLOWNUCLEONS_H
3 /* Copyright(c) 198-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7 //
8 //  Generator for slow nucleons in pA interactions. 
9 //  Source is modelled by a relativistic Maxwell distributions.
10 //  Original code by  Ferenc Sikler  <sikler@rmki.kfki.hu>
11 //  This class: andreas.morsch@cern.ch
12 //
13 #include "AliGenerator.h"
14 class AliSlowNucleonModel;
15 class TH2F;
16 class TH1F;
17 class TF1;
18
19 class AliGenSlowNucleons : public AliGenerator
20 {
21 public:
22     AliGenSlowNucleons();
23     AliGenSlowNucleons(Int_t npart);
24     virtual ~AliGenSlowNucleons();
25     virtual void Init();
26     virtual void FinishRun();
27     virtual void Generate();
28     virtual void SetPmax(Float_t pmax = 10.) {fPmax = pmax;}
29     virtual void SetNominalCmsEnergy(Float_t energy = 14000.) {fCMS = energy;}
30     virtual void SetTarget(Float_t a=208, Float_t z=82) {fATarget = a; fZTarget = z;}
31     virtual void SetProtonDirection(Float_t dir = 1.);
32     virtual void SetCharge(Int_t c = 1) {fCharge = c;}
33     virtual void SetTemperature(Double_t t1 = 0.04, Double_t t2 = 0.004)
34         {fTemperatureG = t1; fTemperatureB = t2;}
35     virtual void SetBetaSource(Double_t b1 = 0.05, Double_t b2 = 0.)
36         {fBetaSourceG = b1; fBetaSourceB = b2;}
37     //
38     virtual void SetSlowNucleonModel(AliSlowNucleonModel* model) 
39         {fSlowNucleonModel = model;}
40     virtual Bool_t NeedsCollisionGeometry() const {return kTRUE;}
41     virtual void   SetCollisionGeometry(AliCollisionGeometry* geom)
42         {fCollisionGeometry = geom;}
43     virtual void   SetDebug(Int_t flag = 0) {fDebug = flag;}
44     virtual void   SetNumbersOfSlowNucleons(Int_t ngp, Int_t ngn, Int_t nbp, Int_t nbn)
45         {fNgp = ngp; fNgn = ngn; fNbp = nbp; fNbn = nbn;}
46     //
47     // Added by Chiara to take into account angular distribution 4 gray tracks
48     virtual void   SetThetaDist(Int_t flag=0) {fThetaDistribution = flag;}
49     
50  protected:
51     void     GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q, Float_t &theta);
52     Double_t Maxwell(Double_t m, Double_t p, Double_t t);
53     void     Lorentz(Double_t m, Double_t beta, Float_t* q);
54  protected:
55     Float_t  fCMS;             // Center of mass energy
56     Float_t  fMomentum;        // Target nucleus momentum
57     Float_t  fBeta;            // Target nucleus beta
58     Float_t  fPmax;            // Maximum slow nucleon momentum
59     Float_t  fATarget;         // Target nucleus mass number
60     Float_t  fZTarget;         // Target nucleus charge number
61     Int_t    fCharge;          // Slow nucleon charge
62     Float_t  fProtonDirection; // Direction of the proton
63     Float_t  fTemperatureG;    // Source Temperature for gray nucleons
64     Float_t  fBetaSourceG;     // Source beta for gray nucleons
65     Float_t  fTemperatureB;    // Source Temperature for black nucleons
66     Float_t  fBetaSourceB;     // Source beta for black nucleons
67     Int_t    fNgp;             // Number of gray  protons
68     Int_t    fNgn;             // Number of gray  neutrons
69     Int_t    fNbp;             // Number of black protons
70     Int_t    fNbn;             // Number of black neutrons
71     Int_t    fDebug;           // Debug flag
72     TH2F*    fDebugHist1;      // Histogram for debugging
73     TH2F*    fDebugHist2;      // Histogram for debugging
74     // Added by Chiara to take into account angular distribution 4 gray tracks
75     Int_t    fThetaDistribution;// 0 -> flat dist., 1 -> fwd. peaked distribution
76     TH1F*    fCosThetaGrayHist; // Histogram for debugging
77     TF1*     fCosTheta;         // Function for non-uniform cos(theta) distribution
78     
79     //
80     AliSlowNucleonModel* fSlowNucleonModel; // The slow nucleon model
81
82  private:
83     AliGenSlowNucleons(const AliGenSlowNucleons &sn);
84     AliGenSlowNucleons & operator=(const AliGenSlowNucleons & rhs);
85
86     ClassDef(AliGenSlowNucleons,2) // Slow Nucleon Generator
87 };
88 #endif
89
90
91
92
93
94