33 auto h =
me->getTH1();
34 const auto xaxis =
h->GetXaxis();
35 if (val <= xaxis->GetXmin())
36 h->AddBinContent(
xaxis->GetFirst());
38 h->AddBinContent(
xaxis->GetLast());
43 class HitPatternPrinter {
47 void print(std::ostream& os)
const {
54 if (
p.missingHitFilter(
hit)) {
56 }
else if (
p.inactiveHitFilter(
hit)) {
58 }
else if (
p.badHitFilter(
hit)) {
70 if (
p.missingHitFilter(
hit)) {
72 }
else if (
p.inactiveHitFilter(
hit)) {
83 if (
p.missingHitFilter(
hit)) {
85 }
else if (
p.inactiveHitFilter(
hit)) {
94 if (
p.pixelBarrelHitFilter(
hit)) {
96 }
else if (
p.pixelEndcapHitFilter(
hit)) {
98 }
else if (
p.stripTIBHitFilter(
hit)) {
100 }
else if (
p.stripTIDHitFilter(
hit)) {
102 }
else if (
p.stripTOBHitFilter(
hit)) {
104 }
else if (
p.stripTECHitFilter(
hit)) {
107 os <<
p.getLayer(
hit);
113 std::ostream&
operator<<(std::ostream& os,
const HitPatternPrinter& hpp) {
118 class TrackAlgoPrinter {
122 void print(std::ostream& os)
const {
134 if (
algos.size() > 1) {
145 std::ostream&
operator<<(std::ostream& os,
const TrackAlgoPrinter& tap) {
150 double diffRelative(
double a,
double b) {
return (
a -
b) /
b; }
154 LogIntHelper(
double lmin,
double lmax) : lmin_(lmin), lmax_(lmax) {}
156 class UnderOverflow {
158 UnderOverflow(
double largestValue,
double smallestValue,
std::function<
double(
double)> modifyUnpack)
159 : unpackedLargestValue_(modifyUnpack ? modifyUnpack(largestValue) : largestValue),
160 unpackedSmallestValue_(modifyUnpack ? modifyUnpack(smallestValue) : smallestValue) {}
162 bool compatibleWithUnderflow(
double value)
const {
return value == unpackedSmallestValue_; }
163 void printNonOkUnderflow(std::ostream& os)
const { os <<
" (not min " << unpackedSmallestValue_ <<
")"; }
165 bool compatibleWithOverflow(
double value)
const {
return value == unpackedLargestValue_; }
166 void printNonOkOverflow(std::ostream& os)
const { os <<
" (not max " << unpackedLargestValue_ <<
")"; }
172 const float unpackedLargestValue_;
173 const float unpackedSmallestValue_;
179 UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)> modifyUnpack)
const {
180 return UnderOverflow(
181 largestValue(),
value >= 0 ? smallestPositiveValue() :
std::abs(smallestNegativeValue()), modifyUnpack);
186 static bool wouldBeDenorm(
double value) {
return false; }
189 bool lessThanSmallestValue(
double value)
const {
191 return value < smallestPositiveValue();
193 return value > smallestNegativeValue();
204 class Float16Helper {
206 class UnderOverflow {
208 static void printNonOkUnderflow(std::ostream& os) { os <<
" (not 0)"; }
209 static bool compatibleWithUnderflow(
double value) {
return value == 0.0; }
210 static void printNonOkOverflow(std::ostream& os) { os <<
" (not inf)"; }
217 static UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)>) {
return UnderOverflow(); }
221 static bool wouldBeDenorm(
double value) {
222 const float valuef =
static_cast<float>(
value);
226 static bool lessThanSmallestValue(
double value) {
return std::abs(
value) < smallestValue(); }
233 inrange_signflip = 1,
242 template <
typename T>
243 class PackedValueCheckResult {
251 const typename T::UnderOverflow& underOverflow)
254 trackvalue_(trackvalue),
258 underOverflow_(underOverflow) {}
261 double diff()
const {
return diff_; }
263 bool outsideExpectedRange()
const {
264 if (status_ == RangeStatus::inrange)
265 return diff_ < rangeMin_ || diff_ > rangeMax_;
267 return status_ == RangeStatus::underflow_notOK || status_ == RangeStatus::overflow_notOK ||
268 status_ == RangeStatus::inrange_signflip;
271 void print(std::ostream& os)
const {
272 if (outsideExpectedRange())
274 os <<
"(" << rangeMin_ <<
"," << rangeMax_ <<
") ";
276 os << diff_ <<
" " << pcvalue_;
277 if (status_ == RangeStatus::underflow_OK || status_ == RangeStatus::underflow_notOK) {
278 os <<
" (underflow) ";
279 if (status_ == RangeStatus::underflow_notOK)
280 underOverflow_.printNonOkUnderflow(os);
281 }
else if (status_ == RangeStatus::overflow_OK || status_ == RangeStatus::overflow_notOK) {
282 os <<
" (overflow) ";
283 if (status_ == RangeStatus::overflow_notOK)
284 underOverflow_.printNonOkOverflow(os);
285 }
else if (status_ == RangeStatus::denormal)
287 os <<
" " << trackvalue_;
292 const double pcvalue_;
293 const double trackvalue_;
294 const double rangeMin_;
295 const double rangeMax_;
297 const typename T::UnderOverflow underOverflow_;
309 template <
typename T>
310 class PackedValueCheck {
312 template <
typename R,
typename... Args>
313 PackedValueCheck(
const R&
range, Args&&...
args)
326 hUnderOverflowSign = iBooker.
book1D(
name +
"UnderOverFlowSign",
327 title +
" with over- and underflow, and sign flip",
331 hStatus = iBooker.
book1D(
name +
"Status",
title +
" status", 7, -0.5, 6.5);
333 hStatus->setBinLabel(2,
"In range, sign flip");
334 hStatus->setBinLabel(3,
"Denormal");
335 hStatus->setBinLabel(4,
"Underflow, PC is " + T::minName());
336 hStatus->setBinLabel(5,
"Underflow, PC is not " + T::minName());
337 hStatus->setBinLabel(6,
"Overflow, PC is " + T::maxName());
338 hStatus->setBinLabel(7,
"Overflow, PC is not " + T::maxName());
341 PackedValueCheckResult<T>
fill(
double pcvalue,
345 const auto diff = diffRelative(pcvalue, trackvalue);
347 const auto tmpSigned = modifyPack ? modifyPack(trackvalue) : trackvalue;
349 const auto underOverflow = helper_.underOverflowHelper(tmpSigned, modifyUnpack);
351 if (
tmp > helper_.largestValue()) {
352 fillNoFlow(hUnderOverflowSign,
diff);
353 if (underOverflow.compatibleWithOverflow(
std::abs(pcvalue))) {
354 status = RangeStatus::overflow_OK;
356 status = RangeStatus::overflow_notOK;
358 }
else if (helper_.lessThanSmallestValue(tmpSigned)) {
359 fillNoFlow(hUnderOverflowSign,
diff);
360 if (underOverflow.compatibleWithUnderflow(
std::abs(pcvalue))) {
361 status = RangeStatus::underflow_OK;
363 status = RangeStatus::underflow_notOK;
367 if (pcvalue * trackvalue > 0 || pcvalue == trackvalue) {
368 if (T::wouldBeDenorm(
tmp)) {
369 status = RangeStatus::denormal;
371 status = RangeStatus::inrange;
373 fillNoFlow(hInrange,
diff);
375 fillNoFlow(hUnderOverflowSign,
diff);
376 status = RangeStatus::inrange_signflip;
379 hStatus->Fill(static_cast<int>(
status));
381 return PackedValueCheckResult<T>(
status,
diff, pcvalue, trackvalue, rangeMin_, rangeMax_, underOverflow);
386 const double rangeMin_;
387 const double rangeMax_;
393 template <
typename T>
394 std::ostream& operator<<(std::ostream& os, const PackedValueCheckResult<T>&
res) {
496 iConfig.getUntrackedParameter<
edm::
InputTag>(
"trackToPackedCandidateAssociation"))),
497 rootFolder_(iConfig.getUntrackedParameter<
std::
string>(
"rootFolder")),
498 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")),
499 h_diffDxyAssocPV(RangeAbs(0.001)),
500 h_diffDzAssocPV(RangeAbs(0.001)),
501 h_diffCovQoverpQoverp(
Range(-1
e-6, 0.13), -15, 0),
502 h_diffCovLambdaLambda(
503 Range(-1
e-6, 0.13), -20, -5),
504 h_diffCovLambdaDsz(RangeAbs(0.13), -17, -4),
505 h_diffCovPhiPhi(RangeAbs(0.13), -15, 0),
506 h_diffCovPhiDxy(RangeAbs(0.13), -17, -4),
507 h_diffCovDxyDxy(RangeAbs(0.001)),
508 h_diffCovDxyDsz(RangeAbs(0.001)),
509 h_diffCovDszDsz(RangeAbs(0.001)) {}
519 desc.addUntracked<
std::string>(
"rootFolder",
"Tracking/PackedCandidate");
520 desc.addUntracked<
bool>(
"debug",
false);
522 descriptions.
add(
"packedCandidateTrackValidator",
desc);
539 constexpr
int diffBins = 50;
542 iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -0.2, 0.2);
544 iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -0.2, 0.2);
546 iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -0.4, 0.4);
549 "PackedCandidate::bestTrack() - reco::Track in normalizedChi2()",
554 "diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
557 "diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
559 "PackedCandidate::bestTrack() - reco::Track in quality(highPurity)",
565 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in pt()",
570 "diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -0.001, 0.001);
572 "PackedCandidate::bestTrack() - reco::Track in phi()",
579 "(PackedCandidate::dxy() - reco::Track::dxy(assocPV))/reco::Track",
588 "(PackedCandidate::dzAssociatedPV() - reco::Track::dz(assocPV))/reco::Track",
596 "(PackedCandidate::dxy(PV) - reco::Track::dxy(PV))/reco::Track",
601 "(PackedCandidate::dz(PV) - reco::Track::dz(PV))/reco::Track",
606 iBooker.
book1D(
"diffTrackDxyAssocPV",
607 "(PackedCandidate::bestTrack()::dxy(assocPV)) - reco::Track::dxy(assocPV))/reco::Track",
612 iBooker.
book1D(
"diffTrackDzAssocPV",
613 "(PackedCandidate::bestTrack()::dz(assocPV)) - reco::Track::dz(assocPV))/reco::Track",
619 "diffCovQoverpQoverp",
620 "(PackedCandidate::bestTrack() - reco::Track)/reco::track in cov(qoverp, qoverp)",
629 "diffCovLambdaLambda",
630 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, lambda)",
639 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, dsz)",
649 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, phi)",
658 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, dxy)",
667 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dxy)",
676 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dsz)",
685 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dsz, dsz)",
694 "(PackedCandidate::dxyError() - reco::Track::dxyError())/reco::Track",
699 "(PackedCandidate::dzError() - reco::Track::dszError())/reco::Track",
704 "(PackedCandidate::dzError() - reco::Track::dzError())/reco::Track",
710 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dxyError()",
715 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dzError()",
721 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in ptError()",
726 "(PackedCandidate::bestTrack() - reco::Track)/reco::Track in etaError()",
732 "diffNumberOfPixelLayers",
733 "PackedCandidate::pixelLayersWithMeasurement() - reco::Track::hitPattern::pixelLayersWithMeasurement()",
738 "diffNumberOfStripLayers",
739 "PackedCandidate::stripLayersWithMeasurement() - reco::Track::hitPattern::stripLayersWithMeasurement()",
744 iBooker.
book1D(
"diffNumberOfPixelHits",
745 "PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()",
750 "PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()",
755 iBooker.
book1D(
"diffLostInnerHits",
756 "PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)",
762 iBooker.
book1D(
"diffHitPatternPixelLayersWithMeasurement",
763 "PackedCandidate::bestTrack() - reco::Track in hitPattern::pixelLayersWithMeasurement()",
768 iBooker.
book1D(
"diffHitPatternStripLayersWithMeasurement",
769 "PackedCandidate::bestTrack() - reco::Track in hitPattern::stripLayersWithMeasurement()",
774 iBooker.
book1D(
"diffHitPatternTrackerLayersWithMeasurement",
775 "PackedCandidate::bestTrack() - reco::Track in hitPattern::trackerLayersWithMeasurement()",
780 iBooker.
book1D(
"diffHitPatternNumberOfValidPixelHits",
781 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfValidPixelHits()",
786 iBooker.
book1D(
"diffHitPatternNumberOfValidHits",
787 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfValidHits()",
792 iBooker.
book1D(
"diffHitPatternNumberOfLostPixelHits",
793 "PackedCandidate::bestTrack() - reco::Track in hitPattern::numberOfLostHits(MISSING_INNER_HITS)",
798 iBooker.
book1D(
"diffHitPatternHasValidHitInFirstPixelBarrel",
799 "PackedCandidate::bestTrack() - reco::Track in hitPattern::hasValidHitInFirstPixelBarrel",
805 "numberPixelLayersOverMax",
"Number of pixel layers over the maximum of PackedCandidate", 10, 0, 10);
807 "numberStripLayersOverMax",
"Number of strip layers over the maximum of PackedCandidate", 10, 0, 10);
809 iBooker.
book1D(
"numberLayersOverMax",
"Number of layers over the maximum of PackedCandidate", 20, 0, 20);
811 iBooker.
book1D(
"numberPixelHitsOverMax",
"Number of pixel hits over the maximum of PackedCandidate", 10, 0, 10);
813 iBooker.
book1D(
"numberStripHitsOverMax",
"Number of strip hits over the maximum of PackedCandidate", 10, 0, 10);
815 iBooker.
book1D(
"numberHitsOverMax",
"Number of hits over the maximum of PackedCandidate", 20, 0, 20);
821 const auto&
tracks = *htracks;
833 const auto& trackToPackedCandidate = *hassoc;
835 for (
size_t i = 0;
i <
tracks.size(); ++
i) {
836 auto trackPtr =
tracks.ptrAt(
i);
847 if (pcRef->charge() == 0) {
852 const reco::Track* trackPcPtr = pcRef->bestTrack();
859 if (
std::abs(pcRef->pdgId()) == 11) {
871 auto slimmedVertexRef = pcRef->vertexRef();
883 double diffNormalizedChi2 = 0;
884 if (trackPc.
ndof() != 0) {
891 auto diffCharge = trackPc.
charge() -
track.charge();
897 const auto diffPt = diffRelative(trackPc.
pt(),
track.pt());
903 const auto diffDxyAssocPV =
907 const auto diffDxyPV = diffRelative(pcRef->dxy(
pv.position()),
track.dxy(
pv.position()));
908 const auto diffDzPV = diffRelative(pcRef->dz(
pv.position()),
track.dz(
pv.position()));
914 auto fillCov1 = [&](
auto& hlp,
const int i,
const int j) {
917 auto fillCov2 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack) {
920 auto fillCov3 = [&](
auto& hlp,
923 std::function<double(double)> modifyPack,
924 std::function<double(double)> modifyUnpack) {
925 return hlp.fill(trackPc.
covariance(
i,
j),
track.covariance(
i,
j), modifyPack, modifyUnpack);
928 const auto pcPt = pcRef->pt();
929 const auto diffCovQoverpQoverp = fillCov3(
933 [=](
double val) {
return val * pcPt * pcPt; },
934 [=](
double val) {
return val / pcPt / pcPt; });
935 const auto diffCovLambdaLambda =
938 const auto diffCovPhiPhi = fillCov3(
942 [=](
double val) {
return val * pcPt * pcPt; },
943 [=](
double val) {
return val / pcPt / pcPt; });
945 const auto diffCovDxyDxy = fillCov2(
947 const auto diffCovDxyDsz = fillCov2(
949 const auto diffCovDszDsz = fillCov2(
952 if (isInRange(diffCovDszDsz.status())) {
957 if (isInRange(diffCovDxyDxy.status())) {
965 const auto trackNumberOfHits =
track.hitPattern().numberOfValidHits();
966 const auto trackNumberOfPixelHits =
track.hitPattern().numberOfValidPixelHits();
967 const auto trackNumberOfStripHits =
track.hitPattern().numberOfValidStripHits();
968 const auto pcNumberOfHits = pcRef->numberOfHits();
969 const auto pcNumberOfPixelHits = pcRef->numberOfPixelHits();
970 const auto pcNumberOfStripHits = pcNumberOfHits - pcNumberOfPixelHits;
971 const auto trackNumberOfLayers =
track.hitPattern().trackerLayersWithMeasurement();
972 const auto trackNumberOfPixelLayers =
track.hitPattern().pixelLayersWithMeasurement();
973 const auto trackNumberOfStripLayers =
track.hitPattern().stripLayersWithMeasurement();
974 const auto pcNumberOfLayers = pcRef->trackerLayersWithMeasurement();
975 const auto pcNumberOfPixelLayers = pcRef->pixelLayersWithMeasurement();
976 const auto pcNumberOfStripLayers = pcRef->stripLayersWithMeasurement();
985 const int layerOverflow =
987 ? trackNumberOfLayers -
992 const int pixelOverflow =
996 const int stripOverflow =
1000 const int hitsOverflow =
1001 trackNumberOfHits - pcNumberOfLayers >
1003 ? trackNumberOfHits - pcNumberOfLayers -
1007 const int pixelInducedStripOverflow =
1009 ? (trackNumberOfStripHits + pixelOverflow - stripOverflow - pcNumberOfStripLayers) -
1019 int diffNumberOfPixelHits = 0;
1020 int diffNumberOfHits = 0;
1021 int diffNumberOfPixelLayers = 0;
1022 int diffNumberOfStripLayers = 0;
1023 if (pixelLayerOverflow) {
1026 diffNumberOfPixelLayers = pcNumberOfPixelLayers - trackNumberOfPixelLayers;
1028 if (pixelOverflow) {
1031 diffNumberOfPixelHits = pcNumberOfPixelHits - trackNumberOfPixelHits;
1033 if (stripLayerOverflow) {
1036 diffNumberOfStripLayers = pcNumberOfStripLayers - trackNumberOfStripLayers;
1038 if (stripOverflow || pixelInducedStripOverflow || pixelOverflow) {
1039 int diffNumberOfStripHits = 0;
1040 if (stripOverflow || pixelInducedStripOverflow) {
1042 }
else if (pixelOverflow) {
1043 diffNumberOfStripHits = (pcNumberOfStripHits - pixelOverflow) - trackNumberOfStripHits;
1046 diffNumberOfHits = diffNumberOfPixelHits + diffNumberOfStripHits;
1048 diffNumberOfHits = pcNumberOfHits - trackNumberOfHits;
1056 int diffLostInnerHits = 0;
1058 switch (pcRef->lostInnerHits()) {
1061 diffLostInnerHits = -trackLostInnerHits;
1064 diffLostInnerHits = 1 - trackLostInnerHits;
1067 diffLostInnerHits = trackLostInnerHits >= 2 ? 0 : 2 - trackLostInnerHits;
1073 auto diffHitPatternPixelLayersWithMeasurement =
1076 auto diffHitPatternStripLayersWithMeasurement =
1079 auto diffHitPatternTrackerLayersWithMeasurement =
1091 int diffHitPatternHasValidHitInFirstPixelBarrel = 0;
1094 diffHitPatternHasValidHitInFirstPixelBarrel =
1103 (diffNormalizedChi2 < -1 || diffNormalizedChi2 > 0 || diffCharge != 0 || diffHP != 0 ||
1104 std::abs(diffPhi) > 5
e-4 || diffDxyAssocPV.outsideExpectedRange() || diffDzAssocPV.outsideExpectedRange() ||
1105 std::abs(diffDxyPV) > 0.05 ||
std::abs(diffDzPV) > 0.05 || diffCovQoverpQoverp.outsideExpectedRange() ||
1106 diffCovLambdaLambda.outsideExpectedRange() || diffCovLambdaDsz.outsideExpectedRange() ||
1107 diffCovPhiPhi.outsideExpectedRange() || diffCovPhiDxy.outsideExpectedRange() ||
1108 diffCovDxyDxy.outsideExpectedRange() || diffCovDxyDsz.outsideExpectedRange() ||
1109 diffCovDszDsz.outsideExpectedRange() || diffNumberOfPixelHits != 0 || diffNumberOfHits != 0 ||
1110 diffLostInnerHits != 0 || diffHitPatternHasValidHitInFirstPixelBarrel != 0)) {
1112 <<
"Track " <<
i <<
" pt " <<
track.pt() <<
" eta " <<
track.eta() <<
" phi " <<
track.phi() <<
" chi2 " 1113 <<
track.chi2() <<
" ndof " <<
track.ndof() <<
"\n" 1114 <<
" ptError " <<
track.ptError() <<
" etaError " <<
track.etaError() <<
" phiError " <<
track.phiError()
1115 <<
" dxyError " <<
track.dxyError() <<
" dzError " <<
track.dzError() <<
"\n" 1116 <<
" refpoint " <<
track.referencePoint() <<
" momentum " <<
track.momentum() <<
"\n" 1117 <<
" dxy " <<
track.dxy() <<
" dz " <<
track.dz() <<
"\n" 1118 <<
" " << TrackAlgoPrinter(
track) <<
" lost inner hits " << trackLostInnerHits <<
" lost outer hits " 1120 << HitPatternPrinter(
track) <<
" \n" 1121 <<
" PC " << pcRef.
id() <<
":" << pcRef.
key() <<
" track pt " << trackPc.
pt() <<
" eta " << trackPc.
eta()
1122 <<
" phi " << trackPc.
phi() <<
" (PC " << pcRef->phi() <<
") chi2 " << trackPc.
chi2() <<
" ndof " 1123 << trackPc.
ndof() <<
" pdgId " << pcRef->pdgId() <<
" mass " << pcRef->mass() <<
"\n" 1124 <<
" ptError " << trackPc.
ptError() <<
" etaError " << trackPc.
etaError() <<
" phiError " 1126 <<
" pc.vertex " << pcRef->vertex() <<
" momentum " << pcRef->momentum() <<
" track " << trackPc.
momentum()
1128 <<
" dxy " << trackPc.
dxy() <<
" dz " << trackPc.
dz() <<
" pc.dz " << pcRef->dz() <<
" dxyError " 1130 <<
" dxy(PV) " << trackPc.
dxy(
pv.position()) <<
" dz(PV) " << trackPc.
dz(
pv.position()) <<
" dxy(assocPV) " 1132 <<
" (diff PackedCandidate track)" 1135 <<
track.charge() <<
" normalizedChi2 " << diffNormalizedChi2 <<
" " << trackPc.
normalizedChi2() <<
" " 1136 <<
track.normalizedChi2() <<
"\n " 1137 <<
" numberOfAllHits " << diffNumberOfHits <<
" " << pcNumberOfHits <<
" " << trackNumberOfHits
1138 <<
" numberOfPixelHits " << diffNumberOfPixelHits <<
" " << pcNumberOfPixelHits <<
" " 1139 << trackNumberOfPixelHits <<
" numberOfStripHits # " << pcNumberOfStripHits <<
" " << trackNumberOfStripHits
1141 <<
" hitPattern.numberOfValidPixelHits " << diffHitPatternNumberOfValidPixelHits <<
" " 1143 <<
" hitPattern.numberOfValidHits " << diffHitPatternNumberOfValidHits <<
" " 1145 <<
" hitPattern.hasValidHitInFirstPixelBarrel " << diffHitPatternHasValidHitInFirstPixelBarrel <<
" " 1148 <<
" lostInnerHits " << diffLostInnerHits <<
" " << pcRef->lostInnerHits() <<
" #" 1149 <<
" phi (5e-4) " << diffPhi <<
" " << trackPc.
phi() <<
" " <<
track.phi() <<
"\n " 1150 <<
" dxy(assocPV) " << diffDxyAssocPV <<
"\n " 1151 <<
" dz(assocPV) " << diffDzAssocPV <<
"\n " 1152 <<
" dxy(PV) (0.05) " << diffDxyPV <<
" " << pcRef->dxy(
pv.position()) <<
" " <<
track.dxy(
pv.position())
1154 <<
" dz(PV) (0.05) " << diffDzPV <<
" " << pcRef->dz(
pv.position()) <<
" " <<
track.dz(
pv.position()) <<
"\n " 1155 <<
" cov(qoverp, qoverp) " << diffCovQoverpQoverp <<
"\n " 1156 <<
" cov(lambda, lambda) " << diffCovLambdaLambda <<
"\n " 1157 <<
" cov(lambda, dsz) " << diffCovLambdaDsz <<
"\n " 1158 <<
" cov(phi, phi) " << diffCovPhiPhi <<
"\n " 1159 <<
" cov(phi, dxy) " << diffCovPhiDxy <<
"\n " 1160 <<
" cov(dxy, dxy) " << diffCovDxyDxy <<
"\n " 1161 <<
" cov(dxy, dsz) " << diffCovDxyDsz <<
"\n " 1162 <<
" cov(dsz, dsz) " << diffCovDszDsz;
bool quality(const TrackQuality) const
Track quality.
int numberOfValidPixelHits() const
constexpr double deltaPhi(double phi1, double phi2)
int numberOfLostHits(HitCategory category) const
int numberOfValidHits() const
PackedValueCheck< LogIntHelper > h_diffCovLambdaDsz
PackedValueCheck< Float16Helper > h_diffDzAssocPV
PackedValueCheck< Float16Helper > h_diffDxyAssocPV
ProductID id() const
Accessor for product ID.
dqm::impl::MonitorElement MonitorElement
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
PixelRecoRange< float > Range
virtual void setCurrentFolder(std::string const &fullpath)
double vx() const
x coordinate of the reference point on track
edm::EDGetTokenT< edm::View< reco::Track > > tracksToken_
constexpr bool isNotFinite(T x)
MonitorElement * h_diffNormalizedChi2
MonitorElement * h_diffVy
const Point & position() const
position
double unpack8log(int8_t i, double lmin, double lmax, uint8_t base=128)
PackedCandidateTrackValidator(const edm::ParameterSet &pset)
int trackerLayersWithMeasurement() const
MonitorElement * h_selectionFlow
MonitorElement * h_diffVz
MonitorElement * h_diffCharge
std::vector< pat::PackedCandidate > PackedCandidateCollection
int stripLayersWithMeasurement() const
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > trackToPackedCandidateToken_
MonitorElement * h_numberHitsOverMax
constexpr int8_t smallestNegative
MonitorElement * h_numberPixelHitsOverMax
MonitorElement * h_diffNumberOfPixelHits
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::vector< Vertex > VertexCollection
key_type key() const
Accessor for product key.
MonitorElement * h_diffTrackDxyAssocPV
TrackAlgorithm
track algorithm
static float denorm_min()
MonitorElement * h_diffDzError
PackedValueCheck< LogIntHelper > h_diffCovLambdaLambda
MonitorElement * h_numberStripHitsOverMax
MonitorElement * h_diffLostInnerHits
double pt() const
track transverse momentum
MonitorElement * h_numberLayersOverMax
double ndof() const
number of degrees of freedom of the fit
int charge() const
track electric charge
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...
CovarianceMatrix covariance() const
return track covariance matrix
MonitorElement * h_diffPhi
PackedValueCheck< LogIntHelper > h_diffCovPhiDxy
double dxyError() const
error on dxy
double vz() const
z coordinate of the reference point on track
~PackedCandidateTrackValidator() override
PackedValueCheck< Float16Helper > h_diffCovDxyDxy
MonitorElement * h_diffTrackDzError
double dzError() const
error on dz
PackedValueCheck< LogIntHelper > h_diffCovPhiPhi
MonitorElement * h_diffDzPV
MonitorElement * h_diffHitPatternHasValidHitInFirstPixelBarrel
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Abs< T >::type abs(const T &t)
dqm::legacy::DQMStore DQMStore
double phi() const
azimuthal angle of momentum vector
#define DEFINE_FWK_MODULE(type)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_diffHitPatternTrackerLayersWithMeasurement
MonitorElement * h_diffIsHighPurity
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
std::string algoName() const
MonitorElement * h_diffHitPatternPixelLayersWithMeasurement
Log< level::Info, false > LogInfo
double eta() const
pseudorapidity of momentum vector
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
edm::EDGetTokenT< reco::VertexCollection > verticesToken_
MonitorElement * h_diffDxyPV
constexpr int8_t smallestPositive
double chi2() const
chi-squared of the fit
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * h_diffTrackDzAssocPV
MonitorElement * h_diffHitPatternNumberOfLostInnerHits
MonitorElement * h_diffHitPatternNumberOfValidPixelHits
MonitorElement * h_diffNdof
const Vector & momentum() const
track momentum vector
MonitorElement * h_diffVx
double vy() const
y coordinate of the reference point on track
void analyze(const edm::Event &, const edm::EventSetup &) override
static float max32RoundedToMax16()
MonitorElement * h_diffHitPatternNumberOfValidHits
PackedValueCheck< LogIntHelper > h_diffCovQoverpQoverp
PackedValueCheck< Float16Helper > h_diffCovDxyDsz
MonitorElement * h_numberStripLayersOverMax
MonitorElement * h_diffDxyError
MonitorElement * h_diffPt
PackedValueCheck< Float16Helper > h_diffCovDszDsz
MonitorElement * h_numberPixelLayersOverMax
int pixelLayersWithMeasurement() const
MonitorElement * h_diffNumberOfStripLayers
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * h_diffPtError
MonitorElement * h_diffEta
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
double phiError() const
error on phi
MonitorElement * h_diffTrackDxyError
double etaError() const
error on eta
MonitorElement * h_diffNumberOfHits
MonitorElement * h_diffEtaError
bool hasValidHitInPixelLayer(enum PixelSubdetector::SubDetector, uint16_t layer) const
MonitorElement * h_diffNumberOfPixelLayers
MonitorElement * h_diffHitPatternStripLayersWithMeasurement
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...