25 #include "boost/math/special_functions/sign.hpp" 36 const auto xaxis =
h->GetXaxis();
37 if (val <= xaxis->GetXmin())
38 h->AddBinContent(
xaxis->GetFirst());
39 else if (val >=
xaxis->GetXmax())
40 h->AddBinContent(
xaxis->GetLast());
45 class HitPatternPrinter {
49 void print(std::ostream& os)
const {
95 static void detLayer(std::ostream& os,
const reco::HitPattern& p, uint32_t hit) {
115 std::ostream&
operator<<(std::ostream& os,
const HitPatternPrinter& hpp) {
120 class TrackAlgoPrinter {
124 void print(std::ostream& os)
const {
136 if (algos.
size() > 1) {
138 for (
auto algo : algos) {
147 std::ostream&
operator<<(std::ostream& os,
const TrackAlgoPrinter& tap) {
152 double diffRelative(
double a,
double b) {
return (a - b) /
b; }
156 LogIntHelper(
double lmin,
double lmax) : lmin_(lmin), lmax_(lmax) {}
158 class UnderOverflow {
160 UnderOverflow(
double largestValue,
double smallestValue,
std::function<
double(
double)> modifyUnpack)
161 : unpackedLargestValue_(modifyUnpack ? modifyUnpack(largestValue) : largestValue),
162 unpackedSmallestValue_(modifyUnpack ? modifyUnpack(smallestValue) : smallestValue) {}
164 bool compatibleWithUnderflow(
double value)
const {
return value == unpackedSmallestValue_; }
165 void printNonOkUnderflow(std::ostream& os)
const { os <<
" (not min " << unpackedSmallestValue_ <<
")"; }
167 bool compatibleWithOverflow(
double value)
const {
return value == unpackedLargestValue_; }
168 void printNonOkOverflow(std::ostream& os)
const { os <<
" (not max " << unpackedLargestValue_ <<
")"; }
174 const float unpackedLargestValue_;
175 const float unpackedSmallestValue_;
181 UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)> modifyUnpack)
const {
182 return UnderOverflow(
183 largestValue(), value >= 0 ? smallestPositiveValue() :
std::abs(smallestNegativeValue()), modifyUnpack);
188 static bool wouldBeDenorm(
double value) {
return false; }
191 bool lessThanSmallestValue(
double value)
const {
193 return value < smallestPositiveValue();
195 return value > smallestNegativeValue();
206 class Float16Helper {
208 class UnderOverflow {
210 static void printNonOkUnderflow(std::ostream& os) { os <<
" (not 0)"; }
211 static bool compatibleWithUnderflow(
double value) {
return value == 0.0; }
212 static void printNonOkOverflow(std::ostream& os) { os <<
" (not inf)"; }
213 static bool compatibleWithOverflow(
double value) {
return edm::isNotFinite(value); }
219 static UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)>) {
return UnderOverflow(); }
223 static bool wouldBeDenorm(
double value) {
224 const float valuef =
static_cast<float>(
value);
228 static bool lessThanSmallestValue(
double value) {
return std::abs(value) < smallestValue(); }
235 inrange_signflip = 1,
242 bool isInRange(
RangeStatus status) {
return status == RangeStatus::inrange || status == RangeStatus::denormal; }
244 template <
typename T>
245 class PackedValueCheckResult {
253 const typename T::UnderOverflow& underOverflow)
256 trackvalue_(trackvalue),
260 underOverflow_(underOverflow) {}
263 double diff()
const {
return diff_; }
265 bool outsideExpectedRange()
const {
266 if (status_ == RangeStatus::inrange)
267 return diff_ < rangeMin_ || diff_ > rangeMax_;
269 return status_ == RangeStatus::underflow_notOK || status_ == RangeStatus::overflow_notOK ||
270 status_ == RangeStatus::inrange_signflip;
273 void print(std::ostream& os)
const {
274 if (outsideExpectedRange())
276 os <<
"(" << rangeMin_ <<
"," << rangeMax_ <<
") ";
278 os << diff_ <<
" " << pcvalue_;
279 if (status_ == RangeStatus::underflow_OK || status_ == RangeStatus::underflow_notOK) {
280 os <<
" (underflow) ";
281 if (status_ == RangeStatus::underflow_notOK)
282 underOverflow_.printNonOkUnderflow(os);
283 }
else if (status_ == RangeStatus::overflow_OK || status_ == RangeStatus::overflow_notOK) {
284 os <<
" (overflow) ";
285 if (status_ == RangeStatus::overflow_notOK)
286 underOverflow_.printNonOkOverflow(os);
287 }
else if (status_ == RangeStatus::denormal)
289 os <<
" " << trackvalue_;
294 const double pcvalue_;
295 const double trackvalue_;
296 const double rangeMin_;
297 const double rangeMax_;
299 const typename T::UnderOverflow underOverflow_;
307 RangeAbs(
double val) :
min(-val),
max(val) {}
311 template <
typename T>
312 class PackedValueCheck {
314 template <
typename R,
typename... Args>
315 PackedValueCheck(
const R&
range, Args&&...
args)
316 : helper_(std::forward<Args>(
args)...), rangeMin_(range.min), rangeMax_(range.max) {}
318 void book(DQMStore::IBooker& iBooker,
327 hInrange = iBooker.book1D(name, title, nbins, min, max);
328 hUnderOverflowSign = iBooker.book1D(name +
"UnderOverFlowSign",
329 title +
" with over- and underflow, and sign flip",
333 hStatus = iBooker.book1D(name +
"Status", title +
" status", 7, -0.5, 6.5);
334 hStatus->setBinLabel(1,
"In range");
335 hStatus->setBinLabel(2,
"In range, sign flip");
336 hStatus->setBinLabel(3,
"Denormal");
337 hStatus->setBinLabel(4,
"Underflow, PC is " + T::minName());
338 hStatus->setBinLabel(5,
"Underflow, PC is not " + T::minName());
339 hStatus->setBinLabel(6,
"Overflow, PC is " + T::maxName());
340 hStatus->setBinLabel(7,
"Overflow, PC is not " + T::maxName());
343 PackedValueCheckResult<T>
fill(
double pcvalue,
347 const auto diff = diffRelative(pcvalue, trackvalue);
349 const auto tmpSigned = modifyPack ? modifyPack(trackvalue) : trackvalue;
351 const auto underOverflow = helper_.underOverflowHelper(tmpSigned, modifyUnpack);
353 if (
tmp > helper_.largestValue()) {
354 fillNoFlow(hUnderOverflowSign,
diff);
355 if (underOverflow.compatibleWithOverflow(
std::abs(pcvalue))) {
356 status = RangeStatus::overflow_OK;
358 status = RangeStatus::overflow_notOK;
360 }
else if (helper_.lessThanSmallestValue(tmpSigned)) {
361 fillNoFlow(hUnderOverflowSign,
diff);
362 if (underOverflow.compatibleWithUnderflow(
std::abs(pcvalue))) {
363 status = RangeStatus::underflow_OK;
365 status = RangeStatus::underflow_notOK;
369 if (T::wouldBeDenorm(
tmp)) {
370 status = RangeStatus::denormal;
372 status = RangeStatus::inrange;
374 fillNoFlow(hInrange,
diff);
376 fillNoFlow(hUnderOverflowSign,
diff);
377 status = RangeStatus::inrange_signflip;
380 hStatus->Fill(static_cast<int>(status));
382 return PackedValueCheckResult<T>(
status,
diff, pcvalue, trackvalue, rangeMin_, rangeMax_, underOverflow);
387 const double rangeMin_;
388 const double rangeMax_;
394 template <
typename T>
395 std::ostream& operator<<(std::ostream& os, const PackedValueCheckResult<T>&
res) {
421 sf_AssociatedToPC = 1,
424 sf_PCIsNotElectron = 4,
427 sf_NoMissingInnerHits = 7
497 iConfig.getUntrackedParameter<
edm::
InputTag>(
"trackToPackedCandidateAssociation"))),
498 rootFolder_(iConfig.getUntrackedParameter<
std::
string>(
"rootFolder")),
499 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")),
500 h_diffDxyAssocPV(RangeAbs(0.001)),
501 h_diffDzAssocPV(RangeAbs(0.001)),
502 h_diffCovQoverpQoverp(
Range(-1
e-6, 0.13), -15, 0),
503 h_diffCovLambdaLambda(
504 Range(-1
e-6, 0.13), -20, -5),
505 h_diffCovLambdaDsz(RangeAbs(0.13), -17, -4),
506 h_diffCovPhiPhi(RangeAbs(0.13), -15, 0),
507 h_diffCovPhiDxy(RangeAbs(0.13), -17, -4),
508 h_diffCovDxyDxy(RangeAbs(0.001)),
509 h_diffCovDxyDsz(RangeAbs(0.001)),
510 h_diffCovDszDsz(RangeAbs(0.001)) {}
523 descriptions.
add(
"packedCandidateTrackValidator", desc);
543 iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -0.2, 0.2);
545 iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -0.2, 0.2);
547 iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -0.4, 0.4);
550 "PackedCandidate::bestTrack() - reco::Track in normalizedChi2()",
555 "diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
558 "diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
560 "PackedCandidate::bestTrack() - reco::Track in quality(highPurity)",
566 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in pt()",
571 "diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -0.001, 0.001);
573 "PackedCandidate::bestTrack() - reco::Track in phi()",
580 "(PackedCandidate::dxy() - reco::Track::dxy(assocPV))/reco::Track",
589 "(PackedCandidate::dzAssociatedPV() - reco::Track::dz(assocPV))/reco::Track",
597 "(PackedCandidate::dxy(PV) - reco::Track::dxy(PV))/reco::Track",
602 "(PackedCandidate::dz(PV) - reco::Track::dz(PV))/reco::Track",
607 iBooker.
book1D(
"diffTrackDxyAssocPV",
608 "(PackedCandidate::bestTrack()::dxy(assocPV)) - reco::Track::dxy(assocPV))/reco::Track",
613 iBooker.
book1D(
"diffTrackDzAssocPV",
614 "(PackedCandidate::bestTrack()::dz(assocPV)) - reco::Track::dz(assocPV))/reco::Track",
620 "diffCovQoverpQoverp",
621 "(PackedCandidate::bestTrack() - reco::Track)/reco::track in cov(qoverp, qoverp)",
630 "diffCovLambdaLambda",
631 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, lambda)",
640 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, dsz)",
650 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, phi)",
659 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, dxy)",
668 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dxy)",
677 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dsz)",
686 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dsz, dsz)",
695 "(PackedCandidate::dxyError() - reco::Track::dxyError())/reco::Track",
700 "(PackedCandidate::dzError() - reco::Track::dszError())/reco::Track",
705 "(PackedCandidate::dzError() - reco::Track::dzError())/reco::Track",
711 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dxyError()",
716 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dzError()",
722 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in ptError()",
727 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in etaError()",
733 "diffNumberOfPixelLayers",
734 "PackedCandidate::pixelLayersWithMeasurement() - reco::Track::hitPattern::pixelLayersWithMeasurement()",
739 "diffNumberOfStripLayers",
740 "PackedCandidate::stripLayersWithMeasurement() - reco::Track::hitPattern::stripLayersWithMeasurement()",
745 iBooker.
book1D(
"diffNumberOfPixelHits",
746 "PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()",
751 "PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()",
756 iBooker.
book1D(
"diffLostInnerHits",
757 "PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)",
763 iBooker.
book1D(
"diffHitPatternPixelLayersWithMeasurement",
764 "PackedCandidate::bestTrack() - reco::Track in hitPattern::pixelLayersWithMeasurement()",
769 iBooker.
book1D(
"diffHitPatternStripLayersWithMeasurement",
770 "PackedCandidate::bestTrack() - reco::Track in hitPattern::stripLayersWithMeasurement()",
775 iBooker.
book1D(
"diffHitPatternTrackerLayersWithMeasurement",
776 "PackedCandidate::bestTrack() - reco::Track in hitPattern::trackerLayersWithMeasurement()",
781 iBooker.
book1D(
"diffHitPatternNumberOfValidPixelHits",
782 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfValidPixelHits()",
787 iBooker.
book1D(
"diffHitPatternNumberOfValidHits",
788 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfValidHits()",
793 iBooker.
book1D(
"diffHitPatternNumberOfLostPixelHits",
794 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfLostHits(MISSING_INNER_HITS)",
799 iBooker.
book1D(
"diffHitPatternHasValidHitInFirstPixelBarrel",
800 "PackedCandidate::bestTrack() - reco::Track in hitPattern::hasValidHitInFirstPixelBarrel",
806 "numberPixelLayersOverMax",
"Number of pixel layers over the maximum of PackedCandidate", 10, 0, 10);
808 "numberStripLayersOverMax",
"Number of strip layers over the maximum of PackedCandidate", 10, 0, 10);
810 iBooker.
book1D(
"numberLayersOverMax",
"Number of layers over the maximum of PackedCandidate", 20, 0, 20);
812 iBooker.
book1D(
"numberPixelHitsOverMax",
"Number of pixel hits over the maximum of PackedCandidate", 10, 0, 10);
814 iBooker.
book1D(
"numberStripHitsOverMax",
"Number of strip hits over the maximum of PackedCandidate", 10, 0, 10);
816 iBooker.
book1D(
"numberHitsOverMax",
"Number of hits over the maximum of PackedCandidate", 20, 0, 20);
822 const auto&
tracks = *htracks;
834 const auto& trackToPackedCandidate = *hassoc;
836 for (
size_t i = 0;
i <
tracks.size(); ++
i) {
837 auto trackPtr =
tracks.ptrAt(
i);
848 if (pcRef->charge() == 0) {
853 const reco::Track* trackPcPtr = pcRef->bestTrack();
860 if (
std::abs(pcRef->pdgId()) == 11) {
872 auto slimmedVertexRef = pcRef->vertexRef();
884 double diffNormalizedChi2 = 0;
885 if (trackPc.
ndof() != 0) {
898 const auto diffPt = diffRelative(trackPc.
pt(), track.
pt());
904 const auto diffDxyAssocPV =
907 pcRef->dzAssociatedPV(), track.
dz(pcVertex.
position()), [](
double value) {
return value * 100.; });
909 const auto diffDzPV = diffRelative(pcRef->dz(pv.
position()), track.
dz(pv.
position()));
915 auto fillCov1 = [&](
auto& hlp,
const int i,
const int j) {
918 auto fillCov2 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack) {
921 auto fillCov3 = [&](
auto& hlp,
924 std::function<double(double)> modifyPack,
925 std::function<double(double)> modifyUnpack) {
929 const auto pcPt = pcRef->pt();
933 [=](
double val) {
return val * pcPt * pcPt; },
934 [=](
double val) {
return val / pcPt / pcPt; });
935 const auto diffCovLambdaLambda =
941 [=](
double val) {
return val * pcPt * pcPt; },
942 [=](
double val) {
return val / pcPt / pcPt; });
944 const auto diffCovDxyDxy = fillCov2(
946 const auto diffCovDxyDsz = fillCov2(
948 const auto diffCovDszDsz = fillCov2(
951 if (isInRange(diffCovDszDsz.status())) {
956 if (isInRange(diffCovDxyDxy.status())) {
967 const auto pcNumberOfHits = pcRef->numberOfHits();
968 const auto pcNumberOfPixelHits = pcRef->numberOfPixelHits();
969 const auto pcNumberOfStripHits = pcNumberOfHits - pcNumberOfPixelHits;
973 const auto pcNumberOfLayers = pcRef->trackerLayersWithMeasurement();
974 const auto pcNumberOfPixelLayers = pcRef->pixelLayersWithMeasurement();
975 const auto pcNumberOfStripLayers = pcRef->stripLayersWithMeasurement();
984 const int layerOverflow =
986 ? trackNumberOfLayers -
991 const int pixelOverflow =
995 const int stripOverflow =
999 const int hitsOverflow =
1000 trackNumberOfHits - pcNumberOfLayers >
1002 ? trackNumberOfHits - pcNumberOfLayers -
1006 const int pixelInducedStripOverflow =
1008 ? (trackNumberOfStripHits + pixelOverflow - stripOverflow - pcNumberOfStripLayers) -
1018 int diffNumberOfPixelHits = 0;
1019 int diffNumberOfHits = 0;
1020 int diffNumberOfPixelLayers = 0;
1021 int diffNumberOfStripLayers = 0;
1022 if (pixelLayerOverflow) {
1025 diffNumberOfPixelLayers = pcNumberOfPixelLayers - trackNumberOfPixelLayers;
1027 if (pixelOverflow) {
1030 diffNumberOfPixelHits = pcNumberOfPixelHits - trackNumberOfPixelHits;
1032 if (stripLayerOverflow) {
1035 diffNumberOfStripLayers = pcNumberOfStripLayers - trackNumberOfStripLayers;
1037 if (stripOverflow || pixelInducedStripOverflow || pixelOverflow) {
1038 int diffNumberOfStripHits = 0;
1039 if (stripOverflow || pixelInducedStripOverflow) {
1041 }
else if (pixelOverflow) {
1042 diffNumberOfStripHits = (pcNumberOfStripHits - pixelOverflow) - trackNumberOfStripHits;
1045 diffNumberOfHits = diffNumberOfPixelHits + diffNumberOfStripHits;
1047 diffNumberOfHits = pcNumberOfHits - trackNumberOfHits;
1055 int diffLostInnerHits = 0;
1057 switch (pcRef->lostInnerHits()) {
1060 diffLostInnerHits = -trackLostInnerHits;
1063 diffLostInnerHits = 1 - trackLostInnerHits;
1066 diffLostInnerHits = trackLostInnerHits >= 2 ? 0 : 2 - trackLostInnerHits;
1072 auto diffHitPatternPixelLayersWithMeasurement =
1075 auto diffHitPatternStripLayersWithMeasurement =
1078 auto diffHitPatternTrackerLayersWithMeasurement =
1090 int diffHitPatternHasValidHitInFirstPixelBarrel = 0;
1093 diffHitPatternHasValidHitInFirstPixelBarrel =
1102 (diffNormalizedChi2 < -1 || diffNormalizedChi2 > 0 || diffCharge != 0 || diffHP != 0 ||
1103 std::abs(diffPhi) > 5
e-4 || diffDxyAssocPV.outsideExpectedRange() || diffDzAssocPV.outsideExpectedRange() ||
1104 std::abs(diffDxyPV) > 0.05 ||
std::abs(diffDzPV) > 0.05 || diffCovQoverpQoverp.outsideExpectedRange() ||
1105 diffCovLambdaLambda.outsideExpectedRange() || diffCovLambdaDsz.outsideExpectedRange() ||
1106 diffCovPhiPhi.outsideExpectedRange() || diffCovPhiDxy.outsideExpectedRange() ||
1107 diffCovDxyDxy.outsideExpectedRange() || diffCovDxyDsz.outsideExpectedRange() ||
1108 diffCovDszDsz.outsideExpectedRange() || diffNumberOfPixelHits != 0 || diffNumberOfHits != 0 ||
1109 diffLostInnerHits != 0 || diffHitPatternHasValidHitInFirstPixelBarrel != 0)) {
1111 <<
"Track " << i <<
" pt " << track.
pt() <<
" eta " << track.
eta() <<
" phi " << track.
phi() <<
" chi2 " 1112 << track.
chi2() <<
" ndof " << track.
ndof() <<
"\n" 1114 <<
" dxyError " << track.
dxyError() <<
" dzError " << track.
dzError() <<
"\n" 1116 <<
" dxy " << track.
dxy() <<
" dz " << track.
dz() <<
"\n" 1117 <<
" " << TrackAlgoPrinter(track) <<
" lost inner hits " << trackLostInnerHits <<
" lost outer hits " 1119 << HitPatternPrinter(track) <<
" \n" 1120 <<
" PC " << pcRef.
id() <<
":" << pcRef.
key() <<
" track pt " << trackPc.
pt() <<
" eta " << trackPc.
eta()
1121 <<
" phi " << trackPc.
phi() <<
" (PC " << pcRef->phi() <<
") chi2 " << trackPc.
chi2() <<
" ndof " 1122 << trackPc.
ndof() <<
" pdgId " << pcRef->pdgId() <<
" mass " << pcRef->mass() <<
"\n" 1123 <<
" ptError " << trackPc.
ptError() <<
" etaError " << trackPc.
etaError() <<
" phiError " 1125 <<
" pc.vertex " << pcRef->vertex() <<
" momentum " << pcRef->momentum() <<
" track " << trackPc.
momentum()
1127 <<
" dxy " << trackPc.
dxy() <<
" dz " << trackPc.
dz() <<
" pc.dz " << pcRef->dz() <<
" dxyError " 1129 <<
" dxy(PV) " << trackPc.
dxy(pv.
position()) <<
" dz(PV) " << trackPc.
dz(pv.
position()) <<
" dxy(assocPV) " 1131 <<
" (diff PackedCandidate track)" 1134 << track.
charge() <<
" normalizedChi2 " << diffNormalizedChi2 <<
" " << trackPc.
normalizedChi2() <<
" " 1136 <<
" numberOfAllHits " << diffNumberOfHits <<
" " << pcNumberOfHits <<
" " << trackNumberOfHits
1137 <<
" numberOfPixelHits " << diffNumberOfPixelHits <<
" " << pcNumberOfPixelHits <<
" " 1138 << trackNumberOfPixelHits <<
" numberOfStripHits # " << pcNumberOfStripHits <<
" " << trackNumberOfStripHits
1140 <<
" hitPattern.numberOfValidPixelHits " << diffHitPatternNumberOfValidPixelHits <<
" " 1142 <<
" hitPattern.numberOfValidHits " << diffHitPatternNumberOfValidHits <<
" " 1144 <<
" hitPattern.hasValidHitInFirstPixelBarrel " << diffHitPatternHasValidHitInFirstPixelBarrel <<
" " 1147 <<
" lostInnerHits " << diffLostInnerHits <<
" " << pcRef->lostInnerHits() <<
" #" 1148 <<
" phi (5e-4) " << diffPhi <<
" " << trackPc.
phi() <<
" " << track.
phi() <<
"\n " 1149 <<
" dxy(assocPV) " << diffDxyAssocPV <<
"\n " 1150 <<
" dz(assocPV) " << diffDzAssocPV <<
"\n " 1151 <<
" dxy(PV) (0.05) " << diffDxyPV <<
" " << pcRef->dxy(pv.
position()) <<
" " << track.
dxy(pv.
position())
1153 <<
" dz(PV) (0.05) " << diffDzPV <<
" " << pcRef->dz(pv.
position()) <<
" " << track.
dz(pv.
position()) <<
"\n " 1154 <<
" cov(qoverp, qoverp) " << diffCovQoverpQoverp <<
"\n " 1155 <<
" cov(lambda, lambda) " << diffCovLambdaLambda <<
"\n " 1156 <<
" cov(lambda, dsz) " << diffCovLambdaDsz <<
"\n " 1157 <<
" cov(phi, phi) " << diffCovPhiPhi <<
"\n " 1158 <<
" cov(phi, dxy) " << diffCovPhiDxy <<
"\n " 1159 <<
" cov(dxy, dxy) " << diffCovDxyDxy <<
"\n " 1160 <<
" cov(dxy, dsz) " << diffCovDxyDsz <<
"\n " 1161 <<
" cov(dsz, dsz) " << diffCovDszDsz;
constexpr double deltaPhi(double phi1, double phi2)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
const Point & referencePoint() const
Reference point on the track.
static bool stripTECHitFilter(uint16_t pattern)
static uint32_t getLayer(uint16_t pattern)
PackedValueCheck< LogIntHelper > h_diffCovLambdaDsz
PackedValueCheck< Float16Helper > h_diffDzAssocPV
PackedValueCheck< Float16Helper > h_diffDxyAssocPV
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool hasValidHitInPixelLayer(enum PixelSubdetector::SubDetector, uint16_t layer) const
static bool badHitFilter(uint16_t pattern)
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool isNotFinite(T x)
MonitorElement * h_diffNormalizedChi2
PixelRecoRange< float > Range
double dxyError() const
error on dxy
MonitorElement * h_diffVy
void setCurrentFolder(std::string const &fullpath)
double unpack8log(int8_t i, double lmin, double lmax, uint8_t base=128)
int numberOfValidHits() const
PackedCandidateTrackValidator(const edm::ParameterSet &pset)
MonitorElement * h_selectionFlow
MonitorElement * h_diffVz
MonitorElement * h_diffCharge
std::vector< pat::PackedCandidate > PackedCandidateCollection
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > trackToPackedCandidateToken_
double etaError() const
error on eta
int numberOfValidStripHits() const
double phi() const
azimuthal angle of momentum vector
std::vector< Vertex > VertexCollection
collection of Vertex objects
MonitorElement * h_numberHitsOverMax
constexpr int8_t smallestNegative
MonitorElement * h_numberPixelHitsOverMax
key_type key() const
Accessor for product key.
MonitorElement * h_diffNumberOfPixelHits
int pixelLayersWithMeasurement() const
const Vector & momentum() const
track momentum vector
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
S & print(S &os, JobReport::InputFile const &f)
static bool missingHitFilter(uint16_t pattern)
int trackerLayersWithMeasurement() const
const Point & position() const
position
static bool pixelBarrelHitFilter(uint16_t pattern)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h_diffTrackDxyAssocPV
ProductID id() const
Accessor for product ID.
void push_back(const T &value)
TrackAlgorithm
track algorithm
static float denorm_min()
static bool pixelEndcapHitFilter(uint16_t pattern)
MonitorElement * h_diffDzError
PackedValueCheck< LogIntHelper > h_diffCovLambdaLambda
MonitorElement * h_numberStripHitsOverMax
MonitorElement * h_diffLostInnerHits
MonitorElement * h_numberLayersOverMax
double dszError() const
error on dsz
#define DEFINE_FWK_MODULE(type)
double eta() const
pseudorapidity of momentum vector
MonitorElement * h_diffPhi
PackedValueCheck< LogIntHelper > h_diffCovPhiDxy
~PackedCandidateTrackValidator() override
double chi2() const
chi-squared of the fit
PackedValueCheck< Float16Helper > h_diffCovDxyDxy
MonitorElement * h_diffTrackDzError
PackedValueCheck< LogIntHelper > h_diffCovPhiPhi
double ndof() const
number of degrees of freedom of the fit
MonitorElement * h_diffDzPV
CovarianceMatrix covariance() const
return track covariance matrix
dqm::dqmstoreimpl::DQMStore DQMStore
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
double phiError() const
error on phi
MonitorElement * h_diffHitPatternHasValidHitInFirstPixelBarrel
int numberOfAllHits(HitCategory category) const
Abs< T >::type abs(const T &t)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_diffHitPatternTrackerLayersWithMeasurement
MonitorElement * h_diffIsHighPurity
constexpr size_type size() const noexcept
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
bool isNull() const
Checks for null.
MonitorElement * h_diffDszError
static bool inactiveHitFilter(uint16_t pattern)
MonitorElement * h_diffHitPatternPixelLayersWithMeasurement
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
double vz() const
z coordinate of the reference point on track
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::VertexCollection > verticesToken_
MonitorElement * h_diffDxyPV
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
std::string algoName() const
constexpr int8_t smallestPositive
int stripLayersWithMeasurement() const
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * h_diffTrackDzAssocPV
MonitorElement * h_diffHitPatternNumberOfLostInnerHits
MonitorElement * h_diffHitPatternNumberOfValidPixelHits
static bool stripTOBHitFilter(uint16_t pattern)
bool quality(const TrackQuality) const
Track quality.
MonitorElement * h_diffNdof
int numberOfLostHits(HitCategory category) const
MonitorElement * h_diffVx
double vy() const
y coordinate of the reference point on track
static bool stripTIBHitFilter(uint16_t pattern)
void analyze(const edm::Event &, const edm::EventSetup &) override
static float max32RoundedToMax16()
dqm::impl::MonitorElement MonitorElement
MonitorElement * h_diffHitPatternNumberOfValidHits
PackedValueCheck< LogIntHelper > h_diffCovQoverpQoverp
PackedValueCheck< Float16Helper > h_diffCovDxyDsz
MonitorElement * h_numberStripLayersOverMax
MonitorElement * h_diffDxyError
MonitorElement * h_diffPt
int numberOfValidPixelHits() const
PackedValueCheck< Float16Helper > h_diffCovDszDsz
int charge() const
track electric charge
MonitorElement * h_numberPixelLayersOverMax
MonitorElement * h_diffNumberOfStripLayers
uint16_t getHitPattern(HitCategory category, int position) const
static bool stripTIDHitFilter(uint16_t pattern)
MonitorElement * h_diffPtError
MonitorElement * h_diffEta
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
MonitorElement * h_diffTrackDxyError
virtual TH1 * getTH1() const
MonitorElement * h_diffNumberOfHits
MonitorElement * h_diffEtaError
MonitorElement * h_diffNumberOfPixelLayers
double vx() const
x coordinate of the reference point on track
MonitorElement * h_diffHitPatternStripLayersWithMeasurement