Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profiles for chi2 #16495

Merged
merged 1 commit into from Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion DQM/TrackingMonitor/interface/TrackAnalyzer.h
Expand Up @@ -192,6 +192,8 @@ class TrackAnalyzer
, NumberOfLayersPerTrackVsTheta(NULL)
, NumberOfLayersPerTrackVsEta(NULL)

, Chi2oNDFVsNHits(NULL)
, Chi2oNDFVsPt(NULL)
, Chi2oNDFVsEta(NULL)
, Chi2oNDFVsPhi(NULL)
, Chi2oNDFVsTheta(NULL)
Expand Down Expand Up @@ -266,6 +268,8 @@ class TrackAnalyzer
MonitorElement* NumberOfLayersPerTrackVsTheta;
MonitorElement* NumberOfLayersPerTrackVsEta;

MonitorElement* Chi2oNDFVsNHits;
MonitorElement* Chi2oNDFVsPt;
MonitorElement* Chi2oNDFVsEta;
MonitorElement* Chi2oNDFVsPhi;
MonitorElement* Chi2oNDFVsTheta;
Expand Down Expand Up @@ -334,7 +338,9 @@ class TrackAnalyzer
MonitorElement* Chi2Prob;
MonitorElement* Chi2oNDF;

MonitorElement* Chi2oNDFVsEta;
MonitorElement* Chi2oNDFVsNHits = nullptr;
MonitorElement* Chi2oNDFVsPt = nullptr;
MonitorElement* Chi2oNDFVsEta = nullptr;
MonitorElement* Chi2oNDFVsPhi;
MonitorElement* Chi2oNDFVsTheta;

Expand Down
29 changes: 20 additions & 9 deletions DQM/TrackingMonitor/src/TrackAnalyzer.cc
Expand Up @@ -90,9 +90,6 @@ void TrackAnalyzer::initHistos()
Chi2oNDFVsEta = nullptr;
Chi2oNDFVsPhi = nullptr;
Chi2oNDFVsTheta = nullptr;
Chi2oNDFVsTheta = nullptr;
Chi2oNDFVsPhi = nullptr;
Chi2oNDFVsEta = nullptr;

NumberOfRecHitsPerTrack = nullptr;
NumberOfValidRecHitsPerTrack = nullptr;
Expand Down Expand Up @@ -1421,11 +1418,6 @@ void TrackAnalyzer::bookHistosForState(std::string sname, DQMStore::IBooker & ib
tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #phi",1);
tkmes.Chi2oNDFVsPhi->setAxisTitle("Track #chi^{2}/ndf",2);

histname = "Chi2oNDFVsEta_" + histTag;
tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);

histname = "Chi2ProbVsPhi_" + histTag;
tkmes.Chi2ProbVsPhi = ibooker.bookProfile(histname+CategoryName, histname+CategoryName, PhiBin, PhiMin, PhiMax, Chi2ProbMin, Chi2ProbMax);
tkmes.Chi2ProbVsPhi->setAxisTitle("Tracks #phi" ,1);
Expand All @@ -1441,6 +1433,22 @@ void TrackAnalyzer::bookHistosForState(std::string sname, DQMStore::IBooker & ib
// general properties
ibooker.setCurrentFolder(TopFolder_+"/GeneralProperties");


histname = "Chi2oNDFVsEta_" + histTag;
tkmes.Chi2oNDFVsEta = ibooker.bookProfile(histname, histname, EtaBin, EtaMin, EtaMax, Chi2NDFMin, Chi2NDFMax,"");
tkmes.Chi2oNDFVsEta->setAxisTitle("Track #eta",1);
tkmes.Chi2oNDFVsEta->setAxisTitle("Track #chi^{2}/ndf",2);

histname = "Chi2oNDFVsPt_" + histTag;
tkmes.Chi2oNDFVsPt = ibooker.bookProfile(histname, histname, TrackPtBin, TrackPtMin, TrackPtMax, Chi2NDFMin, Chi2NDFMax,"");
tkmes.Chi2oNDFVsPt->setAxisTitle("Track p_{T} (GeV/c)", 1);
tkmes.Chi2oNDFVsPt->setAxisTitle("Track #chi^{2}/ndf",2);

histname = "Chi2oNDFVsNHits_" + histTag;
tkmes.Chi2oNDFVsNHits = ibooker.bookProfile(histname, histname, 50, 0, 50, Chi2NDFMin, Chi2NDFMax,"");
tkmes.Chi2oNDFVsNHits->setAxisTitle("Track NHits", 1);
tkmes.Chi2oNDFVsNHits->setAxisTitle("Track #chi^{2}/ndf",2);

histname = "TrackP_" + histTag;
tkmes.TrackP = ibooker.book1D(histname, histname, TrackPBin, TrackPMin, TrackPMax);
tkmes.TrackP->setAxisTitle("Track |p| (GeV/c)", 1);
Expand Down Expand Up @@ -1761,14 +1769,17 @@ void TrackAnalyzer::fillHistosForState(const edm::EventSetup& iSetup, const reco
double chi2prob = TMath::Prob(track.chi2(),(int)track.ndof());
double chi2oNDF = track.normalizedChi2();

tkmes.Chi2oNDFVsEta->Fill(eta, chi2oNDF);
tkmes.Chi2oNDFVsPt->Fill(pt, chi2oNDF);
tkmes.Chi2oNDFVsNHits->Fill(nRecHits, chi2oNDF);

if(doAllPlots_) {

// general properties
if (doThetaPlots_) {
tkmes.Chi2oNDFVsTheta->Fill(theta, chi2oNDF);
}
tkmes.Chi2oNDFVsPhi->Fill(phi, chi2oNDF);
tkmes.Chi2oNDFVsEta->Fill(eta, chi2oNDF);
tkmes.Chi2ProbVsPhi->Fill(phi, chi2prob);
tkmes.Chi2ProbVsEta->Fill(eta, chi2prob);
}
Expand Down