O2-DQ User Interface 1.0.0
Loading...
Searching...
No Matches
TableMakerMC Class Reference
Inheritance diagram for TableMakerMC:

Public Member Functions

def __init__ (self, parserTableMakerMC=argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, description="Example Usage: ./runTableMakerMC.py <yourConfig.json> --arg value",), eventSelection=EventSelectionTask(), centralityTable=CentralityTable(), multiplicityTable=MultiplicityTable(), tofEventTime=TofEventTime(), tofPidBeta=TofPidBeta(), tpcTofPidFull=TpcTofPidFull(), trackPropagation=TrackPropagation(), trackSelection=TrackSelectionTask(), helperOptions=HelperOptions(), o2Converters=O2Converters(), dplAodReader=DplAodReader())
 
def addArguments (self)
 
def mergeArgs (self)
 
def parseArgs (self)
 

Public Attributes

 centralityTable
 
 dplAodReader
 
 eventSelection
 
 helperOptions
 
 multiplicityTable
 
 o2Converters
 
 parserTableMakerMC
 
 tofEventTime
 
 tofPidBeta
 
 tpcTofPidFull
 
 trackPropagation
 
 trackSelection
 

Detailed Description

Class for Interface -> tableMakerMC.cxx Task -> Configurable, Process Functions

Args:
    object (parser_args() object): tableMakerMC.cxx Interface

Definition at line 44 of file tableMakerMC.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  parserTableMakerMC = argparse.ArgumentParser(             formatter_class = argparse.ArgumentDefaultsHelpFormatter,             description = "Example Usage: ./runTableMakerMC.py <yourConfig.json> --arg value",             ),
  eventSelection = EventSelectionTask(),
  centralityTable = CentralityTable(),
  multiplicityTable = MultiplicityTable(),
  tofEventTime = TofEventTime(),
  tofPidBeta = TofPidBeta(),
  tpcTofPidFull = TpcTofPidFull(),
  trackPropagation = TrackPropagation(),
  trackSelection = TrackSelectionTask(),
  helperOptions = HelperOptions(),
  o2Converters = O2Converters(),
  dplAodReader = DplAodReader() 
)

Definition at line 53 of file tableMakerMC.py.

60 ):
61 super(TableMakerMC, self).__init__()
62 self.parserTableMakerMC = parserTableMakerMC
63 self.eventSelection = eventSelection
64 self.centralityTable = centralityTable
65 self.multiplicityTable = multiplicityTable
66 self.tofEventTime = tofEventTime
67 self.tofPidBeta = tofPidBeta
68 self.tpcTofPidFull = tpcTofPidFull
69 self.trackPropagation = trackPropagation
70 self.trackSelection = trackSelection
71 self.helperOptions = helperOptions
72 self.o2Converters = o2Converters
73 self.dplAodReader = dplAodReader
74 self.parserTableMakerMC.register("action", "none", NoAction)
75 self.parserTableMakerMC.register("action", "store_choice", ChoicesAction)
76

Member Function Documentation

◆ addArguments()

def addArguments (   self)
This function allows to add arguments for parser_args() function

Definition at line 77 of file tableMakerMC.py.

77 def addArguments(self):
78 """
79 This function allows to add arguments for parser_args() function
80 """
81
82 # Predefined Selections
83 tableMakerProcessSelections = {
84 "Full": "Build full DQ skimmed data model, w/o centrality",
85 "FullWithCov": "Build full DQ skimmed data model, w/ track and fwdtrack covariance tables",
86 "BarrelOnly": "Build barrel-only DQ skimmed data model, w/o centrality",
87 "BarrelOnlyWithCov": "Build barrel-only DQ skimmed data model, w/ track cov matrix",
88 "BarrelOnlyWithCent": "Build barrel-only DQ skimmed data model, w/ centrality",
89 "MuonOnlyWithCov": "Build muon-only DQ skimmed data model, w/ muon cov matrix",
90 "MuonOnlyWithCent": "Build muon-only DQ skimmed data model, w/ centrality",
91 "OnlyBCs": "Analyze the BCs to store sampled lumi",
92 }
93 tableMakerProcessSelectionsList = []
94 for k, v in tableMakerProcessSelections.items():
95 tableMakerProcessSelectionsList.append(k)
96
97 booleanSelections = ["true", "false"]
98
99 # init for get DQ libraries
100 allAnalysisCuts, allMCSignals, allSels, allMixing = DQLibGetter.getAnalysisSelections(self)
101
102 # Interface
103 groupTableMakerConfigs = self.parserTableMakerMC.add_argument_group(title = "Data processor options: table-maker-m-c")
104 groupTableMakerConfigs.add_argument(
105 "--cfgEventCuts", help = "Space separated list of event cuts", nargs = "*", action = "store", type = str,
106 metavar = "CFGEVENTCUTS", choices = allAnalysisCuts,
107 ).completer = ChoicesCompleterList(allAnalysisCuts)
108 groupTableMakerConfigs.add_argument(
109 "--cfgBarrelTrackCuts", help = " Space separated list of barrel track cuts", nargs = "*", action = "store", type = str,
110 metavar = "CFGBARRELTRACKCUTS", choices = allAnalysisCuts,
111 ).completer = ChoicesCompleterList(allAnalysisCuts)
112 groupTableMakerConfigs.add_argument(
113 "--cfgMuonCuts", help = "Space separated list of muon cuts in table-maker", action = "store", nargs = "*", type = str,
114 metavar = "CFGMUONCUTS", choices = allAnalysisCuts,
115 ).completer = ChoicesCompleterList(allAnalysisCuts)
116 groupTableMakerConfigs.add_argument("--cfgBarrelLowPt", help = "Low pt cut for tracks in the barrel", action = "store", type = str)
117 groupTableMakerConfigs.add_argument("--cfgMuonLowPt", help = "Low pt cut for muons", action = "store", type = str)
118 groupTableMakerConfigs.add_argument(
119 "--cfgNoQA", help = "If true, no QA histograms", action = "store", type = str.lower, choices = booleanSelections,
120 ).completer = ChoicesCompleter(booleanSelections)
121 groupTableMakerConfigs.add_argument(
122 "--cfgDetailedQA", help = "If true, include more QA histograms (BeforeCuts classes and more)", action = "store",
123 type = str.lower, choices = booleanSelections,
124 ).completer = ChoicesCompleter(booleanSelections)
125 # groupTableMakerConfigs.add_argument("--cfgIsRun2", help="Run selection true or false", action="store", choices=["true","false"], type=str) # no need
126 groupTableMakerConfigs.add_argument("--cfgMinTpcSignal", help = "Minimum TPC signal", action = "store", type = str)
127 groupTableMakerConfigs.add_argument("--cfgMaxTpcSignal", help = "Maximum TPC signal", action = "store", type = str)
128 groupTableMakerConfigs.add_argument(
129 "--cfgMCsignals", help = "Space separated list of MC signals", action = "store", nargs = "*", type = str,
130 metavar = "CFGMCSIGNALS", choices = allMCSignals,
131 ).completer = ChoicesCompleterList(allMCSignals)
132
133 groupProcessTableMaker = self.parserTableMakerMC.add_argument_group(title = "Data processor options: table-maker-m-c")
134 groupProcessTableMaker.add_argument(
135 "--process", help = "Process Selection options for tableMaker/tableMakerMC Data Processing and Skimming", action = "store",
136 type = str, nargs = "*", metavar = "PROCESS", choices = tableMakerProcessSelectionsList,
137 ).completer = ChoicesCompleterList(tableMakerProcessSelectionsList)
138 for key, value in tableMakerProcessSelections.items():
139 groupProcessTableMaker.add_argument(key, help = value, action = "none")
140
141 # Core Part
142 groupCoreSelections = self.parserTableMakerMC.add_argument_group(title = "Core configurations that must be configured")
143 groupCoreSelections.add_argument("-runMC", help = "Run over MC", action = "store_true", default = True)
144

