|
|
#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 |
|
double | maxLayers |
|
double | maxNHit |
|
double | maxPhi |
|
double | maxPixels |
|
double | maxPt |
|
double | maxPU |
|
double | maxRPCHit |
|
double | maxRpos |
|
double | maxZpos |
|
double | minCSCHit |
|
double | minDTHit |
|
double | minDxy |
|
double | minDz |
|
double | minEta |
|
double | minLayers |
|
double | minNHit |
|
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 | nintLayers |
|
int | nintNHit |
|
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, ctfWithMaterialTrackMCMatch_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 358 of file MuonTrackValidator.cc.
359 using namespace reco;
361 edm::LogInfo(
"MuonTrackValidator") <<
"\n===================================================="
363 <<
"Analyzing new event"
365 <<
"====================================================\n"
369 int PU_NumInteractions(-1);
372 std::unique_ptr<ParametersDefinerForTP> Cosmic_parametersDefinerTP;
379 for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
381 if (puInfoIt->getBunchCrossing() == 0) {
382 PU_NumInteractions = puInfoIt->getPU_NumInteractions();
392 Cosmic_parametersDefinerTP = _Cosmic_parametersDefinerTP->
clone();
397 Cosmic_parametersDefinerTP->initEvent(simHitsTPAssoc);
415 std::vector<const reco::TrackToTrackingParticleAssociator*>
associator;
425 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
426 for (
unsigned int www = 0; www <
label.size(); www++) {
431 unsigned int trackCollectionSize = 0;
448 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
451 LogTrace(
"MuonTrackValidator") <<
"Calling associateRecoToSim method"
454 LogTrace(
"MuonTrackValidator") <<
"Calling associateSimToReco method"
459 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
465 simRecColl = *simtorecoCollectionH.
product();
469 recSimColl = *recotosimCollectionH.
product();
476 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.size() <<
"\n";
480 bool TP_is_matched =
false;
481 bool isChargeOK =
true;
495 LogTrace(
"MuonTrackValidator") <<
"TrackingParticle " <<
i;
498 momentumTP =
tp->momentum();
499 vertexTP =
tp->vertex();
510 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
511 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
515 edm::LogVerbatim(
"MuonTrackValidator") <<
"--------------------Selected TrackingParticle #" << tpr.key();
517 <<
"momentumTP: pt = " <<
sqrt(momentumTP.perp2()) <<
", pz = " << momentumTP.z()
518 <<
", \t vertexTP: radius = " <<
sqrt(vertexTP.perp2()) <<
", z = " << vertexTP.z() <<
"\n";
521 double TPeta = momentumTP.eta();
522 double xTPeta =
getEta(TPeta);
523 double TPpt =
sqrt(momentumTP.perp2());
524 double xTPpt =
getPt(TPpt);
525 double TPphi = momentumTP.phi();
526 double TPrpos =
sqrt(vertexTP.perp2());
527 double TPzpos = vertexTP.z();
532 nSimHits = tpr.get()->numberOfHits();
534 nSimHits = tpr.get()->numberOfHits() - tpr.get()->numberOfTrackerHits();
536 nSimHits = tpr.get()->numberOfTrackerHits();
538 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N simhits = " << nSimHits <<
"\n";
540 int assoc_recoTrack_NValidHits = 0;
541 if (simRecColl.
find(tpr) != simRecColl.
end()) {
542 auto const&
rt = simRecColl[tpr];
546 <<
"-----------------------------associated Track #" << assoc_recoTrack.
key();
547 TP_is_matched =
true;
549 if (assoc_recoTrack->
charge() != tpr->charge())
554 <<
"TrackingParticle #" << tpr.key() <<
" with pt=" <<
sqrt(momentumTP.perp2())
555 <<
" associated with quality:" <<
quality <<
"\n";
559 <<
"TrackingParticle #" << tpr.key() <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2()) <<
" , "
560 << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , "
561 <<
" NOT associated to any reco::Track"
640 <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label() <<
":"
641 <<
label[www].instance() <<
": " << trackCollectionSize <<
"\n";
646 bool Track_is_matched =
false;
647 bool isChargeOK =
true;
651 std::vector<std::pair<TrackingParticleRef, double> >
tp;
656 edm::LogVerbatim(
"MuonTrackValidator") <<
"----------------------------------------Track #" <<
track.key();
661 tpr =
tp.begin()->first;
663 if (simRecColl.
find(tpr) != simRecColl.
end()) {
664 auto const& assoc_track_checkback = simRecColl[tpr].
begin()->first;
666 if (assoc_track_checkback.key() ==
track.key()) {
668 <<
"------------------associated TrackingParticle #" << tpr.
key();
669 Track_is_matched =
true;
671 if (
track->charge() != tpr->charge())
673 double Purity =
tp.begin()->second;
676 <<
" associated with purity:" << Purity <<
"\n";
684 if (!Track_is_matched)
686 <<
" NOT associated to any TrackingParticle"
694 tpr =
tp.begin()->first;
695 Track_is_matched =
true;
697 if (
track->charge() != tpr->charge())
700 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
704 <<
" NOT associated to any TrackingParticle"
710 int nRecHits =
track->numberOfValidHits();
711 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N valid rechits = " << nRecHits <<
"\n";
713 double etaRec =
track->eta();
714 double xetaRec =
getEta(etaRec);
716 double ptRec =
track->pt();
717 double xptRec =
getPt(ptRec);
719 double qoverpRec =
track->qoverp();
720 double phiRec =
track->phi();
721 double thetaRec =
track->theta();
722 double dxyRec =
track->dxy(
bs.position());
723 double dzRec =
track->dz(
bs.position());
725 double qoverpError =
track->qoverpError();
726 double ptError =
track->ptError();
727 double thetaError =
track->thetaError();
729 double dxyError =
track->dxyError();
730 double dzError =
track->dzError();
734 if (Track_is_matched) {
740 if (Track_is_matched) {
746 if (Track_is_matched) {
752 if (Track_is_matched) {
758 if (Track_is_matched) {
764 if (Track_is_matched) {
773 if (Track_is_matched) {
796 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
797 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
803 double assocChi2 = -
tp.begin()->second;
806 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
845 double ptSim =
sqrt(momentumTP.perp2());
846 double xptSim =
getPt(ptSim);
847 double qoverpSim = tpr->charge() /
sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
848 momentumTP.z() * momentumTP.z());
849 double etaSim = momentumTP.eta();
850 double thetaSim = momentumTP.theta();
851 double phiSim = momentumTP.phi();
855 double etares = etaRec - etaSim;
856 double ptRelRes = (ptRec - ptSim) / ptSim;
857 double ptPull = (ptRec - ptSim) / ptError;
858 double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
859 double thetaPull = (thetaRec - thetaSim) / thetaError;
860 double phiDiff = phiRec - phiSim;
863 phiDiff = phiDiff - 2. *
M_PI;
865 phiDiff = phiDiff + 2. *
M_PI;
867 double phiPull = phiDiff /
phiError;
868 double dxyPull = (dxyRec - dxySim) / dxyError;
869 double dzPull = (dzRec - dzSim) / dzError;
905 double contrib_Qoverp = qoverpPull * qoverpPull / 5;
906 double contrib_dxy = dxyPull * dxyPull / 5;
907 double contrib_dz = dzPull * dzPull / 5;
908 double contrib_theta = thetaPull * thetaPull / 5;
909 double contrib_phi = phiPull * phiPull / 5;
910 double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
912 edm::LogVerbatim(
"MuonTrackValidator") <<
"normalized Chi2 (track 5-dofs matching) = " << assoChi2 <<
"\n"
913 <<
"\t contrib_Qoverp = " << contrib_Qoverp <<
"\n"
914 <<
"\t contrib_theta = " << contrib_theta <<
"\n"
915 <<
"\t contrib_phi = " << contrib_phi <<
"\n"
916 <<
"\t contrib_dxy = " << contrib_dxy <<
"\n"
917 <<
"\t contrib_dz = " << contrib_dz <<
"\n";
920 <<
"etaRec = " << etaRec <<
"\n"
921 <<
"qoverpRec = " << qoverpRec <<
"\n"
922 <<
"thetaRec = " << thetaRec <<
"\n"
923 <<
"phiRec = " << phiRec <<
"\n"
924 <<
"dxyRec = " << dxyRec <<
"\n"
925 <<
"dzRec = " << dzRec <<
"\n"
928 <<
"qoverpError = " << qoverpError <<
"\n"
929 <<
"thetaError = " << thetaError <<
"\n"
930 <<
"phiError = " <<
phiError <<
"\n"
931 <<
"dxyError = " << dxyError <<
"\n"
932 <<
"dzError = " << dzError <<
"\n"
935 <<
"ptSim = " << ptSim <<
"\n"
936 <<
"etaSim = " << etaSim <<
"\n"
937 <<
"qoverpSim = " << qoverpSim <<
"\n"
938 <<
"thetaSim = " << thetaSim <<
"\n"
939 <<
"phiSim = " << phiSim <<
"\n"
940 <<
"dxySim = " << dxySim <<
"\n"
941 <<
"dzSim = " << dzSim <<
"\n";
947 <<
"Total Associated (simToReco): " << ats <<
"\n"
948 <<
"Total Reconstructed: " << rT <<
"\n"
949 <<
"Total Associated (recoToSim): " << at <<
"\n"
950 <<
"Total Fakes: " << rT - at <<
"\n";
References funct::abs(), ctfWithMaterialTrackMCMatch_cfi::associator, muonValidationHeavyIons_cff::associatormap, MuonErrorMatrixAnalyzer_cfi::associatorName, simPFProducer_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(), qcdUeDQM_cfi::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()) {
58 h_tracks.push_back(ibooker.
book1D(
"Ntracks",
"Number of reconstructed tracks", 100, -0.5, 99.5));
59 h_fakes.push_back(ibooker.
book1D(
"Nfakes",
"Number of fake reco tracks", 20, -0.5, 19.5));
60 h_charge.push_back(ibooker.
book1D(
"Ncharge",
"track charge", 3, -1.5, 1.5));
64 "num_assoSimToReco_eta",
"N of associated tracks (simToReco) vs eta",
nintEta,
minEta,
maxEta));
66 "num_assoRecoToSim_eta",
"N of associated (recoToSim) tracks vs eta",
nintEta,
minEta,
maxEta));
69 "N of associated (simToReco) tracks with charge misID vs eta",
76 "num_assoSimToReco_pT",
"N of associated tracks (simToReco) vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
78 "num_assoRecoToSim_pT",
"N of associated (recoToSim) tracks vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
82 "N of associated (simToReco) tracks with charge misID vs pT",
90 "num_assoSimToReco_phi",
"N of associated tracks (simToReco) vs phi",
nintPhi,
minPhi,
maxPhi));
92 "num_assoRecoToSim_phi",
"N of associated (recoToSim) tracks vs phi",
nintPhi,
minPhi,
maxPhi));
95 "N of associated (simToReco) tracks with charge misID vs phi",
108 "N of associated (recoToSim) tracks with charge misID vs N RecHits",
115 "num_assoSimToReco_dxy",
"N of associated tracks (simToReco) vs dxy",
nintDxy,
minDxy,
maxDxy));
117 "num_assoRecoToSim_dxy",
"N of associated (recoToSim) tracks vs dxy",
nintDxy,
minDxy,
maxDxy));
120 "N of associated (simToReco) tracks with charge misID vs dxy",
126 ibooker.
book1D(
"num_assoSimToReco_dz",
"N of associated tracks (simToReco) vs dz",
nintDz,
minDz,
maxDz));
128 ibooker.
book1D(
"num_assoRecoToSim_dz",
"N of associated (recoToSim) tracks vs dz",
nintDz,
minDz,
maxDz));
131 "num_chargemisid_dz",
"N of associated (simToReco) tracks with charge misID vs dz",
nintDz,
minDz,
maxDz));
144 ibooker.
book1D(
"num_assoSimToReco_pu",
"N of associated tracks (simToReco) vs pu",
nintPU,
minPU,
maxPU));
146 ibooker.
book1D(
"num_assoRecoToSim_pu",
"N of associated (recoToSim) tracks vs pu",
nintPU,
minPU,
maxPU));
149 "num_chargemisid_pu",
"N of associated (simToReco) charge misIDed tracks vs pu",
nintPU,
minPU,
maxPU));
151 h_nchi2.push_back(ibooker.
book1D(
"chi2",
"Track normalized #chi^{2}", 80, 0., 20.));
152 h_nchi2_prob.push_back(ibooker.
book1D(
"chi2prob",
"Probability of track normalized #chi^{2}", 100, 0., 1.));
182 "# TRK Layers with measurement vs eta",
190 "Number of Pixel Layers with measurement vs eta",
201 h_nlosthits.push_back(ibooker.
book1D(
"nlosthits",
"Number of lost hits per track", 6, -0.5, 5.5));
203 "nlosthits_vs_eta",
"Number of lost hits per track vs eta",
nintEta,
minEta,
maxEta, 6, -0.5, 5.5));
207 "p_{T} Relative Residual vs #eta",
215 "p_{T} Relative Residual vs #phi",
223 "p_{T} Relative Residual vs p_{T}",
231 h_ptpull.push_back(ibooker.
book1D(
"ptpull",
"p_{T} Pull", 100, -10., 10.));
240 "#eta Residual vs #eta",
249 "cot(#theta) Residual vs #eta",
257 "cot(#theta) Residual vs p_{T}",
265 h_thetapull.push_back(ibooker.
book1D(
"thetapull",
"#theta Pull", 100, -10., 10.));
272 "#phi Residual vs #eta",
280 "#phi Residual vs p_{T}",
289 "#phi Residual vs #phi",
296 h_phipull.push_back(ibooker.
book1D(
"phipull",
"#phi Pull", 100, -10., 10.));
303 "dxy Residual vs #eta",
311 "dxy Residual vs p_{T}",
319 h_dxypull.push_back(ibooker.
book1D(
"dxypull",
"dxy Pull", 100, -10., 10.));
326 "dz Residual vs p_{T}",
334 h_dzpull.push_back(ibooker.
book1D(
"dzpull",
"dz Pull", 100, -10., 10.));
343 ibooker.
book2D(
"PurityVsQuality",
"Purity vs Quality (MABH)", 20, 0.01, 1.01, 20, 0.01, 1.01));
347 h_assochi2.push_back(ibooker.
book1D(
"assocChi2",
"track association #chi^{2}", 1000, 0., 100.));
348 h_assochi2_prob.push_back(ibooker.
book1D(
"assocChi2_prob",
"probability of association #chi^{2}", 100, 0., 1.));
349 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
References trackingPlots::assoc, simPFProducer_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::maxLayers, histoParameters_cff::maxNHit, 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, beam_dqm_sourceclient-live_cfg::minLayers, histoParameters_cff::minNHit, 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::nintLayers, histoParameters_cff::nintNHit, 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
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)