]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muondep/AccEffTemplates/sim.C
Merge branch 'master' into TPCdev
[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",VAR_SIM_ALIGNDATA);
27
28     simulator.SetSpecificStorage("ITS/Align/Data",  "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");
29     // Mag.field from OCDB
30     simulator.UseMagFieldFromGRP();
31
32     simulator.UseVertexFromCDB();  
33   }
34   
35   // The rest
36   TStopwatch timer;
37   timer.Start();
38   simulator.Run(nev);
39   timer.Stop();
40   timer.Print();
41 }