From 2c0b524c9d33176582b95b8db274074534fd26bc Mon Sep 17 00:00:00 2001 From: Ta Wei Date: Sun, 30 Aug 2015 13:29:50 -0400 Subject: [PATCH 1/4] update --- Bfinder/src/Bfinder.cc | 5 +++-- Bfinder_PbPb_cfg.py | 11 ++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Bfinder/src/Bfinder.cc b/Bfinder/src/Bfinder.cc index 19a16e7..d3a7b84 100644 --- a/Bfinder/src/Bfinder.cc +++ b/Bfinder/src/Bfinder.cc @@ -603,6 +603,7 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) MuonInfo.outerTrackisNonnull[MuonInfo.size] = mu_it->outerTrack().isNonnull(); MuonInfo.innerTrackisNonnull[MuonInfo.size] = mu_it->innerTrack().isNonnull(); //Muon inner track info. + if(mu_it->innerTrack().isNonnull()){ //Muon inner track track quality //enum TrackQuality { undefQuality = -1, loose = 0, tight = 1, highPurity = 2, confirmed = 3, goodIterative = 4, looseSetWithPV = 5, highPuritySetWithPV = 6, qualitySize = 7} @@ -704,7 +705,7 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if (fabs(tk_it->eta()) > 2.5) continue; TrackCutLevel->Fill(3); if(doTkPreCut_){ - if (!tk_it->track()->qualityByName("highPurity")) continue; + if (!(tk_it->track()->qualityByName("highPurity"))) continue; TrackCutLevel->Fill(4); //outdated selections //if (tk_it->track()->normalizedChi2()>5) continue; @@ -1074,7 +1075,7 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) TrackInfo.highPurity [TrackInfo.size] = tk_it->track()->qualityByName("highPurity"); TrackInfo.geninfo_index [TrackInfo.size] = -1;//initialize for later use if(tk_it->track().isNonnull()){ - for(int tq = -1; tq < reco::TrackBase::qualitySize; tq++){ + for(int tq = 0; tq < reco::TrackBase::qualitySize; tq++){ if (tk_it->track()->quality(static_cast(tq))) TrackInfo.trackQuality[TrackInfo.size] += 1 << (tq); }} diff --git a/Bfinder_PbPb_cfg.py b/Bfinder_PbPb_cfg.py index 56e582a..b04f753 100644 --- a/Bfinder_PbPb_cfg.py +++ b/Bfinder_PbPb_cfg.py @@ -83,11 +83,12 @@ fileNames = cms.untracked.vstring(ivars.inputFiles) ) ### Using JSON file -if not runOnMC: - import PhysicsTools.PythonAnalysis.LumiList as LumiList - process.source.lumisToProcess = LumiList.LumiList(filename = - '/net/hisrv0001/home/tawei/HeavyFlavor_20131030/Bfinder/CMSSW_5_3_20/src/Bfinder/JSON/Cert_181530-183126_HI7TeV_25Oct2012ReReco_Collisions11_JSON_MuonPhys_HF_manualPatch.txt' - ).getVLuminosityBlockRange() +#if not runOnMC: +# #import PhysicsTools.PythonAnalysis.LumiList as LumiList +# import FWCore.PythonUtilities.LumiList as LumiList +# process.source.lumisToProcess = LumiList.LumiList(filename = +# '/net/hisrv0001/home/tawei/HeavyFlavor_20131030/Bfinder/CMSSW_5_3_20/src/Bfinder/JSON/Cert_181530-183126_HI7TeV_25Oct2012ReReco_Collisions11_JSON_MuonPhys_HF_manualPatch.txt' +# ).getVLuminosityBlockRange() ### Set basic filter process.primaryVertexFilter = cms.EDFilter("GoodVertexFilter", From 639991945b2657ba9e8e0987f329c45f1e12565d Mon Sep 17 00:00:00 2001 From: Ta Wei Date: Sun, 30 Aug 2015 15:09:12 -0400 Subject: [PATCH 2/4] fix bug --- Bfinder/src/Bfinder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bfinder/src/Bfinder.cc b/Bfinder/src/Bfinder.cc index d3a7b84..118e924 100644 --- a/Bfinder/src/Bfinder.cc +++ b/Bfinder/src/Bfinder.cc @@ -705,7 +705,7 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if (fabs(tk_it->eta()) > 2.5) continue; TrackCutLevel->Fill(3); if(doTkPreCut_){ - if (!(tk_it->track()->qualityByName("highPurity"))) continue; + if( !(tk_it->track()->quality(reco::TrackBase::highPurity))) continue; TrackCutLevel->Fill(4); //outdated selections //if (tk_it->track()->normalizedChi2()>5) continue; @@ -1072,7 +1072,7 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) TrackInfo.d0error [TrackInfo.size] = tk_it->track()->d0Error(); TrackInfo.dzPV [TrackInfo.size] = tk_it->track()->dz(RefVtx); TrackInfo.dxyPV [TrackInfo.size] = tk_it->track()->dxy(RefVtx); - TrackInfo.highPurity [TrackInfo.size] = tk_it->track()->qualityByName("highPurity"); + TrackInfo.highPurity [TrackInfo.size] = tk_it->track()->quality(reco::TrackBase::highPurity); TrackInfo.geninfo_index [TrackInfo.size] = -1;//initialize for later use if(tk_it->track().isNonnull()){ for(int tq = 0; tq < reco::TrackBase::qualitySize; tq++){ From 171713131a074c76ae73559bbd74fcfadfec279b Mon Sep 17 00:00:00 2001 From: HaoQiu Date: Thu, 14 Dec 2017 17:49:22 -0500 Subject: [PATCH 3/4] update to Taiwei's Dfinder branch 2 --- Bfinder/src/Bfinder.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/Bfinder/src/Bfinder.cc b/Bfinder/src/Bfinder.cc index 886fe15..cadaee4 100644 --- a/Bfinder/src/Bfinder.cc +++ b/Bfinder/src/Bfinder.cc @@ -706,7 +706,6 @@ void Bfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) TrackCutLevel->Fill(4); if(doTkPreCut_){ if( !(tk_it->track()->quality(reco::TrackBase::highPurity))) continue; - //outdated selections //if (tk_it->track()->normalizedChi2()>5) continue; //if (tk_it->p()>200 || tk_it->pt()>200) continue; From 4f886a69cf3704fc8833957784c3d73960d31e78 Mon Sep 17 00:00:00 2001 From: HaoQiu Date: Thu, 14 Dec 2017 17:54:33 -0500 Subject: [PATCH 4/4] add daughter track dz --- Bfinder/interface/Dntuple.h | 186 +++++++++++++++++++++++++++--------- Bfinder/interface/format.h | 9 ++ Bfinder/src/Dfinder.cc | 3 + 3 files changed, 151 insertions(+), 47 deletions(-) diff --git a/Bfinder/interface/Dntuple.h b/Bfinder/interface/Dntuple.h index 8073228..45319c6 100644 --- a/Bfinder/interface/Dntuple.h +++ b/Bfinder/interface/Dntuple.h @@ -111,10 +111,18 @@ class DntupleBranches float Dtrk2Dxy[MAX_XB]; float Dtrk3Dxy[MAX_XB]; float Dtrk4Dxy[MAX_XB]; - float Dtrk1D0Err[MAX_XB]; - float Dtrk2D0Err[MAX_XB]; - float Dtrk3D0Err[MAX_XB]; - float Dtrk4D0Err[MAX_XB]; + float Dtrk1DxyErr[MAX_XB]; + float Dtrk2DxyErr[MAX_XB]; + float Dtrk3DxyErr[MAX_XB]; + float Dtrk4DxyErr[MAX_XB]; + float Dtrk1Dsz[MAX_XB]; + float Dtrk2Dsz[MAX_XB]; + float Dtrk3Dsz[MAX_XB]; + float Dtrk4Dsz[MAX_XB]; + float Dtrk1DszErr[MAX_XB]; + float Dtrk2DszErr[MAX_XB]; + float Dtrk3DszErr[MAX_XB]; + float Dtrk4DszErr[MAX_XB]; float Dtrk1PixelHit[MAX_XB]; float Dtrk2PixelHit[MAX_XB]; float Dtrk3PixelHit[MAX_XB]; @@ -174,7 +182,9 @@ class DntupleBranches float DRestrk1Y[MAX_XB]; float DRestrk1P[MAX_XB]; float DRestrk1Dxy[MAX_XB]; - float DRestrk1D0Err[MAX_XB]; + float DRestrk1DxyErr[MAX_XB]; + float DRestrk1Dsz[MAX_XB]; + float DRestrk1DszErr[MAX_XB]; int DRestrk1originalAlgo[MAX_XB]; float DRestrk2Pt[MAX_XB]; float DRestrk2Eta[MAX_XB]; @@ -182,7 +192,9 @@ class DntupleBranches float DRestrk2Y[MAX_XB]; float DRestrk2P[MAX_XB]; float DRestrk2Dxy[MAX_XB]; - float DRestrk2D0Err[MAX_XB]; + float DRestrk2DxyErr[MAX_XB]; + float DRestrk2Dsz[MAX_XB]; + float DRestrk2DszErr[MAX_XB]; int DRestrk2originalAlgo[MAX_XB]; float DRestrk3Pt[MAX_XB]; float DRestrk3Eta[MAX_XB]; @@ -190,7 +202,9 @@ class DntupleBranches float DRestrk3Y[MAX_XB]; float DRestrk3P[MAX_XB]; float DRestrk3Dxy[MAX_XB]; - float DRestrk3D0Err[MAX_XB]; + float DRestrk3DxyErr[MAX_XB]; + float DRestrk3Dsz[MAX_XB]; + float DRestrk3DszErr[MAX_XB]; int DRestrk3originalAlgo[MAX_XB]; float DRestrk4Pt[MAX_XB]; float DRestrk4Eta[MAX_XB]; @@ -198,7 +212,9 @@ class DntupleBranches float DRestrk4P[MAX_XB]; float DRestrk4Y[MAX_XB]; float DRestrk4Dxy[MAX_XB]; - float DRestrk4D0Err[MAX_XB]; + float DRestrk4DxyErr[MAX_XB]; + float DRestrk4Dsz[MAX_XB]; + float DRestrk4DszErr[MAX_XB]; int DRestrk4originalAlgo[MAX_XB]; float DRestrk1PtErr[MAX_XB]; float DRestrk2PtErr[MAX_XB]; @@ -314,6 +330,12 @@ class DntupleBranches dnt->Branch("Dtrk2PtErr",Dtrk2PtErr,"Dtrk2PtErr[Dsize]/F"); dnt->Branch("Dtrk1Dxy",Dtrk1Dxy,"Dtrk1Dxy[Dsize]/F"); dnt->Branch("Dtrk2Dxy",Dtrk2Dxy,"Dtrk2Dxy[Dsize]/F"); + dnt->Branch("Dtrk1DxyErr",Dtrk1DxyErr,"Dtrk1DxyErr[Dsize]/F"); + dnt->Branch("Dtrk2DxyErr",Dtrk2DxyErr,"Dtrk2DxyErr[Dsize]/F"); + dnt->Branch("Dtrk1Dsz",Dtrk1Dsz,"Dtrk1Dsz[Dsize]/F"); + dnt->Branch("Dtrk2Dsz",Dtrk2Dsz,"Dtrk2Dsz[Dsize]/F"); + dnt->Branch("Dtrk1DszErr",Dtrk1DszErr,"Dtrk1DszErr[Dsize]/F"); + dnt->Branch("Dtrk2DszErr",Dtrk2DszErr,"Dtrk2DszErr[Dsize]/F"); dnt->Branch("Dtrk1PixelHit",Dtrk1PixelHit,"Dtrk1PixelHit[Dsize]/F"); dnt->Branch("Dtrk2PixelHit",Dtrk2PixelHit,"Dtrk2PixelHit[Dsize]/F"); dnt->Branch("Dtrk1StripHit",Dtrk1StripHit,"Dtrk1StripHit[Dsize]/F"); @@ -348,6 +370,12 @@ class DntupleBranches dnt->Branch("Dtrk4PtErr",Dtrk4PtErr,"Dtrk4PtErr[Dsize]/F"); dnt->Branch("Dtrk3Dxy",Dtrk3Dxy,"Dtrk3Dxy[Dsize]/F"); dnt->Branch("Dtrk4Dxy",Dtrk4Dxy,"Dtrk4Dxy[Dsize]/F"); + dnt->Branch("Dtrk3DxyErr",Dtrk3DxyErr,"Dtrk3DxyErr[Dsize]/F"); + dnt->Branch("Dtrk4DxyErr",Dtrk4DxyErr,"Dtrk4DxyErr[Dsize]/F"); + dnt->Branch("Dtrk3Dsz",Dtrk3Dsz,"Dtrk3Dsz[Dsize]/F"); + dnt->Branch("Dtrk4Dsz",Dtrk4Dsz,"Dtrk4Dsz[Dsize]/F"); + dnt->Branch("Dtrk3DszErr",Dtrk3DszErr,"Dtrk3DszErr[Dsize]/F"); + dnt->Branch("Dtrk4DszErr",Dtrk4DszErr,"Dtrk4DszErr[Dsize]/F"); dnt->Branch("Dtrk3PixelHit",Dtrk3PixelHit,"Dtrk3PixelHit[Dsize]/F"); dnt->Branch("Dtrk4PixelHit",Dtrk4PixelHit,"Dtrk4PixelHit[Dsize]/F"); dnt->Branch("Dtrk3StripHit",Dtrk3StripHit,"Dtrk3StripHit[Dsize]/F"); @@ -379,8 +407,6 @@ class DntupleBranches dnt->Branch("Dtrk2PhiErr",Dtrk2PhiErr,"Dtrk2PhiErr[Dsize]/F"); dnt->Branch("Dtrk1Y",Dtrk1Y,"Dtrk1Y[Dsize]/F"); dnt->Branch("Dtrk2Y",Dtrk2Y,"Dtrk2Y[Dsize]/F"); - dnt->Branch("Dtrk1D0Err",Dtrk1D0Err,"Dtrk1D0Err[Dsize]/F"); - dnt->Branch("Dtrk2D0Err",Dtrk2D0Err,"Dtrk2D0Err[Dsize]/F"); dnt->Branch("Dtrk1MVAVal",Dtrk1MVAVal,"Dtrk1MVAVal[Dsize]/F"); dnt->Branch("Dtrk2MVAVal",Dtrk2MVAVal,"Dtrk2MVAVal[Dsize]/F"); dnt->Branch("Dtrk1Quality",Dtrk1Quality,"Dtrk1Quality[Dsize]/I"); @@ -395,8 +421,6 @@ class DntupleBranches dnt->Branch("Dtrk4PhiErr",Dtrk4PhiErr,"Dtrk4PhiErr[Dsize]/F"); dnt->Branch("Dtrk3Y",Dtrk3Y,"Dtrk3Y[Dsize]/F"); dnt->Branch("Dtrk4Y",Dtrk4Y,"Dtrk4Y[Dsize]/F"); - dnt->Branch("Dtrk3D0Err",Dtrk3D0Err,"Dtrk3D0Err[Dsize]/F"); - dnt->Branch("Dtrk4D0Err",Dtrk4D0Err,"Dtrk4D0Err[Dsize]/F"); dnt->Branch("Dtrk3MVAVal",Dtrk3MVAVal,"Dtrk3MVAVal[Dsize]/F"); dnt->Branch("Dtrk4MVAVal",Dtrk4MVAVal,"Dtrk4MVAVal[Dsize]/F"); dnt->Branch("Dtrk3Quality",Dtrk3Quality,"Dtrk3Quality[Dsize]/I"); @@ -415,24 +439,36 @@ class DntupleBranches dnt->Branch("DRestrk1Phi",DRestrk1Phi,"DRestrk1Phi[Dsize]/F"); dnt->Branch("DRestrk1P",DRestrk1P,"DRestrk1P[Dsize]/F"); dnt->Branch("DRestrk1Dxy",DRestrk1Dxy,"DRestrk1Dxy[Dsize]/F"); + dnt->Branch("DRestrk1DxyErr",DRestrk1DxyErr,"DRestrk1DxyErr[Dsize]/F"); + dnt->Branch("DRestrk1Dsz",DRestrk1Dsz,"DRestrk1Dsz[Dsize]/F"); + dnt->Branch("DRestrk1DszErr",DRestrk1DszErr,"DRestrk1DszErr[Dsize]/F"); dnt->Branch("DRestrk1originalAlgo",DRestrk1originalAlgo,"DRestrk1originalAlgo[Dsize]/I"); dnt->Branch("DRestrk2Pt",DRestrk2Pt,"DRestrk2Pt[Dsize]/F"); dnt->Branch("DRestrk2Eta",DRestrk2Eta,"DRestrk2Eta[Dsize]/F"); dnt->Branch("DRestrk2Phi",DRestrk2Phi,"DRestrk2Phi[Dsize]/F"); dnt->Branch("DRestrk2P",DRestrk2P,"DRestrk2P[Dsize]/F"); dnt->Branch("DRestrk2Dxy",DRestrk2Dxy,"DRestrk2Dxy[Dsize]/F"); + dnt->Branch("DRestrk2DxyErr",DRestrk2DxyErr,"DRestrk2DxyErr[Dsize]/F"); + dnt->Branch("DRestrk2Dsz",DRestrk2Dsz,"DRestrk2Dsz[Dsize]/F"); + dnt->Branch("DRestrk2DszErr",DRestrk2DszErr,"DRestrk2DszErr[Dsize]/F"); dnt->Branch("DRestrk2originalAlgo",DRestrk2originalAlgo,"DRestrk2originalAlgo[Dsize]/I"); dnt->Branch("DRestrk3Pt",DRestrk3Pt,"DRestrk3Pt[Dsize]/F"); dnt->Branch("DRestrk3Eta",DRestrk3Eta,"DRestrk3Eta[Dsize]/F"); dnt->Branch("DRestrk3Phi",DRestrk3Phi,"DRestrk3Phi[Dsize]/F"); dnt->Branch("DRestrk3P",DRestrk3P,"DRestrk3P[Dsize]/F"); dnt->Branch("DRestrk3Dxy",DRestrk3Dxy,"DRestrk3Dxy[Dsize]/F"); + dnt->Branch("DRestrk3DxyErr",DRestrk3DxyErr,"DRestrk3DxyErr[Dsize]/F"); + dnt->Branch("DRestrk3Dsz",DRestrk3Dsz,"DRestrk3Dsz[Dsize]/F"); + dnt->Branch("DRestrk3DszErr",DRestrk3DszErr,"DRestrk3DszErr[Dsize]/F"); dnt->Branch("DRestrk3originalAlgo",DRestrk3originalAlgo,"DRestrk3originalAlgo[Dsize]/I"); dnt->Branch("DRestrk4Pt",DRestrk4Pt,"DRestrk4Pt[Dsize]/F"); dnt->Branch("DRestrk4Eta",DRestrk4Eta,"DRestrk4Eta[Dsize]/F"); dnt->Branch("DRestrk4Phi",DRestrk4Phi,"DRestrk4Phi[Dsize]/F"); dnt->Branch("DRestrk4P",DRestrk4P,"DRestrk4P[Dsize]/F"); dnt->Branch("DRestrk4Dxy",DRestrk4Dxy,"DRestrk4Dxy[Dsize]/F"); + dnt->Branch("DRestrk4DxyErr",DRestrk4DxyErr,"DRestrk4DxyErr[Dsize]/F"); + dnt->Branch("DRestrk4Dsz",DRestrk4Dsz,"DRestrk4Dsz[Dsize]/F"); + dnt->Branch("DRestrk4DszErr",DRestrk4DszErr,"DRestrk4DszErr[Dsize]/F"); dnt->Branch("DRestrk4originalAlgo",DRestrk4originalAlgo,"DRestrk4originalAlgo[Dsize]/I"); dnt->Branch("DRestrk1PtErr",DRestrk1PtErr,"DRestrk1PtErr[Dsize]/F"); dnt->Branch("DRestrk2PtErr",DRestrk2PtErr,"DRestrk2PtErr[Dsize]/F"); @@ -452,13 +488,9 @@ class DntupleBranches if(!D0kpimode) { dnt->Branch("DRestrk1Y",DRestrk1Y,"DRestrk1Y[Dsize]/F"); - dnt->Branch("DRestrk1D0Err",DRestrk1D0Err,"DRestrk1D0Err[Dsize]/F"); dnt->Branch("DRestrk2Y",DRestrk2Y,"DRestrk2Y[Dsize]/F"); - dnt->Branch("DRestrk2D0Err",DRestrk2D0Err,"DRestrk2D0Err[Dsize]/F"); dnt->Branch("DRestrk3Y",DRestrk3Y,"DRestrk3Y[Dsize]/F"); - dnt->Branch("DRestrk3D0Err",DRestrk3D0Err,"DRestrk3D0Err[Dsize]/F"); dnt->Branch("DRestrk4Y",DRestrk4Y,"DRestrk4Y[Dsize]/F"); - dnt->Branch("DRestrk4D0Err",DRestrk4D0Err,"DRestrk4D0Err[Dsize]/F"); dnt->Branch("DRestrk1Quality",DRestrk1Quality,"DRestrk1Quality[Dsize]/I"); dnt->Branch("DRestrk2Quality",DRestrk2Quality,"DRestrk2Quality[Dsize]/I"); dnt->Branch("DRestrk3Quality",DRestrk3Quality,"DRestrk3Quality[Dsize]/I"); @@ -918,7 +950,9 @@ class DntupleBranches Dtrk1Y[typesize] = b4P->Rapidity(); Dtrk1P[typesize] = b4P->P(); Dtrk1Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk1_index[j]]; - Dtrk1D0Err[typesize] = TrackInfo->d0error[DInfo->rftk1_index[j]]; + Dtrk1DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk1_index[j]]; + Dtrk1Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk1_index[j]]; + Dtrk1DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk1_index[j]]; Dtrk1PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk1_index[j]]; Dtrk1StripHit[typesize] = TrackInfo->striphit[DInfo->rftk1_index[j]]; Dtrk1nPixelLayer[typesize] = TrackInfo->nPixelLayer[DInfo->rftk1_index[j]]; @@ -944,7 +978,9 @@ class DntupleBranches Dtrk2Y[typesize] = b4P->Rapidity(); Dtrk2P[typesize] = b4P->P(); Dtrk2Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk2_index[j]]; - Dtrk2D0Err[typesize] = TrackInfo->d0error[DInfo->rftk2_index[j]]; + Dtrk2DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk2_index[j]]; + Dtrk2Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk2_index[j]]; + Dtrk2DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk2_index[j]]; Dtrk2PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk2_index[j]]; Dtrk2StripHit[typesize] = TrackInfo->striphit[DInfo->rftk2_index[j]]; Dtrk2nPixelLayer[typesize] = TrackInfo->nPixelLayer[DInfo->rftk2_index[j]]; @@ -970,7 +1006,9 @@ class DntupleBranches Dtrk3PhiErr[typesize] = 0; Dtrk3Y[typesize] = -1; Dtrk3Dxy[typesize] = -1; - Dtrk3D0Err[typesize] = -1; + Dtrk3DxyErr[typesize] = -1; + Dtrk3Dsz[typesize] = -1; + Dtrk3DszErr[typesize] = -1; Dtrk3PixelHit[typesize] = -1; Dtrk3StripHit[typesize] = -1; Dtrk3nPixelLayer[typesize] = -1; @@ -993,7 +1031,9 @@ class DntupleBranches Dtrk4PhiErr[typesize] = 0; Dtrk4Y[typesize] = -1; Dtrk4Dxy[typesize] = -1; - Dtrk4D0Err[typesize] = -1; + Dtrk4DxyErr[typesize] = -1; + Dtrk4Dsz[typesize] = -1; + Dtrk4DszErr[typesize] = -1; Dtrk4PixelHit[typesize] = -1; Dtrk4StripHit[typesize] = -1; Dtrk4nPixelLayer[typesize] = -1; @@ -1018,7 +1058,9 @@ class DntupleBranches DRestrk1P[typesize] = -1; DRestrk1Y[typesize] = -1; DRestrk1Dxy[typesize] = -1; - DRestrk1D0Err[typesize] = -1; + DRestrk1DxyErr[typesize] = -1; + DRestrk1Dsz[typesize] = -1; + DRestrk1DszErr[typesize] = -1; DRestrk1originalAlgo[typesize] = 0; DRestrk2Pt[typesize] = -1; DRestrk2Eta[typesize] = -20; @@ -1026,7 +1068,9 @@ class DntupleBranches DRestrk2P[typesize] = -1; DRestrk2Y[typesize] = -1; DRestrk2Dxy[typesize] = -1; - DRestrk2D0Err[typesize] = -1; + DRestrk2DxyErr[typesize] = -1; + DRestrk2Dsz[typesize] = -1; + DRestrk2DszErr[typesize] = -1; DRestrk2originalAlgo[typesize] = 0; DRestrk3Pt[typesize] = -1; DRestrk3Eta[typesize] = -20; @@ -1034,7 +1078,9 @@ class DntupleBranches DRestrk3P[typesize] = -1; DRestrk3Y[typesize] = -1; DRestrk3Dxy[typesize] = -1; - DRestrk3D0Err[typesize] = -1; + DRestrk3DxyErr[typesize] = -1; + DRestrk3Dsz[typesize] = -1; + DRestrk3DszErr[typesize] = -1; DRestrk3originalAlgo[typesize] = 0; DRestrk4Pt[typesize] = -1; DRestrk4Eta[typesize] = -20; @@ -1042,7 +1088,9 @@ class DntupleBranches DRestrk4P[typesize] = -1; DRestrk4Y[typesize] = -1; DRestrk4Dxy[typesize] = -1; - DRestrk4D0Err[typesize] = -1; + DRestrk4DxyErr[typesize] = -1; + DRestrk4Dsz[typesize] = -1; + DRestrk4DszErr[typesize] = -1; DRestrk4originalAlgo[typesize] = 0; DRestrk1PtErr[typesize] = -1; DRestrk2PtErr[typesize] = -1; @@ -1075,7 +1123,9 @@ class DntupleBranches Dtrk3Y[typesize] = b4P->Rapidity(); Dtrk3P[typesize] = b4P->P(); Dtrk3Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk3_index[j]]; - Dtrk3D0Err[typesize] = TrackInfo->d0error[DInfo->rftk3_index[j]]; + Dtrk3DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk3_index[j]]; + Dtrk3Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk3_index[j]]; + Dtrk3DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk3_index[j]]; Dtrk3PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk3_index[j]]; Dtrk3StripHit[typesize] = TrackInfo->striphit[DInfo->rftk3_index[j]]; Dtrk3nPixelLayer[typesize] = TrackInfo->nPixelLayer[DInfo->rftk3_index[j]]; @@ -1098,7 +1148,9 @@ class DntupleBranches Dtrk4PhiErr[typesize] = 0; Dtrk4Y[typesize] = -1; Dtrk4Dxy[typesize] = -1; - Dtrk4D0Err[typesize] = -1; + Dtrk4DxyErr[typesize] = -1; + Dtrk4Dsz[typesize] = -1; + Dtrk4DszErr[typesize] = -1; Dtrk4PixelHit[typesize] = -1; Dtrk4StripHit[typesize] = -1; Dtrk4nPixelLayer[typesize] = -1; @@ -1123,7 +1175,9 @@ class DntupleBranches DRestrk1P[typesize] = -1; DRestrk1Y[typesize] = -1; DRestrk1Dxy[typesize] = -1; - DRestrk1D0Err[typesize] = -1; + DRestrk1DxyErr[typesize] = -1; + DRestrk1Dsz[typesize] = -1; + DRestrk1DszErr[typesize] = -1; DRestrk1originalAlgo[typesize] = 0; DRestrk2Pt[typesize] = -1; DRestrk2Eta[typesize] = -20; @@ -1131,7 +1185,9 @@ class DntupleBranches DRestrk2P[typesize] = -1; DRestrk2Y[typesize] = -1; DRestrk2Dxy[typesize] = -1; - DRestrk2D0Err[typesize] = -1; + DRestrk2DxyErr[typesize] = -1; + DRestrk2Dsz[typesize] = -1; + DRestrk2DszErr[typesize] = -1; DRestrk2originalAlgo[typesize] = 0; DRestrk3Pt[typesize] = -1; DRestrk3Eta[typesize] = -20; @@ -1139,7 +1195,9 @@ class DntupleBranches DRestrk3P[typesize] = -1; DRestrk3Y[typesize] = -1; DRestrk3Dxy[typesize] = -1; - DRestrk3D0Err[typesize] = -1; + DRestrk3DxyErr[typesize] = -1; + DRestrk3Dsz[typesize] = -1; + DRestrk3DszErr[typesize] = -1; DRestrk3originalAlgo[typesize] = 0; DRestrk4Pt[typesize] = -1; DRestrk4Eta[typesize] = -20; @@ -1147,7 +1205,9 @@ class DntupleBranches DRestrk4P[typesize] = -1; DRestrk4Y[typesize] = -1; DRestrk4Dxy[typesize] = -1; - DRestrk4D0Err[typesize] = -1; + DRestrk4DxyErr[typesize] = -1; + DRestrk4Dsz[typesize] = -1; + DRestrk4DszErr[typesize] = -1; DRestrk4originalAlgo[typesize] = 0; DRestrk1PtErr[typesize] = -1; DRestrk2PtErr[typesize] = -1; @@ -1192,8 +1252,12 @@ class DntupleBranches Dtrk4P[typesize] = b4P->P(); Dtrk3Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk3_index[j]]; Dtrk4Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk4_index[j]]; - Dtrk3D0Err[typesize] = TrackInfo->d0error[DInfo->rftk3_index[j]]; - Dtrk4D0Err[typesize] = TrackInfo->d0error[DInfo->rftk4_index[j]]; + Dtrk3DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk3_index[j]]; + Dtrk4DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk4_index[j]]; + Dtrk3Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk3_index[j]]; + Dtrk4Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk4_index[j]]; + Dtrk3DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk3_index[j]]; + Dtrk4DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk4_index[j]]; Dtrk3PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk3_index[j]]; Dtrk4PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk4_index[j]]; Dtrk3StripHit[typesize] = TrackInfo->striphit[DInfo->rftk3_index[j]]; @@ -1229,8 +1293,10 @@ class DntupleBranches DRestrk1Phi[typesize] = -20; DRestrk1P[typesize] = -1; DRestrk1Y[typesize] = -1; - DRestrk1Dxy[typesize] = -1; - DRestrk1D0Err[typesize] = -1; + DRestrk1Dxy[typesize] = -1; + DRestrk1DxyErr[typesize] = -1; + DRestrk1Dsz[typesize] = -1; + DRestrk1DszErr[typesize] = -1; DRestrk1originalAlgo[typesize] = 0; DRestrk2Pt[typesize] = -1; DRestrk2Eta[typesize] = -20; @@ -1238,7 +1304,9 @@ class DntupleBranches DRestrk2P[typesize] = -1; DRestrk2Y[typesize] = -1; DRestrk2Dxy[typesize] = -1; - DRestrk2D0Err[typesize] = -1; + DRestrk2DxyErr[typesize] = -1; + DRestrk2Dsz[typesize] = -1; + DRestrk2DszErr[typesize] = -1; DRestrk2originalAlgo[typesize] = 0; DRestrk3Pt[typesize] = -1; DRestrk3Eta[typesize] = -20; @@ -1246,7 +1314,9 @@ class DntupleBranches DRestrk3P[typesize] = -1; DRestrk3Y[typesize] = -1; DRestrk3Dxy[typesize] = -1; - DRestrk3D0Err[typesize] = -1; + DRestrk3DxyErr[typesize] = -1; + DRestrk3Dsz[typesize] = -1; + DRestrk3DszErr[typesize] = -1; DRestrk3originalAlgo[typesize] = 0; DRestrk4Pt[typesize] = -1; DRestrk4Eta[typesize] = -20; @@ -1254,7 +1324,9 @@ class DntupleBranches DRestrk4P[typesize] = -1; DRestrk4Y[typesize] = -1; DRestrk4Dxy[typesize] = -1; - DRestrk4D0Err[typesize] = -1; + DRestrk4DxyErr[typesize] = -1; + DRestrk4Dsz[typesize] = -1; + DRestrk4DszErr[typesize] = -1; DRestrk4originalAlgo[typesize] = 0; DRestrk1PtErr[typesize] = -1; DRestrk2PtErr[typesize] = -1; @@ -1287,7 +1359,9 @@ class DntupleBranches Dtrk1Y[typesize] = b4P->Rapidity(); Dtrk1P[typesize] = b4P->P(); Dtrk1Dxy[typesize] = TrackInfo->dxyPV[DInfo->rftk2_index[j]]; - Dtrk1D0Err[typesize] = TrackInfo->d0error[DInfo->rftk2_index[j]]; + Dtrk1DxyErr[typesize] = TrackInfo->dxyErr[DInfo->rftk2_index[j]]; + Dtrk1Dsz[typesize] = TrackInfo->dszPV[DInfo->rftk2_index[j]]; + Dtrk1DszErr[typesize] = TrackInfo->dszErr[DInfo->rftk2_index[j]]; Dtrk1PixelHit[typesize] = TrackInfo->pixelhit[DInfo->rftk2_index[j]]; Dtrk1StripHit[typesize] = TrackInfo->striphit[DInfo->rftk2_index[j]]; Dtrk1nPixelLayer[typesize] = TrackInfo->nPixelLayer[DInfo->rftk2_index[j]]; @@ -1311,7 +1385,9 @@ class DntupleBranches Dtrk2PhiErr[typesize] = 0; Dtrk2Y[typesize] = -1; Dtrk2Dxy[typesize] = -1; - Dtrk2D0Err[typesize] = -1; + Dtrk2DxyErr[typesize] = -1; + Dtrk2Dsz[typesize] = -1; + Dtrk2DszErr[typesize] = -1; Dtrk2PixelHit[typesize] = -1; Dtrk2StripHit[typesize] = -1; Dtrk2nPixelLayer[typesize] = -1; @@ -1334,7 +1410,9 @@ class DntupleBranches Dtrk3PhiErr[typesize] = 0; Dtrk3Y[typesize] = -1; Dtrk3Dxy[typesize] = -1; - Dtrk3D0Err[typesize] = -1; + Dtrk3DxyErr[typesize] = -1; + Dtrk3Dsz[typesize] = -1; + Dtrk3DszErr[typesize] = -1; Dtrk3PixelHit[typesize] = -1; Dtrk3StripHit[typesize] = -1; Dtrk3nPixelLayer[typesize] = -1; @@ -1357,7 +1435,9 @@ class DntupleBranches Dtrk4PhiErr[typesize] = 0; Dtrk4Y[typesize] = -1; Dtrk4Dxy[typesize] = -1; - Dtrk4D0Err[typesize] = -1; + Dtrk4DxyErr[typesize] = -1; + Dtrk4Dsz[typesize] = -1; + Dtrk4DszErr[typesize] = -1; Dtrk4PixelHit[typesize] = -1; Dtrk4StripHit[typesize] = -1; Dtrk4nPixelLayer[typesize] = -1; @@ -1383,7 +1463,9 @@ class DntupleBranches DRestrk1Y[typesize] = b4P->Rapidity(); DRestrk1P[typesize] = b4P->P(); DRestrk1Dxy[typesize] = TrackInfo->dxyPV[DInfo->tktkRes_rftk1_index[j]]; - DRestrk1D0Err[typesize] = TrackInfo->d0error[DInfo->tktkRes_rftk1_index[j]]; + DRestrk1DxyErr[typesize] = TrackInfo->dxyErr[DInfo->tktkRes_rftk1_index[j]]; + DRestrk1Dsz[typesize] = TrackInfo->dszPV[DInfo->tktkRes_rftk1_index[j]]; + DRestrk1DszErr[typesize] = TrackInfo->dszErr[DInfo->tktkRes_rftk1_index[j]]; DRestrk1originalAlgo[typesize] = TrackInfo->originalTrkAlgo[DInfo->tktkRes_rftk1_index[j]]; DRestrk2Pt[typesize] = TrackInfo->pt[DInfo->tktkRes_rftk2_index[j]]; DRestrk2Eta[typesize] = TrackInfo->eta[DInfo->tktkRes_rftk2_index[j]]; @@ -1392,7 +1474,9 @@ class DntupleBranches DRestrk2Y[typesize] = b4P->Rapidity(); DRestrk2P[typesize] = b4P->P(); DRestrk2Dxy[typesize] = TrackInfo->dxyPV[DInfo->tktkRes_rftk2_index[j]]; - DRestrk2D0Err[typesize] = TrackInfo->d0error[DInfo->tktkRes_rftk2_index[j]]; + DRestrk2DxyErr[typesize] = TrackInfo->dxyErr[DInfo->tktkRes_rftk2_index[j]]; + DRestrk2Dsz[typesize] = TrackInfo->dszPV[DInfo->tktkRes_rftk2_index[j]]; + DRestrk2DszErr[typesize] = TrackInfo->dszErr[DInfo->tktkRes_rftk2_index[j]]; DRestrk2originalAlgo[typesize] = TrackInfo->originalTrkAlgo[DInfo->tktkRes_rftk2_index[j]]; DRestrk3Pt[typesize] = -1; DRestrk3Eta[typesize] = -20; @@ -1400,7 +1484,9 @@ class DntupleBranches DRestrk3P[typesize] = -1; DRestrk3Y[typesize] = -1; DRestrk3Dxy[typesize] = -1; - DRestrk3D0Err[typesize] = -1; + DRestrk3DxyErr[typesize] = -1; + DRestrk3Dsz[typesize] = -1; + DRestrk3DszErr[typesize] = -1; DRestrk3originalAlgo[typesize] = 0; DRestrk4Pt[typesize] = -1; DRestrk4Eta[typesize] = -20; @@ -1408,7 +1494,9 @@ class DntupleBranches DRestrk4P[typesize] = -1; DRestrk4Y[typesize] = -1; DRestrk4Dxy[typesize] = -1; - DRestrk4D0Err[typesize] = -1; + DRestrk4DxyErr[typesize] = -1; + DRestrk4Dsz[typesize] = -1; + DRestrk4DszErr[typesize] = -1; DRestrk4originalAlgo[typesize] = 0; DRestrk1PtErr[typesize] = TrackInfo->ptErr[DInfo->tktkRes_rftk1_index[j]]; DRestrk2PtErr[typesize] = TrackInfo->ptErr[DInfo->tktkRes_rftk2_index[j]]; @@ -1435,7 +1523,9 @@ class DntupleBranches DRestrk3Y[typesize] = b4P->Rapidity(); DRestrk3P[typesize] = b4P->P(); DRestrk3Dxy[typesize] = TrackInfo->dxyPV[DInfo->tktkRes_rftk3_index[j]]; - DRestrk3D0Err[typesize] = TrackInfo->d0error[DInfo->tktkRes_rftk3_index[j]]; + DRestrk3DxyErr[typesize] = TrackInfo->dxyErr[DInfo->tktkRes_rftk3_index[j]]; + DRestrk3Dsz[typesize] = TrackInfo->dszPV[DInfo->tktkRes_rftk3_index[j]]; + DRestrk3DszErr[typesize] = TrackInfo->dszErr[DInfo->tktkRes_rftk3_index[j]]; DRestrk3originalAlgo[typesize] = TrackInfo->originalTrkAlgo[DInfo->tktkRes_rftk3_index[j]]; DRestrk4Pt[typesize] = TrackInfo->pt[DInfo->tktkRes_rftk4_index[j]]; DRestrk4Eta[typesize] = TrackInfo->eta[DInfo->tktkRes_rftk4_index[j]]; @@ -1444,7 +1534,9 @@ class DntupleBranches DRestrk4Y[typesize] = b4P->Rapidity(); DRestrk4P[typesize] = b4P->P(); DRestrk4Dxy[typesize] = TrackInfo->dxyPV[DInfo->tktkRes_rftk4_index[j]]; - DRestrk4D0Err[typesize] = TrackInfo->d0error[DInfo->tktkRes_rftk4_index[j]]; + DRestrk4DxyErr[typesize] = TrackInfo->dxyErr[DInfo->tktkRes_rftk4_index[j]]; + DRestrk4Dsz[typesize] = TrackInfo->dszPV[DInfo->tktkRes_rftk4_index[j]]; + DRestrk4DszErr[typesize] = TrackInfo->dszErr[DInfo->tktkRes_rftk4_index[j]]; DRestrk4originalAlgo[typesize] = TrackInfo->originalTrkAlgo[DInfo->tktkRes_rftk4_index[j]]; DRestrk3PtErr[typesize] = TrackInfo->ptErr[DInfo->tktkRes_rftk3_index[j]]; DRestrk4PtErr[typesize] = TrackInfo->ptErr[DInfo->tktkRes_rftk4_index[j]]; diff --git a/Bfinder/interface/format.h b/Bfinder/interface/format.h index 578150f..87320bf 100644 --- a/Bfinder/interface/format.h +++ b/Bfinder/interface/format.h @@ -515,6 +515,9 @@ class TrackInfoBranches{//{{{ float d0error [ MAX_TRACK]; float dzPV [ MAX_TRACK]; float dxyPV [ MAX_TRACK]; + float dxyErr [ MAX_TRACK]; + float dszPV [ MAX_TRACK]; + float dszErr [ MAX_TRACK]; int geninfo_index[ MAX_TRACK]; int trackQuality [ MAX_TRACK]; bool highPurity [ MAX_TRACK]; @@ -546,6 +549,9 @@ class TrackInfoBranches{//{{{ root->Branch("TrackInfo.d0error" ,d0error ,"TrackInfo.d0error[TrackInfo.size]/F" ); root->Branch("TrackInfo.dzPV" ,dzPV ,"TrackInfo.dzPV[TrackInfo.size]/F" ); root->Branch("TrackInfo.dxyPV" ,dxyPV ,"TrackInfo.dxyPV[TrackInfo.size]/F" ); + root->Branch("TrackInfo.dxyErr" ,dxyErr ,"TrackInfo.dxyErr[TrackInfo.size]/F" ); + root->Branch("TrackInfo.dszPV" ,dszPV ,"TrackInfo.dszPV[TrackInfo.size]/F" ); + root->Branch("TrackInfo.dszErr" ,dszErr ,"TrackInfo.dszErr[TrackInfo.size]/F" ); root->Branch("TrackInfo.geninfo_index" ,geninfo_index ,"TrackInfo.geninfo_index[TrackInfo.size]/I"); root->Branch("TrackInfo.trackQuality" ,trackQuality ,"TrackInfo.trackQuality[TrackInfo.size]/I"); root->Branch("TrackInfo.highPurity" ,highPurity ,"TrackInfo.highPurity[TrackInfo.size]/O"); @@ -581,6 +587,9 @@ class TrackInfoBranches{//{{{ root->SetBranchAddress("TrackInfo.d0error" , d0error ); root->SetBranchAddress("TrackInfo.dzPV" , dzPV ); root->SetBranchAddress("TrackInfo.dxyPV" , dxyPV ); + root->SetBranchAddress("TrackInfo.dxyErr" , dxyErr ); + root->SetBranchAddress("TrackInfo.dszPV" , dszPV ); + root->SetBranchAddress("TrackInfo.dszErr" , dszErr ); root->SetBranchAddress("TrackInfo.geninfo_index" , geninfo_index ); root->SetBranchAddress("TrackInfo.trackQuality" , trackQuality ); root->SetBranchAddress("TrackInfo.highPurity" , highPurity ); diff --git a/Bfinder/src/Dfinder.cc b/Bfinder/src/Dfinder.cc index a8a29f4..0b4f118 100644 --- a/Bfinder/src/Dfinder.cc +++ b/Bfinder/src/Dfinder.cc @@ -876,6 +876,9 @@ void Dfinder::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) TrackInfo.d0error [TrackInfo.size] = tk_it->track()->d0Error(); TrackInfo.dzPV [TrackInfo.size] = tk_it->track()->dz(RefVtx); TrackInfo.dxyPV [TrackInfo.size] = tk_it->track()->dxy(RefVtx); + TrackInfo.dxyErr [TrackInfo.size] = tk_it->track()->dxyError(); + TrackInfo.dszPV [TrackInfo.size] = tk_it->track()->dsz(RefVtx); + TrackInfo.dszErr [TrackInfo.size] = tk_it->track()->dszError(); TrackInfo.highPurity [TrackInfo.size] = tk_it->track()->quality(reco::TrackBase::highPurity); TrackInfo.geninfo_index [TrackInfo.size] = -1;//initialize for later use if(MVAMapLabelInputTag_.instance() == "MVAVals")