24 setNumberOutputBits(12);
34 TRG_MSG_ERROR(
"Dynamic cast failed in TCS::cTauMultiplicity::initialize");
38 m_extraInfo = m_threshold->getExtraInfo();
41 std::string hname_accept =
"cTauMultiplicity_accept_EtaPt_"+m_threshold->name();
42 bookHistMult(m_histAccept, hname_accept,
"Mult_"+m_threshold->name(),
"#eta#times40",
"E_{t} [GeV]", 200, -200, 200, 100, 0, 100);
44 hname_accept =
"cTauMultiplicity_accept_counts_"+m_threshold->name();
45 bookHistMult(m_histAccept, hname_accept,
"Mult_"+m_threshold->name(),
"counts", 15, 0, 15);
48 bookHistMult(m_histcTauEt,
"cTauTOBEt",
"Matched cTau TOB Et",
"E_{t} [GeV]", 200, 0, 400);
49 bookHistMult(m_histcTauPhiEta,
"cTauTOBPhiEta",
"Matched cTau TOB location",
"#eta#times40",
"#phi#times20", 200, -200, 200, 128, 0, 128);
50 bookHistMult(m_histcTauEtEta,
"cTauTOBEtEta",
"Matched cTau TOB Et vs eta",
"#eta#times40",
"E_{t} [GeV]", 200, -200, 200, 200, 0, 400);
51 bookHistMult(m_histcTauPartialIsoLoose,
"cTauTOBPartialIsoLoose",
"Matched cTau Loose partial isolation",
"Loose isolation", 200, 0, 10);
52 bookHistMult(m_histcTauPartialIsoMedium,
"cTauTOBPartialIsoMedium",
"Matched cTau Medium partial isolation",
"Medium isolation", 200, 0, 10);
53 bookHistMult(m_histcTauPartialIsoMedium12,
"cTauTOBPartialIsoMedium12",
"Matched cTau Medium12 partial isolation",
"Medium12 isolation", 200, 0, 10);
54 bookHistMult(m_histcTauPartialIsoMedium20,
"cTauTOBPartialIsoMedium20",
"Matched cTau Medium20 partial isolation",
"Medium20 isolation", 200, 0, 10);
55 bookHistMult(m_histcTauPartialIsoMedium30,
"cTauTOBPartialIsoMedium30",
"Matched cTau Medium30 partial isolation",
"Medium30 isolation", 200, 0, 10);
56 bookHistMult(m_histcTauPartialIsoMedium35,
"cTauTOBPartialIsoMedium35",
"Matched cTau Medium35 partial isolation",
"Medium35 isolation", 200, 0, 10);
57 bookHistMult(m_histcTauPartialIsoTight,
"cTauTOBPartialIsoTight",
"Matched cTau Tight partial isolation",
"Tight isolation", 200, 0, 10);
58 bookHistMult(m_histcTauIsoMatchedPass,
"cTauTOBIsoMatchedPass",
"Matched cTau isolation pass",
"isolation pass", 2, 0, 2);
80 if((*etauCand)->tobType() !=
TCS::ETAU)
continue;
84 bool isIsolated =
false;
85 float isolation_partial_loose = 0;
86 float isolation_partial_medium = 0;
87 float isolation_partial_medium12 = 0;
88 float isolation_partial_medium20 = 0;
89 float isolation_partial_medium30 = 0;
90 float isolation_partial_medium35 = 0;
91 float isolation_partial_tight = 0;
96 if((*jtauCand)->tobType() !=
TCS::JTAU)
continue;
98 isMatched = cTauMatching(*etauCand, *jtauCand);
101 float etauCand_et =
static_cast<float>((*etauCand)->Et());
102 float etauCand_eta =
static_cast<float>((*etauCand)->etaDouble());
103 float jtauCand_et =
static_cast<float>((*jtauCand)->Et());
104 float jtauCand_etIso =
static_cast<float>((*jtauCand)->EtIso());
108 isolation_partial_loose = (jtauCand_etIso + m_extraInfo->isolation(
WP::LOOSE, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
109 isolation_partial_loose = (jtauCand_etIso + m_extraInfo->isolation(
WP::MEDIUM, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
110 isolation_partial_medium12 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM12, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
111 isolation_partial_medium20 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM20, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
112 isolation_partial_medium30 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM30, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
113 isolation_partial_medium35 = (jtauCand_etIso + m_extraInfo->isolation(WP::MEDIUM35, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
114 isolation_partial_tight = (jtauCand_etIso + m_extraInfo->isolation(WP::TIGHT, etauCand_eta).isolation_jTAUCoreScale_fw()/1024.0 * jtauCand_et) / etauCand_et;
117 isIsolated = checkIsolationWP(*etauCand, *jtauCand);
126 fillHist1D(m_histcTauEt[0], (*etauCand)->EtDouble());
127 fillHist2D(m_histcTauPhiEta[0], (*etauCand)->eta(), (*etauCand)->phi());
128 fillHist2D(m_histcTauEtEta[0], (*etauCand)->eta(), (*etauCand)->EtDouble());
129 fillHist1D(m_histcTauPartialIsoLoose[0], isolation_partial_loose);
130 fillHist1D(m_histcTauPartialIsoMedium[0], isolation_partial_medium);
131 fillHist1D(m_histcTauPartialIsoMedium12[0], isolation_partial_medium12);
132 fillHist1D(m_histcTauPartialIsoMedium20[0], isolation_partial_medium20);
133 fillHist1D(m_histcTauPartialIsoMedium30[0], isolation_partial_medium30);
134 fillHist1D(m_histcTauPartialIsoMedium35[0], isolation_partial_medium35);
135 fillHist1D(m_histcTauPartialIsoTight[0], isolation_partial_tight);
136 fillHist1D(m_histcTauIsoMatchedPass[0],
isMatched && isIsolated);
142 if(!checkeTAUWP(*etauCand))
accept =
false;
147 if((*etauCand)->eta()%4 >= 0) eta_thr = (*etauCand)->eta() - (*etauCand)->eta()%4;
148 else eta_thr = (*etauCand)->eta() - (*etauCand)->eta()%4 - 4;
150 accept =
accept && (*etauCand)->Et() > m_threshold->thrValue100MeV(eta_thr/4);
154 fillHist2D(m_histAccept[0], (*etauCand)->eta(), (*etauCand)->EtDouble());
159 fillHist1D(m_histAccept[1], counting);
163 count.setSizeCount(counting);
171 if(m_threshold->isolation() ==
WP::NONE)
return true;
172 auto iso_wp = m_extraInfo->isolation(m_threshold->isolation(), etauCand->
etaDouble());
173 return jtauCand->
EtIso()*1024 + jtauCand->
Et()*iso_wp.isolation_jTAUCoreScale_fw() < etauCand->
Et()*iso_wp.isolation_fw();
178 if(m_threshold->isolation() ==
WP::NONE)
return true;
179 auto iso_wp = m_extraInfo->isolation(m_threshold->isolation(), etauCand->
etaDouble());
180 return etauCand->
RCore() >= iso_wp.eTAU_rCoreMin_WP_fw() && etauCand->
RHad() >= iso_wp.eTAU_rHadMin_WP_fw();
186 bool matching =
false;
193 if(etauCand->
eta()%4 >= 0 ) eTauEtaTower = etauCand->
eta() - etauCand->
eta()%4;
194 else eTauEtaTower = etauCand->
eta() - etauCand->
eta()%4 - 4;
196 if (jtauCand->
eta()%4 >= 0 ) jTauEtaTower = jtauCand->
eta() - jtauCand->
eta()%4;
197 else jTauEtaTower = jtauCand->
eta() - jtauCand->
eta()%4 - 4;
200 unsigned int eTauPhiTower = etauCand->
phi() >> 1;
201 unsigned int jTauPhiTower = jtauCand->
phi() >> 1;
203 matching = (eTauEtaTower == jTauEtaTower) && (eTauPhiTower == jTauPhiTower);
211 #ifndef TRIGCONF_STANDALONE
229 if(jTauEtaTopo%4 >= 0 ) jTauEtaTower = jTauEtaTopo - jTauEtaTopo%4;
230 else jTauEtaTower = jTauEtaTopo - jTauEtaTopo%4 - 4;
233 unsigned int eTauPhiTower =
static_cast<unsigned int>(eTau.
iPhiTopo()) >> 1;
234 bool matching = ( eTauEtaTower == jTauEtaTower ) && ( eTauPhiTower == jTauPhiTower );
259 if(jTauEtaTopo%4 >= 0 ) jTauEtaTower = jTauEtaTopo - jTauEtaTopo%4;
260 else jTauEtaTower = jTauEtaTopo - jTauEtaTopo%4 - 4;
263 unsigned int eTauPhiTower =
static_cast<unsigned int>(eTau.
iPhiTopo()) >> 1;
265 bool matching = ( eTauEtaTower == jTauEtaTower ) && ( eTauPhiTower == jTauPhiTower );
274 return jTau.
tobIso()*2*1024 + jTau.
tobEt()*2*iso_wp.isolation_jTAUCoreScale_fw() < eTau.
etTOB()*iso_wp.isolation_fw();