external#

CMS related tasks dealing with external data.

Classes:

CreatePileupWeights(*args, **kwargs)

CreatePileupWeightsWrapper(*args, **kwargs)

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

Bases: ConfigTask

Attributes:

sandbox

data_mode

version

reqs

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

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)

rtype:

list[float]

sandbox = 'bash::$CF_BASE/sandboxes/cmssw_default.sh'#
data_mode = <luigi.parameter.ChoiceParameter object>#
version = None#
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]

exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
class CreatePileupWeightsWrapper(*args, **kwargs)#

Bases: AnalysisTask, WrapperTask

Attributes:

configs

exclude_index

exclude_params_index

exclude_params_repr

exclude_params_repr_empty

exclude_params_req

exclude_params_req_get

exclude_params_req_set

exclude_params_sandbox

skip_configs

version

Methods:

requires()

Collect requirements defined by the underlying require_cls of the WrapperTask depending on optional additional parameters.

update_wrapper_params(params)

configs = <law.parameter.CSVParameter object>#
exclude_index = False#
exclude_params_index = {}#
exclude_params_repr = {}#
exclude_params_repr_empty = {}#
exclude_params_req = {}#
exclude_params_req_get = {}#
exclude_params_req_set = {}#
exclude_params_sandbox = {'log_file', 'sandbox'}#
requires() Requirements#

Collect requirements defined by the underlying require_cls of the WrapperTask depending on optional additional parameters.

Return type:

Requirements

Returns:

Requirements for the WrapperTask instance.

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