]>
Commit | Line | Data |
---|---|---|
478d5b53 | 1 | void sim(Int_t nev=1) { |
2 | const char * kYear = "08" ; | |
3 | AliSimulation simu; | |
4 | simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); | |
5 | simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO"); | |
6 | simu.SetMakeDigitsFromHits("ITS TPC"); | |
7 | simu.SetWriteRawData("ALL","raw.root",kTRUE); | |
8 | // simu.SetDefaultStorage("alien://Folder=/alice/simulation/2007/PDC07_v4-09-Rev-00/Ideal/CDB/"); | |
f66339d1 | 9 | simu.SetDefaultStorage("local://$ALICE_ROOT"); |
478d5b53 | 10 | simu.SetSpecificStorage("EMCAL/*","local://DB"); |
11 | ||
f66339d1 | 12 | simu.SetRunQA("ALL:ALL") ; |
478d5b53 | 13 | AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ; |
14 | AliQA::SetQARefDataDirName("Sim") ; //Data, Pedestals, BlackEvent, ..... | |
15 | ||
16 | TStopwatch timer; | |
17 | timer.Start(); | |
18 | simu.Run(nev); | |
19 | WriteXsection(); | |
20 | timer.Stop(); | |
21 | timer.Print(); | |
22 | } | |
23 | ||
24 | WriteXsection() | |
25 | { | |
26 | TPythia6 *pythia = TPythia6::Instance(); | |
27 | pythia->Pystat(1); | |
28 | Double_t xsection = pythia->GetPARI(1); | |
29 | Int_t ntrials = pythia->GetMSTI(5); | |
30 | ||
31 | TTree *tree = new TTree("Xsection","Pythia cross section"); | |
32 | TBranch *branch = tree->Branch("xsection", &xsection, "X/D"); | |
33 | TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i"); | |
34 | tree->Fill(); | |
35 | ||
36 | TFile *file = new TFile("pyxsec.root","recreate"); | |
37 | tree->Write(); | |
38 | file->Close(); | |
39 | ||
40 | cout << "Pythia cross section: " << xsection | |
41 | << ", number of trials: " << ntrials << endl; | |
42 | } | |
43 |