]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG/muondep/AccEffTemplates/sim.C
Add possibility to work completely locally (Laurent)
[u/mrichter/AliRoot.git] / PWG / muondep / AccEffTemplates / sim.C
index bde63f235bc2a7d6254c67f3aaf0a7c5817d37c7..50cd2e0a7c96fea031a6e88b54676fb58b9ae7ca 100644 (file)
@@ -1,5 +1,9 @@
 void sim(Int_t nev=100) 
-{  
+{
+  if ( VAR_PURELY_LOCAL) {
+    TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
+  }
+
   AliSimulation simulator;
   simulator.SetTriggerConfig("MUON");
   simulator.SetRunQA("MUON:ALL");
@@ -8,21 +12,24 @@ void sim(Int_t nev=100)
   simulator.SetMakeSDigits("MUON");
   simulator.SetMakeDigits("MUON");// ITS"); // ITS needed to propagate the simulated vertex
 //  simulator.SetMakeDigitsFromHits("ITS"); // ITS needed to propagate the simulated vertex
-  
-  // raw OCDB
-//  simulator.SetDefaultStorage("alien://folder=/alice/data/2011/OCDB?cacheFold=/local/cdb");
+
   simulator.SetDefaultStorage(VAR_OCDB_PATH);
   
   if ( VAR_OCDB_SNAPSHOT )
   {
     simulator.SetCDBSnapshotMode("OCDB_sim.root");
   }
-  // MUON Tracker
-  simulator.SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
   
-  // Vertex and Mag.field from OCDB
-//  simulator.UseVertexFromCDB();
-  simulator.UseMagFieldFromGRP();
+  if ( ! VAR_PURELY_LOCAL ) {
+    
+    // MUON Tracker
+    simulator.SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
+  
+    // Mag.field from OCDB
+    simulator.UseMagFieldFromGRP();
+
+    //  simulator.UseVertexFromCDB();  
+  }
   
   // The rest
   TStopwatch timer;