]>
Commit | Line | Data |
---|---|---|
930e6e3e | 1 | void sim(Int_t nev=4) { |
478d5b53 | 2 | const char * kYear = "08" ; |
3 | AliSimulation simu; | |
f479d4aa | 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"); | |
478d5b53 | 6 | simu.SetMakeDigitsFromHits("ITS TPC"); |
7 | simu.SetWriteRawData("ALL","raw.root",kTRUE); | |
59932366 | 8 | // simu.SetDefaultStorage("alien://Folder=/alice/data/2008/LHC08c/OCDB/"); |
f66339d1 | 9 | simu.SetDefaultStorage("local://$ALICE_ROOT"); |
478d5b53 | 10 | simu.SetSpecificStorage("EMCAL/*","local://DB"); |
11 | ||
f66339d1 | 12 | simu.SetRunQA("ALL:ALL") ; |
51757634 | 13 | // AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ; |
14 | AliQA::SetQARefStorage("local://$ALICE_ROOT") ; | |
80336a64 | 15 | // AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE |
930e6e3e | 16 | for (Int_t det = 0 ; det < AliQA::kNDET ; det++) { |
17 | simu.SetQACycles(det, 2) ; | |
18 | } | |
19 | ||
478d5b53 | 20 | TStopwatch timer; |
21 | timer.Start(); | |
22 | simu.Run(nev); | |
23 | WriteXsection(); | |
24 | timer.Stop(); | |
25 | timer.Print(); | |
26 | } | |
27 | ||
28 | WriteXsection() | |
29 | { | |
30 | TPythia6 *pythia = TPythia6::Instance(); | |
31 | pythia->Pystat(1); | |
32 | Double_t xsection = pythia->GetPARI(1); | |
33 | Int_t ntrials = pythia->GetMSTI(5); | |
34 | ||
35 | TTree *tree = new TTree("Xsection","Pythia cross section"); | |
36 | TBranch *branch = tree->Branch("xsection", &xsection, "X/D"); | |
37 | TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i"); | |
38 | tree->Fill(); | |
39 | ||
40 | TFile *file = new TFile("pyxsec.root","recreate"); | |
41 | tree->Write(); | |
42 | file->Close(); | |
43 | ||
44 | cout << "Pythia cross section: " << xsection | |
45 | << ", number of trials: " << ntrials << endl; | |
46 | } | |
47 |