Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] If running several channels at one time, the cutflow will save randomly in other channel (in analysis_template.cxx) #221

Open
botaoguo opened this issue Jun 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working investigation needed

Comments

@botaoguo
Copy link

botaoguo commented Jun 9, 2023

if (nevents != 0){
TH1D cutflow;
cutflow.SetName("cutflow");
cutflow.SetTitle("cutflow");
// iterate through the cutflow vector and fill the histogram with the
// .GetPass() values
for (auto cut = cutReports[scope_counter].begin();
cut != cutReports[scope_counter].end(); cut++) {
cutflow.SetBinContent(
std::distance(cutReports[scope_counter].begin(), cut) + 1,
cut->GetPass());
cutflow.GetXaxis()->SetBinLabel(
std::distance(cutReports[scope_counter].begin(), cut) + 1,
cut->GetName().c_str());
}
// store it in the output file
cutflow.Write();
}

Here, by scope_counter++ to loop, but the corresponding cutReport will be random in config.cxx

@botaoguo botaoguo added the bug Something isn't working label Jun 9, 2023
@botaoguo
Copy link
Author

botaoguo commented Jun 9, 2023

for example, If run mm, em, ee channel at the same time, may be the cutflow of mm will save in em ntuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working investigation needed
Projects
None yet
Development

No branches or pull requests

2 participants