Skip to content

Btag v2#218

Open
abolshov wants to merge 11 commits intocms-flaf:mainfrom
abolshov:btag_v2
Open

Btag v2#218
abolshov wants to merge 11 commits intocms-flaf:mainfrom
abolshov:btag_v2

Conversation

@abolshov
Copy link
Contributor

No description provided.

@abolshov
Copy link
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_61
  • Corrections_version=PR_97

@cms-flaf-bot
Copy link
Collaborator

pipeline#13922851 started

@cms-flaf-bot
Copy link
Collaborator

pipeline#13922851 failed

@abolshov
Copy link
Contributor Author

@cms-flaf-bot please test

  • HH_bbWW_version=PR_61
  • Corrections_version=PR_97

@cms-flaf-bot
Copy link
Collaborator

pipeline#13923010 started

@cms-flaf-bot
Copy link
Collaborator

pipeline#13923010 failed

@abolshov
Copy link
Contributor Author

abolshov commented Feb 1, 2026

@cms-flaf-bot please test

  • HH_bbWW_version=PR_61
  • Corrections_version=PR_97

@cms-flaf-bot
Copy link
Collaborator

pipeline#13930990 started

@cms-flaf-bot
Copy link
Collaborator

pipeline#13930990 failed

@abolshov
Copy link
Contributor Author

abolshov commented Feb 1, 2026

@cms-flaf-bot please test

  • HH_bbWW_version=PR_61
  • Corrections_version=PR_97

@cms-flaf-bot
Copy link
Collaborator

pipeline#13931790 started

@cms-flaf-bot
Copy link
Collaborator

pipeline#13931790 failed

@abolshov
Copy link
Contributor Author

abolshov commented Feb 2, 2026

@cms-flaf-bot please test

  • HH_bbWW_version=PR_61
  • Corrections_version=PR_97

@cms-flaf-bot
Copy link
Collaborator

pipeline#13933371 started

@cms-flaf-bot
Copy link
Collaborator

pipeline#13933371 failed

@abolshov
Copy link
Contributor Author

abolshov commented Feb 2, 2026

@kandrosov tests except Hmumu 2024 passed.

final_array = ak.concatenate([final_array, new_array])
elif save_as == "json":
if final_dict is None:
final_dict = {key: new_array[key] for key in new_array.keys()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
final_dict = {key: new_array[key] for key in new_array.keys()}
final_dict = new_array

Comment on lines +95 to +96
for key in final_dict.keys():
final_dict[key] += new_array[key]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for key in final_dict.keys():
final_dict[key] += new_array[key]
final_dict = producer.combine_outputs(final_dict, new_array)

n_orig = n_orig.GetValue()
n_final = n_final.GetValue()
if n_orig != n_final:
if save_as != "json" and n_orig != n_final:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if save_as != "json" and n_orig != n_final:
if save_as == "root" and n_orig != n_final:

# verbosity = ROOT.RLogScopedVerbosity(
# ROOT.Detail.RDF.RDFLogChannel(), ROOT.ELogLevel.kLogInfo
# )
isData = dataset_name == "data"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isData = dataset_name == "data"
isData = setup.datasets[dataset_name]["process_group"] == "data"

Comment on lines +258 to +260
parser.add_argument("--saveAs", type=str, default="root")
parser.add_argument("--isData", action="store_true")
parser.add_argument("--histTupleDef", type=str)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
parser.add_argument("--saveAs", type=str, default="root")
parser.add_argument("--isData", action="store_true")
parser.add_argument("--histTupleDef", type=str)

Take everything from the setup

Comment on lines +253 to +254
isData = process_group == "data"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isData = process_group == "data"

Comment on lines +289 to +290
isData=isData,
btagIntegralRatios=btagIntegralRatios,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
isData=isData,
btagIntegralRatios=btagIntegralRatios,

n_cpus = copy_param(HTCondorWorkflow.n_cpus, 4)

def workflow_requires(self):
correct_btagShape_weights = self.global_params.get("correct_btagShape_weights", False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
correct_btagShape_weights = self.global_params.get("correct_btagShape_weights", False)

ps_call(cmd, verbose=1)


class BtagShapeWeightCorrectionTask(Task, HTCondorWorkflow, law.LocalWorkflow):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want a separate task dedicated to btag shape weight corrections. We need AnalysisCacheTask and AnalysisCacheAggregatorTask (if need_aggregator flag is set to true for the producer)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not modify RunKit in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants