84 std::vector<TLorentzVector> selected_recoPFJets;
85 selected_recoPFJets.clear();
86 std::vector<TLorentzVector> selected_lep;
94 if (
met->begin() !=
met->end()) {
95 MET->Fill(
met->begin()->et());
97 imet.SetPtEtaPhiM(
met->begin()->et(), 0.,
met->begin()->phi(), 0.0);
108 unsigned int pvMult = 0;
111 if (
pv->position().Rho() < 2 &&
abs(
pv->position().z()) <= 24. &&
pv->ndof() > 4 && !
pv->isFake()) {
119 reco::MuonCollection::const_iterator
mu;
120 if (!
muons.failedToGet()) {
127 Mu.SetPtEtaPhiM(
mu->pt(),
mu->eta(),
mu->phi(), 0.0);
128 selected_lep.push_back(
Mu);
138 double muonCombRelIso = 1.;
153 reco::GsfElectronCollection::const_iterator elec;
155 if (!
elecs.failedToGet()) {
158 for (elec =
elecs->begin(); elec !=
elecs->end(); ++elec) {
159 if (elec->pt() < 5.0)
162 El.SetPtEtaPhiM(elec->pt(), elec->eta(), elec->phi(), 0.0);
163 selected_lep.push_back(El);
173 double elecCombRelIso = 1.;
190 if (
jet->pt() < 15.0)
193 ijet.SetPtEtaPhiM(
jet->pt(),
jet->eta(),
jet->phi(),
jet->mass());
198 std::sort(selected_lep.begin(), selected_lep.end(),
SortByPt());
201 bool goodjet =
false;
202 for (
unsigned int j = 0;
j < selected_lep.size();
j++) {
215 selected_recoPFJets.push_back(
temp);
219 std::sort(selected_recoPFJets.begin(), selected_recoPFJets.end(),
SortByPt());
221 for (
unsigned int k = 0;
k < selected_recoPFJets.size();
k++) {
236 if (selected_lep.size() > 1) {
237 detall->
Fill(selected_lep[0].Eta() - selected_lep[1].Eta());
239 mll->
Fill((selected_lep[0] + selected_lep[1]).M());
240 ptll->
Fill((selected_lep[0] + selected_lep[1]).Pt());
241 etall->
Fill((selected_lep[0] + selected_lep[1]).Eta());
242 if (!selected_recoPFJets.empty()) {
248 else if (selected_lep.size() == 1) {
252 if (!selected_recoPFJets.empty()) {
260 if (selected_recoPFJets.size() > 1) {
261 detajj->
Fill(
abs(selected_recoPFJets[0].Eta() - selected_recoPFJets[1].Eta()));
262 mjj->
Fill((selected_recoPFJets[0] + selected_recoPFJets[1]).M());