本文整理汇总了C++中Jet::Charge方法的典型用法代码示例。如果您正苦于以下问题:C++ Jet::Charge方法的具体用法?C++ Jet::Charge怎么用?C++ Jet::Charge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jet
的用法示例。
在下文中一共展示了Jet::Charge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalculateVariables
void GlobalRecoTTbarPlugin::CalculateVariables(Jet const &bTopLep, Jet const &bTopHad,
Jet const &q1TopHad, Jet const &q2TopHad)
{
// Calculate variables related to the top quark decaying semileptonically
auto const &lepton = (*reader)->GetLeptons().front();
Candidate const wLep(lepton.P4() + (*reader)->GetNeutrino().P4());
Candidate const topLep(wLep.P4() + bTopLep.P4());
//bfMass_TopLep = topLep.M();
LogPt_TopLep = log(topLep.Pt());
//bfEta_TopLep = topLep.Eta();
//bfPt_BTopLep = bTopLep.Pt();
//bfEta_BTopLep = bTopLep.Eta();
//PassBTag_BTopLep = 0 + bTagger->IsTagged(bTopLep);
//bfCharge_BTopLep = bTopLep.Charge() * lepton.Charge();
LogMass_BTopLepLep = log((bTopLep.P4() + lepton.P4()).M());
DeltaR_BTopLepWLep = bTopLep.P4().DeltaR(wLep.P4());
//bfDEta_TopLepLep = fabs(topLep.Eta() - lepton.Eta());
// Calculate the cosine
// TVector3 b((wLep.P4()).BoostVector());
// TLorentzVector boostedLepton(lepton.P4());
// boostedLepton.Boost(-b);
// TVector3 p3Lepton(boostedLepton.Vect());
// TLorentzVector boostedBJet(bTopLep.P4());
// boostedBJet.Boost(-b);
// TVector3 const p3BJet(boostedBJet.Vect());
// bfCos_LepBTopLep_WLep = p3Lepton.Dot(p3BJet) / (p3Lepton.Mag() * p3BJet.Mag());
// Calculate variables related to the top quark decaying semileptonically
Candidate const wHad(q1TopHad.P4() + q2TopHad.P4());
Candidate const topHad(wHad.P4() + bTopHad.P4());
//bfMass_TopHad = topHad.M();
LogPt_TopHad = log(topHad.Pt());
AbsEta_TopHad = fabs(topHad.Eta());
LogMass_WHad = log(wHad.M());
//bfPt_WHad = wHad.Pt();
//bfEta_WHad= wHad.Eta();
DeltaR_BTopHadWHad = bTopHad.P4().DeltaR(wHad.P4());
//bfPt_BTopHad = bTopHad.Pt();
//bfEta_BTopHad = bTopHad.Eta();
//PassBTag_BTopHad = 0 + bTagger->IsTagged(bTopHad);
//bfCharge_BTopHad = bTopHad.Charge() * lepton.Charge();
//bfMinPt_Light = min(fabs(q1TopHad.Pt()), fabs(q2TopHad.Pt()));
//bfMaxEta_Light = max(fabs(q1TopHad.Eta()), fabs(q2TopHad.Eta()));
SumCharge_Light = (q1TopHad.Charge() + q2TopHad.Charge()) * lepton.Charge();
NumBTag_Light = 0 + bTagger->IsTagged(q1TopHad) + bTagger->IsTagged(q2TopHad);
DeltaR_Light = q1TopHad.P4().DeltaR(q2TopHad.P4());
// bfMaxMass_BTopHadLight =
// max((bTopHad.P4() + q1TopHad.P4()).M(), (bTopHad.P4() + q2TopHad.P4()).M());
LogDMass_TopHadWHad = log(topHad.M() - wHad.M());
// Calcualate variables with correlations between different objects
double Ht = lepton.Pt() + (*reader)->GetMET().Pt();
for (auto const &j: (*reader)->GetJets())
Ht += j.Pt();
RelHt = (topLep.Pt() + topHad.Pt()) / Ht;
//bfMass_TopLepTopHad = (topLep.P4() + topHad.P4()).M();
//bfPt_TopLepTopHad = (topLep.P4() + topHad.P4()).Pt();
//bfEta_TopLepTopHad = (topLep.P4() + topHad.P4()).Eta();
//bfDeltaR_TopLepTopHad = topLep.P4().DeltaR(topHad.P4());
DCharge_BTopHadBTopLep = (bTopHad.Charge() - bTopLep.Charge()) * lepton.Charge();
}