Recent first physics productions.
[u/mrichter/AliRoot.git] / prod / LHC09a14 / sim.C
index c4f3d353ece1706431a99fb8cad22c20c58a3de7..5753a8c181c138961fb64540494df1cbd029ba17 100644 (file)
@@ -1,39 +1,44 @@
-void sim(Int_t nev=100) {\r
-//  AliLog::SetGlobalLogLevel(AliLog::kError);\r
+void sim(Int_t nev=50) {\r
 \r
-  AliSimulation simu;\r
-  simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");\r
-  simu.SetMakeDigitsFromHits("ITS TPC");\r
+  AliSimulation MuonSim;\r
+  MuonSim.SetMakeTrigger("MUON");\r
+  MuonSim.SetMakeSDigits("MUON ITS");\r
+  MuonSim.SetMakeDigits("MUON ITS VZERO");\r
+  MuonSim.SetWriteRawData("MUON ITS VZERO HLT","raw.root",kTRUE);\r
+  MuonSim.SetRunHLT("libAliHLTMUON.so chains=dHLT-sim");\r
+  MuonSim.SetRunQA("MUON:ALL");\r
+  \r
+  MuonSim.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/"); \r
+  \r
+  // QA reference\r
+  MuonSim.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;\r
 \r
-  simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");\r
+  // HLT\r
+  MuonSim.SetSpecificStorage("HLT/ConfigMUON/DecisionComponent","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  MuonSim.SetSpecificStorage("HLT/ConfigMUON/HitReconstructor","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  MuonSim.SetSpecificStorage("HLT/ConfigMUON/MansoTrackerFSM","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  MuonSim.SetSpecificStorage("HLT/ConfigMUON/TriggerReconstructor","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  \r
+  // CTP\r
+  MuonSim.SetSpecificStorage("GRP/CTP/Config","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  \r
+  // alignment\r
+  MuonSim.SetSpecificStorage("MUON/Align/Data","alien://Folder=/alice/simulation/2008/v4-15-Release/Full");\r
+  \r
+  // trigger masks\r
+  MuonSim.SetSpecificStorage("MUON/Calib/GlobalTriggerCrateConfig","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
+  MuonSim.SetSpecificStorage("MUON/Calib/LocalTriggerBoardMasks","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb");\r
\r
+  // tracker masks\r
+  MuonSim.SetSpecificStorage("MUON/Calib/Gains","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb/sim");\r
+  MuonSim.SetSpecificStorage("MUON/Calib/Pedestals","alien://Folder=/alice/cern.ch/user/b/bogdan/prod2009/cdb/sim");\r
 \r
-
-  simu.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
-
   TStopwatch timer;\r
   timer.Start();\r
-  simu.Run(nev);\r
-  WriteXsection();
+  \r
+  MuonSim.Run(nev);\r
+  \r
   timer.Stop();\r
   timer.Print();\r
+  \r
 }\r
-
-WriteXsection()
-{
-  TPythia6 *pythia = TPythia6::Instance();
-  pythia->Pystat(1);
-  Double_t xsection = pythia->GetPARI(1);
-  Int_t    ntrials  = pythia->GetMSTI(5);
-
-  TFile *file = new TFile("pyxsec.root","recreate");
-  TTree   *tree   = new TTree("Xsection","Pythia cross section");
-  TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
-  TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
-  tree->Fill();
-
-  tree->Write();
-  file->Close();
-
-  cout << "Pythia cross section: " << xsection 
-       << ", number of trials: " << ntrials << endl;
-}