25 #include "boost/math/special_functions/sign.hpp" 32 const auto xaxis =
h->GetXaxis();
33 if(val <= xaxis->GetXmin())
34 h->AddBinContent(xaxis->GetFirst());
35 else if(val >= xaxis->GetXmax())
36 h->AddBinContent(xaxis->GetLast());
41 class HitPatternPrinter {
45 void print(std::ostream& os)
const {
91 static void detLayer(std::ostream& os,
const reco::HitPattern& p, uint32_t hit) {
116 std::ostream&
operator<<(std::ostream& os,
const HitPatternPrinter& hpp) {
121 class TrackAlgoPrinter {
125 void print(std::ostream& os)
const {
137 if(algos.
size() > 1) {
139 for(
auto algo: algos) {
148 std::ostream&
operator<<(std::ostream& os,
const TrackAlgoPrinter& tap) {
153 double diffRelative(
double a,
double b) {
159 LogIntHelper(
double lmin,
double lmax): lmin_(lmin), lmax_(lmax) {}
161 class UnderOverflow {
163 UnderOverflow(
double largestValue,
double smallestValue,
std::function<
double(
double)> modifyUnpack):
164 unpackedLargestValue_(modifyUnpack ? modifyUnpack(largestValue) : largestValue),
165 unpackedSmallestValue_(modifyUnpack ? modifyUnpack(smallestValue) : smallestValue)
168 bool compatibleWithUnderflow(
double value)
const {
169 return value == unpackedSmallestValue_;
171 void printNonOkUnderflow(std::ostream& os)
const {
172 os <<
" (not min " << unpackedSmallestValue_ <<
")";
175 bool compatibleWithOverflow(
double value)
const {
176 return value == unpackedLargestValue_;
178 void printNonOkOverflow(std::ostream& os)
const {
179 os <<
" (not max " << unpackedLargestValue_ <<
")";
186 const float unpackedLargestValue_;
187 const float unpackedSmallestValue_;
193 UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)> modifyUnpack)
const {
194 return UnderOverflow(largestValue(), value >= 0 ? smallestPositiveValue() :
std::abs(smallestNegativeValue()), modifyUnpack);
197 double largestValue()
const {
201 static bool wouldBeDenorm(
double value) {
206 bool lessThanSmallestValue(
double value)
const {
208 return value < smallestPositiveValue();
210 return value > smallestNegativeValue();
213 double smallestPositiveValue()
const {
217 double smallestNegativeValue()
const {
225 class Float16Helper {
227 class UnderOverflow {
229 static void printNonOkUnderflow(std::ostream& os) {
232 static bool compatibleWithUnderflow(
double value) {
235 static void printNonOkOverflow(std::ostream& os) {
238 static bool compatibleWithOverflow(
double value) {
246 static UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)>) {
247 return UnderOverflow();
250 static double largestValue() {
254 static bool wouldBeDenorm(
double value) {
255 const float valuef =
static_cast<float>(
value);
259 static bool lessThanSmallestValue(
double value) {
260 return std::abs(value) < smallestValue();
263 static double smallestValue() {
270 inrange_signflip = 1,
278 return status == RangeStatus::inrange || status == RangeStatus::denormal;
281 template <
typename T>
282 class PackedValueCheckResult {
285 double pcvalue,
double trackvalue,
286 double rangeMin,
double rangeMax,
287 const typename T::UnderOverflow& underOverflow):
288 diff_(diff), pcvalue_(pcvalue), trackvalue_(trackvalue), rangeMin_(rangeMin), rangeMax_(rangeMax),
289 status_(status), underOverflow_(underOverflow)
293 double diff()
const {
return diff_; }
295 bool outsideExpectedRange()
const {
296 if(status_ == RangeStatus::inrange)
297 return diff_ < rangeMin_ || diff_ > rangeMax_;
299 return status_ == RangeStatus::underflow_notOK || status_ == RangeStatus::overflow_notOK || status_ == RangeStatus::inrange_signflip;
302 void print(std::ostream& os)
const {
303 if(outsideExpectedRange())
305 os <<
"(" << rangeMin_ <<
"," << rangeMax_ <<
") ";
307 os << diff_ <<
" " << pcvalue_;
308 if(status_ == RangeStatus::underflow_OK || status_ == RangeStatus::underflow_notOK) {
309 os <<
" (underflow) ";
310 if(status_ == RangeStatus::underflow_notOK)
311 underOverflow_.printNonOkUnderflow(os);
313 else if(status_ == RangeStatus::overflow_OK || status_ == RangeStatus::overflow_notOK) {
314 os <<
" (overflow) ";
315 if(status_ == RangeStatus::overflow_notOK)
316 underOverflow_.printNonOkOverflow(os);
318 else if(status_ == RangeStatus::denormal)
320 os <<
" " << trackvalue_;
325 const double pcvalue_;
326 const double trackvalue_;
327 const double rangeMin_;
328 const double rangeMax_;
330 const typename T::UnderOverflow underOverflow_;
338 RangeAbs(
double val):
min(-val),
max(val) {}
342 template <
typename T>
343 class PackedValueCheck {
345 template <
typename R,
typename ...Args>
346 PackedValueCheck(
const R& range, Args&&...
args):
347 helper_(std::forward<Args>(
args)...),
348 rangeMin_(range.min), rangeMax_(range.max)
354 int flow_nbins,
double flow_min,
double flow_max) {
355 hInrange = iBooker.
book1D(name, title, nbins, min, max);
356 hUnderOverflowSign = iBooker.
book1D(name+
"UnderOverFlowSign", title+
" with over- and underflow, and sign flip", flow_nbins, flow_min, flow_max);
357 hStatus = iBooker.
book1D(name+
"Status", title+
" status", 7, -0.5, 6.5);
359 hStatus->setBinLabel(2,
"In range, sign flip");
360 hStatus->setBinLabel(3,
"Denormal");
361 hStatus->setBinLabel(4,
"Underflow, PC is "+T::minName());
362 hStatus->setBinLabel(5,
"Underflow, PC is not "+T::minName());
363 hStatus->setBinLabel(6,
"Overflow, PC is "+T::maxName());
364 hStatus->setBinLabel(7,
"Overflow, PC is not "+T::maxName());
367 PackedValueCheckResult<T>
fill(
double pcvalue,
double trackvalue,
370 const auto diff = diffRelative(pcvalue, trackvalue);
372 const auto tmpSigned = modifyPack ? modifyPack(trackvalue) : trackvalue;
374 const auto underOverflow = helper_.underOverflowHelper(tmpSigned, modifyUnpack);
376 if(
tmp > helper_.largestValue()) {
377 fillNoFlow(hUnderOverflowSign,
diff);
378 if(underOverflow.compatibleWithOverflow(
std::abs(pcvalue))) {
379 status = RangeStatus::overflow_OK;
382 status = RangeStatus::overflow_notOK;
385 else if(helper_.lessThanSmallestValue(tmpSigned)) {
386 fillNoFlow(hUnderOverflowSign,
diff);
387 if(underOverflow.compatibleWithUnderflow(
std::abs(pcvalue))) {
388 status = RangeStatus::underflow_OK;
391 status = RangeStatus::underflow_notOK;
396 if(T::wouldBeDenorm(
tmp)) {
397 status = RangeStatus::denormal;
400 status = RangeStatus::inrange;
402 fillNoFlow(hInrange,
diff);
405 fillNoFlow(hUnderOverflowSign,
diff);
406 status = RangeStatus::inrange_signflip;
409 hStatus->Fill(static_cast<int>(status));
411 return PackedValueCheckResult<T>(
status,
diff, pcvalue, trackvalue, rangeMin_, rangeMax_, underOverflow);
416 const double rangeMin_;
417 const double rangeMax_;
423 template <
typename T>
424 std::ostream& operator<<(std::ostream& os, const PackedValueCheckResult<T>&
res) {
450 sf_AssociatedToPC = 1,
453 sf_PCIsNotElectron = 4,
456 sf_NoMissingInnerHits = 7
524 tracksToken_(consumes<
edm::
View<
reco::Track>>(iConfig.getUntrackedParameter<
edm::InputTag>(
"tracks"))),
526 trackToPackedCandidateToken_(consumes<
edm::Association<
pat::
PackedCandidateCollection>>(iConfig.getUntrackedParameter<
edm::InputTag>(
"trackToPackedCandidateAssociation"))),
527 rootFolder_(iConfig.getUntrackedParameter<
std::
string>(
"rootFolder")),
528 h_diffDxyAssocPV(RangeAbs(0.001)),
529 h_diffDzAssocPV(RangeAbs(0.001)),
530 h_diffCovQoverpQoverp(
Range(-1
e-6, 0.13), -15, 0),
531 h_diffCovLambdaLambda(
Range(-1
e-6, 0.13), -20, -5),
532 h_diffCovLambdaDsz(RangeAbs(0.13), -17, -4),
533 h_diffCovPhiPhi(RangeAbs(0.13), -15, 0),
534 h_diffCovPhiDxy(RangeAbs(0.13), -17, -4),
535 h_diffCovDxyDxy(RangeAbs(0.001)),
536 h_diffCovDxyDsz(RangeAbs(0.001)),
537 h_diffCovDszDsz(RangeAbs(0.001))
550 descriptions.
add(
"packedCandidateTrackValidator", desc);
568 h_diffVx = iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -0.2, 0.2);
569 h_diffVy = iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -0.2, 0.2);
570 h_diffVz = iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -0.4, 0.4);
572 h_diffNormalizedChi2 = iBooker.
book1D(
"diffNormalizedChi2",
"PackedCandidate::bestTrack() - reco::Track in normalizedChi2()", 30, -1.5, 1.5);
573 h_diffNdof = iBooker.
book1D(
"diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
575 h_diffCharge = iBooker.
book1D(
"diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
576 h_diffIsHighPurity = iBooker.
book1D(
"diffIsHighPurity",
"PackedCandidate::bestTrack() - reco::Track in quality(highPurity)", 3, -1.5, 1.5);
578 h_diffPt = iBooker.
book1D(
"diffPt",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in pt()", diffBins, -1.1, 1.1);
579 h_diffEta = iBooker.
book1D(
"diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -0.001, 0.001);
580 h_diffPhi = iBooker.
book1D(
"diffPhi",
"PackedCandidate::bestTrack() - reco::Track in phi()", diffBins, -0.0005, 0.0005);
582 h_diffDxyAssocPV.book(iBooker,
"diffDxyAssocPV",
"(PackedCandidate::dxy() - reco::Track::dxy(assocPV))/reco::Track",
585 h_diffDzAssocPV.book(iBooker,
"diffDzAssocPV",
"(PackedCandidate::dzAssociatedPV() - reco::Track::dz(assocPV))/reco::Track",
588 h_diffDxyPV = iBooker.
book1D(
"diffDxyPV",
"(PackedCandidate::dxy(PV) - reco::Track::dxy(PV))/reco::Track", diffBins, -0.01, 0.01);
589 h_diffDzPV = iBooker.
book1D(
"diffDzPV",
"(PackedCandidate::dz(PV) - reco::Track::dz(PV))/reco::Track", diffBins, -0.01, 0.01);
590 h_diffTrackDxyAssocPV = iBooker.
book1D(
"diffTrackDxyAssocPV",
"(PackedCandidate::bestTrack()::dxy(assocPV)) - reco::Track::dxy(assocPV))/reco::Track", diffBins, -0.01, 0.01);
591 h_diffTrackDzAssocPV = iBooker.
book1D(
"diffTrackDzAssocPV",
"(PackedCandidate::bestTrack()::dz(assocPV)) - reco::Track::dz(assocPV))/reco::Track", diffBins, -0.01, 0.01);
593 h_diffCovQoverpQoverp.book(iBooker,
"diffCovQoverpQoverp",
"(PackedCandidate::bestTrack() - reco::Track)/reco::track in cov(qoverp, qoverp)",
596 h_diffCovLambdaLambda.book(iBooker,
"diffCovLambdaLambda",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, lambda)",
599 h_diffCovLambdaDsz.book(iBooker,
"diffCovLambdaDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, dsz)",
602 h_diffCovPhiPhi.book(iBooker,
"diffCovPhiPhi",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, phi)",
605 h_diffCovPhiDxy.book(iBooker,
"diffCovPhiDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, dxy)",
608 h_diffCovDxyDxy.book(iBooker,
"diffCovDxyDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dxy)",
611 h_diffCovDxyDsz.book(iBooker,
"diffCovDxyDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dsz)",
614 h_diffCovDszDsz.book(iBooker,
"diffCovDszDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dsz, dsz)",
618 h_diffDxyError = iBooker.
book1D(
"diffDxyError",
"(PackedCandidate::dxyError() - reco::Track::dxyError())/reco::Track", 40, -0.001, 0.001);
619 h_diffDszError = iBooker.
book1D(
"diffDszError",
"(PackedCandidate::dzError() - reco::Track::dszError())/reco::Track", 40, -0.001, 0.001);
620 h_diffDzError = iBooker.
book1D(
"diffDzError",
"(PackedCandidate::dzError() - reco::Track::dzError())/reco::Track", 40, -0.001, 0.001);
622 h_diffTrackDxyError = iBooker.
book1D(
"diffTrackDxyError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dxyError()", 40, -0.001, 0.001);
623 h_diffTrackDzError = iBooker.
book1D(
"diffTrackDzError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dzError()", 40, -0.05, 0.05);
625 h_diffPtError = iBooker.
book1D(
"diffPtError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in ptError()", diffBins, -1.1, 1.1);
626 h_diffEtaError = iBooker.
book1D(
"diffEtaError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in etaError()", 60, -0.15, 0.15);
629 h_diffNumberOfPixelLayers = iBooker.
book1D(
"diffNumberOfPixelLayers",
"PackedCandidate::pixelLayersWithMeasurement() - reco::Track::hitPattern::pixelLayersWithMeasurement()", 5, -2.5, 2.5);
630 h_diffNumberOfStripLayers = iBooker.
book1D(
"diffNumberOfStripLayers",
"PackedCandidate::stripLayersWithMeasurement() - reco::Track::hitPattern::stripLayersWithMeasurement()", 5, -2.5, 2.5);
631 h_diffNumberOfPixelHits = iBooker.
book1D(
"diffNumberOfPixelHits",
"PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()", 5, -2.5, 2.5);
632 h_diffNumberOfHits = iBooker.
book1D(
"diffNumberOfHits",
"PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()", 5, -2.5, 2.5);
633 h_diffLostInnerHits = iBooker.
book1D(
"diffLostInnerHits",
"PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)", 5, -2.5, 2.5);
648 h_numberHitsOverMax = iBooker.
book1D(
"numberHitsOverMax",
"Number of hits over the maximum of PackedCandidate", 20, 0, 20);
654 const auto&
tracks = *htracks;
666 const auto& trackToPackedCandidate = *hassoc;
669 auto trackPtr =
tracks.ptrAt(
i);
680 if(pcRef->charge() == 0) {
685 const reco::Track *trackPcPtr = pcRef->bestTrack();
692 if(
std::abs(pcRef->pdgId()) == 11) {
704 auto slimmedVertexRef = pcRef->vertexRef();
716 double diffNormalizedChi2 = 0;
717 if(trackPc.
ndof() != 0) {
729 const auto diffPt = diffRelative(trackPc.
pt(), track.
pt());
735 const auto diffDxyAssocPV =
h_diffDxyAssocPV.fill(pcRef->dxy( ) , track.
dxy(pcVertex.
position()), [](
double value){
return value*100.;});
736 const auto diffDzAssocPV =
h_diffDzAssocPV.fill( pcRef->dzAssociatedPV(), track.
dz(pcVertex.
position()) , [](
double value){
return value*100.;});
738 const auto diffDzPV = diffRelative(pcRef->dz(pv.
position()) , track.
dz(pv.
position()));
744 auto fillCov1 = [&](
auto& hlp,
const int i,
const int j) {
747 auto fillCov2 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack) {
750 auto fillCov3 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack, std::function<double(double)> modifyUnpack) {
754 const auto pcPt = pcRef->pt();
764 if(isInRange(diffCovDszDsz.status())) {
769 if(isInRange(diffCovDxyDxy.status())) {
782 const auto pcNumberOfHits = pcRef->numberOfHits();
783 const auto pcNumberOfPixelHits = pcRef->numberOfPixelHits();
784 const auto pcNumberOfStripHits = pcNumberOfHits - pcNumberOfPixelHits;
788 const auto pcNumberOfLayers = pcRef->trackerLayersWithMeasurement();
789 const auto pcNumberOfPixelLayers = pcRef->pixelLayersWithMeasurement();
790 const auto pcNumberOfStripLayers = pcRef->stripLayersWithMeasurement();
810 int diffNumberOfPixelHits = 0;
811 int diffNumberOfHits = 0;
812 int diffNumberOfPixelLayers = 0;
813 int diffNumberOfStripLayers = 0;
814 if(pixelLayerOverflow) {
818 diffNumberOfPixelLayers = pcNumberOfPixelLayers - trackNumberOfPixelLayers;
824 diffNumberOfPixelHits = pcNumberOfPixelHits - trackNumberOfPixelHits;
826 if(stripLayerOverflow) {
830 diffNumberOfStripLayers = pcNumberOfStripLayers - trackNumberOfStripLayers;
832 if(stripOverflow || pixelInducedStripOverflow || pixelOverflow) {
833 int diffNumberOfStripHits = 0;
834 if(stripOverflow || pixelInducedStripOverflow) {
837 else if(pixelOverflow) {
838 diffNumberOfStripHits = (pcNumberOfStripHits - pixelOverflow) - trackNumberOfStripHits;
841 diffNumberOfHits = diffNumberOfPixelHits + diffNumberOfStripHits;
844 diffNumberOfHits = pcNumberOfHits - trackNumberOfHits;
854 int diffLostInnerHits = 0;
856 switch(pcRef->lostInnerHits()) {
859 diffLostInnerHits = -trackLostInnerHits;
862 diffLostInnerHits = 1-trackLostInnerHits;
865 diffLostInnerHits = trackLostInnerHits>=2 ? 0 : 2-trackLostInnerHits;
884 int diffHitPatternHasValidHitInFirstPixelBarrel = 0;
892 if(diffNormalizedChi2 < -1 || diffNormalizedChi2 > 0 || diffCharge != 0 || diffHP != 0
894 || diffDxyAssocPV.outsideExpectedRange()
895 || diffDzAssocPV.outsideExpectedRange()
897 || diffCovQoverpQoverp.outsideExpectedRange() || diffCovLambdaLambda.outsideExpectedRange()
898 || diffCovLambdaDsz.outsideExpectedRange() || diffCovPhiPhi.outsideExpectedRange()
899 || diffCovPhiDxy.outsideExpectedRange() || diffCovDxyDxy.outsideExpectedRange()
900 || diffCovDxyDsz.outsideExpectedRange() || diffCovDszDsz.outsideExpectedRange()
901 || diffNumberOfPixelHits != 0 || diffNumberOfHits != 0 || diffLostInnerHits != 0
902 || diffHitPatternHasValidHitInFirstPixelBarrel != 0
905 edm::LogInfo(
"PackedCandidateTrackValidator") <<
"Track " << i <<
" pt " << track.
pt() <<
" eta " << track.
eta() <<
" phi " << track.
phi() <<
" chi2 " << track.
chi2() <<
" ndof " << track.
ndof()
911 <<
" dxy " << track.
dxy() <<
" dz " << track.
dz()
913 <<
" " << TrackAlgoPrinter(track)
914 <<
" lost inner hits " << trackLostInnerHits
916 <<
" hitpattern " << HitPatternPrinter(track)
918 <<
" PC " << pcRef.
id() <<
":" << pcRef.
key() <<
" track pt " << trackPc.
pt() <<
" eta " << trackPc.
eta() <<
" phi " << trackPc.
phi() <<
" (PC " << pcRef->phi() <<
") chi2 " << trackPc.
chi2() <<
" ndof " << trackPc.
ndof() <<
" pdgId " << pcRef->pdgId() <<
" mass " << pcRef->mass()
920 <<
" ptError " << trackPc.
ptError() <<
" etaError " << trackPc.
etaError() <<
" phiError " << trackPc.
phiError()
922 <<
" pc.vertex " << pcRef->vertex() <<
" momentum " << pcRef->momentum() <<
" track " << trackPc.
momentum()
924 <<
" dxy " << trackPc.
dxy() <<
" dz " << trackPc.
dz() <<
" pc.dz " << pcRef->dz()
925 <<
" dxyError " << trackPc.
dxyError() <<
" dzError " << trackPc.
dzError()
928 <<
" dxy(assocPV) " << trackPc.
dxy(pcVertex.
position()) <<
" dz(assocPV) " << trackPc.
dz(pcVertex.
position())
930 <<
" (diff PackedCandidate track)" 932 <<
" charge " << diffCharge <<
" " << trackPc.
charge() <<
" " << track.
charge()
935 <<
" numberOfHits " << diffNumberOfHits <<
" " << pcNumberOfHits <<
" " << trackNumberOfHits
936 <<
" numberOfPixelHits " << diffNumberOfPixelHits <<
" " << pcNumberOfPixelHits <<
" " << trackNumberOfPixelHits
937 <<
" numberOfStripHits # " << pcNumberOfStripHits <<
" " << trackNumberOfStripHits
943 <<
" lostInnerHits " << diffLostInnerHits <<
" " << pcRef->lostInnerHits() <<
" #" 944 <<
" phi (5e-4) " << diffPhi <<
" " << trackPc.
phi() <<
" " << track.
phi()
946 <<
" dxy(assocPV) " << diffDxyAssocPV
948 <<
" dz(assocPV) " << diffDzAssocPV
950 <<
" dxy(PV) (0.05) " << diffDxyPV <<
" " << pcRef->dxy(pv.
position()) <<
" " << track.
dxy(pv.
position())
952 <<
" dz(PV) (0.05) " << diffDzPV <<
" " << pcRef->dz(pv.
position()) <<
" " << track.
dz(pv.
position())
954 <<
" cov(qoverp, qoverp) " << diffCovQoverpQoverp
956 <<
" cov(lambda, lambda) " << diffCovLambdaLambda
958 <<
" cov(lambda, dsz) " << diffCovLambdaDsz
960 <<
" cov(phi, phi) " << diffCovPhiPhi
962 <<
" cov(phi, dxy) " << diffCovPhiDxy
964 <<
" cov(dxy, dxy) " << diffCovDxyDxy
966 <<
" cov(dxy, dsz) " << diffCovDxyDsz
968 <<
" cov(dsz, dsz) " << diffCovDszDsz;
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
def analyze(function, filename, filter=None)
MonitorElement * h_diffNormalizedChi2
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_diffVy
double unpack8log(int8_t i, double lmin, double lmax, uint8_t base=128)
int numberOfValidHits() const
PackedCandidateTrackValidator(const edm::ParameterSet &pset)
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
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
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)
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)
static bool missingHitFilter(uint16_t pattern)
int trackerLayersWithMeasurement() const
const Point & position() const
position
static bool pixelBarrelHitFilter(uint16_t pattern)
void bookHistograms(fwlite::EventContainer &eventCont)
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
double eta() const
pseudorapidity of momentum vector
PixelRecoRange< float > Range
MonitorElement * h_diffPhi
PackedValueCheck< LogIntHelper > h_diffCovPhiDxy
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
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
MonitorElement * book1D(Args &&...args)
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
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 deltaPhi(double phi1, double phi2)
double vz() const
z coordinate of the reference point on track
void setCurrentFolder(const std::string &fullpath)
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
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * h_diffTrackDzAssocPV
MonitorElement * h_diffHitPatternNumberOfLostInnerHits
MonitorElement * h_diffHitPatternNumberOfValidPixelHits
virtual ~PackedCandidateTrackValidator()
static bool stripTOBHitFilter(uint16_t pattern)
bool quality(const TrackQuality) const
Track quality.
MonitorElement * h_diffNdof
int numberOfLostHits(HitCategory category) const
MonitorElement * h_diffVx
std::vector< std::vector< double > > tmp
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()
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
MonitorElement * h_diffNumberOfHits
MonitorElement * h_diffEtaError
MonitorElement * h_diffNumberOfPixelLayers
double vx() const
x coordinate of the reference point on track
int numberOfHits(HitCategory category) const
MonitorElement * h_diffHitPatternStripLayersWithMeasurement