]> git.uio.no Git - u/mrichter/AliRoot.git/blame - prod/LHC08d11/sim.C
Settings for Pythia6 with Tune D6T added.
[u/mrichter/AliRoot.git] / prod / LHC08d11 / sim.C
CommitLineData
2c82db0e 1void sim(Int_t nev=100) {\r
2// AliLog::SetGlobalLogLevel(AliLog::kError);\r
3\r
4 AliSimulation simu;\r
5 simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");\r
6 simu.SetMakeDigitsFromHits("ITS TPC");\r
7\r
8 simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");\r
9\r
10
11 simu.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
12
13 TStopwatch timer;\r
14 timer.Start();\r
15 simu.Run(nev);\r
16 WriteXsection();
17 timer.Stop();\r
18 timer.Print();\r
19}\r
20
21WriteXsection()
22{
23 TPythia6 *pythia = TPythia6::Instance();
24 pythia->Pystat(1);
25 Double_t xsection = pythia->GetPARI(1);
26 Int_t ntrials = pythia->GetMSTI(5);
27
28 TFile *file = new TFile("pyxsec.root","recreate");
29 TTree *tree = new TTree("Xsection","Pythia cross section");
30 TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
31 TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
32 tree->Fill();
33
34 tree->Write();
35 file->Close();
36
37 cout << "Pythia cross section: " << xsection
38 << ", number of trials: " << ntrials << endl;
39}