]>
Commit | Line | Data |
---|---|---|
b720ba73 | 1 | void runGlauberMCpPb(Int_t option=0,Int_t N=250000,Bool_t qparts=kFALSE) |
2 | { | |
3 | //load libraries | |
4 | gSystem->Load("libVMC"); | |
5 | gSystem->Load("libPhysics"); | |
6 | gSystem->Load("libTree"); | |
7 | gSystem->Load("libPWGGlauber"); | |
8 | ||
9 | //set the random seed from current time | |
10 | TTimeStamp time; | |
11 | Int_t seed = time.GetSec(); | |
12 | gRandom->SetSeed(seed); | |
13 | ||
14 | Int_t nevents = N; // number of events to simulate | |
15 | // supported systems are e.g. "p", "d", "Si", "Au", "Pb", "U" | |
16 | Option_t *sysA="p"; | |
17 | Option_t *sysB="Pb"; | |
18 | Double_t signn=70; // inelastic nucleon nucleon cross section | |
19 | Double_t mind=0.4; | |
20 | const char *fname="glau_ppb_ntuple.root"; | |
21 | ||
22 | if (qparts) { | |
23 | signn/=9; | |
24 | mind=0; | |
25 | } | |
26 | ||
27 | AliGlauberMC mcg(sysA,sysB,signn); | |
28 | mcg.SetMinDistance(mind); | |
29 | if (qparts) { | |
30 | AliGlauberNucleus &na = mcg.GetNucA(); | |
31 | na.SetN(3*na.GetN()); | |
32 | AliGlauberNucleus &nb = mcg.GetNucB(); | |
33 | nb.SetN(3*nb.GetN()); | |
34 | } | |
35 | if (option==1) | |
36 | mcg.SetDoFluc(0.55,78.5,0.82,kTRUE); | |
37 | else if (option==2) | |
38 | mcg.SetDoFluc(1.01,72.5,0.74,kTRUE); | |
39 | mcg.SetDoPartProduction(kFALSE); | |
40 | ||
41 | ////////////////// | |
42 | mcg.SetdNdEtaType(AliGlauberMC::kNBDSV); | |
43 | mcg.GetdNdEtaParam()[0] = 2.49; //npp | |
44 | mcg.GetdNdEtaParam()[1] = 1.7; //ratioSgm2Mu | |
45 | mcg.GetdNdEtaParam()[2] = 0.13; //xhard | |
46 | ////////////////// | |
47 | ||
48 | mcg.Run(nevents); | |
49 | ||
50 | TNtuple *nt = mcg.GetNtuple(); | |
51 | TFile out(fname,"recreate",fname,9); | |
52 | if(nt) nt->Write(); | |
53 | printf("total cross section with a nucleon-nucleon cross section %.4f is %.4f\n\n",signn,mcg.GetTotXSect()); | |
54 | out.Close(); | |
55 | } |