◆ mergeArgs()

def mergeArgs (   self)
This function allows to merge parser_args argument information from different classes

Definition at line 155 of file tableMakerMC.py.

155 def mergeArgs(self):
156 """
157 This function allows to merge parser_args argument information from different classes
158 """
159
160 self.eventSelection.parserEventSelectionTask = self.parserTableMakerMC
161 self.eventSelection.addArguments()
162
163 self.centralityTable.parserCentralityTable = self.parserTableMakerMC
164 self.centralityTable.addArguments()
165
166 self.multiplicityTable.parserMultiplicityTable = self.parserTableMakerMC
167 self.multiplicityTable.addArguments()
168
169 self.tofEventTime.parserTofEventTime = self.parserTableMakerMC
170 self.tofEventTime.addArguments()
171
172 self.tofPidBeta.parserTofPidBeta = self.parserTableMakerMC
173 self.tofPidBeta.addArguments()
174
175 self.tpcTofPidFull.parserTpcTofPidFull = self.parserTableMakerMC
176 self.tpcTofPidFull.addArguments()
177
178 self.trackPropagation.parserTrackPropagation = self.parserTableMakerMC
179 self.trackPropagation.addArguments()
180
181 self.trackSelection.parserTrackSelectionTask = self.parserTableMakerMC
182 self.trackSelection.addArguments()
183
184 self.helperOptions.parserHelperOptions = self.parserTableMakerMC
185 self.helperOptions.addArguments()
186
187 # self.o2Converters.parserO2Converters = self.parserTableMakerMC
188 # self.o2Converters.addArguments()
189
190 self.dplAodReader.parserDplAodReader = self.parserTableMakerMC
191 self.dplAodReader.addArguments()
192
193 self.addArguments()

◆ parseArgs()

def parseArgs (   self)
This function allows to save the obtained arguments to the parser_args() function

Returns:
    Namespace: returns parse_args()

Definition at line 145 of file tableMakerMC.py.

145 def parseArgs(self):
146 """
147 This function allows to save the obtained arguments to the parser_args() function
148
149 Returns:
150 Namespace: returns parse_args()
151 """
152 argcomplete.autocomplete(self.parserTableMakerMC, always_complete_options = False)
153 return self.parserTableMakerMC.parse_args()
154

Member Data Documentation

◆ centralityTable

centralityTable

Definition at line 64 of file tableMakerMC.py.

◆ dplAodReader

dplAodReader

Definition at line 73 of file tableMakerMC.py.

◆ eventSelection

eventSelection

Definition at line 63 of file tableMakerMC.py.

◆ helperOptions

helperOptions

Definition at line 71 of file tableMakerMC.py.

◆ multiplicityTable

multiplicityTable

Definition at line 65 of file tableMakerMC.py.

◆ o2Converters

o2Converters

Definition at line 72 of file tableMakerMC.py.

◆ parserTableMakerMC

parserTableMakerMC

Definition at line 62 of file tableMakerMC.py.

◆ tofEventTime

tofEventTime

Definition at line 66 of file tableMakerMC.py.

◆ tofPidBeta

tofPidBeta

Definition at line 67 of file tableMakerMC.py.

◆ tpcTofPidFull

tpcTofPidFull

Definition at line 68 of file tableMakerMC.py.

◆ trackPropagation

trackPropagation

Definition at line 69 of file tableMakerMC.py.

◆ trackSelection

trackSelection

Definition at line 70 of file tableMakerMC.py.


The documentation for this class was generated from the following file: