Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

automatic merge? #3

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analysis/NanoTools
Submodule NanoTools added at ff3248
Binary file added analysis/bin/vbsvvhjets_semimerged
Binary file not shown.
9 changes: 9 additions & 0 deletions analysis/include/core/cuts.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,22 @@ class SelectVBSJets : public AnalysisCut
{
LorentzVectors good_jet_p4s = globals.getVal<LorentzVectors>("good_jet_p4s");
std::vector<unsigned int> vbsjet_cand_idxs;
// getting the vqq globals to use it to skip vqq jets candidates
int ld_vqqjet_idx = globals.getVal<int>("ld_vqqjet_idx");
int tr_vqqjet_idx = globals.getVal<int>("tr_vqqjet_idx");
for (unsigned int jet_i = 0; jet_i < good_jet_p4s.size(); ++jet_i)
{

LorentzVector jet_p4 = good_jet_p4s.at(jet_i);
// Skip Vqq jets candidates
if (jet_i == ld_vqqjet_idx || jet_i == tr_vqqjet_idx) { continue; }

if (jet_p4.pt() >= 30. && fabs(jet_p4.eta()) < 4.7)
{
vbsjet_cand_idxs.push_back(jet_i);
}


}
return vbsjet_cand_idxs;
};
Expand Down
15 changes: 9 additions & 6 deletions analysis/include/vbsvvhjets/collections.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ struct Analysis : Core::Analysis
// Hbb jet globals
cutflow.globals.newVar<LorentzVector>("hbbfatjet_p4");
cutflow.globals.newVar<unsigned int>("hbbfatjet_gidx", 999); // idx in 'good' fatjets global vector
// vvhqq globals
cutflow.globals.newVar<int>("ld_vqqjet_idx");
cutflow.globals.newVar<int>("tr_vqqjet_idx");

// Scale factors
jes = nullptr;
Expand Down Expand Up @@ -252,17 +255,17 @@ struct Analysis : Core::Analysis
);
cutflow.insert(semimerged_select_jets, semimerged_geq4_jets, Right);

// VBS jet selection
Cut* semimerged_select_vbsjets = new Core::SelectVBSJets("SemiMerged_SelectVBSJets", *this);
cutflow.insert(semimerged_geq4_jets, semimerged_select_vbsjets, Right);

// V --> qq jet candidate selection
Cut* semimerged_select_vjets = new SelectVJets("SemiMerged_SelectVJets", *this);
cutflow.insert(semimerged_select_vbsjets, semimerged_select_vjets, Right);
cutflow.insert(semimerged_geq4_jets, semimerged_select_vjets, Right);

// VBS jet selection
Cut* semimerged_select_vbsjets = new Core::SelectVBSJets("SemiMerged_SelectVBSJets", *this);
cutflow.insert(semimerged_select_vjets, semimerged_select_vbsjets, Right);

// Save analysis variables
Cut* semimerged_save_vars = new SaveVariables("SemiMerged_SaveVariables", *this, SemiMerged);
cutflow.insert(semimerged_select_vjets, semimerged_save_vars, Right);
cutflow.insert(semimerged_select_vbsjets, semimerged_save_vars, Right);

// Basic VBS jet requirements
Cut* semimerged_Mjjgt500 = new LambdaCut(
Expand Down
11 changes: 8 additions & 3 deletions analysis/include/vbsvvhjets/cuts.h
Copy link
Owner

Choose a reason for hiding this comment

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

Sorry in advance for the pedantic review: the comment you changed was indeed wrong, but the change is confusing; I think it should read "Sort the two Vqq jets into leading/trailing".

Otherwise, good catch! Glad you are looking at the code closely.

Copy link
Author

Choose a reason for hiding this comment

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

yeah sorry for the confusing comment.

Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ class SelectVJets : public Core::AnalysisCut
{
int jet_idx = good_jet_idxs.at(jet_i);
// Skip VBS jet candidates
if (jet_idx == ld_vbsjet_idx || jet_idx == tr_vbsjet_idx) { continue; }
// skip this step since we are gonna select the Vqq jets first
// if (jet_idx == ld_vbsjet_idx || jet_idx == tr_vbsjet_idx) { continue; }
// Iterate over all pairs
for (unsigned int jet_j = jet_i + 1; jet_j < good_jet_p4s.size(); ++jet_j)
{
Expand All @@ -313,10 +314,10 @@ class SelectVJets : public Core::AnalysisCut
}
}

// Sort the two VBS jets into leading/trailing
// Sort the two (VBS-xx) Vqq jets into leading/trailing
int ld_vqqjet_idx;
int tr_vqqjet_idx;
if (good_jet_p4s.at(vqqjet_idxs.first).pt() > good_jet_p4s.at(vqqjet_idxs.first).pt())
if (good_jet_p4s.at(vqqjet_idxs.first).pt() > good_jet_p4s.at(vqqjet_idxs.second).pt())
{
ld_vqqjet_idx = vqqjet_idxs.first;
tr_vqqjet_idx = vqqjet_idxs.second;
Expand All @@ -333,6 +334,10 @@ class SelectVJets : public Core::AnalysisCut

globals.setVal<LorentzVector>("ld_vqqjet_p4", ld_vqqjet_p4);
globals.setVal<LorentzVector>("tr_vqqjet_p4", tr_vqqjet_p4);
// save vbf jet globals to be used in vbs part
globals.setVal<int>("ld_vqqjet_idx", ld_vqqjet_idx);
globals.setVal<int>("tr_vqqjet_idx", tr_vqqjet_idx);

arbol.setLeaf<double>("ld_vqqjet_qgl", nt.Jet_qgl().at(ld_vqqjet_nanoidx));
arbol.setLeaf<double>("ld_vqqjet_pt", ld_vqqjet_p4.pt());
arbol.setLeaf<double>("ld_vqqjet_eta", ld_vqqjet_p4.eta());
Expand Down
1 change: 1 addition & 0 deletions analysis/rapido
Submodule rapido added at 6fc65c
2 changes: 1 addition & 1 deletion analysis/studies/vbsvvhjets/main.cc
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer not to merge this into the main branch. You can keep this change separate for now.

Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int main(int argc, char** argv)

// Run cutflow
std::vector<std::string> cuts_to_check = {
"AllMerged_SaveVariables"
"SemiMerged_SaveVariables"
};
std::vector<bool> checkpoints = cutflow.run(cuts_to_check);
if (checkpoints.at(0)) { arbol.fill(); }
Expand Down
Loading