25 #include "boost/math/special_functions/sign.hpp"
34 class HitPatternPrinter {
36 explicit HitPatternPrinter(
const reco::Track& trk): track(trk) {}
38 void print(std::ostream& os)
const {
84 static void detLayer(std::ostream& os,
const reco::HitPattern& p, uint32_t hit) {
109 std::ostream&
operator<<(std::ostream& os,
const HitPatternPrinter& hpp) {
114 class TrackAlgoPrinter {
116 explicit TrackAlgoPrinter(
const reco::Track& trk): track(trk) {}
118 void print(std::ostream& os)
const {
122 if(track.isAlgoInMask(
algo)) {
128 if(track.originalAlgo() != track.algo())
130 if(algos.
size() > 1) {
132 for(
auto algo: algos) {
141 std::ostream&
operator<<(std::ostream& os,
const TrackAlgoPrinter& tap) {
146 double diffRelative(
double a,
double b) {
152 LogIntHelper(
double lmin,
double lmax): lmin_(lmin), lmax_(lmax) {}
154 class UnderOverflow {
156 UnderOverflow(
double largestValue,
double smallestValue,
std::function<
double(
double)> modifyUnpack):
157 unpackedLargestValue_(modifyUnpack ? modifyUnpack(largestValue) : largestValue),
158 unpackedSmallestValue_(modifyUnpack ? modifyUnpack(smallestValue) : smallestValue)
161 bool compatibleWithUnderflow(
double value)
const {
162 return value == unpackedSmallestValue_;
164 void printNonOkUnderflow(std::ostream& os)
const {
165 os <<
" (not min " << unpackedSmallestValue_ <<
")";
168 bool compatibleWithOverflow(
double value)
const {
169 return value == unpackedLargestValue_;
171 void printNonOkOverflow(std::ostream& os)
const {
172 os <<
" (not max " << unpackedLargestValue_ <<
")";
179 const float unpackedLargestValue_;
180 const float unpackedSmallestValue_;
186 UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)> modifyUnpack)
const {
187 return UnderOverflow(largestValue(), value >= 0 ? smallestPositiveValue() :
std::abs(smallestNegativeValue()), modifyUnpack);
190 double largestValue()
const {
194 static bool wouldBeDenorm(
double value) {
199 bool lessThanSmallestValue(
double value)
const {
201 return value < smallestPositiveValue();
203 return value > smallestNegativeValue();
206 double smallestPositiveValue()
const {
210 double smallestNegativeValue()
const {
218 class Float16Helper {
220 class UnderOverflow {
222 static void printNonOkUnderflow(std::ostream& os) {
225 static bool compatibleWithUnderflow(
double value) {
228 static void printNonOkOverflow(std::ostream& os) {
231 static bool compatibleWithOverflow(
double value) {
239 static UnderOverflow underOverflowHelper(
double value,
std::function<
double(
double)>) {
240 return UnderOverflow();
243 static double largestValue() {
247 static bool wouldBeDenorm(
double value) {
248 const float valuef =
static_cast<float>(
value);
252 static bool lessThanSmallestValue(
double value) {
253 return std::abs(value) < smallestValue();
256 static double smallestValue() {
263 inrange_signflip = 1,
271 return status == RangeStatus::inrange || status == RangeStatus::denormal;
274 template <
typename T>
275 class PackedValueCheckResult {
278 double pcvalue,
double trackvalue,
279 double rangeMin,
double rangeMax,
280 const typename T::UnderOverflow& underOverflow):
281 diff_(diff), pcvalue_(pcvalue), trackvalue_(trackvalue), rangeMin_(rangeMin), rangeMax_(rangeMax),
282 status_(status), underOverflow_(underOverflow)
286 double diff()
const {
return diff_; }
288 bool outsideExpectedRange()
const {
289 if(status_ == RangeStatus::inrange)
290 return diff_ < rangeMin_ || diff_ > rangeMax_;
292 return status_ == RangeStatus::underflow_notOK || status_ == RangeStatus::overflow_notOK || status_ == RangeStatus::inrange_signflip;
295 void print(std::ostream& os)
const {
296 if(outsideExpectedRange())
298 os <<
"(" << rangeMin_ <<
"," << rangeMax_ <<
") ";
300 os << diff_ <<
" " << pcvalue_;
301 if(status_ == RangeStatus::underflow_OK || status_ == RangeStatus::underflow_notOK) {
302 os <<
" (underflow) ";
303 if(status_ == RangeStatus::underflow_notOK)
304 underOverflow_.printNonOkUnderflow(os);
306 else if(status_ == RangeStatus::overflow_OK || status_ == RangeStatus::overflow_notOK) {
307 os <<
" (overflow) ";
308 if(status_ == RangeStatus::overflow_notOK)
309 underOverflow_.printNonOkOverflow(os);
311 else if(status_ == RangeStatus::denormal)
313 os <<
" " << trackvalue_;
318 const double pcvalue_;
319 const double trackvalue_;
320 const double rangeMin_;
321 const double rangeMax_;
323 const typename T::UnderOverflow underOverflow_;
331 RangeAbs(
double val):
min(-val),
max(val) {}
335 template <
typename T>
336 class PackedValueCheck {
338 template <
typename R,
typename ...Args>
339 PackedValueCheck(
const R& range,
Args&&...
args):
340 helper_(std::forward<
Args>(
args)...),
341 rangeMin_(range.
min), rangeMax_(range.
max)
347 int flow_nbins,
double flow_min,
double flow_max) {
348 hInrange = iBooker.
book1D(name, title, nbins, min, max);
349 hUnderOverflowSign = iBooker.
book1D(name+
"UnderOverFlowSign", title+
" with over- and underflow, and sign flip", flow_nbins, flow_min, flow_max);
350 hStatus = iBooker.
book1D(name+
"Status", title+
" status", 7, -0.5, 6.5);
352 hStatus->setBinLabel(2,
"In range, sign flip");
353 hStatus->setBinLabel(3,
"Denormal");
354 hStatus->setBinLabel(4,
"Underflow, PC is "+T::minName());
355 hStatus->setBinLabel(5,
"Underflow, PC is not "+T::minName());
356 hStatus->setBinLabel(6,
"Overflow, PC is "+T::maxName());
357 hStatus->setBinLabel(7,
"Overflow, PC is not "+T::maxName());
360 PackedValueCheckResult<T>
fill(
double pcvalue,
double trackvalue,
363 const auto diff = diffRelative(pcvalue, trackvalue);
365 const auto tmpSigned = modifyPack ? modifyPack(trackvalue) : trackvalue;
367 const auto underOverflow = helper_.underOverflowHelper(tmpSigned, modifyUnpack);
369 if(
tmp > helper_.largestValue()) {
370 fillNoFlow(hUnderOverflowSign,
diff);
371 if(underOverflow.compatibleWithOverflow(
std::abs(pcvalue))) {
372 status = RangeStatus::overflow_OK;
375 status = RangeStatus::overflow_notOK;
378 else if(helper_.lessThanSmallestValue(tmpSigned)) {
379 fillNoFlow(hUnderOverflowSign,
diff);
380 if(underOverflow.compatibleWithUnderflow(
std::abs(pcvalue))) {
381 status = RangeStatus::underflow_OK;
384 status = RangeStatus::underflow_notOK;
389 if(T::wouldBeDenorm(
tmp)) {
390 status = RangeStatus::denormal;
393 status = RangeStatus::inrange;
395 fillNoFlow(hInrange,
diff);
398 fillNoFlow(hUnderOverflowSign,
diff);
399 status = RangeStatus::inrange_signflip;
402 hStatus->Fill(static_cast<int>(status));
404 return PackedValueCheckResult<T>(
status,
diff, pcvalue, trackvalue, rangeMin_, rangeMax_, underOverflow);
409 const double rangeMin_;
410 const double rangeMax_;
416 template <
typename T>
417 std::ostream& operator<<(std::ostream& os, const PackedValueCheckResult<T>& res) {
509 tracksToken_(consumes<edm::
View<
reco::Track>>(iConfig.getUntrackedParameter<edm::
InputTag>(
"tracks"))),
511 trackToPackedCandidateToken_(consumes<edm::Association<pat::
PackedCandidateCollection>>(iConfig.getUntrackedParameter<edm::
InputTag>(
"trackToPackedCandidateAssociation"))),
512 rootFolder_(iConfig.getUntrackedParameter<std::
string>(
"rootFolder")),
513 h_diffDxyAssocPV(RangeAbs(0.001)),
514 h_diffDzAssocPV(RangeAbs(0.001)),
515 h_diffCovQoverpQoverp(
Range(-1
e-6, 0.13), -15, 0),
516 h_diffCovLambdaLambda(
Range(-1
e-6, 0.13), -20, -5),
517 h_diffCovLambdaDsz(RangeAbs(0.13), -17, -4),
518 h_diffCovPhiPhi(RangeAbs(0.13), -15, 0),
519 h_diffCovPhiDxy(RangeAbs(0.13), -17, -4),
520 h_diffCovDxyDxy(RangeAbs(0.001)),
521 h_diffCovDxyDsz(RangeAbs(0.001)),
522 h_diffCovDszDsz(RangeAbs(0.001))
535 descriptions.
add(
"packedCandidateTrackValidator", desc);
553 h_diffVx = iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -0.2, 0.2);
554 h_diffVy = iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -0.2, 0.2);
555 h_diffVz = iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -0.4, 0.4);
557 h_diffNormalizedChi2 = iBooker.
book1D(
"diffNormalizedChi2",
"PackedCandidate::bestTrack() - reco::Track in normalizedChi2()", 30, -1.5, 1.5);
558 h_diffNdof = iBooker.
book1D(
"diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
560 h_diffCharge = iBooker.
book1D(
"diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
561 h_diffIsHighPurity = iBooker.
book1D(
"diffIsHighPurity",
"PackedCandidate::bestTrack() - reco::Track in quality(highPurity)", 3, -1.5, 1.5);
563 h_diffPt = iBooker.
book1D(
"diffPt",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in pt()", diffBins, -1.1, 1.1);
564 h_diffEta = iBooker.
book1D(
"diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -0.001, 0.001);
565 h_diffPhi = iBooker.
book1D(
"diffPhi",
"PackedCandidate::bestTrack() - reco::Track in phi()", diffBins, -0.0005, 0.0005);
567 h_diffDxyAssocPV.book(iBooker,
"diffDxyAssocPV",
"(PackedCandidate::dxy() - reco::Track::dxy(assocPV))/reco::Track",
570 h_diffDzAssocPV.book(iBooker,
"diffDzAssocPV",
"(PackedCandidate::dzAssociatedPV() - reco::Track::dz(assocPV))/reco::Track",
573 h_diffDxyPV = iBooker.
book1D(
"diffDxyPV",
"(PackedCandidate::dxy(PV) - reco::Track::dxy(PV))/reco::Track", diffBins, -0.01, 0.01);
574 h_diffDzPV = iBooker.
book1D(
"diffDzPV",
"(PackedCandidate::dz(PV) - reco::Track::dz(PV))/reco::Track", diffBins, -0.01, 0.01);
575 h_diffTrackDxyAssocPV = iBooker.
book1D(
"diffTrackDxyAssocPV",
"(PackedCandidate::bestTrack()::dxy(assocPV)) - reco::Track::dxy(assocPV))/reco::Track", diffBins, -0.01, 0.01);
576 h_diffTrackDzAssocPV = iBooker.
book1D(
"diffTrackDzAssocPV",
"(PackedCandidate::bestTrack()::dz(assocPV)) - reco::Track::dz(assocPV))/reco::Track", diffBins, -0.01, 0.01);
578 h_diffCovQoverpQoverp.book(iBooker,
"diffCovQoverpQoverp",
"(PackedCandidate::bestTrack() - reco::Track)/reco::track in cov(qoverp, qoverp)",
581 h_diffCovLambdaLambda.book(iBooker,
"diffCovLambdaLambda",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, lambda)",
584 h_diffCovLambdaDsz.book(iBooker,
"diffCovLambdaDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(lambda, dsz)",
587 h_diffCovPhiPhi.book(iBooker,
"diffCovPhiPhi",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, phi)",
590 h_diffCovPhiDxy.book(iBooker,
"diffCovPhiDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(phi, dxy)",
593 h_diffCovDxyDxy.book(iBooker,
"diffCovDxyDxy",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dxy)",
596 h_diffCovDxyDsz.book(iBooker,
"diffCovDxyDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dxy, dsz)",
599 h_diffCovDszDsz.book(iBooker,
"diffCovDszDsz",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in cov(dsz, dsz)",
603 h_diffDxyError = iBooker.
book1D(
"diffDxyError",
"(PackedCandidate::dxyError() - reco::Track::dxyError())/reco::Track", 40, -0.001, 0.001);
604 h_diffDszError = iBooker.
book1D(
"diffDszError",
"(PackedCandidate::dzError() - reco::Track::dszError())/reco::Track", 40, -0.001, 0.001);
605 h_diffDzError = iBooker.
book1D(
"diffDzError",
"(PackedCandidate::dzError() - reco::Track::dzError())/reco::Track", 40, -0.001, 0.001);
607 h_diffTrackDxyError = iBooker.
book1D(
"diffTrackDxyError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dxyError()", 40, -0.001, 0.001);
608 h_diffTrackDzError = iBooker.
book1D(
"diffTrackDzError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in dzError()", 40, -0.05, 0.05);
610 h_diffPtError = iBooker.
book1D(
"diffPtError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in ptError()", diffBins, -1.1, 1.1);
611 h_diffEtaError = iBooker.
book1D(
"diffEtaError",
"(PackedCandidate::bestTrack() - reco::Track)/reco::Track in etaError()", 60, -0.15, 0.15);
614 h_diffNumberOfPixelHits = iBooker.
book1D(
"diffNumberOfPixelHits",
"PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()", 5, -2.5, 2.5);
615 h_diffNumberOfHits = iBooker.
book1D(
"diffNumberOfHits",
"PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()", 5, -2.5, 2.5);
616 h_diffLostInnerHits = iBooker.
book1D(
"diffLostInnerHits",
"PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)", 5, -2.5, 2.5);
625 h_numberHitsOverMax = iBooker.
book1D(
"numberHitsOverMax",
"Number of hits over the maximum of PackedCandidate", 20, 0, 20);
631 const auto&
tracks = *htracks;
643 const auto& trackToPackedCandidate = *hassoc;
646 auto trackPtr =
tracks.ptrAt(
i);
657 if(pcRef->charge() == 0) {
662 const reco::Track *trackPcPtr = pcRef->bestTrack();
669 if(
std::abs(pcRef->pdgId()) == 11) {
681 auto slimmedVertexRef = pcRef->vertexRef();
693 double diffNormalizedChi2 = 0;
694 if(trackPc.
ndof() != 0) {
706 const auto diffPt = diffRelative(trackPc.
pt(), track.
pt());
712 const auto diffDxyAssocPV =
h_diffDxyAssocPV.fill(pcRef->dxy( ) , track.
dxy(pcVertex.
position()), [](
double value){
return value*100.;});
713 const auto diffDzAssocPV =
h_diffDzAssocPV.fill( pcRef->dzAssociatedPV(), track.
dz(pcVertex.
position()) , [](
double value){
return value*100.;});
715 const auto diffDzPV = diffRelative(pcRef->dz(pv.
position()) , track.
dz(pv.
position()));
721 auto fillCov1 = [&](
auto& hlp,
const int i,
const int j) {
724 auto fillCov2 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack) {
727 auto fillCov3 = [&](
auto& hlp,
const int i,
const int j, std::function<double(double)> modifyPack, std::function<double(double)> modifyUnpack) {
731 const auto pcPt = pcRef->pt();
741 if(isInRange(diffCovDszDsz.status())) {
746 if(isInRange(diffCovDxyDxy.status())) {
759 const auto pcNumberOfHits = pcRef->numberOfHits();
760 const auto pcNumberOfPixelHits = pcRef->numberOfPixelHits();
761 const auto pcNumberOfStripHits = pcNumberOfHits - pcNumberOfPixelHits;
772 int diffNumberOfPixelHits = 0;
773 int diffNumberOfHits = 0;
778 diffNumberOfPixelHits = pcNumberOfPixelHits - trackNumberOfPixelHits;
780 if(stripOverflow || pixelInducedStripOverflow || pixelOverflow) {
781 int diffNumberOfStripHits = 0;
782 if(stripOverflow || pixelInducedStripOverflow) {
785 else if(pixelOverflow) {
786 diffNumberOfStripHits = (pcNumberOfStripHits - pixelOverflow) - trackNumberOfStripHits;
789 diffNumberOfHits = diffNumberOfPixelHits + diffNumberOfStripHits;
792 diffNumberOfHits = pcNumberOfHits - trackNumberOfHits;
798 int diffLostInnerHits = 0;
800 switch(pcRef->lostInnerHits()) {
803 diffLostInnerHits = -trackLostInnerHits;
806 diffLostInnerHits = 1-trackLostInnerHits;
809 diffLostInnerHits = trackLostInnerHits>=2 ? 0 : 2-trackLostInnerHits;
822 int diffHitPatternHasValidHitInFirstPixelBarrel = 0;
830 if(diffNormalizedChi2 < -1 || diffNormalizedChi2 > 0 || diffCharge != 0 || diffHP != 0
832 || diffDxyAssocPV.outsideExpectedRange()
833 || diffDzAssocPV.outsideExpectedRange()
835 || diffCovQoverpQoverp.outsideExpectedRange() || diffCovLambdaLambda.outsideExpectedRange()
836 || diffCovLambdaDsz.outsideExpectedRange() || diffCovPhiPhi.outsideExpectedRange()
837 || diffCovPhiDxy.outsideExpectedRange() || diffCovDxyDxy.outsideExpectedRange()
838 || diffCovDxyDsz.outsideExpectedRange() || diffCovDszDsz.outsideExpectedRange()
839 || diffNumberOfPixelHits != 0 || diffNumberOfHits != 0 || diffLostInnerHits != 0
840 || diffHitPatternHasValidHitInFirstPixelBarrel != 0
843 edm::LogInfo(
"PackedCandidateTrackValidator") <<
"Track " << i <<
" pt " << track.
pt() <<
" eta " << track.
eta() <<
" phi " << track.
phi() <<
" chi2 " << track.
chi2() <<
" ndof " << track.
ndof()
849 <<
" dxy " << track.
dxy() <<
" dz " << track.
dz()
851 <<
" " << TrackAlgoPrinter(track)
852 <<
" lost inner hits " << trackLostInnerHits
854 <<
" hitpattern " << HitPatternPrinter(track)
856 <<
" 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()
858 <<
" ptError " << trackPc.
ptError() <<
" etaError " << trackPc.
etaError() <<
" phiError " << trackPc.
phiError()
860 <<
" pc.vertex " << pcRef->vertex() <<
" momentum " << pcRef->momentum() <<
" track " << trackPc.
momentum()
862 <<
" dxy " << trackPc.
dxy() <<
" dz " << trackPc.
dz() <<
" pc.dz " << pcRef->dz()
863 <<
" dxyError " << trackPc.
dxyError() <<
" dzError " << trackPc.
dzError()
866 <<
" dxy(assocPV) " << trackPc.
dxy(pcVertex.
position()) <<
" dz(assocPV) " << trackPc.
dz(pcVertex.
position())
868 <<
" (diff PackedCandidate track)"
870 <<
" charge " << diffCharge <<
" " << trackPc.
charge() <<
" " << track.
charge()
873 <<
" numberOfHits " << diffNumberOfHits <<
" " << pcNumberOfHits <<
" " << trackNumberOfHits
874 <<
" numberOfPixelHits " << diffNumberOfPixelHits <<
" " << pcNumberOfPixelHits <<
" " << trackNumberOfPixelHits
875 <<
" numberOfStripHits # " << pcNumberOfStripHits <<
" " << trackNumberOfStripHits
881 <<
" lostInnerHits " << diffLostInnerHits <<
" " << pcRef->lostInnerHits() <<
" #"
882 <<
" phi (5e-4) " << diffPhi <<
" " << trackPc.
phi() <<
" " << track.
phi()
884 <<
" dxy(assocPV) " << diffDxyAssocPV
886 <<
" dz(assocPV) " << diffDzAssocPV
888 <<
" dxy(PV) (0.05) " << diffDxyPV <<
" " << pcRef->dxy(pv.
position()) <<
" " << track.
dxy(pv.
position())
890 <<
" dz(PV) (0.05) " << diffDzPV <<
" " << pcRef->dz(pv.
position()) <<
" " << track.
dz(pv.
position())
892 <<
" cov(qoverp, qoverp) " << diffCovQoverpQoverp
894 <<
" cov(lambda, lambda) " << diffCovLambdaLambda
896 <<
" cov(lambda, dsz) " << diffCovLambdaDsz
898 <<
" cov(phi, phi) " << diffCovPhiPhi
900 <<
" cov(phi, dxy) " << diffCovPhiDxy
902 <<
" cov(dxy, dxy) " << diffCovDxyDxy
904 <<
" cov(dxy, dsz) " << diffCovDxyDsz
906 <<
" 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)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
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)
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
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)
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
double dszError() const
error on dsz
double eta() const
pseudorapidity of momentum vector
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
helper::RootFunctionHelper< F, args >::root_function function(F &f)
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_diffIsHighPurity
bool isNull() const
Checks for null.
MonitorElement * h_diffDszError
static bool inactiveHitFilter(uint16_t pattern)
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
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_diffDxyError
MonitorElement * h_diffPt
int numberOfValidPixelHits() const
PackedValueCheck< Float16Helper > h_diffCovDszDsz
int charge() const
track electric charge
bool hasValidHitInFirstPixelBarrel() const
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...
constexpr size_type size() const noexcept
MonitorElement * h_diffTrackDxyError
MonitorElement * h_diffNumberOfHits
MonitorElement * h_diffEtaError
double vx() const
x coordinate of the reference point on track
int numberOfHits(HitCategory category) const