added stuff
[u/mrichter/AliRoot.git] / EVGEN / AliGenSlowNucleons.h
CommitLineData
c9a8628a 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$ */
f687abfe 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//
c9a8628a 13#include "AliGenerator.h"
14class AliSlowNucleonModel;
15class TH2F;
5a9b7f8e 16class TH1F;
17class TF1;
c9a8628a 18
19class AliGenSlowNucleons : public AliGenerator
20{
21public:
22 AliGenSlowNucleons();
23 AliGenSlowNucleons(Int_t npart);
f687abfe 24 AliGenSlowNucleons(const AliGenSlowNucleons &sn);
c9a8628a 25 virtual ~AliGenSlowNucleons();
26 virtual void Init();
27 virtual void FinishRun();
28 virtual void Generate();
29 virtual void SetPmax(Float_t pmax = 10.) {fPmax = pmax;}
30 virtual void SetNominalCmsEnergy(Float_t energy = 14000.) {fCMS = energy;}
31 virtual void SetTarget(Float_t a=208, Float_t z=82) {fATarget = a; fZTarget = z;}
83b3cd6c 32 virtual void SetProtonDirection(Float_t dir = 1.);
c9a8628a 33 virtual void SetCharge(Int_t c = 1) {fCharge = c;}
34 virtual void SetTemperature(Double_t t1 = 0.04, Double_t t2 = 0.004)
35 {fTemperatureG = t1; fTemperatureB = t2;}
36 virtual void SetBetaSource(Double_t b1 = 0.05, Double_t b2 = 0.)
37 {fBetaSourceG = b1; fBetaSourceB = b2;}
38 //
39 virtual void SetSlowNucleonModel(AliSlowNucleonModel* model)
40 {fSlowNucleonModel = model;}
41 virtual Bool_t NeedsCollisionGeometry() const {return kTRUE;}
42 virtual void SetCollisionGeometry(AliCollisionGeometry* geom)
43 {fCollisionGeometry = geom;}
44 virtual void SetDebug(Int_t flag = 0) {fDebug = flag;}
1c22a81e 45 virtual void SetNumbersOfSlowNucleons(Int_t ngp, Int_t ngn, Int_t nbp, Int_t nbn)
46 {fNgp = ngp; fNgn = ngn; fNbp = nbp; fNbn = nbn;}
5a9b7f8e 47 //
48 // Added by Chiara to take into account angular distribution 4 gray tracks
49 virtual void SetThetaDist(Int_t flag=0) {fThetaDistribution = flag;}
1c22a81e 50
c9a8628a 51 protected:
5a9b7f8e 52 void GenerateSlow(Int_t charge, Double_t T, Double_t beta, Float_t* q, Float_t &theta);
c9a8628a 53 Double_t Maxwell(Double_t m, Double_t p, Double_t t);
54 void Lorentz(Double_t m, Double_t beta, Float_t* q);
dc1d768c 55 void Copy(TObject&) const;
f687abfe 56 AliGenSlowNucleons & operator=(const AliGenSlowNucleons & rhs);
c9a8628a 57 protected:
83b3cd6c 58 Float_t fCMS; // Center of mass energy
59 Float_t fMomentum; // Target nucleus momentum
60 Float_t fBeta; // Target nucleus beta
61 Float_t fPmax; // Maximum slow nucleon momentum
62 Float_t fATarget; // Target nucleus mass number
63 Float_t fZTarget; // Target nucleus charge number
64 Int_t fCharge; // Slow nucleon charge
65 Float_t fProtonDirection; // Direction of the proton
66 Float_t fTemperatureG; // Source Temperature for gray nucleons
67 Float_t fBetaSourceG; // Source beta for gray nucleons
68 Float_t fTemperatureB; // Source Temperature for black nucleons
69 Float_t fBetaSourceB; // Source beta for black nucleons
70 Int_t fNgp; // Number of gray protons
71 Int_t fNgn; // Number of gray neutrons
72 Int_t fNbp; // Number of black protons
73 Int_t fNbn; // Number of black neutrons
74 Int_t fDebug; // Debug flag
75 TH2F* fDebugHist1; // Histogram for debugging
76 TH2F* fDebugHist2; // Histogram for debugging
5a9b7f8e 77 // Added by Chiara to take into account angular distribution 4 gray tracks
78 Int_t fThetaDistribution;// 0 -> flat dist., 1 -> fwd. peaked distribution
79 TH1F* fCosThetaGrayHist; // Histogram for debugging
80 TF1* fCosTheta; // Function for non-uniform cos(theta) distribution
c9a8628a 81
82 //
83 AliSlowNucleonModel* fSlowNucleonModel; // The slow nucleon model
5a9b7f8e 84 ClassDef(AliGenSlowNucleons,2) // Slow Nucleon Generator
c9a8628a 85};
86#endif
87
88
89
90
91
92