本文整理汇总了C++中TLorentzVector::SetPx方法的典型用法代码示例。如果您正苦于以下问题:C++ TLorentzVector::SetPx方法的具体用法?C++ TLorentzVector::SetPx怎么用?C++ TLorentzVector::SetPx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLorentzVector
的用法示例。
在下文中一共展示了TLorentzVector::SetPx方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (analysisTree.tau_byMediumCombinedIsolationDeltaBetaCorr3Hits [it]> 0.5 && analysisTree.tau_againstElectronVLooseMVA5[it]>againstElectronVLooseMVA5
&& analysisTree.tau_againstMuonTight3[it]>againstMuonTight3) {isTight = true; tau_tight = int(it);}
}
if (!isLoose) continue;
TLorentzVector JetsV;
JetsMV.clear();
int countjets=0;
for (unsigned int jet=0; jet<analysisTree.pfjet_count; ++jet) {
float absJetEta = fabs(analysisTree.pfjet_eta[jet]);
if (analysisTree.pfjet_pt[jet] < 19) continue;
if (absJetEta > etaJetCut) continue;
//if (fabs(analysisTree.pfjet_pt[jet])<ptJetCut) continue;
bool looseJetID = looseJetiD(analysisTree,jet);
if (!looseJetID) continue;
double dRmuJet1 = deltaR(analysisTree.pfjet_eta[jet],analysisTree.pfjet_phi[jet],
analysisTree.muon_eta[indx1],analysisTree.muon_phi[indx1]);
if (dRmuJet1 < 0.5) continue;
double dRmuJet2 = deltaR(analysisTree.pfjet_eta[jet],analysisTree.pfjet_phi[jet],
analysisTree.muon_eta[indx2],analysisTree.muon_phi[indx2]);
if (dRmuJet2 < 0.5) continue;
JetsV.SetPxPyPzE(0.,0.,0.,0.);
JetsV.SetPxPyPzE(analysisTree.pfjet_px[jet], analysisTree.pfjet_py[jet], analysisTree.pfjet_pz[jet], analysisTree.pfjet_e[jet]);
JetsMV.push_back(JetsV);
countjets++;
}
sort(JetsMV.begin(), JetsMV.end(),ComparePt);
if (countjets ==0) continue;
double dPhi=-1;double MT=-1 ; double RatioSums=-1;
double met = sqrt ( analysisTree.pfmet_ex*analysisTree.pfmet_ex + analysisTree.pfmet_ey*analysisTree.pfmet_ey);
// w = mu+MET
// ptW - ptJ/ptW+ptJ
//
//
TLorentzVector muon1; muon1.SetXYZM(analysisTree.muon_px[indx1],
analysisTree.muon_py[indx1],
analysisTree.muon_pz[indx1],
muonMass);
TLorentzVector muon2; muon2.SetXYZM(analysisTree.muon_px[indx2],
analysisTree.muon_py[indx2],
analysisTree.muon_pz[indx2],
muonMass);
TLorentzVector DiM = muon1+muon2;
RatioSums = analysisTree.tau_pt[tau_loose]/DiM.Pt();
示例2: dummy
//.........这里部分代码省略.........
//---- AM 6 pt_min of the least energetic lepton
plots.v_LEPDPhi = deltaPhi (primoLEP.m_kine->Phi (), secondoLEP.m_kine->Phi ()) ;
//---- AM 7 Delta_phi_min between leptons
plots.v_LEPDEta = deltaEta (primoLEP.m_kine->Eta (), secondoLEP.m_kine->Eta ()) ;
plots.v_LEPDR = deltaR (primoLEP.m_kine->Phi (),primoLEP.m_kine->Eta (), secondoLEP.m_kine->Phi (), secondoLEP.m_kine->Eta ()) ;
TLorentzVector sumLEP = *(primoLEP.m_kine) + *(secondoLEP.m_kine) ;
plots.v_LEPMinv = sumLEP.M () ;
//---- AM 9 MInv_min of leptons
plots.v_LEPProdCharge = first_lepton_charge * second_lepton_charge ;
plots.v_hardLEPCharge = first_lepton_charge ;
plots.v_softLEPCharge = second_lepton_charge ;
//PG MET
//PG ---
// std::cerr << "--- finito " << std::endl;
TLorentzVector* met = ((TLorentzVector*) (MET->At(0))) ;
//correct for muons
for (int i = 0 ; i < nMu ; i++)
{
TLorentzVector * mu_v = (TLorentzVector*) (muons->At (i)) ;
if (mu_v->Pt () > 3)
{
met->SetPx (met->Px () - mu_v->Px ()) ;
met->SetPy (met->Py () - mu_v->Py ()) ;
}
}
plots.v_MET = met->Pt () ;
//---- AM 11 Met_min ----------------> Met correction ?
// if (((TLorentzVector*) (MET->At (0)))->Pt () < g_METMin) continue ; plots.increase (cutId++) ; //PG 10
//PG Ztautau vetos
//PG -------------
//PG the two electrons should not be opposite to each other
//
// TVector2 primoLEPT (primoLEP.m_kine->X (), primoLEP.m_kine->Y ()) ;
// TVector2 secondoLEPT (secondoLEP.m_kine->X (), secondoLEP.m_kine->Y ()) ;
// TVector2 METT (met->X (), met->Y ()) ;
//
// double Sum = METT * primoLEPT + METT * secondoLEPT / (1 + primoLEPT * secondoLEPT) ;
示例3: dummy
//.........这里部分代码省略.........
if (primoLEP.m_flav != 1 || secondoLEP.m_flav != 0) select = false ;
break ;
case 4 :
if (primoLEP.m_flav != 1 || secondoLEP.m_flav != 1) select = false ;
break ;
} ;
if (!select) continue ; plots.increase (cutId++) ; //PG 2
//PG find the two most energetic leptons
//PG -----------------------------------
if (primoLEP.m_kine->Pt () < g_hardLEPPtMin[primoLEP.m_flav]) continue ; plots.increase (cutId++) ; // 5
if (secondoLEP.m_kine->Pt () < g_softLEPPtMin[secondoLEP.m_flav]) continue ; plots.increase (cutId++) ; // 6
double lep_deltaPhi = deltaPhi (primoLEP.m_kine->Phi (), secondoLEP.m_kine->Phi ());
double lep_deltaEta = fabs(primoLEP.m_kine->Eta () - secondoLEP.m_kine->Eta ());
if (deltaPhi (primoLEP.m_kine->Phi (), secondoLEP.m_kine->Phi ()) < g_LEPDPhiMin) continue ; plots.increase (cutId++) ; //PG 7
if (deltaPhi (primoLEP.m_kine->Phi (), secondoLEP.m_kine->Phi ()) > g_LEPDPhiMax) continue ; plots.increase (cutId++) ; //PG 8
TLorentzVector sumLEP = *(primoLEP.m_kine) + *(secondoLEP.m_kine) ;
if (sumLEP.M () < g_LEPMinvMin) continue ; plots.increase (cutId++) ; //PG 9
if (sumLEP.M () > g_LEPMinvMax) continue ; plots.increase (cutId++) ; //PG 10
//PG MET
//PG ---
TLorentzVector* met = ((TLorentzVector*) (MET->At(0))) ;
//correct for muons
for (int i = 0 ; i < nMu ; i++)
{
TLorentzVector * mu_v = (TLorentzVector*) (muons->At (i)) ;
if (mu_v->Pt () > 3)
{
met->SetPx (met->Px () - mu_v->Px ()) ;
met->SetPy (met->Py () - mu_v->Py ()) ;
}
}
// if (met->Pt () < g_METMin) continue ; plots.increase (cutId++) ; //PG 11
// if (((TLorentzVector*) (MET->At (0)))->Pt () < g_METMin) continue ; plots.increase (cutId++) ; //PG 10
//PG 2 TAGS
//PG ------
TLorentzVector * primoTAG = (TLorentzVector*) (tagJets->At (0)) ;
TLorentzVector * secondoTAG = (TLorentzVector*) (tagJets->At (1)) ;
//PG get the first two in pt
if (primoTAG->Pt () < secondoTAG->Pt ())
{
primoTAG = (TLorentzVector*) (tagJets->At (1)) ;
secondoTAG = (TLorentzVector*) (tagJets->At (0)) ;
}
if (met->Pt () < g_METMin) continue ; plots.increase (cutId++) ; //PG 11
TLorentzVector total = *primoTAG + *secondoTAG + sumLEP ;
if (total.Pt () < g_PtTotMax) continue ; plots.increase (cutId++) ; //PG 11
total += *met ;
if (total.Pt () > g_PtTotMetMax) continue ; plots.increase (cutId++) ; //PG 11
if (primoTAG->Pt () < g_hardTAGPtMin) continue ; plots.increase (cutId++) ; //PG 12
if (secondoTAG->Pt () < g_softTAGPtMin) continue ; plots.increase (cutId++) ; //PG 13
if (primoTAG->Eta () * secondoTAG->Eta () > g_TAGDProdEtaMax) continue ; plots.increase (cutId++) ; //PG 14
if (fabs (primoTAG->Eta () - secondoTAG->Eta ()) < g_TAGDetaMin) continue ; plots.increase (cutId++) ; //PG 15
TLorentzVector sumTAG = *primoTAG + *secondoTAG ;
if (sumTAG.M () < g_TAGMinv) continue ; plots.increase (cutId++) ; //PG 16