本文整理汇总了C++中JetPointer::phi方法的典型用法代码示例。如果您正苦于以下问题:C++ JetPointer::phi方法的具体用法?C++ JetPointer::phi怎么用?C++ JetPointer::phi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JetPointer
的用法示例。
在下文中一共展示了JetPointer::phi方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: analyse
void JetAnalyser::analyse(const EventPtr event) {
histMan_->setCurrentHistogramFolder(histogramFolder_);
weight_ = event->weight() * prescale_ * scale_;
const JetCollection jets = event->Jets();
unsigned int numberOfBJets(0);
for (unsigned int index = 0; index < jets.size(); ++index) {
const JetPointer jet(jets.at(index));
histMan_->H1D_BJetBinned("all_jet_pT")->Fill(jet->pt(), weight_);
histMan_->H1D_BJetBinned("all_jet_phi")->Fill(jet->phi(), weight_);
histMan_->H1D_BJetBinned("all_jet_eta")->Fill(jet->eta(), weight_);
if (jet->isBJet(BtagAlgorithm::CombinedSecondaryVertex, BtagAlgorithm::MEDIUM))
++numberOfBJets;
if (index < 7) {
stringstream temp;
temp << "jet" << (index + 1);
string nthJet = temp.str();
histMan_->H1D_BJetBinned(nthJet + "_pT")->Fill(jet->pt(), weight_);
histMan_->H1D_BJetBinned(nthJet + "_phi")->Fill(jet->phi(), weight_);
histMan_->H1D_BJetBinned(nthJet + "_eta")->Fill(jet->eta(), weight_);
}
}
histMan_->H1D_BJetBinned("N_Jets")->Fill(jets.size(), weight_);
histMan_->H1D("N_BJets")->Fill(numberOfBJets, weight_);
}
示例2: analyse
void JetAnalyser::analyse(const EventPtr event) {
histMan_->setCurrentHistogramFolder(histogramFolder_);
treeMan_->setCurrentFolder(histogramFolder_);
weight_ = event->weight() * prescale_ * scale_;
// const JetCollection jets = event->Jets();
const JetCollection jets(event->CleanedJets());
const JetCollection bjets(event->CleanedBJets());
unsigned int numberOfBJets = event->NJets(bjets);
unsigned int numberOfJets = event->NJets(jets);
treeMan_->Fill("NJets", numberOfJets);
treeMan_->Fill("NBJets", numberOfBJets);
for (unsigned int index = 0; index < jets.size(); ++index) {
const JetPointer jet(jets.at(index));
if (jet->pt() < 25 ) continue;
if (index < 5) {
stringstream temp;
temp << "jet" << (index + 1);
string nthJet = temp.str();
treeMan_->Fill( nthJet + "_pt", jet->pt());
treeMan_->Fill( nthJet + "_eta", jet->eta());
treeMan_->Fill( nthJet + "_phi", jet->phi());
}
treeMan_->Fill("pt", jet->pt());
treeMan_->Fill("eta", jet->eta());
treeMan_->Fill("phi", jet->phi());
}
for (unsigned int index = 0; index < bjets.size(); ++index) {
const JetPointer bJet(bjets.at(index));
if ( bJet->pt() < 25 ) continue;
treeMan_->Fill("bjet_pt", bJet->pt());
treeMan_->Fill("bjet_eta", bJet->eta());
treeMan_->Fill("bjet_phi", bJet->phi());
}
// if ( numberOfJets < 4 ) {
// cout << "Fewer than 4 good cleaned jets with pt > 25 GeV : " << numberOfJets << endl;
// cout << numberOfJets << " " << numberOfBJets << endl;
// }
treeMan_->Fill("EventWeight", weight_ );
if ( event->PassesMuonTriggerAndSelection() ) {
const LeptonPointer signalLepton = event->getSignalLepton( SelectionCriteria::MuonPlusJetsReference );
const MuonPointer signalMuon(boost::static_pointer_cast<Muon>(signalLepton));
double efficiencyCorrection = event->isRealData() ? 1. : signalMuon->getEfficiencyCorrection( 0 );
treeMan_->Fill("MuonEfficiencyCorrection", efficiencyCorrection);
}
else if ( event->PassesElectronTriggerAndSelection() ) {
const LeptonPointer signalLepton = event->getSignalLepton( SelectionCriteria::ElectronPlusJetsReference );
const ElectronPointer signalElectron(boost::static_pointer_cast<Electron>(signalLepton));
double efficiencyCorrection = event->isRealData() ? 1. : signalElectron->getEfficiencyCorrection( 0 );
treeMan_->Fill("ElectronEfficiencyCorrection", efficiencyCorrection);
}
}