22 std::vector<unsigned int>& OUT_el,
23 std::vector<unsigned int>& OUT_mu,
24 std::vector<unsigned int>& OUT_jet,
25 std::vector<unsigned int>& OUT_ljet,
27 std::string passTopCuts(
"");
29 passTopCuts =
"passPreORSelection";
32 passTopCuts =
"passPreORSelectionLoose";
38 std::vector<unsigned int> IN_el, IN_mu, IN_jet, IN_ljet;
39 std::list<unsigned int> l_el, l_mu, l_jet, l_ljet;
40 unsigned int index_el(0), index_mu(0), index_jet(0), index_ljet(0);
44 if (
x->auxdataConst<
char >(passTopCuts) == 1) {
45 IN_el.push_back(index_el);
46 l_el.push_back(index_el);
54 if (
x->auxdataConst<
char >(passTopCuts) == 1) {
55 IN_mu.push_back(index_mu);
56 l_mu.push_back(index_mu);
64 if (
x->auxdataConst<
char >(passTopCuts) == 1) {
65 IN_jet.push_back(index_jet);
66 l_jet.push_back(index_jet);
73 for (
auto x : *ljet) {
74 if (
x->auxdataConst<
char >(passTopCuts) == 1) {
75 IN_ljet.push_back(index_ljet);
76 l_ljet.push_back(index_ljet);
83 for (
auto j : IN_jet) {
84 for (
auto m : IN_mu) {
92 for (
auto e : IN_el) {
93 double closestdr = 100.;
94 int closestJetIndex = -1;
95 for (
auto j : IN_jet) {
98 if (ejetdr < 0.2 && ejetdr < closestdr) {
104 if (closestJetIndex > -1) l_jet.remove(closestJetIndex);
108 for (
auto j : l_jet) {
109 for (
auto e : IN_el) {
122 for (
auto i : l_el) {
125 for (
auto i : l_mu) {
128 for (
auto i : l_jet) {
129 OUT_jet.push_back(
i);
131 for (
auto i : l_ljet) {
132 OUT_ljet.push_back(
i);
142 std::vector<unsigned int>& ,
143 std::vector<unsigned int>& goodElectrons,
144 std::vector<unsigned int>& goodMuons,
145 std::vector<unsigned int>& ,
146 std::vector<unsigned int>& goodJets,
147 std::vector<unsigned int>& goodLargeRJets,
148 const bool isLoose) {
153 os <<
"OverlapRemovalIndices\n";
154 os <<
" (1) remove muon within dR < 0.4 of any jet\n";
155 os <<
" (2) remove single jet closest to an electron (within dR < 0.2)\n";
156 os <<
" (3) remove electron with dR < 0.4 of jet\n";