|
|
#include <MuonTrackValidator.h>
|
typedef dqm::reco::DQMStore | DQMStore |
|
typedef dqm::reco::MonitorElement | MonitorElement |
|
typedef CacheContexts< T... > | CacheTypes |
|
typedef CacheTypes::GlobalCache | GlobalCache |
|
typedef AbilityChecker< T... > | HasAbility |
|
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
|
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
|
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
|
typedef CacheTypes::RunCache | RunCache |
|
typedef RunContextT< RunCache, GlobalCache > | RunContext |
|
typedef CacheTypes::RunSummaryCache | 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_effic |
|
edm::InputTag | label_tp_fake |
|
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< TrackingParticleCollection > | tp_effic_Token |
|
edm::EDGetTokenT< TrackingParticleCollection > | tp_fake_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 17 of file MuonTrackValidator.h.
◆ MuonTrackValidator()
Constructor.
Definition at line 20 of file MuonTrackValidator.h.
28 tpset.getParameter<
double>(
"ptMax"),
29 tpset.getParameter<
double>(
"minRapidity"),
30 tpset.getParameter<
double>(
"maxRapidity"),
31 tpset.getParameter<
double>(
"tip"),
32 tpset.getParameter<
double>(
"lip"),
33 tpset.getParameter<
int>(
"minHit"),
34 tpset.getParameter<
bool>(
"signalOnly"),
35 tpset.getParameter<
bool>(
"intimeOnly"),
36 tpset.getParameter<
bool>(
"chargedOnly"),
37 tpset.getParameter<
bool>(
"stableOnly"),
38 tpset.getParameter<std::vector<int> >(
"pdgId"));
41 tpset.getParameter<
double>(
"minRapidity"),
42 tpset.getParameter<
double>(
"maxRapidity"),
43 tpset.getParameter<
double>(
"tip"),
44 tpset.getParameter<
double>(
"lip"),
45 tpset.getParameter<
int>(
"minHit"),
46 tpset.getParameter<
bool>(
"chargedOnly"),
47 tpset.getParameter<std::vector<int> >(
"pdgId"));
59 for (
unsigned int www = 0; www <
label.size(); www++) {
65 _simHitTpMapTag = mayConsume<SimHitTPAssociationProducer::SimHitTPAssociationList>(
85 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n usetracker = TRUE : Tracker SimHits WILL be counted";
87 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n usetracker = FALSE : Tracker SimHits WILL NOT be counted";
89 edm::LogVerbatim(
"MuonTrackValidator") <<
" usemuon = TRUE : Muon SimHits WILL be counted";
91 edm::LogVerbatim(
"MuonTrackValidator") <<
" usemuon = FALSE : Muon SimHits WILL NOT be counted" << std::endl;
94 for (
unsigned int www = 0; www <
label.size(); www++) {
99 if (recoTracksLabel ==
"generalTracks" || (recoTracksLabel.find(
"cutsRecoTracks") != std::string::npos) ||
100 recoTracksLabel ==
"ctfWithMaterialTracksP5LHCNavigation" || recoTracksLabel ==
"hltL3TkTracksFromL2" ||
101 (recoTracksLabel ==
"hltL3Muons" && recoTracksInstance ==
"L2Seeded")) {
104 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usemuon == true"
105 <<
"\n ---> please change to usemuon == false ";
109 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usetracker == false"
110 <<
"\n ---> please change to usetracker == true ";
115 else if (recoTracksLabel ==
"standAloneMuons" || recoTracksLabel ==
"standAloneSETMuons" ||
116 recoTracksLabel ==
"cosmicMuons" || recoTracksLabel ==
"hltL2Muons") {
119 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usetracker == true"
120 <<
"\n ---> please change to usetracker == false ";
124 <<
"\n*** WARNING : inconsistent input tracksTag = " <<
label[www] <<
"\n with usemuon == false"
125 <<
"\n ---> please change 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_effic, MuonTrackValidatorBase::label_tp_fake, MABH, MuonTrackValidatorBase::pileupinfo_Token, muonDTDigis_cfi::pset, recoToSimCollection_Token, simToRecoCollection_Token, AlCaHLTBitMon_QueryRunRegistry::string, MuonTrackValidatorBase::tp_effic_Token, MuonTrackValidatorBase::tp_fake_Token, tpSelector, MuonTrackValidatorBase::track_Collection_Token, UseAssociators, useGEMs_, useME0_, MuonTrackValidatorBase::usemuon, and MuonTrackValidatorBase::usetracker.
◆ ~MuonTrackValidator()
MuonTrackValidator::~MuonTrackValidator |
( |
| ) |
|
|
inlineoverride |
◆ analyze()
Method called before the event loop.
Method called once per event
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);
373 std::unique_ptr<ParametersDefinerForTP> Cosmic_parametersDefinerTP;
380 for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
382 if (puInfoIt->getBunchCrossing() == 0) {
383 PU_NumInteractions = puInfoIt->getPU_NumInteractions();
393 Cosmic_parametersDefinerTP = _Cosmic_parametersDefinerTP->
clone();
398 Cosmic_parametersDefinerTP->initEvent(simHitsTPAssoc);
416 std::vector<const reco::TrackToTrackingParticleAssociator*>
associator;
426 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
427 for (
unsigned int www = 0; www <
label.size(); www++) {
432 unsigned int trackCollectionSize = 0;
449 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
452 LogTrace(
"MuonTrackValidator") <<
"Calling associateRecoToSim method"
455 LogTrace(
"MuonTrackValidator") <<
"Calling associateSimToReco method"
460 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
466 simRecColl = *simtorecoCollectionH.
product();
470 recSimColl = *recotosimCollectionH.
product();
477 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.size() <<
"\n";
481 bool TP_is_matched =
false;
482 bool isChargeOK =
true;
496 LogTrace(
"MuonTrackValidator") <<
"TrackingParticle " <<
i;
499 momentumTP =
tp->momentum();
500 vertexTP =
tp->vertex();
511 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
512 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
516 edm::LogVerbatim(
"MuonTrackValidator") <<
"--------------------Selected TrackingParticle #" << tpr.key();
518 <<
"momentumTP: pt = " <<
sqrt(momentumTP.perp2()) <<
", pz = " << momentumTP.z()
519 <<
", \t vertexTP: radius = " <<
sqrt(vertexTP.perp2()) <<
", z = " << vertexTP.z() <<
"\n";
522 double TPeta = momentumTP.eta();
523 double xTPeta =
getEta(TPeta);
524 double TPpt =
sqrt(momentumTP.perp2());
525 double xTPpt =
getPt(TPpt);
526 double TPphi = momentumTP.phi();
527 double TPrpos =
sqrt(vertexTP.perp2());
528 double TPzpos = vertexTP.z();
533 nSimHits = tpr.get()->numberOfHits();
535 nSimHits = tpr.get()->numberOfHits() - tpr.get()->numberOfTrackerHits();
537 nSimHits = tpr.get()->numberOfTrackerHits();
539 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N simhits = " << nSimHits <<
"\n";
541 int assoc_recoTrack_NValidHits = 0;
542 if (simRecColl.
find(tpr) != simRecColl.
end()) {
543 auto const&
rt = simRecColl[tpr];
547 <<
"-----------------------------associated Track #" << assoc_recoTrack.
key();
548 TP_is_matched =
true;
550 if (assoc_recoTrack->
charge() != tpr->charge())
555 <<
"TrackingParticle #" << tpr.key() <<
" with pt=" <<
sqrt(momentumTP.perp2())
556 <<
" associated with quality:" <<
quality <<
"\n";
560 <<
"TrackingParticle #" << tpr.key() <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2()) <<
" , "
561 << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , "
562 <<
" NOT associated to any reco::Track"
641 <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label() <<
":"
642 <<
label[www].instance() <<
": " << trackCollectionSize <<
"\n";
647 bool Track_is_matched =
false;
648 bool isChargeOK =
true;
652 std::vector<std::pair<TrackingParticleRef, double> >
tp;
657 edm::LogVerbatim(
"MuonTrackValidator") <<
"----------------------------------------Track #" <<
track.key();
662 tpr =
tp.begin()->first;
664 if (simRecColl.
find(tpr) != simRecColl.
end()) {
665 auto const& assoc_track_checkback = simRecColl[tpr].
begin()->first;
667 if (assoc_track_checkback.key() ==
track.key()) {
669 <<
"------------------associated TrackingParticle #" << tpr.
key();
670 Track_is_matched =
true;
672 if (
track->charge() != tpr->charge())
674 double Purity =
tp.begin()->second;
677 <<
" associated with purity:" << Purity <<
"\n";
685 if (!Track_is_matched)
687 <<
" NOT associated to any TrackingParticle"
695 tpr =
tp.begin()->first;
696 Track_is_matched =
true;
698 if (
track->charge() != tpr->charge())
701 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
705 <<
" NOT associated to any TrackingParticle"
711 int nRecHits =
track->numberOfValidHits();
712 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N valid rechits = " << nRecHits <<
"\n";
714 double etaRec =
track->eta();
715 double xetaRec =
getEta(etaRec);
717 double ptRec =
track->pt();
718 double xptRec =
getPt(ptRec);
720 double qoverpRec =
track->qoverp();
721 double phiRec =
track->phi();
722 double thetaRec =
track->theta();
723 double dxyRec =
track->dxy(
bs.position());
724 double dzRec =
track->dz(
bs.position());
726 double qoverpError =
track->qoverpError();
727 double ptError =
track->ptError();
728 double thetaError =
track->thetaError();
730 double dxyError =
track->dxyError();
731 double dzError =
track->dzError();
735 if (Track_is_matched) {
741 if (Track_is_matched) {
747 if (Track_is_matched) {
753 if (Track_is_matched) {
759 if (Track_is_matched) {
765 if (Track_is_matched) {
774 if (Track_is_matched) {
797 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
798 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
804 double assocChi2 = -
tp.begin()->second;
807 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
846 double ptSim =
sqrt(momentumTP.perp2());
847 double xptSim =
getPt(ptSim);
848 double qoverpSim = tpr->charge() /
sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
849 momentumTP.z() * momentumTP.z());
850 double etaSim = momentumTP.eta();
851 double thetaSim = momentumTP.theta();
852 double phiSim = momentumTP.phi();
856 double etares = etaRec - etaSim;
857 double ptRelRes = (ptRec - ptSim) / ptSim;
858 double ptPull = (ptRec - ptSim) / ptError;
859 double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
860 double thetaPull = (thetaRec - thetaSim) / thetaError;
861 double phiDiff = phiRec - phiSim;
864 phiDiff = phiDiff - 2. *
M_PI;
866 phiDiff = phiDiff + 2. *
M_PI;
868 double phiPull = phiDiff /
phiError;
869 double dxyPull = (dxyRec - dxySim) / dxyError;
870 double dzPull = (dzRec - dzSim) / dzError;
906 double contrib_Qoverp = qoverpPull * qoverpPull / 5;
907 double contrib_dxy = dxyPull * dxyPull / 5;
908 double contrib_dz = dzPull * dzPull / 5;
909 double contrib_theta = thetaPull * thetaPull / 5;
910 double contrib_phi = phiPull * phiPull / 5;
911 double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
913 edm::LogVerbatim(
"MuonTrackValidator") <<
"normalized Chi2 (track 5-dofs matching) = " << assoChi2 <<
"\n"
914 <<
"\t contrib_Qoverp = " << contrib_Qoverp <<
"\n"
915 <<
"\t contrib_theta = " << contrib_theta <<
"\n"
916 <<
"\t contrib_phi = " << contrib_phi <<
"\n"
917 <<
"\t contrib_dxy = " << contrib_dxy <<
"\n"
918 <<
"\t contrib_dz = " << contrib_dz <<
"\n";
921 <<
"etaRec = " << etaRec <<
"\n"
922 <<
"qoverpRec = " << qoverpRec <<
"\n"
923 <<
"thetaRec = " << thetaRec <<
"\n"
924 <<
"phiRec = " << phiRec <<
"\n"
925 <<
"dxyRec = " << dxyRec <<
"\n"
926 <<
"dzRec = " << dzRec <<
"\n"
929 <<
"qoverpError = " << qoverpError <<
"\n"
930 <<
"thetaError = " << thetaError <<
"\n"
931 <<
"phiError = " <<
phiError <<
"\n"
932 <<
"dxyError = " << dxyError <<
"\n"
933 <<
"dzError = " << dzError <<
"\n"
936 <<
"ptSim = " << ptSim <<
"\n"
937 <<
"etaSim = " << etaSim <<
"\n"
938 <<
"qoverpSim = " << qoverpSim <<
"\n"
939 <<
"thetaSim = " << thetaSim <<
"\n"
940 <<
"phiSim = " << phiSim <<
"\n"
941 <<
"dxySim = " << dxySim <<
"\n"
942 <<
"dzSim = " << dzSim <<
"\n";
948 <<
"Total Associated (simToReco): " << ats <<
"\n"
949 <<
"Total Reconstructed: " << rT <<
"\n"
950 <<
"Total Associated (recoToSim): " << at <<
"\n"
951 <<
"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, get, edm::Ref< C, T, F >::get(), mps_fire::i, createfilelist::int, edm::RefToBase< T >::key(), edm::Ref< C, T, F >::key(), label, 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(), quality, hcal_runs::rt, singleTopDQM_cfi::setup, funct::sin(), 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()
Method called at the end of the event loop.
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, MuonErrorMatrixAnalyzer_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 |
◆ cosmictpSelector
◆ dirName_
std::string MuonTrackValidator::dirName_ |
|
private |
◆ MABH
bool MuonTrackValidator::MABH |
|
private |
◆ recoToSimCollection_Token
◆ simToRecoCollection_Token
◆ 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
edm::EDGetTokenT< TrackingParticleCollection > tp_fake_Token
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
edm::InputTag label_tp_effic
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
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
unsigned short numberOfValidHits() const
number of valid hits found
double getEta(double eta)
Log< level::Warning, false > LogWarning
std::vector< MonitorElement * > h_recopu
edm::EDGetTokenT< TrackingParticleCollection > tp_effic_Token
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
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
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
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
std::vector< TrackingParticle > TrackingParticleCollection
bool BiDirectional_RecoToSim_association
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > h_assoceta
std::unique_ptr< ParametersDefinerForTP > clone() const override
edm::InputTag label_tp_fake
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
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
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)