]>
Commit | Line | Data |
---|---|---|
afea418a | 1 | void sim(Int_t nev=150) {\r |
2 | AliSimulation simu;\r | |
3 | simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC T0 VZERO");\r | |
4 | simu.SetMakeDigitsFromHits("ITS TPC");\r | |
5 | \r | |
6 | simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");\r | |
7 | \r | |
8 | // No write access to the OCDB => local specific storage\r | |
9 | simu.SetSpecificStorage("GRP/GRP/Data",\r | |
10 | Form("local://%s/",gSystem->pwd()));\r | |
11 | \r | |
12 | Printf("%s:%d %d events",(char*)__FILE__,__LINE__,nev);\r | |
13 | \r | |
14 | TStopwatch timer;\r | |
15 | timer.Start();\r | |
16 | simu.Run(nev);\r | |
17 | WriteXsection();\r | |
18 | timer.Stop();\r | |
19 | timer.Print();\r | |
20 | }\r | |
21 | \r | |
22 | WriteXsection()\r | |
23 | {\r | |
24 | TPythia6 *pythia = TPythia6::Instance();\r | |
25 | pythia->Pystat(1);\r | |
26 | Double_t xsection = pythia->GetPARI(1);\r | |
27 | UInt_t ntrials = pythia->GetMSTI(5);\r | |
28 | \r | |
29 | TFile *file = new TFile("pyxsec.root","recreate");\r | |
30 | TTree *tree = new TTree("Xsection","Pythia cross section");\r | |
31 | TBranch *branch = tree->Branch("xsection", &xsection, "X/D");\r | |
32 | TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");\r | |
33 | tree->Fill();\r | |
34 | \r | |
35 | \r | |
36 | \r | |
37 | tree->Write();\r | |
38 | file->Close();\r | |
39 | \r | |
40 | cout << "Pythia cross section: " << xsection\r | |
41 | << ", number of trials: " << ntrials << endl;\r | |
42 | }\r | |
43 | \r |