60 def addArguments(self):
61 """
62 This function allows to add arguments for parser_args() function
63 """
64
65
66
67 readerPath = "configs/readerConfiguration_reducedEventMC.json"
68 writerPath = "configs/writerConfiguration_dileptonMC.json"
69
70 analysisSelections = {
71 "eventSelection": "Run event selection on DQ skimmed events",
72 "muonSelection": "Run muon selection on DQ skimmed muons",
73 "trackSelection": "Run barrel track selection on DQ skimmed tracks",
74 "sameEventPairing": "Run same event pairing selection on DQ skimmed data",
75 "dileptonTrackDimuonMuonSelection": "Run dimuon-muon pairing, using skimmed data",
76 "dileptonTrackDielectronKaonSelection": "Run dielectron-kaon pairing, using skimmed data",
77 }
78 analysisSelectionsList = []
79 for k, v in analysisSelections.items():
80 analysisSelectionsList.append(k)
81
82 sameEventPairingProcessSelections = {
83 "JpsiToEE": "Run electron-electron pairing, with skimmed tracks",
84 "JpsiToMuMu": "Run muon-muon pairing, with skimmed muons",
85 "JpsiToMuMuVertexing": "Run muon-muon pairing and vertexing, with skimmed muons",
86 }
87 sameEventPairingProcessSelectionsList = []
88 for k, v in sameEventPairingProcessSelections.items():
89 sameEventPairingProcessSelectionsList.append(k)
90
91 booleanSelections = ["true", "false"]
92
93
94 allAnalysisCuts, allMCSignals, allSels, allMixing = DQLibGetter.getAnalysisSelections(self)
95
96
97
98
99 groupAnalysisSelections = self.parserDQEfficiency.add_argument_group(
100 title = "Data processor options: analysis-event-selection, analysis-muon-selection, analysis-track-selection, analysis-dilepton-track"
101 )
102 groupAnalysisSelections.add_argument(
103 "--analysis", help = "Skimmed process selections for MC Analysis", action = "store", nargs = "*", type = str,
104 metavar = "ANALYSIS", choices = analysisSelectionsList,
105 ).completer = ChoicesCompleterList(analysisSelectionsList)
106
107 for key, value in analysisSelections.items():
108 groupAnalysisSelections.add_argument(key, help = value, action = "none")
109
110
111 groupProcessSEPSelections = self.parserDQEfficiency.add_argument_group(
112 title = "Data processor options: analysis-same-event-pairing"
113 )
114 groupProcessSEPSelections.add_argument(
115 "--process", help = "Skimmed process selections for analysis-same-event-pairing task", action = "store", nargs = "*",
116 type = str, metavar = "PROCESS", choices = sameEventPairingProcessSelectionsList,
117 ).completer = ChoicesCompleterList(sameEventPairingProcessSelectionsList)
118 groupProcessSEPSelections.add_argument(
119 "--cfgBarrelMCRecSignals", help = "Space separated list of MC signals (reconstructed)", nargs = "*", action = "store",
120 type = str, metavar = "CFGBARRELMCRECSIGNALS", choices = allMCSignals,
121 ).completer = ChoicesCompleterList(allMCSignals)
122 groupProcessSEPSelections.add_argument(
123 "--cfgBarrelMCGenSignals", help = "Space separated list of MC signals (generated)", nargs = "*", action = "store", type = str,
124 metavar = "CFGBARRELMCGENSIGNALS", choices = allMCSignals,
125 ).completer = ChoicesCompleterList(allMCSignals)
126 groupProcessSEPSelections.add_argument(
127 "--cfgFlatTables", help = "Produce a single flat tables with all relevant information of the pairs and single tracks",
128 action = "store", type = str.lower, choices = booleanSelections,
129 ).completer = ChoicesCompleter(booleanSelections)
130 groupProcess = self.parserDQEfficiency.add_argument_group(
131 title = "Choice List for analysis-same-event-pairing task Process options"
132 )
133
134 for key, value in sameEventPairingProcessSelections.items():
135 groupProcess.add_argument(key, help = value, action = "none")
136
137
138 groupQASelections = self.parserDQEfficiency.add_argument_group(
139 title = "Data processor options: analysis-event-selection, analysis-muon-selection, analysis-track-selection, analysis-event-mixing, analysis-dilepton-hadron"
140 )
141 groupQASelections.add_argument(
142 "--cfgQA", help = "If true, fill QA histograms", action = "store", type = str.lower, choices = (booleanSelections),
143 ).completer = ChoicesCompleter(booleanSelections)
144
145
146 groupAnalysisEventSelection = self.parserDQEfficiency.add_argument_group(title = "Data processor options: analysis-event-selection")
147 groupAnalysisEventSelection.add_argument(
148 "--cfgEventCuts", help = "Space separated list of event cuts", nargs = "*", action = "store", type = str,
149 metavar = "CFGEVENTCUTS", choices = allAnalysisCuts,
150 ).completer = ChoicesCompleterList(allAnalysisCuts)
151
152
153 groupAnalysisTrackSelection = self.parserDQEfficiency.add_argument_group(title = "Data processor options: analysis-track-selection")
154 groupAnalysisTrackSelection.add_argument(
155 "--cfgTrackCuts", help = "Space separated list of barrel track cuts", nargs = "*", action = "store", type = str,
156 metavar = "CFGTRACKCUTS", choices = allAnalysisCuts,
157 ).completer = ChoicesCompleterList(allAnalysisCuts)
158 groupAnalysisTrackSelection.add_argument(
159 "--cfgTrackMCSignals", help = "Space separated list of MC signals", nargs = "*", action = "store", type = str,
160 metavar = "CFGTRACKMCSIGNALS", choices = allMCSignals,
161 ).completer = ChoicesCompleterList(allMCSignals)
162
163
164 groupAnalysisMuonSelection = self.parserDQEfficiency.add_argument_group(title = "Data processor options: analysis-muon-selection")
165 groupAnalysisMuonSelection.add_argument(
166 "--cfgMuonCuts", help = "Space separated list of muon cuts", nargs = "*", action = "store", type = str, metavar = "CFGMUONCUTS",
167 choices = allAnalysisCuts,
168 ).completer = ChoicesCompleterList(allAnalysisCuts)
169 groupAnalysisMuonSelection.add_argument(
170 "--cfgMuonMCSignals", help = "Space separated list of MC signals", nargs = "*", action = "store", type = str,
171 metavar = "CFGMUONMCSIGNALS", choices = allMCSignals,
172 ).completer = ChoicesCompleterList(allMCSignals)
173
174
175 groupAnalysisDileptonTrack = self.parserDQEfficiency.add_argument_group(title = "Data processor options: analysis-dilepton-track")
176 groupAnalysisDileptonTrack.add_argument(
177 "--cfgLeptonCuts", help = "Space separated list of barrel track cuts", nargs = "*", action = "store", type = str,
178 metavar = "CFGLEPTONCUTS", choices = allAnalysisCuts,
179 ).completer = ChoicesCompleterList(allAnalysisCuts)
180 groupAnalysisDileptonTrack.add_argument(
181 "--cfgFillCandidateTable", help = "Produce a single flat tables with all relevant information dilepton-track candidates",
182 action = "store", type = str.lower, choices = booleanSelections,
183 ).completer = ChoicesCompleter(booleanSelections)
184 groupAnalysisDileptonTrack.add_argument(
185 "--cfgBarrelDileptonMCRecSignals", help = "Space separated list of MC signals (reconstructed)", nargs = "*", action = "store",
186 type = str, metavar = "CFGBARRELDILEPTONMCRECSIGNALS", choices = allMCSignals,
187 ).completer = ChoicesCompleterList(allMCSignals)
188 groupAnalysisDileptonTrack.add_argument(
189 "--cfgBarrelDileptonMCGenSignals", help = "Space separated list of MC signals (generated)", nargs = "*", action = "store",
190 type = str, metavar = "CFGBARRELDILEPTONMCRECSIGNALS", choices = allMCSignals,
191 ).completer = ChoicesCompleterList(allMCSignals)
192
193
194 groupDPLReader = self.parserDQEfficiency.add_argument_group(
195 title = "Data processor options: internal-dpl-aod-reader, internal-dpl-aod-writer"
196 )
197 groupDPLReader.add_argument(
198 "--reader",
199 help = "Reader config JSON with path. For Standart Analysis use as default, for dilepton analysis change to dilepton JSON config file",
200 action = "store", default = readerPath, type = str
201 )
202 groupDPLReader.add_argument(
203 "--writer", help = "Argument for producing dileptonAOD.root. Set false for disable", action = "store", default = writerPath,
204 type = str
205 )
206