本文整理汇总了C++中TLorentzVector::DeltaR方法的典型用法代码示例。如果您正苦于以下问题:C++ TLorentzVector::DeltaR方法的具体用法?C++ TLorentzVector::DeltaR怎么用?C++ TLorentzVector::DeltaR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLorentzVector
的用法示例。
在下文中一共展示了TLorentzVector::DeltaR方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: muPtcorr
// // //
double analysisClass::RecoHLTdeltaRmin_SingleMu24Trigger( unsigned int iReco ){
TLorentzVector HLTLep;
TLorentzVector RecoLep;
double deltaRmin=999999.9;
RecoLep.SetPtEtaPhiM( muPtcorr(iReco), MuonEta->at(iReco), MuonPhi->at(iReco), 0);
//
for(unsigned int ifilter=0; ifilter<HLTFilterName->size(); ifilter++){
//
// HLT_Mu24_eta2p1_v*
if( HLTFilterName->at(ifilter) == "hltL3fL1sMu16Eta2p1L1f0L2f16QL3Filtered24Q" //V3,V4,V5
){
//
// ----- extract TrigObject 4-vector -----
std::vector<std::vector<float> > * TrigObjectPt_TrigArray; vector<float> trigObjPtArray; float trigObjPt_;
std::vector<std::vector<float> > * TrigObjectEta_TrigArray; vector<float> trigObjEtaArray; float trigObjEta_;
std::vector<std::vector<float> > * TrigObjectPhi_TrigArray; vector<float> trigObjPhiArray; float trigObjPhi_;
TrigObjectPt_TrigArray = HLTFilterObjPt; trigObjPtArray = (*TrigObjectPt_TrigArray)[ifilter];
TrigObjectEta_TrigArray = HLTFilterObjEta; trigObjEtaArray = (*TrigObjectEta_TrigArray)[ifilter];
TrigObjectPhi_TrigArray = HLTFilterObjPhi; trigObjPhiArray = (*TrigObjectPhi_TrigArray)[ifilter];
// ----- ----- ----- ----- ----- ----- -----
for(unsigned int iobj=0; iobj<trigObjPtArray.size(); iobj++){//loop over all trigObjects of selected Filter
trigObjPt_ = (trigObjPtArray)[iobj]; trigObjEta_= (trigObjEtaArray)[iobj]; trigObjPhi_= (trigObjPhiArray)[iobj];
HLTLep.SetPtEtaPhiM( trigObjPt_, trigObjEta_, trigObjPhi_, 0 );
if(RecoLep.DeltaR(HLTLep)<deltaRmin) deltaRmin = RecoLep.DeltaR(HLTLep);
}
}
}
//
return deltaRmin;
}
示例2: printEvent
void ZgSelectData::printEvent(int index_e1, int index_e2, int index_pho, vector<Float_t> elePt_){
cout << "PassedZeeGamma: run " << run << " event " << event << " rho " << rho << endl ;
cout << "electron :index,pt,eta,phi,En " << endl ;
cout << index_e1 << " , " << elePt_[index_e1] << " , " << eleEta[index_e1] ;
cout << " , " << elePhi[index_e1] << " , " << eleEn[index_e1] << endl ;
cout << index_e2 << " , " << elePt_[index_e2] << " , " << eleEta[index_e2] ;
cout << " , " << elePhi[index_e2] << " , " << eleEn[index_e2] << endl ;
cout << "Electron Pass " << endl ;
cout << "TrackIso " << eleIsoTrkDR03[index_e1] << " EcalIso " << eleIsoEcalDR03[index_e1] << " HcalSolidIso ";
cout << eleIsoHcalSolidDR03[index_e1] << " passID = " << elePassID(index_e1,3,elePt_) << endl ;
cout << "TrackIso " << eleIsoTrkDR03[index_e2] << " EcalIso " << eleIsoEcalDR03[index_e2] << " HcalSolidIso ";
cout << eleIsoHcalSolidDR03[index_e2] << " passID = " << elePassID(index_e2,3,elePt_) << endl ;
TLorentzVector ve1, ve2, vZ ;
ve1.SetPtEtaPhiE(elePt[index_e1],eleEta[index_e1],elePhi[index_e1],eleEn[index_e1]);
ve2.SetPtEtaPhiE(elePt[index_e2],eleEta[index_e2],elePhi[index_e2],eleEn[index_e2]);
vZ = ve1 + ve2 ;
cout << "ZMass = " << vZ.M() << endl ;
cout << "Photon : index, pt, eta, phi, dr1, dr2 " << endl ;
TLorentzVector vp ;
vp.SetPtEtaPhiM(phoEt[index_pho],phoEta[index_pho],phoPhi[index_pho],0);
cout << index_pho << " , " << vp.Pt() << " , " << vp.Eta() << " , " << vp.Phi() ;
cout << " , " << vp.DeltaR(ve1) << " , " << vp.DeltaR(ve2) << endl ;
cout << "=================================================================" << endl ;
}
示例3: isRecoMuMatchedTO
// // //
bool analysisClass::isRecoMuMatchedTO( double genPt , double genEta , double genPhi , double dRcut ){
double deltaR=999;
TLorentzVector RecoMu;
TLorentzVector GenMu;
GenMu.SetPtEtaPhiM( genPt, genEta, genPhi, 0 );
//
for(unsigned int iMuR=0; iMuR<MuonPt->size(); iMuR++){
if( !muRCheck( iMuR ) ) continue;
RecoMu.SetPtEtaPhiM( muPtcorr(iMuR) , MuonEta->at(iMuR) , MuonPhi->at(iMuR) , 0 );
if( RecoMu.DeltaR(GenMu)<deltaR ) deltaR=RecoMu.DeltaR(GenMu);
}
//
if( deltaR<dRcut ) return true;
return false;
}
示例4: isRecoTauMatchedTO
// // //
bool analysisClass::isRecoTauMatchedTO( double genPt , double genEta , double genPhi , double dRcut ){
double deltaR=999;
TLorentzVector RecoTau;
TLorentzVector GenTau;
GenTau.SetPtEtaPhiM( genPt, genEta, genPhi, 0 );
//
for(unsigned int iTauR=0; iTauR<HPSTauPt->size(); iTauR++){
if( !tauRCheck( iTauR ) ) continue;
RecoTau.SetPtEtaPhiM( tauPtcorr(iTauR) , HPSTauEta->at(iTauR) , HPSTauPhi->at(iTauR) , 0 );
if( fabs(RecoTau.DeltaR(GenTau))<deltaR ) deltaR=fabs(RecoTau.DeltaR(GenTau));
}
//
if( deltaR<dRcut ) return true;
return false;
}
示例5: isThisJetALepton
bool isThisJetALepton(TLorentzVector jet, TLorentzVector l1, TLorentzVector l2){
double DRmax = 0.2;
bool isLep = false;
if (jet.DeltaR(l1) < DRmax) isLep = true;
if (jet.DeltaR(l2) < DRmax) isLep = true;
return isLep;
}
示例6: GetAwayJets
//------------------------------------------------------------------------------
// GetAwayJets
//------------------------------------------------------------------------------
void AnalysisFR::GetAwayJets()
{
AnalysisJets.clear();
int jetsize = std_vector_jet_pt->size();
for (int j=0; j<jetsize; j++) {
Jet jet_;
jet_.index = j;
float pt = std_vector_jet_pt ->at(j);
float eta = std_vector_jet_eta->at(j);
float phi = std_vector_jet_phi->at(j);
if (pt < 10.) continue;
TLorentzVector tlv;
tlv.SetPtEtaPhiM(pt, eta, phi, 0);
jet_.v = tlv;
float dR = tlv.DeltaR(Lepton1.v);
if (dR > 1) AnalysisJets.push_back(jet_);
}
}
示例7: tauGenMatchDeltaR
// // //
double analysisClass::tauGenMatchDeltaR(unsigned int iTauR){
TLorentzVector tauMgen;
TLorentzVector taureco;
if(HPSTauMatchedGenParticlePt->at(iTauR)<=0) return 9;
tauMgen.SetPtEtaPhiM( HPSTauMatchedGenParticlePt->at(iTauR), HPSTauMatchedGenParticleEta->at(iTauR), HPSTauMatchedGenParticlePhi->at(iTauR), 0 );
taureco.SetPtEtaPhiM( tauPtcorr(iTauR), HPSTauEta->at(iTauR), HPSTauPhi->at(iTauR), 0 );
return taureco.DeltaR(tauMgen);
}
示例8: muGenMatchDeltaR
// // //
double analysisClass::muGenMatchDeltaR(unsigned int iMuR){
TLorentzVector muMgen;
TLorentzVector mureco;
if(MuonMatchedGenParticlePt->at(iMuR)<=0) return 9;
muMgen.SetPtEtaPhiM( MuonMatchedGenParticlePt->at(iMuR), MuonMatchedGenParticleEta->at(iMuR), MuonMatchedGenParticlePhi->at(iMuR), 0 );
mureco.SetPtEtaPhiM( muPtcorr(iMuR), MuonEta->at(iMuR), MuonPhi->at(iMuR), 0 );
return mureco.DeltaR(muMgen);
}
示例9: RecoHLTdeltaRmin_SingleMuTrigger
// // //
double analysisClass::RecoHLTdeltaRmin_SingleMuTrigger( unsigned int iReco ){
TLorentzVector HLTLep;
TLorentzVector RecoLep;
double deltaRmin=999999.9;
RecoLep.SetPtEtaPhiM( muPtcorr(iReco), MuonEta->at(iReco), MuonPhi->at(iReco), 0);
//
// This is the trigger list for 2012 :: 190456-203002
//
//| HLT_IsoMu24_eta2p1_v11 | 833 | 28.303(/pb) | 28.303(/pb) | "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoFiltered10"
//| HLT_IsoMu24_eta2p1_v12 | 11046 | 669.888(/pb) | 669.888(/pb) | "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoFiltered10"
//| HLT_IsoMu24_eta2p1_v13 | 51172 | 4.427(/fb) | 4.427(/fb) | "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15"
//| HLT_IsoMu24_eta2p1_v14 | 22079 | 1.783(/fb) | 1.783(/fb) | "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15"
//| HLT_IsoMu24_eta2p1_v15 | 54847 | 5.023(/fb) | 5.023(/fb) | "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15"
//
//| HLT_IsoMu20_eta2p1_v3 | 833 | 28.303(/pb) | 346.522(/nb) | <<< PRESCALED "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f20L3crIsoFiltered10"
//| HLT_IsoMu20_eta2p1_v4 | 11046 | 669.888(/pb) | 4.160(/pb) | <<< PRESCALED "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f20L3crIsoFiltered10"
//| HLT_IsoMu20_eta2p1_v5 | 51172 | 4.427(/fb) | 19.806(/pb) | <<< PRESCALED "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f20L3crIsoRhoFiltered0p15"
//| HLT_IsoMu20_eta2p1_v6 | 22079 | 1.783(/fb) | 7.169(/pb) | <<< PRESCALED "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f20L3crIsoRhoFiltered0p15"
//| HLT_IsoMu20_eta2p1_v7 | 54847 | 5.023(/fb) | 19.991(/pb) | <<< PRESCALED "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f20L3crIsoRhoFiltered0p15"
//
//
for(unsigned int ifilter=0; ifilter<HLTFilterName->size(); ifilter++){
//
// HLT_IsoMu24_eta2p1_v*
if( HLTFilterName->at(ifilter) == "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoFiltered10" || //v11,v12
HLTFilterName->at(ifilter) == "hltL3crIsoL1sMu16Eta2p1L1f0L2f16QL3f24QL3crIsoRhoFiltered0p15" //v13, v14, v15
){
//
// ----- extract TrigObject 4-vector -----
std::vector<std::vector<float> > * TrigObjectPt_TrigArray; vector<float> trigObjPtArray; float trigObjPt_;
std::vector<std::vector<float> > * TrigObjectEta_TrigArray; vector<float> trigObjEtaArray; float trigObjEta_;
std::vector<std::vector<float> > * TrigObjectPhi_TrigArray; vector<float> trigObjPhiArray; float trigObjPhi_;
TrigObjectPt_TrigArray = HLTFilterObjPt; trigObjPtArray = (*TrigObjectPt_TrigArray)[ifilter];
TrigObjectEta_TrigArray = HLTFilterObjEta; trigObjEtaArray = (*TrigObjectEta_TrigArray)[ifilter];
TrigObjectPhi_TrigArray = HLTFilterObjPhi; trigObjPhiArray = (*TrigObjectPhi_TrigArray)[ifilter];
// ----- ----- ----- ----- ----- ----- -----
for(unsigned int iobj=0; iobj<trigObjPtArray.size(); iobj++){//loop over all trigObjects of selected Filter
trigObjPt_ = (trigObjPtArray)[iobj]; trigObjEta_= (trigObjEtaArray)[iobj]; trigObjPhi_= (trigObjPhiArray)[iobj];
HLTLep.SetPtEtaPhiM( trigObjPt_, trigObjEta_, trigObjPhi_, 0 );
if(RecoLep.DeltaR(HLTLep)<deltaRmin) deltaRmin = RecoLep.DeltaR(HLTLep);
}
}
}
//
return deltaRmin;
}
示例10: DiscoverySelection
// // //
bool analysisClass::DiscoverySelection( TString SignalChannel ){
//
int TotalN=0;
int TotalTau=0;
int TotalMu=0;
int TotalEl=0;
int TotalJet=0;
int TotalBJet=0;
TotalTau = TauCounter();
TotalMu = MuCounter();
TotalEl = ElCounter();
TotalJet = JetCounter();
TotalBJet = BJetCounter();
TotalN = TotalTau + TotalMu + TotalEl + TotalJet;
//
double LeadMuTauDeltaR=0;
TLorentzVector Mu;
TLorentzVector Tau;
Mu.SetPtEtaPhiM(0,0,0,0);
Tau.SetPtEtaPhiM(0,0,0,0);
for(unsigned int iTauR=0; iTauR<HPSTauPt->size(); iTauR++){
if( !tauRisoCheck(iTauR) )continue;
if( tauPtcorr(iTauR)>Tau.Pt() ){
Tau.SetPtEtaPhiM(tauPtcorr(iTauR), HPSTauEta->at(iTauR), HPSTauPhi->at(iTauR), 0);
}
}
for(unsigned int iMuR=0; iMuR<MuonPt->size(); iMuR++){
if( !muRisoCheck(iMuR) )continue;
if( muPtcorr(iMuR)>Mu.Pt() ){
Mu.SetPtEtaPhiM(muPtcorr(iMuR), MuonEta->at(iMuR), MuonPhi->at(iMuR), 0);
}
}
if( TotalMu>0 && TotalTau>0 ) LeadMuTauDeltaR=Mu.DeltaR(Tau);
//
//
// ASSUME PRESELECTION IS ALREADY APPLIED
if( SignalChannel == "MuMu" ){
if( TotalBJet<1 ) return false;
if( TotalJet<2 ) return false;
if( ST()<400 ) return false;
if( LeadingMuPt()<20 ) return false;
if( RecoSignalType()!=2020 && TotalMu<3 ) return false;//mu-mu SS selection
if( isZToMuMu() ) return false;//required to exclude events in MuTrig Calculation
}
if( SignalChannel == "MuTau" ){
if( TotalBJet<1 ) return false;
if( TotalJet<2 ) return false;//SS selection
if( ST()<500 ) return false;
if( MaxMuTauInvMass()<100 ) return false;
if( LeadingTauPt()<50 ) return false;
if( RecoSignalType()<2000 ) return false;//mu-tau+X OS selection
if( isZToMuMu() ) return false;//required to exclude events in MuTrig Calculation
}
//
return true;
//
}
示例11: RecoHLTdeltaRmin_DoubleMuTrigger
// // //
double analysisClass::RecoHLTdeltaRmin_DoubleMuTrigger( unsigned int iReco ){
TLorentzVector HLTLep;
TLorentzVector RecoLep;
double deltaRmin=999999.9;
RecoLep.SetPtEtaPhiM( muPtcorr(iReco), MuonEta->at(iReco), MuonPhi->at(iReco), 0);
//
for(unsigned int ifilter=0; ifilter<HLTFilterName->size(); ifilter++){
//
// HLT_Mu17_Mu8_v16 hltL3pfL1DoubleMu10MuOpenL1f0L2pf0L3PreFiltered8 hltL3fL1DoubleMu10MuOpenL1f0L2f10L3Filtered17 hltDiMuonMu17Mu8DzFiltered0p2
// HLT_Mu17_Mu8_v17 hltL3pfL1DoubleMu10MuOpenL1f0L2pf0L3PreFiltered8 hltL3fL1DoubleMu10MuOpenL1f0L2f10L3Filtered17 <<<< MC
// HLT_Mu17_Mu8_v18
// HLT_Mu17_Mu8_v19 hltL3pfL1DoubleMu10MuOpenOR3p5L1f0L2pf0L3PreFiltered8 hltL3fL1DoubleMu10MuOpenOR3p5L1f0L2f10L3Filtered17
// HLT_Mu17_Mu8_v21 hltL3pfL1DoubleMu10MuOpenOR3p5L1f0L2pf0L3PreFiltered8 hltL3fL1DoubleMu10MuOpenOR3p5L1f0L2f10L3Filtered17 hltDiMuonGlb17Glb8DzFiltered0p2
// HLT_Mu17_Mu8_v22 hltL3pfL1DoubleMu10MuOpenOR3p5L1f0L2pf0L3PreFiltered8 hltL3fL1DoubleMu10MuOpenOR3p5L1f0L2f10L3Filtered17 hltDiMuonGlb17Glb8DzFiltered0p2
//
if( HLTFilterName->at(ifilter) == "hltL3pfL1DoubleMu10MuOpenL1f0L2pf0L3PreFiltered8" ||
HLTFilterName->at(ifilter) == "hltL3fL1DoubleMu10MuOpenL1f0L2f10L3Filtered17" ||
HLTFilterName->at(ifilter) == "hltL3pfL1DoubleMu10MuOpenOR3p5L1f0L2pf0L3PreFiltered8" ||
HLTFilterName->at(ifilter) == "hltL3fL1DoubleMu10MuOpenOR3p5L1f0L2f10L3Filtered17"
){
//
// ----- extract TrigObject 4-vector -----
std::vector<std::vector<float> > * TrigObjectPt_TrigArray; vector<float> trigObjPtArray; float trigObjPt_;
std::vector<std::vector<float> > * TrigObjectEta_TrigArray; vector<float> trigObjEtaArray; float trigObjEta_;
std::vector<std::vector<float> > * TrigObjectPhi_TrigArray; vector<float> trigObjPhiArray; float trigObjPhi_;
TrigObjectPt_TrigArray = HLTFilterObjPt; trigObjPtArray = (*TrigObjectPt_TrigArray)[ifilter];
TrigObjectEta_TrigArray = HLTFilterObjEta; trigObjEtaArray = (*TrigObjectEta_TrigArray)[ifilter];
TrigObjectPhi_TrigArray = HLTFilterObjPhi; trigObjPhiArray = (*TrigObjectPhi_TrigArray)[ifilter];
// ----- ----- ----- ----- ----- ----- -----
for(unsigned int iobj=0; iobj<trigObjPtArray.size(); iobj++){//loop over all trigObjects of selected Filter
trigObjPt_ = (trigObjPtArray)[iobj]; trigObjEta_= (trigObjEtaArray)[iobj]; trigObjPhi_= (trigObjPhiArray)[iobj];
//debug
//std::cout<<HLTFilterName->at(ifilter)<<" "<< trigObjPt_<<" "<<trigObjEta_<<" "<<trigObjPhi_<<std::endl;
HLTLep.SetPtEtaPhiM( trigObjPt_, trigObjEta_, trigObjPhi_, 0 );
if(RecoLep.DeltaR(HLTLep)<deltaRmin) deltaRmin = RecoLep.DeltaR(HLTLep);
}
//debug
//std::cout<<std::endl;
}
}
//
return deltaRmin;
}
示例12: selectPhoton
TLorentzVector selectPhoton( const ZGConfig& cfg, const ZGTree& myTree, int index, const TLorentzVector& lept0, const TLorentzVector& lept1, EnergyScaleCorrection_class egcor ) {
TLorentzVector photon;
if( myTree.ngamma<=index ) {
photon.SetPtEtaPhiM( 0.01, 0., 0., 0. );
return photon;
}
photon.SetPtEtaPhiM( myTree.gamma_pt[index], myTree.gamma_eta[index], myTree.gamma_phi[index], myTree.gamma_mass[index] );
// photon energy corrections/smearing
if( !myTree.isData ) {
if( cfg.smearing() ) {
smearEmEnergy( egcor, photon, myTree, myTree.gamma_r9[0] );
}
} else {
if( cfg.smearing() ) {
applyEmEnergyScale( egcor, photon, myTree, myTree.gamma_r9[0] );
}
}
bool goodPhoton = true;
if( photon.Pt()<40. ) goodPhoton=false;
if( fabs(photon.Eta())>1.4442 && fabs(photon.Eta())<1.566 ) goodPhoton=false;
if( fabs(photon.Eta())>2.5 ) goodPhoton=false;
if( myTree.gamma_idCutBased[index]==0 ) goodPhoton=false;
if( myTree.gamma_chHadIso[index]>2.5 ) goodPhoton=false;
if( fabs(myTree.gamma_eta[index])<1.44 ) {
if( myTree.gamma_sigmaIetaIeta[index]>0.0102 ) goodPhoton=false;
} else {
if( myTree.gamma_sigmaIetaIeta[index]>0.0274 ) goodPhoton=false;
}
float deltaR_thresh = 0.4;
if( photon.DeltaR(lept0)<deltaR_thresh || photon.DeltaR(lept1)<deltaR_thresh ) goodPhoton=false;
if( !goodPhoton )
photon.SetPtEtaPhiM( 0.01, 0., 0., 0. );
return photon;
}
示例13: DeltaRlj
float DeltaRlj(){
TLorentzVector lep;
lep.SetPtEtaPhiM(myEvent.lep1_pt,myEvent.lep1_eta,myEvent.lep1_phi,myEvent.lep1_mass);
float minDR = 9999;
for(unsigned int i=0;i<myEvent.jet_pt.size();i++){
TLorentzVector p4;
p4.SetPtEtaPhiM(myEvent.jet_pt[i],myEvent.jet_eta[i],myEvent.jet_phi[i],myEvent.jet_mass[i]);
float dr = lep.DeltaR(p4);
if(dr<minDR) minDR = dr;
}
return minDR;
}
示例14: FillJets
void SingleTopTree::FillJets(){
Jets.clear();
bJets.clear();
TLorentzVector muon;
int tightMuIndex;
bool mu = TightIso06Muons.size() > 0;
if( mu )
tightMuIndex = TightIso06Muons[0] ;
if(!mu){
mu = Tight12IsoMuons.size() > 0 ;
if( mu )
tightMuIndex = Tight12IsoMuons[0] ;
}
muon.SetPtEtaPhiE( muons_Pt[tightMuIndex] , muons_Eta[tightMuIndex] , muons_Phi[tightMuIndex] , muons_E[tightMuIndex] );
for( int jid = 0 ; jid < jetsAK4_size ; jid++ ){
//if( Event_EventNumber == 672782113 ) cout << (jetsAK4_CorrPt[jid] > 40) << " " << (fabs( jetsAK4_Eta[jid] ) < 4.7) << " " << jetsAK4_PassesID[jid];
if( jetsAK4_CorrPt[jid] > 40 &&
fabs( jetsAK4_Eta[jid] ) < 4.7 &&
jetsAK4_PassesID[jid]
){
double DR = 1.0 ;
if( mu ){
TLorentzVector jet;
jet.SetPtEtaPhiE( jetsAK4_CorrPt[jid] , jetsAK4_Eta[jid] , jetsAK4_Phi[jid] , jetsAK4_CorrE[jid] );
DR = muon.DeltaR( jet );
}
// if( Event_EventNumber == 672782113 )
// cout << DR << endl;
if ( DR > 0.3 ){
Jets.push_back( jid );
if( jetsAK4_IsCSVT[jid] && fabs( jetsAK4_Eta[jid] ) <= 2.4 ){
bJets.push_back(jid);
}
}
}
//if( Event_EventNumber == 672782113 )
//cout << endl;
}
}
示例15: xAna_hh_massResolution
//.........这里部分代码省略.........
cout << genbIndex[0][0] << "\t" << genbIndex[0][1] << "\t"
<< genbIndex[1][0] << "\t" << genbIndex[1][1] << endl;
genH_l4[0].Print();
genH_l4[1].Print();
genb_l4[0][0].Print();
genb_l4[0][1].Print();
genb_l4[1][0].Print();
genb_l4[1][1].Print();
}
int nFATJet = data.GetInt("FATnJet");
const int nJets=nFATJet;
TClonesArray* fatjetP4 = (TClonesArray*) data.GetPtrTObject("FATjetP4");
TClonesArray* puppijetP4 = (TClonesArray*) data.GetPtrTObject("FATjetPuppiP4");
TClonesArray* AK8PuppijetP4 = (TClonesArray*) data.GetPtrTObject("AK8PuppijetP4");
// check matching first
bool findAMatch=false;
const float dRMax=0.4;
const float dRbMax=0.8;
int matchedHJetIndex[2]={-1,-1};
for(int ij=0; ij<nJets; ij++)
{
TLorentzVector* thisJet = (TLorentzVector*)fatjetP4->At(ij);
for(int jj=0; jj<nJets; jj++)
{
if(ij==jj)continue;
TLorentzVector* thatJet = (TLorentzVector*)fatjetP4->At(jj);
if(thisJet->DeltaR(genH_l4[0])<dRMax &&
(!matchb || (matchb &&
thisJet->DeltaR(genb_l4[0][0])<dRbMax &&
thisJet->DeltaR(genb_l4[0][1])<dRbMax)) &&
thatJet->DeltaR(genH_l4[1])<dRMax &&
(!matchb || (matchb &&
thatJet->DeltaR(genb_l4[1][0])<dRbMax &&
thatJet->DeltaR(genb_l4[1][1])<dRbMax)))
{
if(debug)
{
cout << "dRhb00= " << thisJet->DeltaR(genb_l4[0][0]) << endl;
cout << "dRhb01= " << thisJet->DeltaR(genb_l4[0][1]) << endl;
cout << "dRhb10= " << thatJet->DeltaR(genb_l4[1][0]) << endl;
cout << "dRhb11= " << thatJet->DeltaR(genb_l4[1][1]) << endl;
}
if(ij<jj){
matchedHJetIndex[0]=ij;
matchedHJetIndex[1]=jj;
}
else
{
matchedHJetIndex[0]=jj;
matchedHJetIndex[1]=ij;
}
findAMatch=true;
break;
}
if(findAMatch)break;
}