]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TDPMjet/AliGenDPMjet.h
Initialization via standard input cards written into dpmjet.inp.
[u/mrichter/AliRoot.git] / TDPMjet / AliGenDPMjet.h
1 #ifndef ALIGENDPMJET_H
2 #define ALIGENDPMJET_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 // Generator using DPMJET as an external generator
7 // The main DPMJET options are accessable for the user through this interface.
8
9 #include "AliGenMC.h"
10 #include <TString.h>
11 #include <TArrayI.h>
12
13 class TDPMjet;
14 class TArrayI;
15 class TParticle;
16 class TClonesArray;
17 class TGraph;
18
19 class AliGenDPMjet : public AliGenMC
20 {
21
22  public:
23     AliGenDPMjet();
24     AliGenDPMjet(Int_t npart);
25     AliGenDPMjet(const AliGenDPMjet &Dpmjet);
26     virtual ~AliGenDPMjet(); 
27     virtual void    Generate();
28     virtual void    Init();
29
30     virtual void    SetBeamEnergy(Float_t energy=5400.) {fBeamEn=energy;}
31     virtual void    SetEnergyCMS(Float_t energy=5400.)   {fEnergyCMS=energy;}
32     virtual void    SetImpactParameterRange(Float_t bmin=0., Float_t bmax=16.)
33                         {fMinImpactParam=bmin; fMaxImpactParam=bmax;}
34     virtual void    SetCentral(Int_t icentr=-2) {fICentr = icentr;}
35     virtual void    KeepFullEvent();
36     virtual void    SetDecaysOff(Int_t flag=1)        {fDecaysOff  = flag;}
37     virtual void    SetFlavor(Int_t flag=0)           {fFlavor     = flag;}
38     virtual void    SetEvaluate(Int_t flag=0)         {fEvaluate   = flag;}
39     virtual void    SetSelectAll(Int_t flag=0)        {fSelectAll  = flag;}
40     virtual void    SetSpectators(Int_t spects=1)     {fSpectators = spects;}
41     virtual void    SetBoostLHC(Int_t flag=0)         {fLHC        = flag;}
42             
43     virtual Float_t GetEnergyCMS() {return fEnergyCMS;}
44     virtual void    GetProjectile(Int_t& a, Int_t& z)
45                         {a = fAProjectile; z = fZProjectile;}    
46     virtual void    GetTarget(Int_t& a, Int_t& z)
47                         {a = fATarget; z = fZTarget;}    
48     virtual void    GetImpactParameterRange(Float_t& bmin, Float_t& bmax)
49                         {bmin = fMinImpactParam; bmax = fMaxImpactParam;}
50     virtual Int_t   GetSpectators()        {return fSpectators;}
51     virtual Int_t   GetFlavor()            {return fFlavor;}
52
53     // Temporeaneo!?!
54     virtual void    SetGenImpPar(Float_t bValue) {fGenImpPar=bValue;}
55     virtual Float_t GetGenImpPar() {return fGenImpPar;}
56     
57     /*virtual void EvaluateCrossSections();
58     virtual void Boost();
59     virtual TGraph* CrossSection()     {return fDsigmaDb;}
60     virtual TGraph* BinaryCollisions() {return fDnDb;}
61     */
62
63     AliGenDPMjet &  operator=(const AliGenDPMjet & rhs);
64
65  protected:
66     Bool_t SelectFlavor(Int_t pid);
67     void   MakeHeader();
68
69  protected:
70
71     Int_t         fAProjectile;    // Projectile A
72     Int_t         fZProjectile;    // Projectile Z
73     Int_t         fATarget;        // Target A
74     Int_t         fZTarget;        // Target Z
75     Float_t       fBeamEn;         // beam energy
76     Float_t       fEnergyCMS;      // Centre of mass energy
77     Float_t       fMinImpactParam; // minimum impact parameter
78     Float_t       fMaxImpactParam; // maximum impact parameter  
79     Int_t         fICentr;         // Flag to force central production
80     Float_t       fCrossSec;       // Fraction of x-section
81     Int_t         fKeep;           // Flag to keep full event information
82     Int_t         fDecaysOff;      // Flag to turn off decays of pi0, K_s, D, Lambda, sigma
83     Int_t         fEvaluate;       // Evaluate total and partial cross-sections
84     Int_t         fSelectAll;      // Flag to write the full event
85     Int_t         fFlavor;         // Selected particle flavor 4: charm+beauty 5: beauty
86     Int_t         fTrials;         // Number of trials
87     TArrayI       fParentSelect;   // Parent particles to be selected 
88     TArrayI       fChildSelect;    // Decay products to be selected
89     Float_t       fXsection;       // Cross-section
90     Int_t         fSpectators;     // put spectators on stack
91     Int_t         fSpecn;          // Num. of spectator neutrons
92     Int_t         fSpecp;          // Num. of spectator protons
93     TDPMjet      *fDPMjet;         // DPMjet
94     TGraph*       fDsigmaDb;       // dSigma/db for the system
95     TGraph*       fDnDb;           // dNBinaryCollisions/db
96     TClonesArray *fParticles;      // Particle List
97     Int_t         fNoGammas;       // Don't write gammas if flag "on"
98     Int_t         fLHC;            // Assume LHC as lab frame
99     // Temporaneo!
100     Float_t       fGenImpPar;      // GeneratedImpactParameter
101     
102  private:
103     // adjust the weight from kinematic cuts
104     void   AdjustWeights();
105     // check seleted daughters
106     Bool_t DaughtersSelection(TParticle* iparticle);
107     // check if stable
108     Bool_t Stable(TParticle*  particle);
109     
110     ClassDef(AliGenDPMjet,1) // AliGenerator interface to DPMJET
111 };
112 #endif
113
114
115
116
117