]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - test/vmctest/gun/simMC.C
- Activated 10m cut in low density materials (Geant4)
[u/mrichter/AliRoot.git] / test / vmctest / gun / simMC.C
diff --git a/test/vmctest/gun/simMC.C b/test/vmctest/gun/simMC.C
new file mode 100644 (file)
index 0000000..207fa6a
--- /dev/null
@@ -0,0 +1,26 @@
+// $Id$
+//
+// Macro for running MC simulation only in test/vmctest/gun.
+// Adapted from from sim.C. 
+
+void simMC(Int_t nev=3, const TString& config) {
+  if (gSystem->Getenv("EVENT"))
+   nev = atoi(gSystem->Getenv("EVENT")) ;   
+  
+  AliSimulation simulator(config);
+  simulator.SetMakeSDigits("");
+  simulator.SetMakeDigits("");
+  simulator.SetMakeDigitsFromHits("");
+  simulator.SetRunQA(":") ; 
+  simulator.SetRunHLT("") ; 
+
+  simulator.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  simulator.SetSpecificStorage("GRP/GRP/Data",
+                              Form("local://%s",gSystem->pwd()));
+  
+  TStopwatch timer;
+  timer.Start();
+  simulator.Run(nev);
+  timer.Stop();
+  timer.Print();
+}