]>
Commit | Line | Data |
---|---|---|
d5715c32 | 1 | void runSimRec(Int_t simtype, Int_t SCtype, Int_t nevents, Int_t ntracks, Int_t rate=50, Int_t gas=0) |
9ecc3ba3 | 2 | { |
fa97f7bd | 3 | //rate is in kHz |
9ecc3ba3 | 4 | |
3c38cbb8 | 5 | Int_t recoType=simtype/10; |
6 | recoType%=10; | |
7 | Int_t subRecoType=simtype/100; | |
8 | simtype%=10; | |
9 | ||
9ecc3ba3 | 10 | //simulation part |
11 | AliToyMCEventGeneratorSimple s; | |
12 | ||
13 | TString outputFile="toyMC"; | |
fa97f7bd | 14 | |
15 | //for simtype also below | |
16 | switch (simtype) { | |
17 | case 0: | |
18 | outputFile.Append(Form("_fixed_%dkHz",rate)); | |
19 | break; | |
3c38cbb8 | 20 | case 1: |
21 | outputFile.Append(Form("_train_%dkHz",rate)); | |
22 | break; | |
fa97f7bd | 23 | } |
d5715c32 | 24 | |
25 | AliToyMCEventGeneratorSimple::EGasType gasType=AliToyMCEventGeneratorSimple::kNeCO2_9010; | |
26 | ||
27 | switch (gas) { | |
28 | case 0: | |
29 | gasType=AliToyMCEventGeneratorSimple::kNeCO2_9010; | |
30 | outputFile.Appen("_NeCO2"); | |
31 | break; | |
32 | case 1: | |
33 | gasType=AliToyMCEventGeneratorSimple::kNeCO2N2_90105; | |
34 | outputFile.Appen("_NeCO2N2"); | |
35 | break; | |
36 | } | |
fa97f7bd | 37 | |
9ecc3ba3 | 38 | switch (SCtype) { |
39 | case 0: | |
d5715c32 | 40 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps5, gasType); |
9ecc3ba3 | 41 | outputFile.Append("_eps05"); |
42 | break; | |
43 | case 1: | |
d5715c32 | 44 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps10, gasType); |
9ecc3ba3 | 45 | outputFile.Append("_eps10"); |
46 | break; | |
47 | case 2: | |
d5715c32 | 48 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps20, gasType); |
9ecc3ba3 | 49 | outputFile.Append("_eps20"); |
50 | break; | |
d5715c32 | 51 | case 3: |
52 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps25, gasType); | |
53 | outputFile.Append("_eps25"); | |
54 | break; | |
55 | case 4: | |
56 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps30, gasType); | |
57 | outputFile.Append("_eps30"); | |
58 | break; | |
59 | case 5: | |
60 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps35, gasType); | |
61 | outputFile.Append("_eps35"); | |
62 | break; | |
63 | case 6: | |
64 | s.SetSpaceCharge(AliToyMCEventGeneratorSimple::kEps40, gasType); | |
65 | outputFile.Append("_eps40"); | |
66 | break; | |
9ecc3ba3 | 67 | } |
68 | ||
0403120d | 69 | outputFile.Append(Form("_%04dev_%04dtr",nevents,ntracks)); |
9ecc3ba3 | 70 | outputFile.Append(".root"); |
71 | s.SetOutputFileName(outputFile.Data()); | |
72 | ||
73 | //TODO: Add other types | |
74 | switch (simtype) { | |
75 | case 0: | |
fa97f7bd | 76 | s.RunSimulation(nevents,ntracks,rate); |
9ecc3ba3 | 77 | break; |
838d33a8 | 78 | case 1: |
79 | s.RunSimulationBunchTrain(nevents,ntracks); | |
80 | break; | |
9ecc3ba3 | 81 | } |
82 | ||
83 | //reconstruction part | |
84 | AliToyMCReconstruction rec; | |
85 | // rec.SetUseMaterialBudget(kTRUE) | |
36a79b0d | 86 | rec.SetFillClusterRes(kTRUE); |
87 | rec.SetLongT0seed(kFALSE); | |
838d33a8 | 88 | |
89 | if (recoType==0){ | |
90 | rec.SetRecoSettings(1,0,AliToyMCReconstruction::kNoCorrection); | |
3c38cbb8 | 91 | if (!subRecoType||subRecoType==1) rec.RunReco(outputFile.Data()); |
838d33a8 | 92 | |
93 | rec.SetRecoSettings(1,1,AliToyMCReconstruction::kIdeal); | |
3c38cbb8 | 94 | if (!subRecoType||subRecoType==2) rec.RunReco(outputFile.Data()); |
838d33a8 | 95 | |
96 | rec.SetRecoSettings(0,1,AliToyMCReconstruction::kIdeal); | |
3c38cbb8 | 97 | if (!subRecoType||subRecoType==3) rec.RunReco(outputFile.Data()); |
838d33a8 | 98 | |
99 | rec.SetRecoSettings(0,1,AliToyMCReconstruction::kAverageEta); | |
3c38cbb8 | 100 | if (!subRecoType||subRecoType==4) rec.RunReco(outputFile.Data()); |
838d33a8 | 101 | |
102 | rec.SetRecoSettings(0,1,AliToyMCReconstruction::kNoCorrection); | |
3c38cbb8 | 103 | if (!subRecoType||subRecoType==5) rec.RunReco(outputFile.Data()); |
838d33a8 | 104 | |
105 | rec.SetRecoSettings(0,0,AliToyMCReconstruction::kNoCorrection); | |
3c38cbb8 | 106 | if (!subRecoType||subRecoType==6) rec.RunReco(outputFile.Data()); |
838d33a8 | 107 | } |
108 | ||
109 | if (recoType==1) { | |
110 | rec.SetRecoSettings(0,1,AliToyMCReconstruction::kNoCorrection); | |
3c38cbb8 | 111 | if (!subRecoType||subRecoType==1) rec.RunFullTracking(outputFile.Data()); |
838d33a8 | 112 | |
113 | rec.SetRecoSettings(0,0,AliToyMCReconstruction::kNoCorrection); | |
3c38cbb8 | 114 | if (!subRecoType||subRecoType==2) rec.RunFullTracking(outputFile.Data()); |
838d33a8 | 115 | } |
9ecc3ba3 | 116 | |
117 | } |