external

Contents

external#

CMS related tasks dealing with external data.

Classes:

CreatePileupWeights(*args, **kwargs)

CreatePileupWeightsWrapper(*args, **kwargs)

class CreatePileupWeights(*args, **kwargs)[source]#

Bases: ConfigTask

Attributes:

Methods:

requires()

The Tasks that this Task depends on.

output()

The output that this Task produces.

sandbox_stagein()

sandbox_stageout()

run()

The task run method, to be overridden in a subclass.

read_mc_profile_from_cfg(pu_config_target)

Takes a mc pileup configuration file stored in pu_config_target, parses its content and returns the pu profile as a list of float probabilities.

read_data_profile_from_hist(pu_hist_target)

Takes the pileup profile in data preproducd by the lumi pog and stored in pu_hist_target, builds the ratio to mc and returns the weights in a list.

read_data_profile_from_pileupcalc(...)

Takes the pileup profile in data read stored in pu_file_target, which should have been produced when processing data, and a minbias_mexs value in mb (milli), builds the ratio to mc and returns the weights in a list for 99 bins (recommended number).

normalize_values(values)

single_config = True#
data_mode = <luigi.parameter.ChoiceParameter object>#
version = None#
sandbox = 'bash::$CF_BASE/sandboxes/cmssw_default.sh'#
reqs = {'BundleExternalFiles': <class 'columnflow.tasks.external.BundleExternalFiles'>}#
requires()[source]#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]#

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

sandbox_stagein()[source]#
sandbox_stageout()[source]#
run()[source]#

The task run method, to be overridden in a subclass.

See Task.run

classmethod read_mc_profile_from_cfg(pu_config_target)[source]#

Takes a mc pileup configuration file stored in pu_config_target, parses its content and returns the pu profile as a list of float probabilities.

Return type:

list[float]

classmethod read_data_profile_from_hist(pu_hist_target)[source]#

Takes the pileup profile in data preproducd by the lumi pog and stored in pu_hist_target, builds the ratio to mc and returns the weights in a list.

Return type:

list[float]

classmethod read_data_profile_from_pileupcalc(pu_file_target, minbias_xs)[source]#

Takes the pileup profile in data read stored in pu_file_target, which should have been produced when processing data, and a minbias_mexs value in mb (milli), builds the ratio to mc and returns the weights in a list for 99 bins (recommended number).

Return type:

list[float]

classmethod normalize_values(values)[source]#
Return type:

list[float]

configs = None#
exclude_index = False#
exclude_params_branch = {'user'}#
exclude_params_index = {'known_shifts', 'user'}#
exclude_params_remote_workflow = {'known_shifts'}#
exclude_params_repr = {'known_shifts', 'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
exclude_params_repr_empty = {}#
exclude_params_req = {'known_shifts', 'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'known_shifts', 'log_file', 'sandbox'}#
exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
class CreatePileupWeightsWrapper(*args, **kwargs)#

Bases: AnalysisTask, WrapperTask

Attributes:

Methods:

requires()

The Tasks that this Task depends on.

update_wrapper_params(params)

configs = <law.parameter.CSVParameter object>#
exclude_index = False#
exclude_params_branch = {'user'}#
exclude_params_index = {'user'}#
exclude_params_repr = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
exclude_params_repr_empty = {'skip_configs'}#
exclude_params_req = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
exclude_params_req_get = {}#
exclude_params_req_set = {'configs', 'skip_configs'}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
exclude_params_workflow = {'notify_custom', 'notify_mattermost', 'notify_slack', 'user'}#
requires() dict#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

Return type:

dict

skip_configs = <law.parameter.CSVParameter object>#
update_wrapper_params(params)#
version = None#