]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVGEN/AliGenSlowNucleons.h
Numbers of slow nucleons either from model or user set.
[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 #include "AliGenerator.h"
9 class AliSlowNucleonModel;
10 class TH2F;
11
12
13 class AliGenSlowNucleons : public AliGenerator
14 {
15 public:
16     AliGenSlowNucleons();
17     AliGenSlowNucleons(Int_t npart);
18     virtual ~AliGenSlowNucleons();
19     virtual void Init();
20     virtual void FinishRun();
21     virtual void Generate();
22     virtual void SetPmax(Float_t pmax = 10.) {fPmax = pmax;}
23     virtual void SetNominalCmsEnergy(Float_t energy = 14000.) {fCMS = energy;}
24     virtual void SetTarget(Float_t a=208, Float_t z=82) {fATarget = a; fZTarget = z;}
25     virtual void SetCharge(Int_t c = 1) {fCharge = c;}
26     virtual void SetTemperature(Double_t t1 = 0.04, Double_t t2 = 0.004)
27         {fTemperatureG = t1; fTemperatureB = t2;}
28     virtual void SetBetaSource(Double_t b1 = 0.05, Double_t b2 = 0.)
29         {fBetaSourceG = b1; fBetaSourceB = b2;}
30     //
31     virtual void SetSlowNucleonModel(AliSlowNucleonModel* model) 
32         {fSlowNucleonModel = model;}
33     virtual Bool_t NeedsCollisionGeometry() const {return kTRUE;}
34     virtual void   SetCollisionGeometry(AliCollisionGeometry* geom)
35         {fCollisionGeometry = geom;}
36     virtual void   SetDebug(Int_t flag = 0) {fDebug = flag;}
37     virtual void   SetNumbersOfSlowNucleons(Int_t ngp, Int_t ngn, Int_t nbp, Int_t nbn)
38         {fNgp = ngp; fNgn = ngn; fNbp = nbp; fNbn = nbn;}
39     
40  protected:
41     void     GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q);
42     Double_t Maxwell(Double_t m, Double_t p, Double_t t);
43     void     Lorentz(Double_t m, Double_t beta, Float_t* q);
44  protected:
45     Float_t  fCMS;          // Center of mass energy
46     Float_t  fMomentum;     // Target nucleus momentum
47     Float_t  fBeta;         // Target nucleus beta
48     Float_t  fPmax;         // Maximum slow nucleon momentum
49     Float_t  fATarget;      // Target nucleus mass number
50     Float_t  fZTarget;      // Target nucleus charge number
51     Int_t    fCharge;       // Slow nucleon charge
52     Float_t  fTemperatureG; // Source Temperature for gray nucleons
53     Float_t  fBetaSourceG;  // Source beta for gray nucleons
54     Float_t  fTemperatureB; // Source Temperature for black nucleons
55     Float_t  fBetaSourceB;  // Source beta for black nucleons
56     Int_t    fNgp;          // Number of gray  protons
57     Int_t    fNgn;          // Number of gray  neutrons
58     Int_t    fNbp;          // Number of black protons
59     Int_t    fNbn;          // Number of black neutrons
60     Int_t    fDebug;        // Debug flag
61     TH2F*    fDebugHist;    // Histogram for debugging
62     
63     //
64     AliSlowNucleonModel* fSlowNucleonModel; // The slow nucleon model
65     ClassDef(AliGenSlowNucleons,1) // Slow Nucleon Generator
66 };
67 #endif
68
69
70
71
72
73