]>
Commit | Line | Data |
---|---|---|
57acd2d2 | 1 | void sim(Int_t nev=1) { |
478d5b53 | 2 | AliSimulation simu; |
f479d4aa | 3 | simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); |
4 | simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); | |
478d5b53 | 5 | simu.SetMakeDigitsFromHits("ITS TPC"); |
6 | simu.SetWriteRawData("ALL","raw.root",kTRUE); | |
162637e4 | 7 | simu.SetDefaultStorage("local://$ALICE_ROOT/OCDB"); |
a002cebe | 8 | simu.SetSpecificStorage("GRP/GRP/Data", |
9 | Form("local://%s",gSystem->pwd())); | |
478d5b53 | 10 | |
f66339d1 | 11 | simu.SetRunQA("ALL:ALL") ; |
f1c1204d | 12 | simu.SetQARefDefaultStorage("local://$ALICE_ROOT/OCDB") ; |
a002cebe | 13 | |
930e6e3e | 14 | for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { |
15 | simu.SetQACycles(det, 2) ; | |
16 | } | |
17 | ||
478d5b53 | 18 | TStopwatch timer; |
19 | timer.Start(); | |
20 | simu.Run(nev); | |
21 | WriteXsection(); | |
22 | timer.Stop(); | |
23 | timer.Print(); | |
24 | } | |
25 | ||
26 | WriteXsection() | |
27 | { | |
28 | TPythia6 *pythia = TPythia6::Instance(); | |
29 | pythia->Pystat(1); | |
30 | Double_t xsection = pythia->GetPARI(1); | |
31 | Int_t ntrials = pythia->GetMSTI(5); | |
32 | ||
33 | TTree *tree = new TTree("Xsection","Pythia cross section"); | |
34 | TBranch *branch = tree->Branch("xsection", &xsection, "X/D"); | |
35 | TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i"); | |
36 | tree->Fill(); | |
37 | ||
38 | TFile *file = new TFile("pyxsec.root","recreate"); | |
39 | tree->Write(); | |
40 | file->Close(); | |
41 | ||
42 | cout << "Pythia cross section: " << xsection | |
43 | << ", number of trials: " << ntrials << endl; | |
44 | } | |
45 |