1 void sim(Int_t nev=10) {
3 //simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL FMD PMD T0 ZDC VZERO MUON HLT");
4 //simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL FMD PMD T0 ZDC VZERO MUON HLT");
5 //simu.SetMakeDigitsFromHits("ITS TPC");
6 //simu.SetWriteRawData("ALL","raw.root",kTRUE);
7 simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE");
9 // No write access to the OCDB => specific storage
10 simu.SetSpecificStorage("GRP/GRP/Data",
11 Form("local://%s",gSystem->pwd()));
13 //simu.SetRunQA(":") ;
15 //simu.SetWriteGRPEntry(kFALSE);
18 //Load necessary libraries and connect to the GRID
19 gSystem->Load("libNetx.so") ;
20 gSystem->Load("libRAliEn.so");
21 TGrid::Connect("alien://") ;
23 //Feed Grid with collection file
24 TGridCollection * collection = (TGridCollection*) TAlienCollection::Open("collection.xml");
26 AliError(Form("collection: %s not found", kXML)) ;
29 TGridResult* result = collection->GetGridResult("",0 ,0);
30 TString alienURL = result->GetKey(0, "turl") ;//split all files in collection, only one is sent per job
31 cout << "================== " << alienURL << endl ;
32 simu.MergeWith(alienURL);
44 TPythia6 *pythia = TPythia6::Instance();
46 Double_t xsection = pythia->GetPARI(1);
47 Int_t ntrials = pythia->GetMSTI(5);
49 TTree *tree = new TTree("Xsection","Pythia cross section");
50 TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
51 TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
54 TFile *file = new TFile("pyxsec.root","recreate");
58 cout << "Pythia cross section: " << xsection
59 << ", number of trials: " << ntrials << endl;