]>
Commit | Line | Data |
---|---|---|
f8b7a926 | 1 | Int_t getIntEnv(const char* name) |
2 | { | |
3 | TString env = gSystem->Getenv(name); | |
4 | if (env.IsNull()) return 0; | |
5 | return env.Atoi(); | |
6 | } | |
7 | void SetSpecStore(AliSimulation& s, | |
8 | const char* key, | |
9 | const char* sub) | |
10 | { | |
11 | s.SetSpecificStorage(key, Form("alien://Folder=/alice/simulation/%s",sub)); | |
12 | } | |
13 | ||
14 | ||
15 | void Simulate(Int_t nev=1, UInt_t run=0) | |
16 | { | |
17 | // ----------------------------------------------------------------- | |
18 | // | |
19 | // Get GRP parameters. Defines global "grp" as a pointer to GRPData | |
20 | // | |
21 | gROOT->Macro(Form("GRP.C(%d)", run)); | |
22 | ||
23 | // ----------------------------------------------------------------- | |
24 | // | |
25 | // Basic setup | |
26 | // | |
27 | AliSimulation steer; | |
28 | steer.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO"); | |
29 | steer.SetMakeDigitsFromHits("ITS TPC"); | |
30 | steer.UseMagFieldFromGRP(); | |
31 | steer.UseVertexFromCDB(); | |
32 | ||
33 | // ----------------------------------------------------------------- | |
34 | // | |
35 | // Raw OCDB | |
36 | // | |
37 | AliCDBManager* cdb = AliCDBManager::Instance(); | |
38 | cdb->SetDefaultStorageFromRun(grp->run); | |
39 | // cdb->SetRun(grp.run); | |
40 | steer.SetDefaultStorage(cdb->GetDefaultStorage()->GetURI()); | |
41 | ||
42 | // --- Get GRP to deduce collision system -------------------------- | |
43 | Bool_t isAA = grp->IsAA(); | |
44 | Bool_t isPP = grp->IsPP(); | |
45 | Bool_t is10h = grp->period.EqualTo("LHC10h"); | |
46 | ||
47 | // --- ITS (1 Total) ---------------------------------------------- | |
48 | SetSpecStore(steer,"ITS/Align/Data", "2008/v4-15-Release/Ideal"); | |
49 | ||
50 | // --- MUON (1 object) --------------------------------------------- | |
51 | SetSpecStore(steer,"MUON/Align/Data", "2008/v4-15-Release/Ideal"); | |
52 | ||
53 | // ---- TPC (6 total) ---------------------------------------------- | |
54 | SetSpecStore(steer,"TPC/Calib/TimeGain", "2008/v4-15-Release/Ideal/"); | |
55 | SetSpecStore(steer,"TPC/Calib/ClusterParam", "2008/v4-15-Release/Ideal/"); | |
56 | SetSpecStore(steer,"TPC/Calib/AltroConfig", "2008/v4-15-Release/Ideal/"); | |
57 | SetSpecStore(steer,"TPC/Calib/Correction", "2008/v4-15-Release/Ideal/"); | |
58 | SetSpecStore(steer,"TPC/Align/Data", "2008/v4-15-Release/Ideal/"); | |
59 | SetSpecStore(steer,"TPC/Calib/RecoParam", "2008/v4-15-Release/Residual"); | |
60 | if (is10h) | |
61 | SetSpecStore(steer,"TPC/Calib/TimeDrift", "2008/v4-15-Release/Residual/"); | |
62 | else | |
63 | SetSpecStore(steer,"TPC/Calib/TimeDrift", "2008/v4-15-Release/Ideal/"); | |
64 | ||
65 | // --- ZDC for 2010 the following is needed ------------------------ | |
66 | // (https://savannah.cern.ch/task/?func=detailitem&item_id=33180#comment46) | |
67 | if (is10h) | |
68 | SetSpecStore(steer,"ZDC/Align/Data", "2008/v4-15-Release/Ideal/"); | |
69 | ||
70 | // ----------------------------------------------------------------- | |
71 | // | |
72 | // Vertex, Mag.field, and trigger from OCDB | |
73 | // | |
74 | steer.UseVertexFromCDB(); | |
75 | steer.UseMagFieldFromGRP(); | |
76 | // steer.SetTriggerConfig("OCDB"); | |
77 | steer.SetTriggerConfig(!isAA ? "p-p" : "Pb-Pb"); | |
78 | ||
79 | // ----------------------------------------------------------------- | |
80 | // | |
81 | // The rest - disable QA for PbPb | |
82 | // | |
83 | if (isAA) steer.SetRunQA(":"); | |
84 | // gInterpreter->UnloadFile("GetGRP.C"); | |
85 | ||
86 | TStopwatch timer; | |
87 | timer.Start(); | |
88 | steer.Run(nev); | |
89 | timer.Stop(); | |
90 | timer.Print(); | |
91 | } |