37 #include "TLorentzVector.h" 361 : moduleName_(ps.getUntrackedParameter<
std::
string>(
"moduleName",
"StandaloneTrackMonitor")),
362 folderName_(ps.getUntrackedParameter<
std::
string>(
"folderName",
"highPurityTracks")),
363 siStripClusterInfo_(consumesCollector()),
366 vertexTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"vertexTag",
edm::
InputTag(
"offlinePrimaryVertices"))),
376 trackQuality_(ps.getUntrackedParameter<
std::
string>(
"trackQuality",
"highPurity")),
377 doPUCorrection_(ps.getUntrackedParameter<
bool>(
"doPUCorrection",
false)),
378 doTrackCorrection_(ps.getUntrackedParameter<
bool>(
"doTrackCorrection",
false)),
379 isMC_(ps.getUntrackedParameter<
bool>(
"isMC",
false)),
380 haveAllHistograms_(ps.getUntrackedParameter<
bool>(
"haveAllHistograms",
false)),
381 puScaleFactorFile_(ps.getUntrackedParameter<
std::
string>(
"puScaleFactorFile",
"PileupScaleFactor.root")),
382 trackScaleFactorFile_(ps.getUntrackedParameter<
std::
string>(
"trackScaleFactorFile",
"PileupScaleFactor.root")),
384 mvaTrackTag_(ps.getUntrackedParameter<
edm::
InputTag>(
"TrackProducerForMVA")),
385 mvaTrackToken_(consumes<
edm::
View<
reco::Track> >(mvaTrackTag_)),
386 tcProducer_(ps.getUntrackedParameter<
edm::
InputTag>(
"TCProducer")),
387 algoName_(ps.getUntrackedParameter<
std::
string>(
"AlgoName")),
388 verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
394 for (
const auto&
v : mvaProducers_) {
395 mvaQualityTokens_.push_back(std::make_tuple(consumes<MVACollection>(
edm::InputTag(
v,
"MVAValues")),
396 consumes<QualityMaskCollection>(
edm::InputTag(
v,
"QualityMasks"))));
399 trackEtaH_ =
nullptr;
400 trackEtaerrH_ =
nullptr;
401 trackCosThetaH_ =
nullptr;
402 trackThetaerrH_ =
nullptr;
403 trackPhiH_ =
nullptr;
404 trackPhierrH_ =
nullptr;
407 trackPtUpto2GeVH_ =
nullptr;
408 trackPtOver10GeVH_ =
nullptr;
409 trackPterrH_ =
nullptr;
410 trackqOverpH_ =
nullptr;
411 trackqOverperrH_ =
nullptr;
412 trackChargeH_ =
nullptr;
413 nlostHitsH_ =
nullptr;
414 nvalidTrackerHitsH_ =
nullptr;
415 nvalidPixelHitsH_ =
nullptr;
416 nvalidStripHitsH_ =
nullptr;
417 trkLayerwithMeasurementH_ =
nullptr;
418 pixelLayerwithMeasurementH_ =
nullptr;
419 stripLayerwithMeasurementH_ =
nullptr;
420 beamSpotXYposH_ =
nullptr;
421 beamSpotXYposerrH_ =
nullptr;
422 beamSpotZposH_ =
nullptr;
423 beamSpotZposerrH_ =
nullptr;
424 trackChi2H_ =
nullptr;
425 tracknDOFH_ =
nullptr;
427 trackChi2bynDOFH_ =
nullptr;
428 vertexXposH_ =
nullptr;
429 vertexYposH_ =
nullptr;
430 vertexZposH_ =
nullptr;
432 nPixBarrelH_ =
nullptr;
433 nPixEndcapH_ =
nullptr;
434 nStripTIBH_ =
nullptr;
435 nStripTOBH_ =
nullptr;
436 nStripTECH_ =
nullptr;
437 nStripTIDH_ =
nullptr;
442 bunchCrossingH_ =
nullptr;
444 trueNIntH_ =
nullptr;
446 nLostHitsVspTH_ =
nullptr;
447 nLostHitsVsEtaH_ =
nullptr;
448 nLostHitsVsCosThetaH_ =
nullptr;
449 nLostHitsVsPhiH_ =
nullptr;
450 nLostHitsVsIterationH_ =
nullptr;
452 nHitsTIBSVsEtaH_ =
nullptr;
453 nHitsTOBSVsEtaH_ =
nullptr;
454 nHitsTECSVsEtaH_ =
nullptr;
455 nHitsTIDSVsEtaH_ =
nullptr;
456 nHitsStripSVsEtaH_ =
nullptr;
458 nHitsTIBDVsEtaH_ =
nullptr;
459 nHitsTOBDVsEtaH_ =
nullptr;
460 nHitsTECDVsEtaH_ =
nullptr;
461 nHitsTIDDVsEtaH_ =
nullptr;
462 nHitsStripDVsEtaH_ =
nullptr;
464 nValidHitsVspTH_ =
nullptr;
465 nValidHitsVsEtaH_ =
nullptr;
466 nValidHitsVsCosThetaH_ =
nullptr;
467 nValidHitsVsPhiH_ =
nullptr;
468 nValidHitsVsnVtxH_ =
nullptr;
470 nValidHitsPixVsEtaH_ =
nullptr;
471 nValidHitsPixBVsEtaH_ =
nullptr;
472 nValidHitsPixEVsEtaH_ =
nullptr;
473 nValidHitsStripVsEtaH_ =
nullptr;
474 nValidHitsTIBVsEtaH_ =
nullptr;
475 nValidHitsTOBVsEtaH_ =
nullptr;
476 nValidHitsTECVsEtaH_ =
nullptr;
477 nValidHitsTIDVsEtaH_ =
nullptr;
479 nValidHitsPixVsPhiH_ =
nullptr;
480 nValidHitsPixBVsPhiH_ =
nullptr;
481 nValidHitsPixEVsPhiH_ =
nullptr;
482 nValidHitsStripVsPhiH_ =
nullptr;
483 nValidHitsTIBVsPhiH_ =
nullptr;
484 nValidHitsTOBVsPhiH_ =
nullptr;
485 nValidHitsTECVsPhiH_ =
nullptr;
486 nValidHitsTIDVsPhiH_ =
nullptr;
488 nLostHitsPixVsEtaH_ =
nullptr;
489 nLostHitsPixBVsEtaH_ =
nullptr;
490 nLostHitsPixEVsEtaH_ =
nullptr;
491 nLostHitsStripVsEtaH_ =
nullptr;
492 nLostHitsTIBVsEtaH_ =
nullptr;
493 nLostHitsTOBVsEtaH_ =
nullptr;
494 nLostHitsTECVsEtaH_ =
nullptr;
495 nLostHitsTIDVsEtaH_ =
nullptr;
497 nLostHitsPixVsPhiH_ =
nullptr;
498 nLostHitsPixBVsPhiH_ =
nullptr;
499 nLostHitsPixEVsPhiH_ =
nullptr;
500 nLostHitsStripVsPhiH_ =
nullptr;
501 nLostHitsTIBVsPhiH_ =
nullptr;
502 nLostHitsTOBVsPhiH_ =
nullptr;
503 nLostHitsTECVsPhiH_ =
nullptr;
504 nLostHitsTIDVsPhiH_ =
nullptr;
506 nLostHitsPixVsIterationH_ =
nullptr;
507 nLostHitsPixBVsIterationH_ =
nullptr;
508 nLostHitsPixEVsIterationH_ =
nullptr;
509 nLostHitsStripVsIterationH_ =
nullptr;
510 nLostHitsTIBVsIterationH_ =
nullptr;
511 nLostHitsTOBVsIterationH_ =
nullptr;
512 nLostHitsTECVsIterationH_ =
nullptr;
513 nLostHitsTIDVsIterationH_ =
nullptr;
515 hOnTrkClusChargeThinH_ =
nullptr;
516 hOnTrkClusWidthThinH_ =
nullptr;
517 hOnTrkClusChargeThickH_ =
nullptr;
518 hOnTrkClusWidthThickH_ =
nullptr;
520 hOffTrkClusChargeThinH_ =
nullptr;
521 hOffTrkClusWidthThinH_ =
nullptr;
522 hOffTrkClusChargeThickH_ =
nullptr;
523 hOffTrkClusWidthThickH_ =
nullptr;
527 if (isMC_ && doPUCorrection_ && doTrackCorrection_) {
528 throw std::runtime_error(
"if isMC is true, only one of doPUCorrection and doTrackCorrection can be true");
531 if (isMC_ && doPUCorrection_) {
533 TFile*
f1 = TFile::Open(puScaleFactorFile_.c_str());
534 TH1F* h1 =
dynamic_cast<TH1F*
>(
f1->Get(
"pileupweight"));
535 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
536 vpu_.push_back(h1->GetBinContent(
i));
540 if (isMC_ && doTrackCorrection_) {
542 TFile*
f1 = TFile::Open(trackScaleFactorFile_.c_str());
543 TH1F* h1 =
dynamic_cast<TH1F*
>(
f1->Get(
"trackweight"));
544 for (
int i = 1;
i <= h1->GetNbinsX(); ++
i)
545 vtrack_.push_back(h1->GetBinContent(
i));
574 trackPH_ = ibook.
book1D(
"trackP",
"Track 4-momentum", 50, 0.0, 10.0);
595 ibook.
book1D(
"DistanceOfClosestApproachToPV",
"DistanceOfClosestApproachToPV", 1000, -1.0, 1.0);
597 ibook.
book1D(
"DistanceOfClosestApproachToPVZoomed",
"DistanceOfClosestApproachToPV", 1000, -0.1, 0.1);
599 "DistanceOfClosestApproachToPVVsPhi",
"DistanceOfClosestApproachToPVVsPhi", 100, -3.5, 3.5, 0.0, 0.0,
"g");
601 "xPointOfClosestApproachVsZ0wrtPV",
"xPointOfClosestApproachVsZ0wrtPV", 120, -60, 60, 0.0, 0.0,
"g");
603 "yPointOfClosestApproachVsZ0wrtPV",
"yPointOfClosestApproachVsZ0wrtPV", 120, -60, 60, 0.0, 0.0,
"g");
605 ibook.
book1D(
"trackDeltaRwrtClosestTrack",
"min#DeltaR(considered track,other tracks)", 500, 0, 10);
615 sip3dToPVH_ = ibook.
book1D(
"sip3dToPV",
"IP significance in 3d To PV", 200, -10, 10);
616 sip3dToBSH_ = ibook.
book1D(
"sip3dToBS",
"IP significance in 3d To BS", 200, -10, 10);
620 sip2dToBSH_ = ibook.
book1D(
"sip2dToBS",
"IP significance in 2d To BS", 200, -10, 10);
623 sip2dToPVH_ = ibook.
book1D(
"sip2dToPV",
"IP significance in 2d To PV", 200, -10, 10);
626 sipDxyToPVH_ = ibook.
book1D(
"sipDxyToPV",
"IP significance in dxy To PV", 100, -10, 10);
627 sipDzToPVH_ = ibook.
book1D(
"sipDzToPV",
"IP significance in dz To PV", 100, -10, 10);
654 ibook.
book1D(
"pixelLayerwithMeasurement",
"No. of Pixel Layers per Track", 10, 0.0, 10.0);
656 ibook.
book1D(
"pixelBLayerwithMeasurement",
"No. of Pixel Barrel Layers per Track", 5, 0.0, 5.0);
658 ibook.
book1D(
"pixelELayerwithMeasurement",
"No. of Pixel Endcap Layers per Track", 5, 0.0, 5.0);
660 ibook.
book1D(
"stripLayerwithMeasurement",
"No. of Strip Layers per Track", 20, 0.0, 20.0);
662 ibook.
book1D(
"stripTIBLayerwithMeasurement",
"No. of Strip TIB Layers per Track", 10, 0.0, 10.0);
664 ibook.
book1D(
"stripTOBLayerwithMeasurement",
"No. of Strip TOB Layers per Track", 10, 0.0, 10.0);
666 ibook.
book1D(
"stripTIDLayerwithMeasurement",
"No. of Strip TID Layers per Track", 5, 0.0, 5.0);
668 ibook.
book1D(
"stripTECLayerwithMeasurement",
"No. of Strip TEC Layers per Track", 15, 0.0, 15.0);
672 ibook.
book1D(
"nMissingExpectedInnerHits",
"No. of Missing Expected Inner Hits", 10, -0.5, 9.5);
674 ibook.
book1D(
"nMissingExpectedOuterHits",
"No. of Missing Expected Outer Hits", 10, -0.5, 9.5);
684 nVertexH_ = ibook.
book1D(
"nVertex",
"# of vertices", 120, -0.5, 119.5);
685 nVtxH_ = ibook.
book1D(
"nVtx",
"# of vtxs", 120, -0.5, 119.5);
690 ibook.
book1D(
"nMissingOuterHitB",
"No. missing outer hit per Track in Barrel", 11, -0.5, 10.5);
692 ibook.
book1D(
"nMissingOuterHitE",
"No. missing outer hit per Track in Endcap", 11, -0.5, 10.5);
693 nPixBarrelH_ = ibook.
book1D(
"nHitPixelBarrel",
"No. of hits in Pixel Barrel per Track", 20, 0, 20.0);
694 nPixEndcapH_ = ibook.
book1D(
"nHitPixelEndcap",
"No. of hits in Pixel Endcap per Track", 20, 0, 20.0);
695 nStripTIBH_ = ibook.
book1D(
"nHitStripTIB",
"No. of hits in Strip TIB per Track", 30, 0, 30.0);
696 nStripTOBH_ = ibook.
book1D(
"nHitStripTOB",
"No. of hits in Strip TOB per Track", 30, 0, 30.0);
697 nStripTECH_ = ibook.
book1D(
"nHitStripTEC",
"No. of hits in Strip TEC per Track", 30, 0, 30.0);
698 nStripTIDH_ = ibook.
book1D(
"nHitStripTID",
"No. of hits in Strip TID per Tracks", 30, 0, 30.0);
699 nTracksH_ = ibook.
book1D(
"nTracks",
"No. of Tracks", 1200, -0.5, 1199.5);
700 nJet_ = ibook.
book1D(
"nJet",
"Number of Jets", 101, -0.5, 100.5);
701 Jet_pt_ = ibook.
book1D(
"Jet_pt",
"Jet p_{T}", 200, 0., 200.);
705 ibook.
book1D(
"Jet_chargedMultiplicity",
"Jet charged Hadron Multiplicity", 201, -0.5, 200.5);
706 Zpt_ = ibook.
book1D(
"Zpt",
"Z-boson transverse momentum", 100, 0, 100);
711 nPUH_ = ibook.
book1D(
"nPU",
"No of Pileup", 100, 0, 100.0);
712 trueNIntH_ = ibook.
book1D(
"trueNInt",
"True no of Interactions", 100, 0, 100.0);
719 ibook.
book1D(
"nLostHitByLayerPix",
"No. of Lost Hit per Layer for Pixel detector", 7, 0.5, 7.5);
722 ibook.
book1D(
"nLostHitByLayerStrip",
"No. of Lost Hit per Layer for SiStrip detector", 22, 0.5, 22.5);
725 "Number of Lost Hits Vs pT",
733 "Number of Lost Hits Vs Eta",
741 ibook.
bookProfile(
"nLostHitsVsCosTheta",
"Number of Lost Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
744 ibook.
bookProfile(
"nLostHitsVsIteration",
"Number of Lost Hits Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
747 "Number of Hits in TIB Vs Eta (Single-sided)",
755 "Number of Hits in TOB Vs Eta (Single-sided)",
763 "Number of Hits in TEC Vs Eta (Single-sided)",
771 "Number of Hits in TID Vs Eta (Single-sided)",
780 "Number of Strip Hits Vs Eta (Single-sided)",
789 "Number of Hits in TIB Vs Eta (Double-sided)",
797 "Number of Hits in TOB Vs Eta (Double-sided)",
805 "Number of Hits in TEC Vs Eta (Double-sided)",
813 "Number of Hits in TID Vs Eta (Double-sided)",
821 "Number of Strip Hits Vs Eta (Double-sided)",
830 "Number of Valid Hits Vs pT",
838 ibook.
bookProfile(
"nValidHitsVsnVtx",
"Number of Valid Hits Vs Number of Vertex", 100, 0., 50., 0.0, 0.0,
"g");
840 "Number of Hits Vs Eta",
849 ibook.
bookProfile(
"nValidHitsVsCosTheta",
"Number of Valid Hits Vs Cos(Theta)", 50, -1.0, 1.0, 0.0, 0.0,
"g");
851 ibook.
bookProfile(
"nValidHitsVsPhi",
"Number of Valid Hits Vs Phi", 100, -3.5, 3.5, 0.0, 0.0,
"g");
854 "Number of Valid Hits in Pixel Vs Eta",
862 "Number of Valid Hits in Pixel Barrel Vs Eta",
870 "Number of Valid Hits in Pixel Endcap Vs Eta",
878 "Number of Valid Hits in SiStrip Vs Eta",
886 "Number of Valid Hits in TIB Vs Eta",
894 "Number of Valid Hits in TOB Vs Eta",
902 "Number of Valid Hits in TEC Vs Eta",
910 "Number of Valid Hits in TID Vs Eta",
919 "Number of Valid Hits in Pixel Vs Phi",
927 "Number of Valid Hits in Pixel Barrel Vs Phi",
935 "Number of Valid Hits in Pixel Endcap Vs Phi",
943 "Number of Valid Hits in SiStrip Vs Phi",
951 "Number of Valid Hits in TIB Vs Phi",
959 "Number of Valid Hits in TOB Vs Phi",
967 "Number of Valid Hits in TEC Vs Phi",
975 "Number of Valid Hits in TID Vs Phi",
984 "Number of Lost Hits in Pixel Vs Eta",
992 "Number of Lost Hits in Pixel Barrel Vs Eta",
1000 "Number of Lost Hits in Pixel Endcap Vs Eta",
1008 "Number of Lost Hits in SiStrip Vs Eta",
1016 "Number of Lost Hits in TIB Vs Eta",
1024 "Number of Lost Hits in TOB Vs Eta",
1032 "Number of Lost Hits in TEC Vs Eta",
1040 "Number of Lost Hits in TID Vs Eta",
1049 "Number of Lost Hits in Pixel Vs Phi",
1057 "Number of Lost Hits in Pixel Barrel Vs Phi",
1065 "Number of Lost Hits in Pixel Endcap Vs Phi",
1073 "Number of Lost Hits in SiStrip Vs Phi",
1081 "Number of Lost Hits in TIB Vs Phi",
1089 "Number of Lost Hits in TOB Vs Phi",
1097 "Number of Lost Hits in TEC Vs Phi",
1105 "Number of Lost Hits in TID Vs Phi",
1114 "nLostHitsPixVsIteration",
"Number of Lost Hits in Pixel Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1116 "nLostHitsPixBVsIteration",
"Number of Lost Hits in Pixel Barrel Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1118 "nLostHitsPixEVsIteration",
"Number of Lost Hits in Pixel Endcap Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1120 "nLostHitsStripVsIteration",
"Number of Lost Hits in SiStrip Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1122 "nLostHitsTIBVsIteration",
"Number of Lost Hits in TIB Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1124 "nLostHitsTOBVsIteration",
"Number of Lost Hits in TOB Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1126 "nLostHitsTECVsIteration",
"Number of Lost Hits in TEC Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1128 "nLostHitsTIDVsIteration",
"Number of Lost Hits in TID Vs Iteration", 47, -0.5, 46.5, 0.0, 0.0,
"g");
1131 "chi2/ndof of Tracks Vs Eta",
1139 "chi2/ndof of Tracks Vs Phi",
1148 "chi2 probability of Tracks Vs Eta",
1156 "chi2 probability of Tracks Vs Phi",
1165 ibook.
bookProfile(
"trackIperr3dVsEta",
"ip3d error of Tracks Vs Eta", 80, -4., 4., 0.0, 0.0,
"g");
1170 ibook.
book2D(
"trackIperr3dVsEta2D",
"ip3d error of Tracks Vs Eta 2d", 80, -4., 4., 100, 0., 5.);
1172 ibook.
book2D(
"trackIperr3dVsChi2prob2D",
"ip3d error of Tracks Vs chi2prob 2d", 50, 0., 1., 100, 0., 5.);
1175 ibook.
book2D(
"trackSip2dVsChi2prob2D",
"sip2d of Tracks Vs chi2prob 2d", 50, 0., 1., 200, -10., 10.);
1181 ibook.
book1D(
"hOnTrkClusChargeThick",
"On-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
1183 ibook.
book1D(
"hOnTrkClusWidthThick",
"On-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
1186 ibook.
book1D(
"hOffTrkClusChargeThin",
"Off-track Cluster Charge (Thin Sensor)", 100, 0, 1000);
1188 ibook.
book1D(
"hOffTrkClusWidthThin",
"Off-track Cluster Width (Thin Sensor)", 20, -0.5, 19.5);
1190 ibook.
book1D(
"hOffTrkClusChargeThick",
"Off-track Cluster Charge (Thick Sensor)", 100, 0, 1000);
1192 ibook.
book1D(
"hOffTrkClusWidthThick",
"Off-track Cluster Width (Thick Sensor)", 20, -0.5, 19.5);
1196 edm::LogInfo(
"StandaloneTrackMonitor") <<
"Begin StandaloneTrackMonitor" << std::endl;
1209 if (vertexColl->empty()) {
1210 edm::LogError(
"StandalonaTrackMonitor") <<
"No good vertex in the event!!" << std::endl;
1219 edm::LogError(
"StandalonaTrackMonitor") <<
"Beamspot for input tag: " <<
bsTag_ <<
" not found!!";
1225 edm::LogError(
"StandalonaTrackMonitor") <<
"TrackCollection for input tag: " <<
trackTag_ <<
" not found!!";
1229 if (!
iEvent.isRealData()) {
1234 edm::LogInfo(
"StandaloneTrackMonitor") <<
"nPUColl = " << PupInfo->size();
1236 for (
auto const&
v : *PupInfo) {
1237 int bx =
v.getBunchCrossing();
1243 int ntrueInt =
v.getTrueNumInteractions();
1271 edm::LogInfo(
"StandaloneTrackMonitor") <<
"PU reweight factor = " << wfac;
1274 int nvtx = (vertexColl.
isValid() ? vertexColl->size() : 0);
1287 std::vector<TLorentzVector> list;
1306 TLorentzVector track1;
1308 for (
auto const& TRACK : *
tracks) {
1309 if (&
track == &TRACK)
1311 TLorentzVector track2;
1312 track2.SetPtEtaPhiM(TRACK.pt(), TRACK.eta(), TRACK.phi(), 0.);
1313 if (track1.DeltaR(track2) < trackdeltaR)
1314 trackdeltaR = track1.DeltaR(track2);
1317 list.push_back(track1);
1356 int nLostHits =
track.numberOfLostHits();
1368 int nIteration =
track.originalAlgo();
1414 double losthitBylayer = -1.0;
1415 double losthitBylayerPix = -1.0;
1416 double losthitBylayerStrip = -1.0;
1419 losthitBylayer =
layer;
1420 losthitBylayerPix =
layer;
1422 losthitBylayer =
layer + 4;
1423 losthitBylayerPix =
layer + 4;
1425 losthitBylayer =
layer + 7;
1426 losthitBylayerStrip =
layer;
1428 losthitBylayer =
layer + 11;
1429 losthitBylayerStrip =
layer + 4;
1431 losthitBylayer =
layer + 14;
1432 losthitBylayerStrip =
layer + 7;
1434 losthitBylayer =
layer + 20;
1435 losthitBylayerStrip =
layer + 13;
1437 if (losthitBylayer > -1)
1439 if (losthitBylayerPix > -1)
1441 if (losthitBylayerStrip > -1)
1448 double thetaError =
track.thetaError();
1451 double ptError =
track.ptError();
1452 double qoverp =
track.qoverp();
1453 double qoverpError =
track.qoverpError();
1457 double dxyError =
track.dxyError();
1459 double dzError =
track.dzError();
1461 double trkd0 =
track.d0();
1464 double chi2prob = TMath::Prob(
track.chi2(), (
int)
track.ndof());
1465 double chi2oNDF =
track.normalizedChi2();
1466 double vx =
track.vx();
1467 double vy =
track.vy();
1468 double vz =
track.vz();
1470 unsigned int track_algo =
track.algo();
1471 unsigned int track_origalgo =
track.originalAlgo();
1474 double stop =
track.stopReason() > ssmax ? double(ssmax - 1) :
static_cast<double>(
track.stopReason());
1475 double distanceOfClosestApproachToPV =
track.dxy(
pv.position());
1476 double xPointOfClosestApproachwrtPV =
track.vx() -
pv.position().x();
1477 double yPointOfClosestApproachwrtPV =
track.vy() -
pv.position().y();
1478 double positionZ0 =
track.dz(
pv.position());
1482 double ip3dToPV = 0, iperr3dToPV = 0, sip3dToPV = 0, sip2dToPV = 0;
1487 sip3dToPV =
ip3d.second.value() /
ip3d.second.error();
1488 ip3dToPV =
ip3d.second.value();
1489 iperr3dToPV =
ip3d.second.error();
1492 double ip3dToBS = 0, iperr3dToBS = 0, sip3dToBS = 0, sip2dToBS = 0;
1493 reco::Vertex beamspotvertex((*beamSpot).position(), (*beamSpot).covariance3D());
1495 std::pair<bool, Measurement1D> ip2dbs =
1498 sip3dToBS = ip3dbs.second.value() / ip3dbs.second.error();
1499 ip3dToBS = ip3dbs.second.value();
1500 iperr3dToBS = ip3dbs.second.error();
1503 double ip2dToPV = 0, iperr2dToPV = 0;
1505 ip2dToPV = ip2d.second.value();
1506 iperr2dToPV = ip2d.second.error();
1507 sip2dToPV = ip2d.second.value() / ip2d.second.error();
1510 double ip2dToBS = 0, iperr2dToBS = 0;
1512 ip2dToBS = ip2dbs.second.value();
1513 iperr2dToBS = ip2dbs.second.error();
1514 sip2dToBS = ip2d.second.value() / ip2d.second.error();
1518 sip2dToPV = ip2d.second.value() / ip2d.second.error();
1519 double sipDxyToPV =
track.dxy(
pv.position()) /
track.dxyError();
1520 double sipDzToPV =
track.dz(
pv.position()) /
track.dzError();
1565 int nPixBarrel = 0, nPixEndcap = 0, nStripTIB = 0, nStripTOB = 0, nStripTEC = 0, nStripTID = 0;
1566 for (
auto it =
track.recHitsBegin(); it !=
track.recHitsEnd(); ++it) {
1568 if (
hit.isValid()) {
1570 int subdetId =
hit.geographicalId().subdetId();
1591 <<
" >>> HITs: nPixBarrel: " << nPixBarrel <<
" nPixEndcap: " << nPixEndcap <<
" nStripTIB: " << nStripTIB
1592 <<
" nStripTOB: " << nStripTOB <<
" nStripTEC: " << nStripTEC <<
" nStripTID: " << nStripTID;
1678 if (list.size() >= 2) {
1679 Zpt_->
Fill((list[0] + list[1]).Pt(), wfac);
1693 for (
auto const&
jet : *jetsColl) {
1705 edm::LogInfo(
"StandaloneTrackMonitor") <<
"Ends StandaloneTrackMonitor successfully";
1715 if (clusterHandle.
isValid()) {
1718 dsvit != clusterHandle->end();
1720 uint32_t
detId = dsvit->id();
1721 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator jt =
clusterMap_.find(
detId);
1722 bool detid_found = (jt !=
clusterMap_.end()) ?
true :
false;
1727 std::set<const SiStripCluster*>&
s = jt->second;
1728 if (
s.find(&*clusit) !=
s.end())
1755 uint32_t detid =
recHit.geographicalId();
1760 if (!thit.isValid())
1763 auto const& clus = thit.firstClusterRef();
1764 if (!clus.isValid())
1766 if (!clus.isStrip())
1769 if (thit.isMatched()) {
1796 auto& cluster = clus.stripCluster();
1810 std::map<uint32_t, std::set<const SiStripCluster*> >::iterator it =
clusterMap_.find(detid);
1812 std::set<const SiStripCluster*>
s;
1814 clusterMap_.insert(std::pair<uint32_t, std::set<const SiStripCluster*> >(detid,
s));
1816 std::set<const SiStripCluster*>&
s = it->second;
MonitorElement * nValidHitsPixEVsPhiH_
MonitorElement * pixelLayerwithMeasurementH_
int numberOfLostTrackerHits(HitCategory category) const
const TrackerGeometry * tkGeom_
MonitorElement * nLostHitByLayerPixH_
MonitorElement * nLostHitsPixBVsIterationH_
int numberOfValidPixelHits() const
MonitorElement * hOnTrkClusChargeThickH_
std::vector< int > lumivec2
const edm::InputTag trackTag_
static constexpr auto TEC
MonitorElement * sip2dToBSH_
MonitorElement * nallHitsH_
MonitorElement * nValidHitsPixBVsPhiH_
static bool stripTECHitFilter(uint16_t pattern)
static uint32_t getLayer(uint16_t pattern)
edm::EDGetTokenT< edm::View< reco::Track > > mvaTrackToken_
MonitorElement * nLostHitsPixEVsIterationH_
MonitorElement * trackDeltaRwrtClosestTrack_
unsigned long long m_cacheID_
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
T getParameter(std::string const &) const
int numberOfLostHits(HitCategory category) const
MonitorElement * hOnTrkClusChargeThinH_
MonitorElement * stripTOBLayerwithMeasurementH_
MonitorElement * trackqOverpH_
MonitorElement * nLostHitsVsPhiH_
MonitorElement * trackPtOver10GeVH_
MonitorElement * nlostTOBHitsH_
const std::string trackQuality_
const std::string algoName_
void setCluster(const SiStripCluster &cluster, int detId)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
MonitorElement * nStripTIDH_
std::vector< float > vpu_
MonitorElement * trackStoppingSourceH_
MonitorElement * trackChi2oNDFVsEtaH_
MonitorElement * trackPt_ZoomH_
MonitorElement * iperr2dToPVH_
virtual void setCurrentFolder(std::string const &fullpath)
StandaloneTrackMonitor(const edm::ParameterSet &)
MonitorElement * iperr2dToPVWtH_
const bool haveAllHistograms_
MonitorElement * iperr3dToPVH_
MonitorElement * trackChi2bynDOFH_
std::vector< int > lumivec1
MonitorElement * trackChi2probVsPhiH_
TrackQuality
track quality
MonitorElement * hOffTrkClusWidthThickH_
const edm::EDGetTokenT< reco::TrackCollection > trackToken_
MonitorElement * nMissingOuterHitEH_
int trackerLayersWithMeasurement() const
MonitorElement * nLostHitsTIBVsIterationH_
int numberOfAllHits(HitCategory category) const
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > puSummaryToken_
MonitorElement * ip2dToBSH_
MonitorElement * ip2dToPVH_
int stripLayersWithMeasurement() const
std::vector< Track > TrackCollection
collection of Tracks
MonitorElement * beamSpotZposH_
MonitorElement * nValidHitsVspTH_
MonitorElement * stripLayerwithMeasurementH_
int numberOfValidStripTIBHits() const
MonitorElement * ntrackerHitsH_
int stripTIDLayersWithMeasurement() const
int pixelEndcapLayersWithMeasurement() const
int numberOfValidStripTECHits() const
MonitorElement * nValidHitsTOBVsPhiH_
int numberOfLostPixelBarrelHits(HitCategory category) const
MonitorElement * yPointOfClosestApproachVsZ0wrtPVH_
MonitorElement * nHitsTIDDVsEtaH_
data_type const * const_iterator
MonitorElement * sipDxyToPVH_
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
MonitorElement * hOnTrkClusWidthThinH_
static bool missingHitFilter(uint16_t pattern)
int numberOfAllTrackerHits(HitCategory category) const
MonitorElement * sip3dToPVH_
MonitorElement * trackChi2probVsEtaH_
MonitorElement * nStripTECH_
MonitorElement * nHitsTOBSVsEtaH_
MonitorElement * Jet_chargedMultiplicity_
static bool pixelBarrelHitFilter(uint16_t pattern)
MonitorElement * nHitsTIBDVsEtaH_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transTrackToken_
MonitorElement * hOffTrkClusWidthThinH_
const std::string puScaleFactorFile_
MonitorElement * hOffTrkClusChargeThinH_
int stripTECLayersWithMeasurement() const
std::vector< unsigned char > QualityMaskCollection
SiStripClusterInfo siStripClusterInfo_
MonitorElement * nHitsTIDSVsEtaH_
MonitorElement * trackChi2H_
MonitorElement * nLostHitsTECVsIterationH_
MonitorElement * nlostPixelEHitsH_
const edm::InputTag mvaTrackTag_
MonitorElement * trackSip2dVsEtaH_
static bool pixelEndcapHitFilter(uint16_t pattern)
int numberOfLostStripHits(HitCategory category) const
int numberOfValidStripHits() const
const edm::InputTag jetsTag_
MonitorElement * sipDzToPVH_
MonitorElement * trackIperr3dVsEtaH_
MonitorElement * nMissingExpectedInnerHitsH_
MonitorElement * nLostHitsTOBVsIterationH_
const edm::InputTag vertexTag_
virtual float thickness() const =0
MonitorElement * nlostHitsH_
MonitorElement * beamSpotXYposH_
MonitorElement * nLostHitsTIDVsEtaH_
int numberOfLostStripTECHits(HitCategory category) const
const edm::ParameterSet TrackPtHistoPar_
MonitorElement * nLostHitsPixEVsEtaH_
MonitorElement * nMissingInnerHitEH_
MonitorElement * nlostTIBHitsH_
MonitorElement * nlostTECHitsH_
MonitorElement * nvalidTECHitsH_
const bool doPUCorrection_
MonitorElement * nLostHitsTIBVsEtaH_
MonitorElement * nLostHitsTIDVsIterationH_
MonitorElement * nValidHitsPixVsEtaH_
MonitorElement * nTracksH_
MonitorElement * hOnTrkClusWidthThickH_
MonitorElement * trackorigalgoH_
MonitorElement * trackqOverperrH_
MonitorElement * stripTIBLayerwithMeasurementH_
MonitorElement * nValidHitsTIDVsEtaH_
MonitorElement * nValidHitsStripVsPhiH_
MonitorElement * iperr3dToBSWtH_
SiStripCluster const & monoCluster() const
MonitorElement * nValidHitsTECVsEtaH_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
std::vector< MonitorElement * > trackMVAs
MonitorElement * trackThetaerrH_
MonitorElement * bunchCrossingH_
MonitorElement * nHitsTECDVsEtaH_
MonitorElement * nHitsTOBDVsEtaH_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * nStripTIBH_
int numberOfValidPixelEndcapHits() const
MonitorElement * trackSip2dVsChi2prob2DH_
Cos< T >::type cos(const T &t)
MonitorElement * nvalidPixelBHitsH_
int numberOfLostPixelEndcapHits(HitCategory category) const
MonitorElement * nlostTrackerHitsH_
MonitorElement * trackPterrH_
MonitorElement * sip2dToPVWtH_
const bool doTrackCorrection_
const edm::InputTag puSummaryTag_
MonitorElement * nValidHitsPixVsPhiH_
MonitorElement * DistanceOfClosestApproachToPVH_
Abs< T >::type abs(const T &t)
MonitorElement * ip3dToPVH_
int stripTOBLayersWithMeasurement() const
MonitorElement * nvalidStripHitsH_
MonitorElement * nMissingOuterHitBH_
int numberOfValidStripTIDHits() const
#define DEFINE_FWK_MODULE(type)
MonitorElement * trackPhiH_
MonitorElement * nValidHitsVsCosThetaH_
MonitorElement * nLostHitsTOBVsEtaH_
MonitorElement * nlostStripHitsH_
MonitorElement * pixelELayerwithMeasurementH_
MonitorElement * nValidHitsVsnVtxH_
MonitorElement * vertexXposH_
static constexpr auto TOB
int numberOfLostStripTIDHits(HitCategory category) const
MonitorElement * beamSpotZposerrH_
MonitorElement * nLostHitsTIDVsPhiH_
std::vector< MonitorElement * > trackMVAsVsPtProfile
MonitorElement * nvalidPixelEHitsH_
std::vector< float > MVACollection
uint16_t getHitPattern(HitCategory category, int position) const
std::vector< MonitorElement * > trackMVAsHP
MonitorElement * trackIperr3dVsChi2prob2DH_
MonitorElement * stripTECLayerwithMeasurementH_
MonitorElement * trackIperr3dVsChi2probH_
int numberOfLostStripTOBHits(HitCategory category) const
MonitorElement * nLostHitsVsCosThetaH_
MonitorElement * trackPtH_
MonitorElement * nlostTIDHitsH_
MonitorElement * nValidHitsTIBVsEtaH_
MonitorElement * beamSpotXYposerrH_
MonitorElement * trackChargeH_
MonitorElement * iperr2dToBSH_
MonitorElement * hOffTrkClusChargeThickH_
Log< level::Info, false > LogInfo
const edm::InputTag tcProducer_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * iperr3dToPVWtH_
MonitorElement * nMissingExpectedOuterHitsH_
MonitorElement * trackCosThetaH_
const edm::InputTag clusterTag_
MonitorElement * nvalidTrackerHitsH_
MonitorElement * nValidHitsPixBVsEtaH_
void addClusterToMap(uint32_t detid, const SiStripCluster *cluster)
static TrackQuality qualityByName(const std::string &name)
MonitorElement * nLostHitsTECVsEtaH_
static constexpr auto TIB
const Plane & surface() const
The nominal surface of the GeomDet.
MonitorElement * trackChi2ProbH_
MonitorElement * nValidHitsVsPhiH_
MonitorElement * nlostPixelHitsH_
MonitorElement * trackChi2oNDFVsPhiH_
MonitorElement * nLostHitsStripVsEtaH_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
MonitorElement * trkLayerwithMeasurementH_
MonitorElement * Jet_energy_
MonitorElement * trackd0H_
MonitorElement * sip2dToPVH_
MonitorElement * trackEtaerrH_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * trueNIntH_
MonitorElement * nLostHitByLayerH_
MonitorElement * nHitsTECSVsEtaH_
MonitorElement * DistanceOfClosestApproachToPVZoomedH_
std::map< uint32_t, std::set< const SiStripCluster * > > clusterMap_
MonitorElement * nvalidTIBHitsH_
SiStripCluster const & stereoCluster() const
MonitorElement * trackSip2dVsEta2DH_
const edm::InputTag bsTag_
static bool stripTOBHitFilter(uint16_t pattern)
MonitorElement * xPointOfClosestApproachVsZ0wrtPVH_
MonitorElement * vertexYposH_
MonitorElement * nLostHitByLayerStripH_
MonitorElement * trackChi2oNDFH_
int numberOfLostPixelHits(HitCategory category) const
static bool stripTIBHitFilter(uint16_t pattern)
std::vector< float > vtrack_
void dqmBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
MonitorElement * nvalidTIDHitsH_
MonitorElement * ZInvMass_
const edm::ParameterSet TrackEtaHistoPar_
MonitorElement * trackPH_
const edm::EDGetTokenT< reco::VertexCollection > vertexToken_
MonitorElement * nLostHitsPixVsPhiH_
void processClusters(edm::Event const &iEvent, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
MonitorElement * nPixBarrelH_
MonitorElement * nLostHitsVsIterationH_
MonitorElement * nValidHitsStripVsEtaH_
const edm::EDGetTokenT< std::vector< reco::PFJet > > jetsToken_
MonitorElement * nPixEndcapH_
std::vector< MonitorElement * > trackMVAsHPVsEtaProfile
int numberOfValidPixelBarrelHits() const
MonitorElement * iperr3dToBSH_
MonitorElement * nValidHitsTOBVsEtaH_
MonitorElement * nLostHitsTIBVsPhiH_
int pixelBarrelLayersWithMeasurement() const
MonitorElement * nLostHitsVspTH_
MonitorElement * trackIperr3dVsEta2DH_
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * nHitsStripSVsEtaH_
MonitorElement * nvalidPixelHitsH_
MonitorElement * sip3dToBSH_
MonitorElement * Jet_eta_
MonitorElement * nLostHitsPixBVsEtaH_
int pixelLayersWithMeasurement() const
MonitorElement * tracknDOFH_
MonitorElement * trackPtUpto2GeVH_
MonitorElement * nLostHitsStripVsIterationH_
MonitorElement * pixelBLayerwithMeasurementH_
MonitorElement * nlostPixelBHitsH_
MonitorElement * trackEtaH_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * nLostHitsTOBVsPhiH_
MonitorElement * nLostHitsTECVsPhiH_
static bool stripTIDHitFilter(uint16_t pattern)
void processHit(const TrackingRecHit &recHit, edm::EventSetup const &iSetup, const TrackerGeometry &tkGeom, double wfac=1)
std::vector< std::tuple< edm::EDGetTokenT< MVACollection >, edm::EDGetTokenT< QualityMaskCollection > > > mvaQualityTokens_
std::vector< MonitorElement * > trackMVAsVsEtaProfile
MonitorElement * nLostHitsPixBVsPhiH_
MonitorElement * nLostHitsVsEtaH_
MonitorElement * nValidHitsTIBVsPhiH_
const std::string trackScaleFactorFile_
MonitorElement * nHitsTIBSVsEtaH_
static constexpr auto TID
MonitorElement * nLostHitsPixVsIterationH_
Geom::Theta< T > theta() const
int numberOfValidTrackerHits() const
MonitorElement * stripTIDLayerwithMeasurementH_
MonitorElement * nValidHitsPixEVsEtaH_
MonitorElement * nLostHitsPixVsEtaH_
MonitorElement * ip3dToBSH_
MonitorElement * nVertexH_
MonitorElement * nLostHitsPixEVsPhiH_
MonitorElement * nvalidTOBHitsH_
int numberOfLostStripTIBHits(HitCategory category) const
MonitorElement * DistanceOfClosestApproachToPVVsPhiH_
MonitorElement * nValidHitsVsEtaH_
MonitorElement * nValidHitsTIDVsPhiH_
MonitorElement * nHitsStripDVsEtaH_
MonitorElement * nValidHitsTECVsPhiH_
MonitorElement * vertexZposH_
std::vector< MonitorElement * > trackMVAsHPVsPtProfile
MonitorElement * nLostHitsStripVsPhiH_
const std::vector< std::string > mvaProducers_
MonitorElement * trackalgoH_
MonitorElement * trackPhierrH_
int numberOfValidStripTOBHits() const
MonitorElement * nStripTOBH_
int stripTIBLayersWithMeasurement() const
MonitorElement * nMissingInnerHitBH_
const Bounds & bounds() const