]> git.uio.no Git - u/mrichter/AliRoot.git/blame - test/QA/sim.C
Removing obsolete option
[u/mrichter/AliRoot.git] / test / QA / sim.C
CommitLineData
930e6e3e 1void 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);
f66339d1 8 simu.SetDefaultStorage("local://$ALICE_ROOT");
a002cebe 9 simu.SetSpecificStorage("GRP/GRP/Data",
10 Form("local://%s",gSystem->pwd()));
478d5b53 11
f66339d1 12 simu.SetRunQA("ALL:ALL") ;
51757634 13 AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
a002cebe 14
930e6e3e 15 for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
16 simu.SetQACycles(det, 2) ;
17 }
18
478d5b53 19 TStopwatch timer;
20 timer.Start();
21 simu.Run(nev);
22 WriteXsection();
23 timer.Stop();
24 timer.Print();
25}
26
27WriteXsection()
28{
29 TPythia6 *pythia = TPythia6::Instance();
30 pythia->Pystat(1);
31 Double_t xsection = pythia->GetPARI(1);
32 Int_t ntrials = pythia->GetMSTI(5);
33
34 TTree *tree = new TTree("Xsection","Pythia cross section");
35 TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
36 TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
37 tree->Fill();
38
39 TFile *file = new TFile("pyxsec.root","recreate");
40 tree->Write();
41 file->Close();
42
43 cout << "Pythia cross section: " << xsection
44 << ", number of trials: " << ntrials << endl;
45}
46