]> git.uio.no Git - u/mrichter/AliRoot.git/blame - test/QA/sim.C
Removal of out-of-event-loop QA. Correlation QA. Some clean-up in QA code (Yves)
[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;
930e6e3e 4// simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO");
5 simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL PMD T0 ZDC VZERO");
6 simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL PMD T0 ZDC VZERO");
7// simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL MUON FMD PMD T0 ZDC VZERO");
478d5b53 8 simu.SetMakeDigitsFromHits("ITS TPC");
9 simu.SetWriteRawData("ALL","raw.root",kTRUE);
59932366 10// simu.SetDefaultStorage("alien://Folder=/alice/data/2008/LHC08c/OCDB/");
f66339d1 11 simu.SetDefaultStorage("local://$ALICE_ROOT");
478d5b53 12 simu.SetSpecificStorage("EMCAL/*","local://DB");
13
f66339d1 14 simu.SetRunQA("ALL:ALL") ;
51757634 15 // AliQA::SetQARefStorage(Form("%s%s/", AliQA::GetQARefDefaultStorage(), kYear)) ;
16 AliQA::SetQARefStorage("local://$ALICE_ROOT") ;
80336a64 17 // AliQA::SetQARefDataDirName(AliQA::kMONTECARLO) ; //RUN_TYPE
930e6e3e 18 for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
19 simu.SetQACycles(det, 2) ;
20 }
21
478d5b53 22 TStopwatch timer;
23 timer.Start();
24 simu.Run(nev);
25 WriteXsection();
26 timer.Stop();
27 timer.Print();
28}
29
30WriteXsection()
31{
32 TPythia6 *pythia = TPythia6::Instance();
33 pythia->Pystat(1);
34 Double_t xsection = pythia->GetPARI(1);
35 Int_t ntrials = pythia->GetMSTI(5);
36
37 TTree *tree = new TTree("Xsection","Pythia cross section");
38 TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
39 TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
40 tree->Fill();
41
42 TFile *file = new TFile("pyxsec.root","recreate");
43 tree->Write();
44 file->Close();
45
46 cout << "Pythia cross section: " << xsection
47 << ", number of trials: " << ntrials << endl;
48}
49