43 ptCut_(
cfg.getParameter<double>(
"PtCut")),
44 etaCut_(
cfg.getParameter<double>(
"EtaCut")),
45 massZMin_(
cfg.getParameter<double>(
"MassZMin")),
46 massZMax_(
cfg.getParameter<double>(
"MassZMax")),
48 onlyGlobalMuons_(
cfg.getParameter<
bool>(
"OnlyGlobalMuons")),
53 minTrackerHits_(
cfg.getUntrackedParameter<
int>(
"MinTrackerHits", 7)) {}
59 LogTrace(
"") <<
">>> Muon collection does not exist !!!";
66 LogTrace(
"") <<
">>> ISO Muon collection does not exist !!!";
74 if (!trackerCollection.
isValid()) {
75 LogTrace(
"") <<
">>> Tracker collection does not exist !!!";
81 LogTrace(
"") <<
">>> ISO Tracker collection does not exist !!!";
86 unsigned int npairs = 0;
87 bool globalCombinationFound =
false;
90 LogTrace(
"") <<
"> Processing muon number " <<
i <<
"...";
95 double eta =
mu->eta();
99 bool iso = (*isoMap)[
mu];
100 LogTrace(
"") <<
"\t... isolated? " << iso;
106 LogTrace(
"") <<
"> Processing second muon number " <<
j <<
"...";
107 double pt2 = mu2->pt();
111 double eta2 = mu2->eta();
115 bool iso2 = (*isoMap)[mu2];
116 LogTrace(
"") <<
"\t... isolated2? " << iso2;
120 double z_en =
mu->p() + mu2->p();
121 double z_px =
mu->px() + mu2->px();
122 double z_py =
mu->py() + mu2->py();
123 double z_pz =
mu->pz() + mu2->pz();
124 double massZ = z_en * z_en - z_px * z_px - z_py * z_py - z_pz * z_pz;
125 massZ = (massZ > 0) ?
sqrt(massZ) : 0;
126 LogTrace(
"") <<
"\t... Z_en, Z_px, Z_py, Z_pz= " << z_en <<
", " << z_px <<
", " << z_py <<
", " << z_pz
128 LogTrace(
"") <<
"\t... (GM-GM) Invariant reconstructed mass= " << massZ <<
" GeV";
133 globalCombinationFound =
true;
140 for (
unsigned int j = 0;
j < trackerCollection->size();
j++) {
142 LogTrace(
"") <<
"> Processing track number " <<
j <<
"...";
143 double pt2 = mu2->pt();
147 double eta2 = mu2->eta();
151 int nhits2 = mu2->numberOfValidHits();
152 LogTrace(
"") <<
"\t... nhits3= " << nhits2;
155 bool iso2 = (*isoTrackerMap)[mu2];
156 LogTrace(
"") <<
"\t... isolated3? " << iso2;
160 double z_en =
mu->p() + mu2->p();
161 double z_px =
mu->px() + mu2->px();
162 double z_py =
mu->py() + mu2->py();
163 double z_pz =
mu->pz() + mu2->pz();
164 double massZ = z_en * z_en - z_px * z_px - z_py * z_py - z_pz * z_pz;
165 massZ = (massZ > 0) ?
sqrt(massZ) : 0;
166 LogTrace(
"") <<
"\t... Z_en, Z_px, Z_py, Z_pz= " << z_en <<
", " << z_px <<
", " << z_py <<
", " << z_pz
168 LogTrace(
"") <<
"\t... (GM-TK) Invariant reconstructed mass= " << massZ <<
" GeV";
177 LogTrace(
"") <<
"> Number of Z pairs found= " << npairs;
179 LogTrace(
"") <<
">>>> Event REJECTED";
182 LogTrace(
"") <<
">>>> Event SELECTED!!!";