38 def addArguments(self):
39 """
40 This function allows to add arguments for parser_args() function
41 """
42
43
44 pidSelections = {
45 "el":
46 "Produce PID information for the Electron mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
47 "mu":
48 "Produce PID information for the Muon mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
49 "pi":
50 "Produce PID information for the Pion mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
51 "ka":
52 "Produce PID information for the Kaon mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
53 "pr":
54 "Produce PID information for the Proton mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
55 "de":
56 "Produce PID information for the Deuterons mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
57 "tr":
58 "Produce PID information for the Triton mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
59 "he":
60 "Produce PID information for the Helium3 mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
61 "al":
62 "Produce PID information for the Alpha mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)",
63 }
64 pidSelectionsList = []
65 for k, v in pidSelections.items():
66 pidSelectionsList.append(k)
67
68 booleanSelections = ["true", "false"]
69
70
71 groupPID = self.parserTpcTofPidFull.add_argument_group(title = "Data processor options: tpc-pid-full, tof-pid-full")
72 groupPID.add_argument(
73 "--pid", help = "Produce PID information for the <particle> mass hypothesis", action = "store", nargs = "*", type = str.lower,
74 metavar = "PID", choices = pidSelectionsList,
75 ).completer = ChoicesCompleterList(pidSelectionsList)
76
77 for key, value in pidSelections.items():
78 groupPID.add_argument(key, help = value, action = "none")
79
80 groupTofPid = self.parserTpcTofPidFull.add_argument_group(title = "Data processor options: tof-pid, tof-pid-full")
81 groupTofPid.add_argument(
82 "--isWSlice", help = "Process with track slices", action = "store", type = str.lower, choices = booleanSelections,
83 ).completer = ChoicesCompleter(booleanSelections)
84