diff --git a/Validation/RecoTrack/interface/MTVHistoProducerAlgo.h b/Validation/RecoTrack/interface/MTVHistoProducerAlgo.h index 9bedc584a619f..36a70e3cfd513 100644 --- a/Validation/RecoTrack/interface/MTVHistoProducerAlgo.h +++ b/Validation/RecoTrack/interface/MTVHistoProducerAlgo.h @@ -44,7 +44,7 @@ class MTVHistoProducerAlgo{ const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP, double dxy, double dz, int nSimHits, const reco::Track* track, - int numVertices, double vertz)=0; + int numVertices, double vertz, double dR)=0; virtual void fill_recoAssociated_simTrack_histos(int count, const reco::GenParticle& tp, @@ -63,7 +63,7 @@ class MTVHistoProducerAlgo{ int numVertices, int tpbunchcrossing, int nSimHits, - double sharedFraction)=0; + double sharedFraction, double dR)=0; virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase& trackref,const std::vector< edm::ValueMap >& v_dEdx)=0; // virtual void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap > v_dEdx)=0; @@ -110,6 +110,11 @@ class MTVHistoProducerAlgo{ std::vector& denominator, std::string type); + void fillPlotFromPlots(MonitorElement* h, + TH1* numerator, + TH1* denominator, + std::string type); + void BinLogX(TH1*h); private: diff --git a/Validation/RecoTrack/interface/MTVHistoProducerAlgoForTracker.h b/Validation/RecoTrack/interface/MTVHistoProducerAlgoForTracker.h index 58c75f56e1ff5..973ea7e616433 100644 --- a/Validation/RecoTrack/interface/MTVHistoProducerAlgoForTracker.h +++ b/Validation/RecoTrack/interface/MTVHistoProducerAlgoForTracker.h @@ -45,7 +45,7 @@ class MTVHistoProducerAlgoForTracker: public MTVHistoProducerAlgo { const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP, double dxy, double dz, int nSimHits, const reco::Track* track, - int numVertices, double vertz); + int numVertices, double vertz, double dR); void fill_recoAssociated_simTrack_histos(int count, const reco::GenParticle& tp, @@ -65,7 +65,8 @@ class MTVHistoProducerAlgoForTracker: public MTVHistoProducerAlgo { int numVertices, int tpbunchcrossing, int nSimHits, - double sharedFraction); + double sharedFraction, + double dR); void fill_dedx_recoTrack_histos(int count, edm::RefToBase& trackref, const std::vector< edm::ValueMap >& v_dEdx); // void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap > v_dEdx); @@ -139,6 +140,7 @@ class MTVHistoProducerAlgoForTracker: public MTVHistoProducerAlgo { double minDz, maxDz; int nintDz; double minVertpos, maxVertpos; int nintVertpos; double minZpos, maxZpos; int nintZpos; + double mindr, maxdr; int nintdr; double minDeDx, maxDeDx; int nintDeDx; double minVertcount, maxVertcount; int nintVertcount; @@ -163,6 +165,7 @@ class MTVHistoProducerAlgoForTracker: public MTVHistoProducerAlgo { std::vector h_effic_vs_dz, h_fake_vs_dz, h_recodz, h_assocdz, h_assoc2dz, h_simuldz, h_looperdz, h_misiddz, h_loopratedz, h_misidratedz; std::vector h_effic_vs_vertpos, h_effic_vs_zpos, h_assocvertpos, h_simulvertpos, h_assoczpos, h_simulzpos; + std::vector h_effic_vs_dr, h_fakerate_vs_dr, h_assocdr, h_assoc2dr, h_simuldr, h_recodr; std::vector h_pt, h_eta, h_pullTheta,h_pullPhi,h_pullDxy,h_pullDz,h_pullQoverp; std::vector h_effic_vertcount_entire, h_fakerate_vertcount_entire, h_reco_vertcount_entire, h_assoc_vertcount_entire, h_assoc2_vertcount_entire, h_simul_vertcount_entire; std::vector h_effic_vertcount_barrel, h_fakerate_vertcount_barrel, h_reco_vertcount_barrel, h_assoc_vertcount_barrel, h_assoc2_vertcount_barrel, h_simul_vertcount_barrel; diff --git a/Validation/RecoTrack/interface/MultiTrackValidator.h b/Validation/RecoTrack/interface/MultiTrackValidator.h index c46c28746ee6a..6f07675cd6194 100644 --- a/Validation/RecoTrack/interface/MultiTrackValidator.h +++ b/Validation/RecoTrack/interface/MultiTrackValidator.h @@ -46,8 +46,11 @@ class MultiTrackValidator : public thread_unsafe::DQMEDAnalyzer, protected Multi //(i.e. "denominator" of the efficiency ratio) TrackingParticleSelector tpSelector; CosmicTrackingParticleSelector cosmictpSelector; + TrackingParticleSelector dRtpSelector; edm::EDGetTokenT _simHitTpMapTag; + edm::EDGetTokenT > labelTokenForDrCalculation; + }; diff --git a/Validation/RecoTrack/plugins/MultiTrackValidator.cc b/Validation/RecoTrack/plugins/MultiTrackValidator.cc index af8ad1fb75d0c..7415147035a06 100644 --- a/Validation/RecoTrack/plugins/MultiTrackValidator.cc +++ b/Validation/RecoTrack/plugins/MultiTrackValidator.cc @@ -31,6 +31,7 @@ #include "TMath.h" #include +#include "DataFormats/Math/interface/deltaR.h" //#include @@ -75,11 +76,26 @@ MultiTrackValidator::MultiTrackValidator(const edm::ParameterSet& pset):MultiTra pset.getParameter("chargedOnlyTP"), pset.getParameter >("pdgIdTP")); + + ParameterSet psetVsEta = psetForHistoProducerAlgo.getParameter("TpSelectorForEfficiencyVsEta"); + dRtpSelector = TrackingParticleSelector(psetVsEta.getParameter("ptMin"), + psetVsEta.getParameter("minRapidity"), + psetVsEta.getParameter("maxRapidity"), + psetVsEta.getParameter("tip"), + psetVsEta.getParameter("lip"), + psetVsEta.getParameter("minHit"), + psetVsEta.getParameter("signalOnly"), + psetVsEta.getParameter("chargedOnly"), + psetVsEta.getParameter("stableOnly"), + psetVsEta.getParameter >("pdgId")); + useGsf = pset.getParameter("useGsf"); runStandalone = pset.getParameter("runStandalone"); _simHitTpMapTag = mayConsume(pset.getParameter("simHitTpMapTag")); + labelTokenForDrCalculation = consumes >(pset.getParameter("trackCollectionForDrCalculation")); + if (!UseAssociators) { associators.clear(); associators.push_back(assMapInput.label()); @@ -196,6 +212,28 @@ void MultiTrackValidator::analyze(const edm::Event& event, const edm::EventSetup event.getByToken(label_tv,tvH); TrackingVertexCollection tv = *tvH; + //calculate dR for TPs + std::vector dR_tPCeff; + for (TrackingParticleCollection::size_type i=0; i(tpr.get()); + double dR = std::numeric_limits::max(); + if(dRtpSelector(*tp)) {//only for those needed for efficiency! + for (TrackingParticleCollection::size_type j=0; j(tpr2.get()); + if(! tpSelector(*tp2)) continue;//calculare dR wrt inclusive collection (also with PU, low pT, displaced) + double dR_tmp = reco::deltaR(*tp,*tp2); + if (dR_tmp > trackCollectionForDrCalculation; + event.getByToken(labelTokenForDrCalculation, trackCollectionForDrCalculation); + int w=0; //counter counting the number of sets of histograms for (unsigned int ww=0;wwfill_recoAssociated_simTrack_histos(w,*tp,momentumTP,vertexTP,dxySim,dzSim,nSimHits,matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU); + histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,*tp,momentumTP,vertexTP,dxySim,dzSim,nSimHits,matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU,dR); sts++; if (matchedTrackPointer) asts++; @@ -390,6 +429,20 @@ void MultiTrackValidator::analyze(const edm::Event& event, const edm::EventSetup } //end dE/dx + + //calculate dR for tracks + std::vector dR_trk; + for(View::size_type i=0; isize(); ++i){ + RefToBase track(trackCollection, i); + double dR = std::numeric_limits::max(); + for(View::size_type j=0; jsize(); ++j){ + RefToBase track2(trackCollectionForDrCalculation, j); + double dR_tmp = reco::deltaR(*track,*track2); + if (dR_tmpstd::numeric_limits::min()) dR=dR_tmp; + } + dR_trk.push_back(dR); + } + for(View::size_type i=0; isize(); ++i){ RefToBase track(trackCollection, i); @@ -430,8 +483,8 @@ void MultiTrackValidator::analyze(const edm::Event& event, const edm::EventSetup << " NOT associated to any TrackingParticle" << "\n"; } - - histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction); + double dR=dR_trk[i]; + histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isSimMatched,isSigSimMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction,dR); // dE/dx // reco::TrackRef track2 = reco::TrackRef( trackCollection, i ); diff --git a/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc b/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc index ea75abe5e3db4..73131f7c4a64c 100644 --- a/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc +++ b/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc @@ -345,7 +345,8 @@ void MultiTrackValidatorGenPs::analyze(const edm::Event& event, const edm::Event } - histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isGenMatched,isSigGenMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction); + double dR=0;//fxime + histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isGenMatched,isSigGenMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction,dR); // dE/dx // reco::TrackRef track2 = reco::TrackRef( trackCollection, i ); diff --git a/Validation/RecoTrack/plugins/TrackerSeedValidator.cc b/Validation/RecoTrack/plugins/TrackerSeedValidator.cc index 63a9dbc792eec..42ec18920820b 100644 --- a/Validation/RecoTrack/plugins/TrackerSeedValidator.cc +++ b/Validation/RecoTrack/plugins/TrackerSeedValidator.cc @@ -261,8 +261,9 @@ void TrackerSeedValidator::analyze(const edm::Event& event, const edm::EventSetu matchedTrackPointer->setHitPattern(matchedSeedPointer->recHits().first,matchedSeedPointer->recHits().second); } + double dR=0;//fixme histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,*tp,tp->momentum(),tp->vertex(),dxySim,dzSim,nSimHits, - matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU); + matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU,dR); sts++; if (matchedTrackPointer) asts++; @@ -345,9 +346,10 @@ void TrackerSeedValidator::analyze(const edm::Event& event, const edm::EventSetu edm::LogVerbatim("SeedValidator") << "TrajectorySeed #" << rT << " NOT associated to any TrackingParticle" << "\n"; } + double dR = 0.;//fixme histoProducerAlgo_->fill_generic_recoTrack_histos(w,*trackFromSeed,bs.position(),isSimMatched,isSigSimMatched, isChargeMatched, numAssocSeeds, puinfo.getPU_NumInteractions(), - tpbx, nSimHits, sharedFraction); + tpbx, nSimHits, sharedFraction, dR); //Fill other histos try{ diff --git a/Validation/RecoTrack/python/MTVHistoProducerAlgoForTrackerBlock_cfi.py b/Validation/RecoTrack/python/MTVHistoProducerAlgoForTrackerBlock_cfi.py index 7803f7f5528cf..d2d09c5bcea85 100644 --- a/Validation/RecoTrack/python/MTVHistoProducerAlgoForTrackerBlock_cfi.py +++ b/Validation/RecoTrack/python/MTVHistoProducerAlgoForTrackerBlock_cfi.py @@ -69,6 +69,11 @@ minZpos = cms.double(-30), maxZpos = cms.double(30), nintZpos = cms.int32(60), + # + # dR + mindr = cms.double(0.001), + maxdr = cms.double(1), + nintdr = cms.int32(100), # Pileup vertices minVertcount = cms.double(-0.5), diff --git a/Validation/RecoTrack/python/MultiTrackValidator_cfi.py b/Validation/RecoTrack/python/MultiTrackValidator_cfi.py index 747af30d42764..c261563a27883 100644 --- a/Validation/RecoTrack/python/MultiTrackValidator_cfi.py +++ b/Validation/RecoTrack/python/MultiTrackValidator_cfi.py @@ -57,4 +57,7 @@ ### output configuration dirName = cms.string('Tracking/Track/'), outputFile = cms.string(''), + + ### for fake rate vs dR ### + trackCollectionForDrCalculation = cms.InputTag("generalTracks") ) diff --git a/Validation/RecoTrack/python/PostProcessorTracker_cfi.py b/Validation/RecoTrack/python/PostProcessorTracker_cfi.py index 351a15e91521e..2a11dedb6d05a 100644 --- a/Validation/RecoTrack/python/PostProcessorTracker_cfi.py +++ b/Validation/RecoTrack/python/PostProcessorTracker_cfi.py @@ -23,6 +23,7 @@ "chargeMisIdRate_dz 'Charge MisID Rate vs Dz' num_chargemisid_versus_dz num_reco_dz", "effic_vs_vertpos 'Efficiency vs vertpos' num_assoc(simToReco)_vertpos num_simul_vertpos", "effic_vs_zpos 'Efficiency vs zpos' num_assoc(simToReco)_zpos num_simul_zpos", + "effic_vs_dr 'Efficiency vs dr' num_assoc(simToReco)_dr num_simul_dr", "effic_vertcount_barrel 'efficiency in barrel vs N of pileup vertices' num_assoc(simToReco)_vertcount_barrel num_simul_vertcount_barrel", "effic_vertcount_fwdpos 'efficiency in endcap(+) vs N of pileup vertices' num_assoc(simToReco)_vertcount_fwdpos num_simul_vertcount_fwdpos", "effic_vertcount_fwdneg 'efficiency in endcap(-) vs N of pileup vertices' num_assoc(simToReco)_vertcount_fwdneg num_simul_vertcount_fwdneg", @@ -35,6 +36,7 @@ "fakerate_vs_phi 'Fake rate vs phi' num_assoc(recoToSim)_phi num_reco_phi fake", "fakerate_vs_dxy 'Fake rate vs dxy' num_assoc(recoToSim)_dxy num_reco_dxy fake", "fakerate_vs_dz 'Fake rate vs dz' num_assoc(recoToSim)_dz num_reco_dz fake", + "fakerate_vs_dr 'Fake rate vs dr' num_assoc(recoToSim)_dr num_reco_dr fake", "fakerate_vertcount_barrel 'fake rate in barrel vs N of pileup vertices' num_assoc(recoToSim)_vertcount_barrel num_reco_vertcount_barrel fake", "fakerate_vertcount_fwdpos 'fake rate in endcap(+) vs N of pileup vertices' num_assoc(recoToSim)_vertcount_fwdpos num_reco_vertcount_fwdpos fake", "fakerate_vertcount_fwdneg 'fake rate in endcap(-) vs N of pileup vertices' num_assoc(recoToSim)_vertcount_fwdneg num_reco_vertcount_fwdneg fake" diff --git a/Validation/RecoTrack/src/MTVHistoProducerAlgo.cc b/Validation/RecoTrack/src/MTVHistoProducerAlgo.cc index 17cff53ec4bcf..aaa253c21d206 100644 --- a/Validation/RecoTrack/src/MTVHistoProducerAlgo.cc +++ b/Validation/RecoTrack/src/MTVHistoProducerAlgo.cc @@ -44,8 +44,30 @@ void MTVHistoProducerAlgo::fillPlotFromVectors(MonitorElement* h, } } - - +void MTVHistoProducerAlgo::fillPlotFromPlots(MonitorElement* h, + TH1* numerator, + TH1* denominator, + std::string type){ + assert(h->getNbinsX()==numerator->GetNbinsX()); + assert(h->getNbinsX()==denominator->GetNbinsX()); + double value,err; + for (int bin=1;bin<=h->getNbinsX();++bin) { + if (denominator->GetBinContent(bin)!=0) { + if (type=="effic"){ + value = ((double) numerator->GetBinContent(bin))/((double) denominator->GetBinContent(bin)); + err = sqrt( value*(1.-value)/((double) denominator->GetBinContent(bin)) ); + } else if (type=="fakerate"){ + value = 1.-((double) numerator->GetBinContent(bin))/((double) denominator->GetBinContent(bin)); + err = sqrt( value*(1.-value)/(double)denominator->GetBinContent(bin) ); + } else if (type=="pileup"){ + value = ((double) numerator->GetBinContent(bin))/((double) denominator->GetBinContent(bin)); + err = sqrt( value*(1.+value)/(double) denominator->GetBinContent(bin) ); + } else return; + h->setBinContent(bin,value); + h->setBinError(bin,err); + } + } +} void MTVHistoProducerAlgo::BinLogX(TH1*h){ TAxis *axis = h->GetXaxis(); diff --git a/Validation/RecoTrack/src/MTVHistoProducerAlgoForTracker.cc b/Validation/RecoTrack/src/MTVHistoProducerAlgoForTracker.cc index 48f78cfc8c60c..fc026ae5c18d7 100644 --- a/Validation/RecoTrack/src/MTVHistoProducerAlgoForTracker.cc +++ b/Validation/RecoTrack/src/MTVHistoProducerAlgoForTracker.cc @@ -62,6 +62,11 @@ MTVHistoProducerAlgoForTracker::MTVHistoProducerAlgoForTracker(const edm::Parame maxZpos = pset.getParameter("maxZpos"); nintZpos = pset.getParameter("nintZpos"); + //parameters for _vs_dR plots + mindr = pset.getParameter("mindr"); + maxdr = pset.getParameter("maxdr"); + nintdr = pset.getParameter("nintdr"); + //parameters for dE/dx plots minDeDx = pset.getParameter("minDeDx"); maxDeDx = pset.getParameter("maxDeDx"); @@ -474,6 +479,14 @@ void MTVHistoProducerAlgoForTracker::bookRecoHistos(DQMStore::IBooker& ibook){ nintZpos,minZpos,maxZpos) ); h_simulzpos.push_back( ibook.book1D("num_simul_zpos","N of simulated tracks vs z vert position",nintZpos,minZpos,maxZpos) ); + h_recodr.push_back( ibook.book1D("num_reco_dr","N of reconstructed tracks vs dR",nintdr,log10(mindr),log10(maxdr)) ); + h_assocdr.push_back( ibook.book1D("num_assoc(simToReco)_dr","N of associated tracks (simToReco) vs dR",nintdr,log10(mindr),log10(maxdr)) ); + h_assoc2dr.push_back( ibook.book1D("num_assoc(recoToSim)_dr","N of associated tracks (recoToSim) vs dR",nintdr,log10(mindr),log10(maxdr)) ); + h_simuldr.push_back( ibook.book1D("num_simul_dr","N of simulated tracks vs dR",nintdr,log10(mindr),log10(maxdr)) ); + BinLogX(h_recodr.back()->getTH1F()); + BinLogX(h_assocdr.back()->getTH1F()); + BinLogX(h_assoc2dr.back()->getTH1F()); + BinLogX(h_simuldr.back()->getTH1F()); h_reco_vertcount_entire.push_back( ibook.book1D("num_reco_vertcount_entire","N of reco tracks vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); h_assoc_vertcount_entire.push_back( ibook.book1D("num_assoc(simToReco)_vertcount_entire","N of associated tracks (simToReco) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); @@ -688,6 +701,8 @@ void MTVHistoProducerAlgoForTracker::bookRecoHistosForStandaloneRunning(DQMStore h_effic_vs_dz.push_back( ibook.book1D("effic_vs_dz","effic vs dz",nintDz,minDz,maxDz) ); h_effic_vs_vertpos.push_back( ibook.book1D("effic_vs_vertpos","effic vs vertpos",nintVertpos,minVertpos,maxVertpos) ); h_effic_vs_zpos.push_back( ibook.book1D("effic_vs_zpos","effic vs zpos",nintZpos,minZpos,maxZpos) ); + h_effic_vs_dr.push_back( ibook.book1D("effic_vs_dr","effic vs dr",nintdr,log10(mindr),log10(maxdr)) ); + BinLogX(h_effic_vs_dr.back()->getTH1F()); h_effic_vertcount_entire.push_back( ibook.book1D("effic_vertcount_entire","efficiency vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); h_effic_vertcount_barrel.push_back( ibook.book1D("effic_vertcount_barrel","efficiency in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); h_effic_vertcount_fwdpos.push_back( ibook.book1D("effic_vertcount_fwdpos","efficiency in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); @@ -723,6 +738,8 @@ void MTVHistoProducerAlgoForTracker::bookRecoHistosForStandaloneRunning(DQMStore h_fakerate_ootpu_barrel.push_back( ibook.book1D("fakerate_ootpu_barrel","Out of time pileup fake rate in barrel vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); h_fakerate_ootpu_fwdpos.push_back( ibook.book1D("fakerate_ootpu_fwdpos","Out of time pileup fake rate in endcap(+) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); h_fakerate_ootpu_fwdneg.push_back( ibook.book1D("fakerate_ootpu_fwdneg","Out of time pileup fake rate in endcap(-) vs N of pileup vertices",nintVertcount,minVertcount,maxVertcount) ); + h_fakerate_vs_dr.push_back( ibook.book1D("fakerate_vs_dr","fakerate vs dr",nintdr,log10(mindr),log10(maxdr)) ); + BinLogX(h_fakerate_vs_dr.back()->getTH1F()); h_fomt_eta.push_back( ibook.book1D("fomt","fraction of misreconstructed tracks vs #eta",nintEta,minEta,maxEta) ); h_fomt_sig_eta.push_back( ibook.book1D("fomt_signal","fraction of misreconstructed tracks vs #eta",nintEta,minEta,maxEta) ); @@ -840,7 +857,7 @@ void MTVHistoProducerAlgoForTracker::fill_recoAssociated_simTrack_histos(int cou const TrackingParticle::Point& vertexTP, double dxySim, double dzSim, int nSimHits, const reco::Track* track, - int numVertices, double vertz){ + int numVertices, double vertz, double dR){ bool isMatched = track; if((*TpSelectorForEfficiencyVsEta)(tp)){ @@ -864,6 +881,10 @@ void MTVHistoProducerAlgoForTracker::fill_recoAssociated_simTrack_histos(int cou } // END for (unsigned int f=0; fFill(min(max(dR,h_simuldr[count]->getTH1()->GetXaxis()->GetXmin()),h_simuldr[count]->getTH1()->GetXaxis()->GetXmax())); + if (isMatched) h_assocdr[count]->Fill(min(max(dR,h_simuldr[count]->getTH1()->GetXaxis()->GetXmin()),h_simuldr[count]->getTH1()->GetXaxis()->GetXmax())); + //effic vs num pileup vertices for (unsigned int f=0; fdzintervals[count][f]&& @@ -1036,10 +1058,11 @@ void MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(int count, bool isMatched, bool isSigMatched, bool isChargeMatched, - int numAssocRecoTracks, - int numVertices, - int tpbunchcrossing, int nSimHits, - double sharedFraction){ + int numAssocRecoTracks, + int numVertices, + int tpbunchcrossing, int nSimHits, + double sharedFraction, + double dR){ //Fill track algo histogram @@ -1166,6 +1189,10 @@ void MTVHistoProducerAlgoForTracker::fill_generic_recoTrack_histos(int count, } + //fakerate vs dR + h_recodr[count]->Fill(min(max(dR,h_recodr[count]->getTH1()->GetXaxis()->GetXmin()),h_recodr[count]->getTH1()->GetXaxis()->GetXmax())); + if (isMatched) h_assoc2dr[count]->Fill(min(max(dR,h_recodr[count]->getTH1()->GetXaxis()->GetXmin()),h_recodr[count]->getTH1()->GetXaxis()->GetXmax())); + } @@ -1540,6 +1567,8 @@ void MTVHistoProducerAlgoForTracker::finalHistoFits(int counter){ fillPlotFromVectors(h_misidratedz[counter],totmisid_dz[counter],totREC_dz[counter],"effic"); fillPlotFromVectors(h_effic_vs_vertpos[counter],totASS_vertpos[counter],totSIM_vertpos[counter],"effic"); fillPlotFromVectors(h_effic_vs_zpos[counter],totASS_zpos[counter],totSIM_zpos[counter],"effic"); + fillPlotFromPlots(h_effic_vs_dr[counter],h_assocdr[counter]->getTH1(),h_simuldr[counter]->getTH1(),"effic"); + fillPlotFromPlots(h_fakerate_vs_dr[counter],h_assoc2dr[counter]->getTH1(),h_recodr[counter]->getTH1(),"fakerate"); fillPlotFromVectors(h_effic_vertcount_entire[counter],totASS_vertcount_entire[counter],totSIM_vertcount_entire[counter],"effic"); fillPlotFromVectors(h_effic_vertcount_barrel[counter],totASS_vertcount_barrel[counter],totSIM_vertcount_barrel[counter],"effic"); fillPlotFromVectors(h_effic_vertcount_fwdpos[counter],totASS_vertcount_fwdpos[counter],totSIM_vertcount_fwdpos[counter],"effic");