]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muondep/AccEffTemplates/sim.C
Add possibility to work completely locally (Laurent)
[u/mrichter/AliRoot.git] / PWG / muondep / AccEffTemplates / sim.C
1 void sim(Int_t nev=100) 
2 {
3   if ( VAR_PURELY_LOCAL) {
4     TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
5   }
6
7   AliSimulation simulator;
8   simulator.SetTriggerConfig("MUON");
9   simulator.SetRunQA("MUON:ALL");
10   simulator.SetRunHLT("");
11
12   simulator.SetMakeSDigits("MUON");
13   simulator.SetMakeDigits("MUON");// ITS"); // ITS needed to propagate the simulated vertex
14 //  simulator.SetMakeDigitsFromHits("ITS"); // ITS needed to propagate the simulated vertex
15
16   simulator.SetDefaultStorage(VAR_OCDB_PATH);
17   
18   if ( VAR_OCDB_SNAPSHOT )
19   {
20     simulator.SetCDBSnapshotMode("OCDB_sim.root");
21   }
22   
23   if ( ! VAR_PURELY_LOCAL ) {
24     
25     // MUON Tracker
26     simulator.SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
27   
28     // Mag.field from OCDB
29     simulator.UseMagFieldFromGRP();
30
31     //  simulator.UseVertexFromCDB();  
32   }
33   
34   // The rest
35   TStopwatch timer;
36   timer.Start();
37   simulator.Run(nev);
38   timer.Stop();
39   timer.Print();
40 }