6 #include "TLorentzVector.h"
17 pMin(
cfg.getParameter<double>(
"pMin")),
18 pMax(
cfg.getParameter<double>(
"pMax")),
19 ptMin(
cfg.getParameter<double>(
"ptMin")),
20 ptMax(
cfg.getParameter<double>(
"ptMax")),
21 etaMin(
cfg.getParameter<double>(
"etaMin")),
22 etaMax(
cfg.getParameter<double>(
"etaMax")),
23 phiMin(
cfg.getParameter<double>(
"phiMin")),
24 phiMax(
cfg.getParameter<double>(
"phiMax")),
25 nHitMinSA(
cfg.getParameter<double>(
"nHitMinSA")),
26 nHitMaxSA(
cfg.getParameter<double>(
"nHitMaxSA")),
27 chi2nMaxSA(
cfg.getParameter<double>(
"chi2nMaxSA")),
28 nHitMinGB(
cfg.getParameter<double>(
"nHitMinGB")),
29 nHitMaxGB(
cfg.getParameter<double>(
"nHitMaxGB")),
30 chi2nMaxGB(
cfg.getParameter<double>(
"chi2nMaxGB")),
31 nHitMinTO(
cfg.getParameter<double>(
"nHitMinTO")),
32 nHitMaxTO(
cfg.getParameter<double>(
"nHitMaxTO")),
33 chi2nMaxTO(
cfg.getParameter<double>(
"chi2nMaxTO")),
38 <<
"applying basic muon cuts ..."
39 <<
"\npmin,pmax: " <<
pMin <<
"," <<
pMax <<
"\nptmin,ptmax: " <<
ptMin <<
"," <<
ptMax
97 for (Muons::const_iterator it =
muons.begin(); it !=
muons.end(); ++it) {
100 float pt = muonp->
pt();
105 float chi2nSA = 9999.;
111 float chi2nGB = 9999.;
117 float chi2nTO = 9999.;
119 nhitTO = muonp->
track()->numberOfValidHits();
120 chi2nTO = muonp->
track()->normalizedChi2();
123 <<
" pt,eta,phi,nhitSA,chi2nSA,nhitGB,chi2nGB,nhitTO,chi2nTO: " <<
pt <<
"," <<
eta <<
"," <<
phi <<
","
124 << nhitSA <<
"," << chi2nSA <<
"," << nhitGB <<
"," << chi2nGB <<
"," << nhitTO <<
"," << chi2nTO;
144 std::sort(sortedMuons.begin(), sortedMuons.end(),
ptComparator);
148 for (Muons::const_iterator it = sortedMuons.begin(); it != sortedMuons.end(); ++it) {
163 TLorentzVector mu1, mu2, pair;
164 double mass = 0, minDiff = 999999.;
167 std::sort(sortedMuons.begin(), sortedMuons.end(),
ptComparator);
173 for (Muons::const_iterator it1 = sortedMuons.begin(); it1 != sortedMuons.end(); ++it1) {
174 for (Muons::const_iterator it2 = it1 + 1; it2 != sortedMuons.end(); ++it2) {
175 mu1 = TLorentzVector((*it1)->momentum().x(), (*it1)->momentum().y(), (*it1)->momentum().z(), (*it1)->p());
176 mu2 = TLorentzVector((*it2)->momentum().x(), (*it2)->momentum().y(), (*it2)->momentum().z(), (*it2)->p());