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 {
95 static void detLayer(std::ostream& os,
const reco::HitPattern& p, uint32_t hit) {
120 std::ostream&
operator<<(std::ostream& os,
const HitPatternPrinter& hpp) {
125 class TrackAlgoPrinter {
129 void print(std::ostream& os)
const {
141 if(algos.
size() > 1) {
143 for(
auto algo: algos) {
152 std::ostream&
operator<<(std::ostream& os,
const TrackAlgoPrinter& tap) {
157 double diffRelative(
double a,
double b) {
163 LogIntHelper(
double lmin,
double lmax): lmin_(lmin), lmax_(lmax) {}
165 class UnderOverflow {
167 UnderOverflow(
double largestValue,
double smallestValue,
std::function<
double(
double)> modifyUnpack):
168 unpackedLargestValue_(modifyUnpack ? modifyUnpack(largestValue) : largestValue),
169 unpackedSmallestValue_(modifyUnpack ? modifyUnpack(smallestValue) : smallestValue)
172 bool compatibleWithUnderflow(
double value)
const {
173 return value == unpackedSmallestValue_;
175 void printNonOkUnderflow(std::ostream& os)
const {
176 os <<
" (not min " << unpackedSmallestValue_ <<
")";
179 bool compatibleWithOverflow(
double value)
const {
180 return value == unpackedLargestValue_;
182 void printNonOkOverflow(std::ostream& os)
const {
183 os <<
" (not max " << unpackedLargestValue_ <<
")";
190 const float unpackedLargestValue_;
191 const float unpackedSmallestValue_;
197 UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)> modifyUnpack)
const {
198 return UnderOverflow(largestValue(), value >= 0 ? smallestPositiveValue() :
std::abs(smallestNegativeValue()), modifyUnpack);
201 double largestValue()
const {
205 static bool wouldBeDenorm(
double value) {
210 bool lessThanSmallestValue(
double value)
const {
212 return value < smallestPositiveValue();
214 return value > smallestNegativeValue();
217 double smallestPositiveValue()
const {
221 double smallestNegativeValue()
const {
229 class Float16Helper {
231 class UnderOverflow {
233 static void printNonOkUnderflow(std::ostream& os) {
236 static bool compatibleWithUnderflow(
double value) {
239 static void printNonOkOverflow(std::ostream& os) {
242 static bool compatibleWithOverflow(
double value) {
250 static UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)>) {
251 return UnderOverflow();
254 static double largestValue() {
258 static bool wouldBeDenorm(
double value) {
259 const float valuef =
static_cast<float>(
value);
263 static bool lessThanSmallestValue(
double value) {
264 return std::abs(value) < smallestValue();
267 static double smallestValue() {
274 inrange_signflip = 1,
282 return status == RangeStatus::inrange || status == RangeStatus::denormal;
285 template <
typename T>
286 class PackedValueCheckResult {
289 double pcvalue,
double trackvalue,
291 const typename T::UnderOverflow& underOverflow):
292 diff_(diff), pcvalue_(pcvalue), trackvalue_(trackvalue), rangeMin_(rangeMin), rangeMax_(rangeMax),
293 status_(status), underOverflow_(underOverflow)
297 double diff()
const {
return diff_; }
299 bool outsideExpectedRange()
const {
300 if(status_ == RangeStatus::inrange)
301 return diff_ < rangeMin_ || diff_ > rangeMax_;
303 return status_ == RangeStatus::underflow_notOK || status_ == RangeStatus::overflow_notOK || status_ == RangeStatus::inrange_signflip;
306 void print(std::ostream& os)
const {
307 if(outsideExpectedRange())
309 os <<
"(" << rangeMin_ <<
"," << rangeMax_ <<
") ";
311 os << diff_ <<
" " << pcvalue_;
312 if(status_ == RangeStatus::underflow_OK || status_ == RangeStatus::underflow_notOK) {
313 os <<
" (underflow) ";
314 if(status_ == RangeStatus::underflow_notOK)
315 underOverflow_.printNonOkUnderflow(os);
317 else if(status_ == RangeStatus::overflow_OK || status_ == RangeStatus::overflow_notOK) {
318 os <<
" (overflow) ";
319 if(status_ == RangeStatus::overflow_notOK)
320 underOverflow_.printNonOkOverflow(os);
322 else if(status_ == RangeStatus::denormal)
324 os <<
" " << trackvalue_;
329 const double pcvalue_;
330 const double trackvalue_;
331 const double rangeMin_;
332 const double rangeMax_;
334 const typename T::UnderOverflow underOverflow_;
342 RangeAbs(
double val):
min(-val),
max(val) {}
346 template <
typename T>
347 class PackedValueCheck {
349 template <
typename R,
typename ...Args>
350 PackedValueCheck(
const R& range, Args&&...
args):
351 helper_(std::forward<Args>(
args)...),
352 rangeMin_(range.min), rangeMax_(range.max)
358 int flow_nbins,
double flow_min,
double flow_max) {
359 hInrange = iBooker.
book1D(name, title, nbins, min, max);
360 hUnderOverflowSign = iBooker.
book1D(name+
"UnderOverFlowSign", title+
" with over- and underflow, and sign flip", flow_nbins, flow_min, flow_max);
361 hStatus = iBooker.
book1D(name+
"Status", title+
" status", 7, -0.5, 6.5);
363 hStatus->setBinLabel(2,
"In range, sign flip");
364 hStatus->setBinLabel(3,
"Denormal");
365 hStatus->setBinLabel(4,
"Underflow, PC is "+T::minName());
366 hStatus->setBinLabel(5,
"Underflow, PC is not "+T::minName());
367 hStatus->setBinLabel(6,
"Overflow, PC is "+T::maxName());
368 hStatus->setBinLabel(7,
"Overflow, PC is not "+T::maxName());
371 PackedValueCheckResult<T>
fill(
double pcvalue,
double trackvalue,
374 const auto diff = diffRelative(pcvalue, trackvalue);
376 const auto tmpSigned = modifyPack ? modifyPack(trackvalue) : trackvalue;
378 const auto underOverflow = helper_.underOverflowHelper(tmpSigned, modifyUnpack);
380 if(
tmp > helper_.largestValue()) {
381 fillNoFlow(hUnderOverflowSign,
diff);
382 if(underOverflow.compatibleWithOverflow(
std::abs(pcvalue))) {
383 status = RangeStatus::overflow_OK;
386 status = RangeStatus::overflow_notOK;
389 else if(helper_.lessThanSmallestValue(tmpSigned)) {
390 fillNoFlow(hUnderOverflowSign,
diff);
391 if(underOverflow.compatibleWithUnderflow(
std::abs(pcvalue))) {
392 status = RangeStatus::underflow_OK;
395 status = RangeStatus::underflow_notOK;
400 if(T::wouldBeDenorm(
tmp)) {
401 status = RangeStatus::denormal;
404 status = RangeStatus::inrange;
406 fillNoFlow(hInrange,
diff);
409 fillNoFlow(hUnderOverflowSign,
diff);
410 status = RangeStatus::inrange_signflip;
413 hStatus->Fill(static_cast<int>(status));
415 return PackedValueCheckResult<T>(
status,
diff, pcvalue, trackvalue, rangeMin_, rangeMax_, underOverflow);
420 const double rangeMin_;
421 const double rangeMax_;
427 template <
typename T>
428 std::ostream& operator<<(std::ostream& os, const PackedValueCheckResult<T>&
res) {
455 sf_AssociatedToPC = 1,
458 sf_PCIsNotElectron = 4,
461 sf_NoMissingInnerHits = 7
529 tracksToken_(consumes<
edm::
View<
reco::Track>>(iConfig.getUntrackedParameter<
edm::InputTag>(
"tracks"))),
531 trackToPackedCandidateToken_(consumes<
edm::Association<
pat::
PackedCandidateCollection>>(iConfig.getUntrackedParameter<
edm::InputTag>(
"trackToPackedCandidateAssociation"))),
532 rootFolder_(iConfig.getUntrackedParameter<
std::
string>(
"rootFolder")),
533 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")),
534 h_diffDxyAssocPV(RangeAbs(0.001)),
535 h_diffDzAssocPV(RangeAbs(0.001)),
536 h_diffCovQoverpQoverp(
Range(-1
e-6, 0.13), -15, 0),
537 h_diffCovLambdaLambda(
Range(-1
e-6, 0.13), -20, -5),
538 h_diffCovLambdaDsz(RangeAbs(0.13), -17, -4),
539 h_diffCovPhiPhi(RangeAbs(0.13), -15, 0),
540 h_diffCovPhiDxy(RangeAbs(0.13), -17, -4),
541 h_diffCovDxyDxy(RangeAbs(0.001)),
542 h_diffCovDxyDsz(RangeAbs(0.001)),
543 h_diffCovDszDsz(RangeAbs(0.001))
557 descriptions.
add(
"packedCandidateTrackValidator", desc);
575 h_diffVx = iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -0.2, 0.2);
576 h_diffVy = iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -0.2, 0.2);
577 h_diffVz = iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -0.4, 0.4);
579 h_diffNormalizedChi2 = iBooker.
book1D(
"diffNormalizedChi2",
"PackedCandidate::bestTrack() - reco::Track in normalizedChi2()", 30, -1.5, 1.5);
580 h_diffNdof = iBooker.
book1D(
"diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
582 h_diffCharge = iBooker.
book1D(
"diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
583 h_diffIsHighPurity = iBooker.
book1D(
"diffIsHighPurity",
"PackedCandidate::bestTrack() - reco::Track in quality(highPurity)", 3, -1.5, 1.5);
585 h_diffPt = iBooker.
book1D(
"diffPt",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in pt()", diffBins, -1.1, 1.1);
586 h_diffEta = iBooker.
book1D(
"diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -0.001, 0.001);
587 h_diffPhi = iBooker.
book1D(
"diffPhi",
"PackedCandidate::bestTrack() - reco::Track in phi()", diffBins, -0.0005, 0.0005);
589 h_diffDxyAssocPV.book(iBooker,
"diffDxyAssocPV",
"(PackedCandidate::dxy() - reco::Track::dxy(assocPV))/reco::Track",
592 h_diffDzAssocPV.book(iBooker,
"diffDzAssocPV",
"(PackedCandidate::dzAssociatedPV() - reco::Track::dz(assocPV))/reco::Track",
595 h_diffDxyPV = iBooker.
book1D(
"diffDxyPV",
"(PackedCandidate::dxy(PV) - reco::Track::dxy(PV))/reco::Track", diffBins, -0.01, 0.01);
596 h_diffDzPV = iBooker.
book1D(
"diffDzPV",
"(PackedCandidate::dz(PV) - reco::Track::dz(PV))/reco::Track", diffBins, -0.01, 0.01);
597 h_diffTrackDxyAssocPV = iBooker.
book1D(
"diffTrackDxyAssocPV",
"(PackedCandidate::bestTrack()::dxy(assocPV)) - reco::Track::dxy(assocPV))/reco::Track", diffBins, -0.01, 0.01);
598 h_diffTrackDzAssocPV = iBooker.
book1D(
"diffTrackDzAssocPV",
"(PackedCandidate::bestTrack()::dz(assocPV)) - reco::Track::dz(assocPV))/reco::Track", diffBins, -0.01, 0.01);
600 h_diffCovQoverpQoverp.book(iBooker,
"diffCovQoverpQoverp",
"(PackedCandidate::bestTrack() - reco::Track)/reco::track in cov(qoverp, qoverp)",
603 h_diffCovLambdaLambda.book(iBooker,
"diffCovLambdaLambda",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, lambda)",
606 h_diffCovLambdaDsz.book(iBooker,
"diffCovLambdaDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, dsz)",
609 h_diffCovPhiPhi.book(iBooker,
"diffCovPhiPhi",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, phi)",
612 h_diffCovPhiDxy.book(iBooker,
"diffCovPhiDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, dxy)",
615 h_diffCovDxyDxy.book(iBooker,
"diffCovDxyDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dxy)",
618 h_diffCovDxyDsz.book(iBooker,
"diffCovDxyDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dsz)",
621 h_diffCovDszDsz.book(iBooker,
"diffCovDszDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dsz, dsz)",
625 h_diffDxyError = iBooker.
book1D(
"diffDxyError",
"(PackedCandidate::dxyError() - reco::Track::dxyError())/reco::Track", 40, -0.001, 0.001);
626 h_diffDszError = iBooker.
book1D(
"diffDszError",
"(PackedCandidate::dzError() - reco::Track::dszError())/reco::Track", 40, -0.001, 0.001);
627 h_diffDzError = iBooker.
book1D(
"diffDzError",
"(PackedCandidate::dzError() - reco::Track::dzError())/reco::Track", 40, -0.001, 0.001);
629 h_diffTrackDxyError = iBooker.
book1D(
"diffTrackDxyError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dxyError()", 40, -0.001, 0.001);
630 h_diffTrackDzError = iBooker.
book1D(
"diffTrackDzError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dzError()", 40, -0.05, 0.05);
632 h_diffPtError = iBooker.
book1D(
"diffPtError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in ptError()", diffBins, -1.1, 1.1);
633 h_diffEtaError = iBooker.
book1D(
"diffEtaError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in etaError()", 60, -0.15, 0.15);
636 h_diffNumberOfPixelLayers = iBooker.
book1D(
"diffNumberOfPixelLayers",
"PackedCandidate::pixelLayersWithMeasurement() - reco::Track::hitPattern::pixelLayersWithMeasurement()", 5, -2.5, 2.5);
637 h_diffNumberOfStripLayers = iBooker.
book1D(
"diffNumberOfStripLayers",
"PackedCandidate::stripLayersWithMeasurement() - reco::Track::hitPattern::stripLayersWithMeasurement()", 5, -2.5, 2.5);
638 h_diffNumberOfPixelHits = iBooker.
book1D(
"diffNumberOfPixelHits",
"PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()", 5, -2.5, 2.5);
639 h_diffNumberOfHits = iBooker.
book1D(
"diffNumberOfHits",
"PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()", 5, -2.5, 2.5);
640 h_diffLostInnerHits = iBooker.
book1D(
"diffLostInnerHits",
"PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)", 5, -2.5, 2.5);
655 h_numberHitsOverMax = iBooker.
book1D(
"numberHitsOverMax",
"Number of hits over the maximum of PackedCandidate", 20, 0, 20);
661 const auto&
tracks = *htracks;
673 const auto& trackToPackedCandidate = *hassoc;
676 auto trackPtr =
tracks.ptrAt(
i);
687 if(pcRef->charge() == 0) {
692 const reco::Track *trackPcPtr = pcRef->bestTrack();
699 if(
std::abs(pcRef->pdgId()) == 11) {
711 auto slimmedVertexRef = pcRef->vertexRef();
723 double diffNormalizedChi2 = 0;
724 if(trackPc.
ndof() != 0) {
736 const auto diffPt = diffRelative(trackPc.
pt(), track.
pt());
742 const auto diffDxyAssocPV =
h_diffDxyAssocPV.fill(pcRef->dxy( ) , track.
dxy(pcVertex.
position()), [](
double value){
return value*100.;});
743 const auto diffDzAssocPV =
h_diffDzAssocPV.fill( pcRef->dzAssociatedPV(), track.
dz(pcVertex.
position()) , [](
double value){
return value*100.;});
745 const auto diffDzPV = diffRelative(pcRef->dz(pv.
position()) , track.
dz(pv.
position()));
751 auto fillCov1 = [&](
auto& hlp,
const int i,
const int j) {
754 auto fillCov2 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack) {
757 auto fillCov3 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack, std::function<double(double)> modifyUnpack) {
761 const auto pcPt = pcRef->pt();
771 if(isInRange(diffCovDszDsz.status())) {
776 if(isInRange(diffCovDxyDxy.status())) {
789 const auto pcNumberOfHits = pcRef->numberOfHits();
790 const auto pcNumberOfPixelHits = pcRef->numberOfPixelHits();
791 const auto pcNumberOfStripHits = pcNumberOfHits - pcNumberOfPixelHits;
795 const auto pcNumberOfLayers = pcRef->trackerLayersWithMeasurement();
796 const auto pcNumberOfPixelLayers = pcRef->pixelLayersWithMeasurement();
797 const auto pcNumberOfStripLayers = pcRef->stripLayersWithMeasurement();
817 int diffNumberOfPixelHits = 0;
818 int diffNumberOfHits = 0;
819 int diffNumberOfPixelLayers = 0;
820 int diffNumberOfStripLayers = 0;
821 if(pixelLayerOverflow) {
825 diffNumberOfPixelLayers = pcNumberOfPixelLayers - trackNumberOfPixelLayers;
831 diffNumberOfPixelHits = pcNumberOfPixelHits - trackNumberOfPixelHits;
833 if(stripLayerOverflow) {
837 diffNumberOfStripLayers = pcNumberOfStripLayers - trackNumberOfStripLayers;
839 if(stripOverflow || pixelInducedStripOverflow || pixelOverflow) {
840 int diffNumberOfStripHits = 0;
841 if(stripOverflow || pixelInducedStripOverflow) {
844 else if(pixelOverflow) {
845 diffNumberOfStripHits = (pcNumberOfStripHits - pixelOverflow) - trackNumberOfStripHits;
848 diffNumberOfHits = diffNumberOfPixelHits + diffNumberOfStripHits;
851 diffNumberOfHits = pcNumberOfHits - trackNumberOfHits;
861 int diffLostInnerHits = 0;
863 switch(pcRef->lostInnerHits()) {
866 diffLostInnerHits = -trackLostInnerHits;
869 diffLostInnerHits = 1-trackLostInnerHits;
872 diffLostInnerHits = trackLostInnerHits>=2 ? 0 : 2-trackLostInnerHits;
891 int diffHitPatternHasValidHitInFirstPixelBarrel = 0;
900 (diffNormalizedChi2 < -1 || diffNormalizedChi2 > 0 || diffCharge != 0 || diffHP != 0
902 || diffDxyAssocPV.outsideExpectedRange()
903 || diffDzAssocPV.outsideExpectedRange()
905 || diffCovQoverpQoverp.outsideExpectedRange() || diffCovLambdaLambda.outsideExpectedRange()
906 || diffCovLambdaDsz.outsideExpectedRange() || diffCovPhiPhi.outsideExpectedRange()
907 || diffCovPhiDxy.outsideExpectedRange() || diffCovDxyDxy.outsideExpectedRange()
908 || diffCovDxyDsz.outsideExpectedRange() || diffCovDszDsz.outsideExpectedRange()
909 || diffNumberOfPixelHits != 0 || diffNumberOfHits != 0 || diffLostInnerHits != 0
910 || diffHitPatternHasValidHitInFirstPixelBarrel != 0
914 edm::LogInfo(
"PackedCandidateTrackValidator") <<
"Track " << i <<
" pt " << track.
pt() <<
" eta " << track.
eta() <<
" phi " << track.
phi() <<
" chi2 " << track.
chi2() <<
" ndof " << track.
ndof()
920 <<
" dxy " << track.
dxy() <<
" dz " << track.
dz()
922 <<
" " << TrackAlgoPrinter(track)
923 <<
" lost inner hits " << trackLostInnerHits
925 <<
" hitpattern " << HitPatternPrinter(track)
927 <<
" 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()
929 <<
" ptError " << trackPc.
ptError() <<
" etaError " << trackPc.
etaError() <<
" phiError " << trackPc.
phiError()
931 <<
" pc.vertex " << pcRef->vertex() <<
" momentum " << pcRef->momentum() <<
" track " << trackPc.
momentum()
933 <<
" dxy " << trackPc.
dxy() <<
" dz " << trackPc.
dz() <<
" pc.dz " << pcRef->dz()
934 <<
" dxyError " << trackPc.
dxyError() <<
" dzError " << trackPc.
dzError()
937 <<
" dxy(assocPV) " << trackPc.
dxy(pcVertex.
position()) <<
" dz(assocPV) " << trackPc.
dz(pcVertex.
position())
939 <<
" (diff PackedCandidate track)" 941 <<
" charge " << diffCharge <<
" " << trackPc.
charge() <<
" " << track.
charge()
944 <<
" numberOfAllHits " << diffNumberOfHits <<
" " << pcNumberOfHits <<
" " << trackNumberOfHits
945 <<
" numberOfPixelHits " << diffNumberOfPixelHits <<
" " << pcNumberOfPixelHits <<
" " << trackNumberOfPixelHits
946 <<
" numberOfStripHits # " << pcNumberOfStripHits <<
" " << trackNumberOfStripHits
952 <<
" lostInnerHits " << diffLostInnerHits <<
" " << pcRef->lostInnerHits() <<
" #" 953 <<
" phi (5e-4) " << diffPhi <<
" " << trackPc.
phi() <<
" " << track.
phi()
955 <<
" dxy(assocPV) " << diffDxyAssocPV
957 <<
" dz(assocPV) " << diffDzAssocPV
959 <<
" dxy(PV) (0.05) " << diffDxyPV <<
" " << pcRef->dxy(pv.
position()) <<
" " << track.
dxy(pv.
position())
961 <<
" dz(PV) (0.05) " << diffDzPV <<
" " << pcRef->dz(pv.
position()) <<
" " << track.
dz(pv.
position())
963 <<
" cov(qoverp, qoverp) " << diffCovQoverpQoverp
965 <<
" cov(lambda, lambda) " << diffCovLambdaLambda
967 <<
" cov(lambda, dsz) " << diffCovLambdaDsz
969 <<
" cov(phi, phi) " << diffCovPhiPhi
971 <<
" cov(phi, dxy) " << diffCovPhiDxy
973 <<
" cov(dxy, dxy) " << diffCovDxyDxy
975 <<
" cov(dxy, dsz) " << diffCovDxyDsz
977 <<
" cov(dsz, dsz) " << diffCovDszDsz;
constexpr double deltaPhi(double phi1, double phi2)
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)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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
MonitorElement * h_diffNormalizedChi2
PixelRecoRange< float > Range
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)
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
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
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)
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
MonitorElement * h_diffPhi
void setCurrentFolder(std::string const &fullpath)
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
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
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 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
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
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
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h_diffEtaError
MonitorElement * h_diffNumberOfPixelLayers
double vx() const
x coordinate of the reference point on track
MonitorElement * h_diffHitPatternStripLayersWithMeasurement