|
|
#include <MuonTrackValidator.h>
|
typedef dqm::reco::DQMStore | DQMStore |
|
typedef dqm::reco::MonitorElement | MonitorElement |
|
using | CacheTypes = CacheContexts< T... > |
|
using | GlobalCache = typename CacheTypes::GlobalCache |
|
using | HasAbility = AbilityChecker< T... > |
|
using | InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache |
|
using | LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache |
|
using | LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > |
|
using | LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache |
|
using | RunCache = typename CacheTypes::RunCache |
|
using | RunContext = RunContextT< RunCache, GlobalCache > |
|
using | RunSummaryCache = typename CacheTypes::RunSummaryCache |
|
static void | globalEndJob (DQMEDAnalyzerGlobalCache const *) |
|
static void | globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context) |
|
static void | globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context) |
|
static std::unique_ptr< DQMEDAnalyzerGlobalCache > | initializeGlobalCache (edm::ParameterSet const &) |
|
uint64_t | meId () const |
|
void | BinLogX (TH1 *h) |
|
void | doProfileX (MonitorElement *th2m, MonitorElement *me) |
|
void | doProfileX (TH2 *th2, MonitorElement *me) |
|
template<typename T > |
void | fillPlotNoFlow (MonitorElement *h, T val) |
|
double | getEta (double eta) |
|
double | getPt (double pt) |
|
| MuonTrackValidatorBase (const edm::ParameterSet &pset) |
|
| MuonTrackValidatorBase (const edm::ParameterSet &pset, edm::ConsumesCollector iC) |
| Constructor. More...
|
|
virtual | ~MuonTrackValidatorBase () noexcept(false) |
| Destructor. More...
|
|
edm::EDPutTokenT< DQMToken > | lumiToken_ |
|
edm::EDPutTokenT< DQMToken > | runToken_ |
|
unsigned int | streamId_ |
|
std::vector< std::string > | associators |
|
edm::InputTag | bsSrc |
|
edm::EDGetTokenT< reco::BeamSpot > | bsSrc_Token |
|
std::vector< MonitorElement * > | chi2_vs_eta |
|
std::vector< MonitorElement * > | chi2_vs_nhits |
|
std::vector< MonitorElement * > | chi2_vs_phi |
|
int | cotThetaRes_nbin |
|
double | cotThetaRes_rangeMax |
|
double | cotThetaRes_rangeMin |
|
bool | do_MUOhitsPlots |
|
bool | do_TRKhitsPlots |
|
std::vector< MonitorElement * > | dxypull_vs_eta |
|
int | dxyRes_nbin |
|
double | dxyRes_rangeMax |
|
double | dxyRes_rangeMin |
|
std::vector< MonitorElement * > | dxyres_vs_eta |
|
std::vector< MonitorElement * > | dxyres_vs_pt |
|
std::vector< MonitorElement * > | dzpull_vs_eta |
|
int | dzRes_nbin |
|
double | dzRes_rangeMax |
|
double | dzRes_rangeMin |
|
std::vector< MonitorElement * > | dzres_vs_eta |
|
std::vector< MonitorElement * > | dzres_vs_pt |
|
int | etaRes_nbin |
|
double | etaRes_rangeMax |
|
double | etaRes_rangeMin |
|
std::vector< MonitorElement * > | etares_vs_eta |
|
std::vector< MonitorElement * > | h_assoc2dxy |
|
std::vector< MonitorElement * > | h_assoc2dz |
|
std::vector< MonitorElement * > | h_assoc2eta |
|
std::vector< MonitorElement * > | h_assoc2hit |
|
std::vector< MonitorElement * > | h_assoc2phi |
|
std::vector< MonitorElement * > | h_assoc2pT |
|
std::vector< MonitorElement * > | h_assoc2pu |
|
std::vector< MonitorElement * > | h_assocdxy |
|
std::vector< MonitorElement * > | h_assocdz |
|
std::vector< MonitorElement * > | h_assoceta |
|
std::vector< MonitorElement * > | h_assocFraction |
|
std::vector< MonitorElement * > | h_assochi2 |
|
std::vector< MonitorElement * > | h_assochi2_prob |
|
std::vector< MonitorElement * > | h_assochit |
|
std::vector< MonitorElement * > | h_assocphi |
|
std::vector< MonitorElement * > | h_assocpT |
|
std::vector< MonitorElement * > | h_assocpu |
|
std::vector< MonitorElement * > | h_assocRpos |
|
std::vector< MonitorElement * > | h_assocSharedHit |
|
std::vector< MonitorElement * > | h_assocZpos |
|
std::vector< MonitorElement * > | h_charge |
|
std::vector< MonitorElement * > | h_dxypull |
|
std::vector< MonitorElement * > | h_dxypulleta |
|
std::vector< MonitorElement * > | h_dzpull |
|
std::vector< MonitorElement * > | h_dzpulleta |
|
std::vector< MonitorElement * > | h_etaRes |
|
std::vector< MonitorElement * > | h_fakes |
|
std::vector< MonitorElement * > | h_losthits |
|
std::vector< MonitorElement * > | h_misiddxy |
|
std::vector< MonitorElement * > | h_misiddz |
|
std::vector< MonitorElement * > | h_misideta |
|
std::vector< MonitorElement * > | h_misidhit |
|
std::vector< MonitorElement * > | h_misidphi |
|
std::vector< MonitorElement * > | h_misidpT |
|
std::vector< MonitorElement * > | h_misidpu |
|
std::vector< MonitorElement * > | h_nchi2 |
|
std::vector< MonitorElement * > | h_nchi2_prob |
|
std::vector< MonitorElement * > | h_nhits |
|
std::vector< MonitorElement * > | h_nlosthits |
|
std::vector< MonitorElement * > | h_nmisslayers_inner |
|
std::vector< MonitorElement * > | h_nmisslayers_outer |
|
std::vector< MonitorElement * > | h_phipull |
|
std::vector< MonitorElement * > | h_phipulleta |
|
std::vector< MonitorElement * > | h_phipullphi |
|
std::vector< MonitorElement * > | h_ptpull |
|
std::vector< MonitorElement * > | h_ptpulleta |
|
std::vector< MonitorElement * > | h_ptpullphi |
|
std::vector< MonitorElement * > | h_PurityVsQuality |
|
std::vector< MonitorElement * > | h_qoverppull |
|
std::vector< MonitorElement * > | h_recodxy |
|
std::vector< MonitorElement * > | h_recodz |
|
std::vector< MonitorElement * > | h_recoeta |
|
std::vector< MonitorElement * > | h_recohit |
|
std::vector< MonitorElement * > | h_recophi |
|
std::vector< MonitorElement * > | h_recopT |
|
std::vector< MonitorElement * > | h_recopu |
|
std::vector< MonitorElement * > | h_simuldxy |
|
std::vector< MonitorElement * > | h_simuldz |
|
std::vector< MonitorElement * > | h_simuleta |
|
std::vector< MonitorElement * > | h_simulhit |
|
std::vector< MonitorElement * > | h_simulphi |
|
std::vector< MonitorElement * > | h_simulpT |
|
std::vector< MonitorElement * > | h_simulpu |
|
std::vector< MonitorElement * > | h_simulRpos |
|
std::vector< MonitorElement * > | h_simulZpos |
|
std::vector< MonitorElement * > | h_thetapull |
|
std::vector< MonitorElement * > | h_thetapulleta |
|
std::vector< MonitorElement * > | h_thetapullphi |
|
std::vector< MonitorElement * > | h_tracks |
|
bool | ignoremissingtkcollection_ |
|
std::vector< edm::InputTag > | label |
|
edm::InputTag | label_pileupinfo |
|
edm::InputTag | label_tp |
|
bool | label_tp_refvector |
|
double | maxCSCHit |
|
double | maxDTHit |
|
double | maxDxy |
|
double | maxDz |
|
double | maxEta |
|
int | maxFTracks |
|
double | maxLayers |
|
double | maxNHit |
|
int | maxNTracks |
|
double | maxPhi |
|
double | maxPixels |
|
double | maxPt |
|
double | maxPU |
|
double | maxRPCHit |
|
double | maxRpos |
|
double | maxZpos |
|
double | minCSCHit |
|
double | minDTHit |
|
double | minDxy |
|
double | minDz |
|
double | minEta |
|
int | minFTracks |
|
double | minLayers |
|
double | minNHit |
|
int | minNTracks |
|
double | minPhi |
|
double | minPixels |
|
double | minPt |
|
double | minPU |
|
double | minRPCHit |
|
double | minRpos |
|
double | minZpos |
|
edm::ParameterSet | muonHistoParameters |
|
std::vector< MonitorElement * > | nCSChits_vs_eta |
|
std::vector< MonitorElement * > | nDThits_vs_eta |
|
std::vector< MonitorElement * > | nGEMhits_vs_eta |
|
std::vector< MonitorElement * > | nhits_vs_eta |
|
std::vector< MonitorElement * > | nhits_vs_phi |
|
int | nintCSCHit |
|
int | nintDTHit |
|
int | nintDxy |
|
int | nintDz |
|
int | nintEta |
|
int | nintFTracks |
|
int | nintLayers |
|
int | nintNHit |
|
int | nintNTracks |
|
int | nintPhi |
|
int | nintPixels |
|
int | nintPt |
|
int | nintPU |
|
int | nintRPCHit |
|
int | nintRpos |
|
int | nintZpos |
|
std::vector< MonitorElement * > | nlosthits_vs_eta |
|
std::vector< MonitorElement * > | nME0hits_vs_eta |
|
std::vector< MonitorElement * > | nPixel_LayersWithMeas_vs_eta |
|
std::vector< MonitorElement * > | nRecHits_vs_nSimHits |
|
std::vector< MonitorElement * > | nRPChits_vs_eta |
|
std::vector< MonitorElement * > | nTRK_LayersWithMeas_vs_eta |
|
std::string | out |
|
std::string | parametersDefiner |
|
std::vector< MonitorElement * > | phipull_vs_eta |
|
std::vector< MonitorElement * > | phipull_vs_phi |
|
int | phiRes_nbin |
|
double | phiRes_rangeMax |
|
double | phiRes_rangeMin |
|
std::vector< MonitorElement * > | phires_vs_eta |
|
std::vector< MonitorElement * > | phires_vs_phi |
|
std::vector< MonitorElement * > | phires_vs_pt |
|
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > | pileupinfo_Token |
|
std::vector< MonitorElement * > | ptpull_vs_eta |
|
std::vector< MonitorElement * > | ptpull_vs_phi |
|
int | ptRes_nbin |
|
double | ptRes_rangeMax |
|
double | ptRes_rangeMin |
|
std::vector< MonitorElement * > | ptres_vs_eta |
|
std::vector< MonitorElement * > | ptres_vs_phi |
|
std::vector< MonitorElement * > | ptres_vs_pt |
|
edm::ESHandle< MagneticField > | theMF |
|
std::vector< MonitorElement * > | thetaCotres_vs_eta |
|
std::vector< MonitorElement * > | thetaCotres_vs_pt |
|
std::vector< MonitorElement * > | thetapull_vs_eta |
|
std::vector< MonitorElement * > | thetapull_vs_phi |
|
edm::EDGetTokenT< TrackingParticleRefVector > | tp_refvector_Token |
|
edm::EDGetTokenT< TrackingParticleCollection > | tp_Token |
|
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > | track_Collection_Token |
|
bool | useFabsEta |
|
bool | useInvPt |
|
bool | useLogPt |
|
bool | usemuon |
|
bool | usetracker |
|
Class that produces histograms to validate Muon Track Reconstruction performances
Definition at line 26 of file MuonTrackValidator.h.
◆ MuonTrackValidator()
Constructor.
Definition at line 29 of file MuonTrackValidator.h.
42 tpset.getParameter<
double>(
"ptMax"),
43 tpset.getParameter<
double>(
"minRapidity"),
44 tpset.getParameter<
double>(
"maxRapidity"),
45 tpset.getParameter<
double>(
"tip"),
46 tpset.getParameter<
double>(
"lip"),
47 tpset.getParameter<
int>(
"minHit"),
48 tpset.getParameter<
bool>(
"signalOnly"),
49 tpset.getParameter<
bool>(
"intimeOnly"),
50 tpset.getParameter<
bool>(
"chargedOnly"),
51 tpset.getParameter<
bool>(
"stableOnly"),
52 tpset.getParameter<std::vector<int> >(
"pdgId"));
55 tpset.getParameter<
double>(
"minRapidity"),
56 tpset.getParameter<
double>(
"maxRapidity"),
57 tpset.getParameter<
double>(
"tip"),
58 tpset.getParameter<
double>(
"lip"),
59 tpset.getParameter<
int>(
"minHit"),
60 tpset.getParameter<
bool>(
"chargedOnly"),
61 tpset.getParameter<std::vector<int> >(
"pdgId"));
75 for (
unsigned int www = 0; www <
label.size(); www++) {
81 _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
101 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n usetracker = TRUE : Tracker SimHits WILL be counted";
103 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n usetracker = FALSE : Tracker SimHits WILL NOT be counted";
105 edm::LogVerbatim(
"MuonTrackValidator") <<
" usemuon = TRUE : Muon SimHits WILL be counted";
107 edm::LogVerbatim(
"MuonTrackValidator") <<
" usemuon = FALSE : Muon SimHits WILL NOT be counted" << std::endl;
110 for (
unsigned int www = 0; www <
label.size(); www++) {
115 if (recoTracksLabel ==
"generalTracks" || recoTracksLabel ==
"probeTracks" ||
116 recoTracksLabel ==
"displacedTracks" || recoTracksLabel ==
"extractGemMuons" ||
117 recoTracksLabel ==
"extractMe0Muons" || recoTracksLabel ==
"ctfWithMaterialTracksP5LHCNavigation" ||
118 recoTracksLabel ==
"ctfWithMaterialTracksP5" ||
119 recoTracksLabel ==
"hltIterL3OIMuonTrackSelectionHighPurity" || recoTracksLabel ==
"hltIterL3MuonMerged" ||
120 recoTracksLabel ==
"hltIterL3MuonAndMuonFromL1Merged") {
123 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usemuon == true"
124 <<
"\n ---> resetting to usemuon == false ";
129 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usetracker == false"
130 <<
"\n ---> resetting to usetracker == true ";
136 else if (recoTracksLabel ==
"seedsOfSTAmuons" || recoTracksLabel ==
"standAloneMuons" ||
137 recoTracksLabel ==
"seedsOfDisplacedSTAmuons" || recoTracksLabel ==
"displacedStandAloneMuons" ||
138 recoTracksLabel ==
"refittedStandAloneMuons" || recoTracksLabel ==
"cosmicMuons" ||
139 recoTracksLabel ==
"cosmicMuons1Leg" || recoTracksLabel ==
"hltL2Muons") {
142 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usetracker == true"
143 <<
"\n ---> resetting to usetracker == false ";
148 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usemuon == false"
149 <<
"\n ---> resetting to usemuon == true ";
References _simHitTpMapTag, LCToCPAssociation_cfi::associator, associatormap, MuonTrackValidatorBase::associators, BiDirectional_RecoToSim_association, MuonTrackValidatorBase::bsSrc, MuonTrackValidatorBase::bsSrc_Token, cosmictpSelector, dirName_, edm::InputTag::label(), MuonTrackValidatorBase::label, MuonTrackValidatorBase::label_pileupinfo, MuonTrackValidatorBase::label_tp, MuonTrackValidatorBase::label_tp_refvector, MABH, MuonTrackValidatorBase::pileupinfo_Token, muonDTDigis_cfi::pset, recoToSimCollection_Token, simToRecoCollection_Token, AlCaHLTBitMon_QueryRunRegistry::string, MuonTrackValidatorBase::tp_refvector_Token, MuonTrackValidatorBase::tp_Token, tpSelector, MuonTrackValidatorBase::track_Collection_Token, UseAssociators, useGEMs_, useME0_, MuonTrackValidatorBase::usemuon, and MuonTrackValidatorBase::usetracker.
◆ ~MuonTrackValidator()
MuonTrackValidator::~MuonTrackValidator |
( |
| ) |
|
|
inlineoverride |
◆ analyze()
Reimplemented from DQMEDAnalyzer.
Definition at line 359 of file MuonTrackValidator.cc.
360 using namespace reco;
362 edm::LogInfo(
"MuonTrackValidator") <<
"\n===================================================="
364 <<
"Analyzing new event"
366 <<
"====================================================\n"
370 int PU_NumInteractions(-1);
374 std::unique_ptr<ParametersDefinerForTP> Cosmic_parametersDefinerTP;
381 for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
383 if (puInfoIt->getBunchCrossing() == 0) {
384 PU_NumInteractions = puInfoIt->getPU_NumInteractions();
394 Cosmic_parametersDefinerTP = _Cosmic_parametersDefinerTP->
clone();
399 Cosmic_parametersDefinerTP->initEvent(simHitsTPAssoc);
413 ptr_TPrefV = TPCollectionRefVector_H.
product();
415 event.getByToken(
tp_Token, TPCollection_H);
416 size_t nTP = TPCollection_H->size();
417 for (
size_t i = 0;
i < nTP; ++
i) {
420 ptr_TPrefV = &TPrefV;
425 bool bs_Available =
event.getByToken(
bsSrc_Token, recoBeamSpotHandle);
428 bs = *recoBeamSpotHandle;
431 std::vector<const reco::TrackToTrackingParticleAssociator*>
associator;
441 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
442 for (
unsigned int www = 0; www <
label.size(); www++) {
447 unsigned int trackCollectionSize = 0;
464 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
467 LogTrace(
"MuonTrackValidator") <<
"Calling associateRecoToSim method"
470 LogTrace(
"MuonTrackValidator") <<
"Calling associateSimToReco method"
475 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
481 simRecColl = *simtorecoCollectionH.
product();
485 recSimColl = *recotosimCollectionH.
product();
496 for (
size_t i = 0;
i < tPC.
size();
i++) {
497 bool TP_is_matched =
false;
498 bool isChargeOK =
true;
512 LogTrace(
"MuonTrackValidator") <<
"TrackingParticle " <<
i;
515 momentumTP =
tp.momentum();
516 vertexTP =
tp.vertex();
527 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
528 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
536 nSimHits = tpr.
get()->numberOfHits();
538 nSimHits = tpr.
get()->numberOfHits() - tpr.
get()->numberOfTrackerHits();
540 nSimHits = tpr.
get()->numberOfTrackerHits();
543 edm::LogVerbatim(
"MuonTrackValidator") <<
"--------------------Selected TrackingParticle #" << tpr.
key()
544 <<
" (N counted simhits = " << nSimHits <<
")";
546 <<
"momentumTP: pt = " <<
sqrt(momentumTP.perp2()) <<
", pz = " << momentumTP.z()
547 <<
", \t vertexTP: radius = " <<
sqrt(vertexTP.perp2()) <<
", z = " << vertexTP.z();
550 double TPeta = momentumTP.eta();
551 double xTPeta =
getEta(TPeta);
552 double TPpt =
sqrt(momentumTP.perp2());
553 double xTPpt =
getPt(TPpt);
554 double TPphi = momentumTP.phi();
555 double TPrpos =
sqrt(vertexTP.perp2());
556 double TPzpos = vertexTP.z();
558 int assoc_recoTrack_NValidHits = 0;
559 if (simRecColl.
find(tpr) != simRecColl.
end()) {
560 auto const&
rt = simRecColl[tpr];
563 TP_is_matched =
true;
565 if (assoc_recoTrack->
charge() != tpr->charge())
569 edm::LogVerbatim(
"MuonTrackValidator") <<
"-----------------------------associated to Track #"
570 << assoc_recoTrack.
key() <<
" with quality:" <<
quality <<
"\n";
574 <<
"TrackingParticle #" << tpr.
key() <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2()) <<
" , "
575 << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , "
576 <<
" NOT associated to any reco::Track"
654 <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label() <<
":"
655 <<
label[www].instance() <<
": " << trackCollectionSize <<
"\n";
660 bool Track_is_matched =
false;
661 bool isChargeOK =
true;
663 int nRecHits =
track->numberOfValidHits();
666 std::vector<std::pair<TrackingParticleRef, double> >
tp;
671 edm::LogVerbatim(
"MuonTrackValidator") <<
"----------------------------------------Track #" <<
track.key()
672 <<
" (N valid rechits = " << nRecHits <<
")";
677 tpr =
tp.begin()->first;
679 if (simRecColl.
find(tpr) != simRecColl.
end()) {
680 auto const& assoc_track_checkback = simRecColl[tpr].
begin()->first;
682 if (assoc_track_checkback.key() ==
track.key()) {
683 Track_is_matched =
true;
685 if (
track->charge() != tpr->charge())
687 double Purity =
tp.begin()->second;
690 <<
"with pt=" <<
track->pt() <<
" associated with purity:" << Purity <<
" to TrackingParticle #"
691 << tpr.
key() <<
"\n";
699 if (!Track_is_matched)
701 <<
"with pt=" <<
track->pt() <<
" NOT associated to any TrackingParticle"
709 tpr =
tp.begin()->first;
710 Track_is_matched =
true;
712 if (
track->charge() != tpr->charge())
715 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
719 <<
" NOT associated to any TrackingParticle"
724 double etaRec =
track->eta();
725 double xetaRec =
getEta(etaRec);
727 double ptRec =
track->pt();
728 double xptRec =
getPt(ptRec);
730 double qoverpRec =
track->qoverp();
731 double phiRec =
track->phi();
732 double thetaRec =
track->theta();
733 double dxyRec =
track->dxy(
bs.position());
734 double dzRec =
track->dz(
bs.position());
736 double qoverpError =
track->qoverpError();
737 double ptError =
track->ptError();
738 double thetaError =
track->thetaError();
740 double dxyError =
track->dxyError();
741 double dzError =
track->dzError();
745 if (Track_is_matched) {
751 if (Track_is_matched) {
757 if (Track_is_matched) {
763 if (Track_is_matched) {
769 if (Track_is_matched) {
775 if (Track_is_matched) {
784 if (Track_is_matched) {
807 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
808 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
814 double assocChi2 = -
tp.begin()->second;
817 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
856 double ptSim =
sqrt(momentumTP.perp2());
857 double xptSim =
getPt(ptSim);
858 double qoverpSim = tpr->charge() /
sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
859 momentumTP.z() * momentumTP.z());
860 double etaSim = momentumTP.eta();
861 double thetaSim = momentumTP.theta();
862 double phiSim = momentumTP.phi();
866 double etares = etaRec - etaSim;
867 double ptRelRes = (ptRec - ptSim) / ptSim;
868 double ptPull = (ptRec - ptSim) / ptError;
869 double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
870 double thetaPull = (thetaRec - thetaSim) / thetaError;
871 double phiDiff = phiRec - phiSim;
874 phiDiff = phiDiff - 2. *
M_PI;
876 phiDiff = phiDiff + 2. *
M_PI;
878 double phiPull = phiDiff /
phiError;
879 double dxyPull = (dxyRec - dxySim) / dxyError;
880 double dzPull = (dzRec - dzSim) / dzError;
916 double contrib_Qoverp = qoverpPull * qoverpPull / 5;
917 double contrib_dxy = dxyPull * dxyPull / 5;
918 double contrib_dz = dzPull * dzPull / 5;
919 double contrib_theta = thetaPull * thetaPull / 5;
920 double contrib_phi = phiPull * phiPull / 5;
921 double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
923 LogTrace(
"MuonTrackValidator") <<
"normalized Chi2 (track 5-dofs matching) = " << assoChi2 <<
"\n"
924 <<
"\t contrib_Qoverp = " << contrib_Qoverp <<
"\n"
925 <<
"\t contrib_theta = " << contrib_theta <<
"\n"
926 <<
"\t contrib_phi = " << contrib_phi <<
"\n"
927 <<
"\t contrib_dxy = " << contrib_dxy <<
"\n"
928 <<
"\t contrib_dz = " << contrib_dz <<
"\n";
930 LogTrace(
"MuonTrackValidator") <<
"ptRec = " << ptRec <<
"\n"
931 <<
"etaRec = " << etaRec <<
"\n"
932 <<
"qoverpRec = " << qoverpRec <<
"\n"
933 <<
"thetaRec = " << thetaRec <<
"\n"
934 <<
"phiRec = " << phiRec <<
"\n"
935 <<
"dxyRec = " << dxyRec <<
"\n"
936 <<
"dzRec = " << dzRec <<
"\n"
939 <<
"qoverpError = " << qoverpError <<
"\n"
940 <<
"thetaError = " << thetaError <<
"\n"
941 <<
"phiError = " <<
phiError <<
"\n"
942 <<
"dxyError = " << dxyError <<
"\n"
943 <<
"dzError = " << dzError <<
"\n"
946 <<
"ptSim = " << ptSim <<
"\n"
947 <<
"etaSim = " << etaSim <<
"\n"
948 <<
"qoverpSim = " << qoverpSim <<
"\n"
949 <<
"thetaSim = " << thetaSim <<
"\n"
950 <<
"phiSim = " << phiSim <<
"\n"
951 <<
"dxySim = " << dxySim <<
"\n"
952 <<
"dzSim = " << dzSim <<
"\n";
958 <<
"Total Associated (simToReco): " << ats <<
"\n"
959 <<
"Total Reconstructed: " << rT <<
"\n"
960 <<
"Total Associated (recoToSim): " << at <<
"\n"
961 <<
"Total Fakes: " << rT - at <<
"\n";
References funct::abs(), LCToCPAssociation_cfi::associator, muonValidationHeavyIons_cff::associatormap, MuonErrorMatrixAnalyzer_cfi::associatorName, trackTimeValueMapProducer_cfi::associators, edm::AssociationMap< Tag >::begin(), MuonTrackValidator_cfi::BiDirectional_RecoToSim_association, cms::cuda::bs, reco::TrackBase::charge(), CosmicParametersDefinerForTP::clone(), funct::cos(), histoParameters_cff::do_MUOhitsPlots, histoParameters_cff::do_TRKhitsPlots, TrackingParticleIP::dxy(), TrackingParticleIP::dz(), edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), HLT_FULL_cff::fraction, edm::Ref< C, T, F >::get(), mps_fire::i, createfilelist::int, edm::RefToBase< T >::key(), edm::Ref< C, T, F >::key(), label, MuonTrackValidator_cfi::label_tp_refvector, LogTrace, M_PI, associators_cff::MABH, reco::HitPattern::MISSING_INNER_HITS, reco::HitPattern::MISSING_OUTER_HITS, ParametersDefinerForTP::momentum(), reco::TrackBase::numberOfValidHits(), MuonTrackValidator_cfi::parametersDefiner, muonME0PseudoDigis_cfi::phiError, edm::AssociationMap< Tag >::post_insert(), edm::Handle< T >::product(), edm::RefVector< C, T, F >::push_back(), quality, hcal_runs::rt, singleTopDQM_cfi::setup, funct::sin(), edm::RefVector< C, T, F >::size(), mathSSE::sqrt(), cmsswSequenceInfo::tp, RecoMuonValidator_cfi::tpSelector, HLT_FULL_cff::track, duplicaterechits_cfi::trackCollection, TrackAlgoCompareUtil_cfi::UseAssociators, histoParameters_cff::usemuon, histoParameters_cff::usetracker, bphysicsOniaDQM_cfi::vertex, ParametersDefinerForTP::vertex(), and w.
◆ bookHistograms()
Implements DQMEDAnalyzer.
Definition at line 24 of file MuonTrackValidator.cc.
27 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
28 for (
unsigned int www = 0; www <
label.size(); www++) {
33 auto setBinLogX = [
this](TH1* th1) {
39 if (!
algo.process().empty())
41 if (!
algo.label().empty())
43 if (!
algo.instance().empty())
52 if (
assoc.find(
"tpToTkmuTrackAssociation") <
assoc.length()) {
61 h_charge.push_back(ibooker.
book1D(
"Ncharge",
"track charge", 3, -1.5, 1.5));
65 "num_assoSimToReco_eta",
"N of associated tracks (simToReco) vs eta",
nintEta,
minEta,
maxEta));
67 "num_assoRecoToSim_eta",
"N of associated (recoToSim) tracks vs eta",
nintEta,
minEta,
maxEta));
70 "N of associated (simToReco) tracks with charge misID vs eta",
77 "num_assoSimToReco_pT",
"N of associated tracks (simToReco) vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
79 "num_assoRecoToSim_pT",
"N of associated (recoToSim) tracks vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
83 "N of associated (simToReco) tracks with charge misID vs pT",
91 "num_assoSimToReco_phi",
"N of associated tracks (simToReco) vs phi",
nintPhi,
minPhi,
maxPhi));
93 "num_assoRecoToSim_phi",
"N of associated (recoToSim) tracks vs phi",
nintPhi,
minPhi,
maxPhi));
96 "N of associated (simToReco) tracks with charge misID vs phi",
109 "N of associated (recoToSim) tracks with charge misID vs N RecHits",
116 "num_assoSimToReco_dxy",
"N of associated tracks (simToReco) vs dxy",
nintDxy,
minDxy,
maxDxy));
118 "num_assoRecoToSim_dxy",
"N of associated (recoToSim) tracks vs dxy",
nintDxy,
minDxy,
maxDxy));
121 "N of associated (simToReco) tracks with charge misID vs dxy",
127 ibooker.
book1D(
"num_assoSimToReco_dz",
"N of associated tracks (simToReco) vs dz",
nintDz,
minDz,
maxDz));
129 ibooker.
book1D(
"num_assoRecoToSim_dz",
"N of associated (recoToSim) tracks vs dz",
nintDz,
minDz,
maxDz));
132 "num_chargemisid_dz",
"N of associated (simToReco) tracks with charge misID vs dz",
nintDz,
minDz,
maxDz));
145 ibooker.
book1D(
"num_assoSimToReco_pu",
"N of associated tracks (simToReco) vs pu",
nintPU,
minPU,
maxPU));
147 ibooker.
book1D(
"num_assoRecoToSim_pu",
"N of associated (recoToSim) tracks vs pu",
nintPU,
minPU,
maxPU));
150 "num_chargemisid_pu",
"N of associated (simToReco) charge misIDed tracks vs pu",
nintPU,
minPU,
maxPU));
152 h_nchi2.push_back(ibooker.
book1D(
"chi2",
"Track normalized #chi^{2}", 80, 0., 20.));
153 h_nchi2_prob.push_back(ibooker.
book1D(
"chi2prob",
"Probability of track normalized #chi^{2}", 100, 0., 1.));
183 "# TRK Layers with measurement vs eta",
191 "Number of Pixel Layers with measurement vs eta",
202 h_nlosthits.push_back(ibooker.
book1D(
"nlosthits",
"Number of lost hits per track", 6, -0.5, 5.5));
204 "nlosthits_vs_eta",
"Number of lost hits per track vs eta",
nintEta,
minEta,
maxEta, 6, -0.5, 5.5));
208 "p_{T} Relative Residual vs #eta",
216 "p_{T} Relative Residual vs #phi",
224 "p_{T} Relative Residual vs p_{T}",
232 h_ptpull.push_back(ibooker.
book1D(
"ptpull",
"p_{T} Pull", 100, -10., 10.));
241 "#eta Residual vs #eta",
250 "cot(#theta) Residual vs #eta",
258 "cot(#theta) Residual vs p_{T}",
266 h_thetapull.push_back(ibooker.
book1D(
"thetapull",
"#theta Pull", 100, -10., 10.));
273 "#phi Residual vs #eta",
281 "#phi Residual vs p_{T}",
290 "#phi Residual vs #phi",
297 h_phipull.push_back(ibooker.
book1D(
"phipull",
"#phi Pull", 100, -10., 10.));
304 "dxy Residual vs #eta",
312 "dxy Residual vs p_{T}",
320 h_dxypull.push_back(ibooker.
book1D(
"dxypull",
"dxy Pull", 100, -10., 10.));
327 "dz Residual vs p_{T}",
335 h_dzpull.push_back(ibooker.
book1D(
"dzpull",
"dz Pull", 100, -10., 10.));
344 ibooker.
book2D(
"PurityVsQuality",
"Purity vs Quality (MABH)", 20, 0.01, 1.01, 20, 0.01, 1.01));
348 h_assochi2.push_back(ibooker.
book1D(
"assocChi2",
"track association #chi^{2}", 1000, 0., 100.));
349 h_assochi2_prob.push_back(ibooker.
book1D(
"assocChi2_prob",
"probability of association #chi^{2}", 100, 0., 1.));
350 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
References trackingPlots::assoc, trackTimeValueMapProducer_cfi::associators, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), histoParameters_cff::cotThetaRes_nbin, histoParameters_cff::cotThetaRes_rangeMax, histoParameters_cff::cotThetaRes_rangeMin, TrackerOfflineValidation_Dqm_cff::dirName, histoParameters_cff::do_MUOhitsPlots, histoParameters_cff::do_TRKhitsPlots, histoParameters_cff::dxyRes_nbin, histoParameters_cff::dxyRes_rangeMax, histoParameters_cff::dxyRes_rangeMin, histoParameters_cff::dzRes_nbin, histoParameters_cff::dzRes_rangeMax, histoParameters_cff::dzRes_rangeMin, histoParameters_cff::etaRes_nbin, histoParameters_cff::etaRes_rangeMax, histoParameters_cff::etaRes_rangeMin, label, associators_cff::MABH, histoParameters_cff::maxCSCHit, histoParameters_cff::maxDTHit, gather_cfg::maxDxy, beam_dqm_sourceclient-live_cfg::maxDz, maxEta, histoParameters_cff::maxFTracks, histoParameters_cff::maxLayers, histoParameters_cff::maxNHit, HLT_FULL_cff::maxNTracks, HLT_FULL_cff::maxPhi, histoParameters_cff::maxPixels, L1TrackerEtMissProducer_cfi::maxPt, pileupFilter_cff::maxPU, histoParameters_cff::maxRPCHit, histoParameters_cff::maxRpos, HGVHistoProducerAlgoBlock_cfi::maxZpos, histoParameters_cff::minCSCHit, histoParameters_cff::minDTHit, histoParameters_cff::minDxy, pfMETCorrectionType0_cfi::minDz, EgHLTOffEleSelection_cfi::minEta, histoParameters_cff::minFTracks, beam_dqm_sourceclient-live_cfg::minLayers, histoParameters_cff::minNHit, histoParameters_cff::minNTracks, HLT_FULL_cff::minPhi, histoParameters_cff::minPixels, beam_dqm_sourceclient-live_cfg::minPt, pileupFilter_cff::minPU, histoParameters_cff::minRPCHit, histoParameters_cff::minRpos, HGVHistoProducerAlgoBlock_cfi::minZpos, histoParameters_cff::nintCSCHit, histoParameters_cff::nintDTHit, histoParameters_cff::nintDxy, histoParameters_cff::nintDz, HGVHistoProducerAlgoBlock_cfi::nintEta, histoParameters_cff::nintFTracks, histoParameters_cff::nintLayers, histoParameters_cff::nintNHit, histoParameters_cff::nintNTracks, HGVHistoProducerAlgoBlock_cfi::nintPhi, histoParameters_cff::nintPixels, HGVHistoProducerAlgoBlock_cfi::nintPt, histoParameters_cff::nintPU, histoParameters_cff::nintRPCHit, histoParameters_cff::nintRpos, HGVHistoProducerAlgoBlock_cfi::nintZpos, histoParameters_cff::phiRes_nbin, histoParameters_cff::phiRes_rangeMax, histoParameters_cff::phiRes_rangeMin, histoParameters_cff::ptRes_nbin, histoParameters_cff::ptRes_rangeMax, histoParameters_cff::ptRes_rangeMin, python.rootplot.root2matplotlib::replace(), dqm::implementation::NavigatorBase::setCurrentFolder(), and TrackValidationHeavyIons_cff::useLogPt.
◆ _simHitTpMapTag
◆ associatormap
◆ BiDirectional_RecoToSim_association
bool MuonTrackValidator::BiDirectional_RecoToSim_association |
|
private |
◆ cosmictpDefinerEsToken
◆ cosmictpSelector
◆ dirName_
std::string MuonTrackValidator::dirName_ |
|
private |
◆ MABH
bool MuonTrackValidator::MABH |
|
private |
◆ recoToSimCollection_Token
◆ simToRecoCollection_Token
◆ tpDefinerEsToken
◆ tpSelector
◆ UseAssociators
bool MuonTrackValidator::UseAssociators |
|
private |
◆ useGEMs_
bool MuonTrackValidator::useGEMs_ |
|
private |
◆ useME0_
bool MuonTrackValidator::useME0_ |
|
private |
std::vector< MonitorElement * > h_misiddz
std::vector< MonitorElement * > h_simulRpos
std::vector< MonitorElement * > chi2_vs_eta
std::vector< MonitorElement * > ptres_vs_phi
std::vector< MonitorElement * > ptres_vs_pt
std::vector< MonitorElement * > h_assocpT
std::vector< MonitorElement * > dzpull_vs_eta
std::vector< MonitorElement * > h_assocZpos
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< MonitorElement * > h_misidphi
std::vector< edm::InputTag > label
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimCollection_Token
std::vector< MonitorElement * > h_misidpu
T const * product() const
std::vector< MonitorElement * > h_misideta
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > dxypull_vs_eta
std::vector< MonitorElement * > h_misidhit
std::vector< MonitorElement * > h_assocpu
std::vector< MonitorElement * > h_simulZpos
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > h_simulpT
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< MonitorElement * > thetaCotres_vs_pt
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > nME0hits_vs_eta
T const * get() const
Returns C++ pointer to the item.
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > nPixel_LayersWithMeas_vs_eta
edm::EDGetTokenT< TrackingParticleCollection > tp_Token
std::vector< MonitorElement * > etares_vs_eta
std::vector< MonitorElement * > h_nlosthits
math::XYZVectorD Vector
point in the space
virtual TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
Log< level::Info, false > LogInfo
std::vector< MonitorElement * > h_nmisslayers_outer
std::vector< MonitorElement * > h_assocRpos
const edm::ESGetToken< CosmicParametersDefinerForTP, TrackAssociatorRecord > cosmictpDefinerEsToken
unsigned short numberOfValidHits() const
number of valid hits found
double getEta(double eta)
Log< level::Warning, false > LogWarning
std::vector< MonitorElement * > h_recopu
std::vector< MonitorElement * > h_assocFraction
const uint32_t *__restrict__ Quality * quality
Sin< T >::type sin(const T &t)
std::vector< MonitorElement * > h_misidpT
const_iterator end() const
last iterator over the map (read only)
void post_insert()
post insert action
std::vector< MonitorElement * > h_recoeta
Cos< T >::type cos(const T &t)
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupinfo_Token
std::vector< MonitorElement * > phipull_vs_phi
edm::EDGetTokenT< SimHitTPAssociationProducer::SimHitTPAssociationList > _simHitTpMapTag
std::vector< MonitorElement * > h_assoc2pT
std::vector< MonitorElement * > nCSChits_vs_eta
edm::EDGetTokenT< TrackingParticleRefVector > tp_refvector_Token
Monte Carlo truth information used for tracking validation.
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > h_assochi2
int charge() const
track electric charge
edm::EDGetTokenT< reco::BeamSpot > bsSrc_Token
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > nRPChits_vs_eta
std::vector< MonitorElement * > thetaCotres_vs_eta
std::vector< MonitorElement * > h_dzpull
std::vector< MonitorElement * > h_phipull
edm::InputTag associatormap
std::vector< MonitorElement * > h_assochi2_prob
ObjectSelector< CosmicTrackingParticleSelector > CosmicTrackingParticleSelector
std::vector< MonitorElement * > h_dxypull
std::vector< MonitorElement * > chi2_vs_phi
void fillPlotNoFlow(MonitorElement *h, T val)
std::vector< MonitorElement * > h_assoc2phi
CosmicTrackingParticleSelector cosmictpSelector
std::vector< std::string > associators
std::vector< MonitorElement * > h_etaRes
std::vector< MonitorElement * > h_thetapull
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< MonitorElement * > h_assochit
std::vector< MonitorElement * > h_assocdxy
std::vector< MonitorElement * > nGEMhits_vs_eta
std::vector< MonitorElement * > h_simulpu
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > phipull_vs_eta
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > h_assoc2eta
std::vector< MonitorElement * > nDThits_vs_eta
std::vector< MonitorElement * > h_assoc2pu
std::vector< MonitorElement * > h_PurityVsQuality
std::vector< edm::EDGetTokenT< edm::View< reco::Track > > > track_Collection_Token
std::vector< MonitorElement * > h_recohit
Log< level::Error, false > LogError
std::string parametersDefiner
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
std::vector< MonitorElement * > h_assoc2hit
std::vector< MonitorElement * > h_fakes
std::vector< MonitorElement * > h_ptpull
std::vector< MonitorElement * > h_misiddxy
std::vector< MonitorElement * > ptpull_vs_phi
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > h_assoc2dxy
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoCollection_Token
double cotThetaRes_rangeMin
std::vector< MonitorElement * > h_nmisslayers_inner
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< MonitorElement * > phires_vs_phi
edm::InputTag label_pileupinfo
std::vector< MonitorElement * > dzres_vs_pt
const edm::ESGetToken< ParametersDefinerForTP, TrackAssociatorRecord > tpDefinerEsToken
Log< level::Info, true > LogVerbatim
bool ignoremissingtkcollection_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< MonitorElement * > h_nhits
const_iterator begin() const
first iterator over the map (read only)
std::vector< MonitorElement * > h_assocSharedHit
bool BiDirectional_RecoToSim_association
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > h_assoceta
std::unique_ptr< ParametersDefinerForTP > clone() const override
std::vector< MonitorElement * > h_qoverppull
key_type key() const
Accessor for product key.
TrackingParticleSelector tpSelector
std::vector< MonitorElement * > nRecHits_vs_nSimHits
Abs< T >::type abs(const T &t)
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< MonitorElement * > nTRK_LayersWithMeas_vs_eta
std::vector< MonitorElement * > h_simuldz
edm::Ref< TrackingParticleCollection > TrackingParticleRef
std::vector< MonitorElement * > ptres_vs_eta
double cotThetaRes_rangeMax
std::vector< MonitorElement * > h_simuldxy
std::vector< MonitorElement * > h_simulhit
math::XYZPointD Point
point in the space
size_type size() const
Size of the RefVector.
std::vector< MonitorElement * > h_nchi2
std::vector< MonitorElement * > nhits_vs_phi
std::vector< MonitorElement * > h_assoc2dz
MuonTrackValidatorBase(const edm::ParameterSet &pset, edm::ConsumesCollector iC)
Constructor.
std::vector< MonitorElement * > ptpull_vs_eta
std::vector< MonitorElement * > h_recophi
std::vector< MonitorElement * > h_charge
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< MonitorElement * > phires_vs_pt
std::vector< MonitorElement * > dzres_vs_eta
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< MonitorElement * > h_simulphi
std::vector< MonitorElement * > h_assocphi
virtual TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const Charge ch, const Point &vtx, const LorentzVector &lv) const
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
def replace(string, replacements)