本文整理汇总了C++中JetPointer::isWithinDeltaR方法的典型用法代码示例。如果您正苦于以下问题:C++ JetPointer::isWithinDeltaR方法的具体用法?C++ JetPointer::isWithinDeltaR怎么用?C++ JetPointer::isWithinDeltaR使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JetPointer
的用法示例。
在下文中一共展示了JetPointer::isWithinDeltaR方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jets
const JetCollection TopPairMuPlusJetsReferenceSelection2011::cleanedJets(const EventPtr event) const {
const JetCollection jets(event->Jets());
JetCollection cleanedJets;
if (!hasExactlyOneIsolatedLepton(event)) //if no signal lepton is found, can't clean jets, return them all!
return jets;
const LeptonPointer lepton(signalLepton(event));
for (unsigned int index = 0; index < jets.size(); ++index) {
const JetPointer jet(jets.at(index));
if (!jet->isWithinDeltaR(0.3, lepton))
cleanedJets.push_back(jet);
}
return cleanedJets;
}
示例2: passesTriggerAnalysisSelection
bool HLTriggerQCDAnalyser::passesTriggerAnalysisSelection(const EventPtr event) const {
const ElectronCollection electrons(event->Electrons());
const JetCollection jets(event->Jets());
if (electrons.size() == 0 || jets.size() < 3)
return false;
unsigned int nElectrons(0);
for (unsigned int index = 0; index < electrons.size(); ++index) {
const ElectronPointer electron(electrons.at(index));
if (fabs(electron->eta()) < 2.5 && electron->pt() > 20)
++nElectrons;
//if more than 2 electrons passing the selection of > 20GeV, reject event
}
const ElectronPointer mostEnergeticElectron(electrons.front());
//clean jets against electron
JetCollection cleanedJets;
for (unsigned int index = 0; index < jets.size(); ++index) {
const JetPointer jet(jets.at(index));
if (!jet->isWithinDeltaR(0.3, mostEnergeticElectron))
cleanedJets.push_back(jet);
}
unsigned int nCleanedJetsAbove30GeV(0), nCleanedJetsAbove45GeV(0);
for (unsigned int index = 0; index < cleanedJets.size(); ++index) {
const JetPointer jet(cleanedJets.at(index));
if (jet->pt() > 45.)
++nCleanedJetsAbove45GeV;
if (jet->pt() > 30.)
++nCleanedJetsAbove30GeV;
}
return nElectrons == 1
&& (nCleanedJetsAbove45GeV >= 3
|| (nCleanedJetsAbove45GeV >= 2 && nCleanedJetsAbove30GeV >= 3 && event->runnumber() >= 194270));
}