73 tracksToken_(consumes<edm::
View<
reco::Track>>(iConfig.getUntrackedParameter<edm::
InputTag>(
"tracks"))),
74 trackToPackedCandidateToken_(consumes<edm::Association<pat::
PackedCandidateCollection>>(iConfig.getUntrackedParameter<edm::
InputTag>(
"trackToPackedCandiadteAssociation"))),
75 rootFolder_(iConfig.getUntrackedParameter<std::
string>(
"rootFolder"))
87 descriptions.
add(
"packedCandidateTrackValidator", desc);
104 h_diffPx = iBooker.
book1D(
"diffPx",
"PackedCandidate::bestTrack() - reco::Track in px()", diffBins, -diffP, diffP);
105 h_diffPy = iBooker.
book1D(
"diffPy",
"PackedCandidate::bestTrack() - reco::Track in py()", diffBins, -diffP, diffP);
106 h_diffPz = iBooker.
book1D(
"diffPz",
"PackedCandidate::bestTrack() - reco::Track in pz()", diffBins, -diffP, diffP);
108 h_diffVx = iBooker.
book1D(
"diffVx",
"PackedCandidate::bestTrack() - reco::Track in vx()", diffBins, -diffP, diffP);
109 h_diffVy = iBooker.
book1D(
"diffVy",
"PackedCandidate::bestTrack() - reco::Track in vy()", diffBins, -diffP, diffP);
110 h_diffVz = iBooker.
book1D(
"diffVz",
"PackedCandidate::bestTrack() - reco::Track in vz()", diffBins, -diffP, diffP);
112 h_diffNormalizedChi2 = iBooker.
book1D(
"diffNormalizedChi2",
"PackedCandidate::bestTrack() - reco::Track in normalizedChi2()", 30, -1.5, 1.5);
113 h_diffNdof = iBooker.
book1D(
"diffNdof",
"PackedCandidate::bestTrack() - reco::Track in ndof()", 33, -30.5, 2.5);
115 h_diffCharge = iBooker.
book1D(
"diffCharge",
"PackedCandidate::bestTrack() - reco::Track in charge()", 5, -2.5, 2.5);
116 h_diffIsHighPurity = iBooker.
book1D(
"diffIsHighPurity",
"PackedCandidate::bestTrack() - reco::Track in quality(highPurity)", 3, -1.5, 1.5);
118 h_diffQoverp = iBooker.
book1D(
"diffQoverp",
"PackedCandidate::bestTrack() - reco::Track in qoverp()", diffBins, -1
e-3, 1
e-3);
119 h_diffPt = iBooker.
book1D(
"diffPt",
"PackedCandidate::bestTrack() - reco::Track in pt()", diffBins, -diffP, diffP);
120 h_diffEta = iBooker.
book1D(
"diffEta",
"PackedCandidate::bestTrack() - reco::Track in eta()", diffBins, -diff, diff);
121 h_diffTheta = iBooker.
book1D(
"diffTheta",
"PackedCandidate::bestTrack() - reco::Track in theta()", diffBins, -diff, diff);
122 h_diffPhi = iBooker.
book1D(
"diffPhi",
"PackedCandidate::bestTrack() - reco::Track in phi()", diffBins, -diff, diff);
123 h_diffDxy = iBooker.
book1D(
"diffDxy",
"PackedCandidate::bestTrack() - reco::Track in dxy()", diffBins, -2
e-5, 2
e-5);
124 h_diffDz = iBooker.
book1D(
"diffDz",
"PackedCandidate::bestTrack() - reco::Track in dz()", diffBins, -4
e-5, 4
e-5);
126 h_diffQoverpError = iBooker.
book1D(
"diffQoverpError",
"PackedCandidate::bestTrack() - reco::Track in qoverpError()", diffBins, -1
e-3, 1
e-3);
127 h_diffPtError = iBooker.
book1D(
"diffPtError",
"PackedCandidate::bestTrack() - reco::Track in ptError()", diffBins, -diffP, diffP);
128 h_diffEtaError = iBooker.
book1D(
"diffEtaError",
"PackedCandidate::bestTrack() - reco::Track in etaError()", diffBins, -diff, diff);
129 h_diffThetaError = iBooker.
book1D(
"diffThetaError",
"PackedCandidate::bestTrack() - reco::Track in thetaError()", diffBins, -diff, diff);
130 h_diffPhiError = iBooker.
book1D(
"diffPhiError",
"PackedCandidate::bestTrack() - reco::Track in phiError()", diffBins, -diff, diff);
131 h_diffDxyError = iBooker.
book1D(
"diffDxyError",
"PackedCandidate::bestTrack() - reco::Track in dxyError()", diffBins, -2
e-5, 2
e-5);
132 h_diffDzError = iBooker.
book1D(
"diffDzError",
"PackedCandidate::bestTrack() - reco::Track in dzError()", diffBins, -4
e-5, 4
e-5);
134 h_diffNumberOfPixelHits = iBooker.
book1D(
"diffNumberOfPixelHits",
"PackedCandidate::numberOfPixelHits() - reco::Track::hitPattern::numberOfValidPixelHits()", 5, -2.5, 2.5);
135 h_diffNumberOfHits = iBooker.
book1D(
"diffNumberOfHits",
"PackedCandidate::numberHits() - reco::Track::hitPattern::numberOfValidHits()", 5, -2.5, 2.5);
136 h_diffLostInnerHits = iBooker.
book1D(
"diffLostInnerHits",
"PackedCandidate::lostInnerHits() - reco::Track::hitPattern::numberOfLostHits(MISSING_INNER_HITS)", 5, -2.5, 2.5);
154 const auto&
tracks = *htracks;
158 const auto& trackToPackedCandidate = *hassoc;
161 auto trackPtr =
tracks.ptrAt(
i);
171 const reco::Track *trackPcPtr = pcRef->bestTrack();
178 if(
std::abs(pcRef->pdgId()) == 11) {
224 int diffLostInnerHits = 0;
226 switch(pcRef->lostInnerHits()) {
229 diffLostInnerHits = -trackLostInnerHits;
232 diffLostInnerHits = 1-trackLostInnerHits;
235 diffLostInnerHits = trackLostInnerHits>=2 ? 0 : 2-trackLostInnerHits;
double qoverp() const
q / p
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
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
double theta() const
polar angle
double dxyError() const
error on dxy
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_diffVy
int numberOfValidHits() const
PackedCandidateTrackValidator(const edm::ParameterSet &pset)
MonitorElement * h_selectionFlow
MonitorElement * h_diffThetaError
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)
double phi() const
azimuthal angle of momentum vector
double px() const
x coordinate of momentum vector
MonitorElement * h_diffNumberOfPixelHits
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * h_diffDzError
MonitorElement * h_diffLostInnerHits
double eta() const
pseudorapidity of momentum vector
MonitorElement * h_diffPhi
MonitorElement * h_diffPz
MonitorElement * h_diffPx
double ndof() const
number of degrees of freedom of the fit
double pt() const
track transverse momentum
MonitorElement * h_diffPhiError
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)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_diffIsHighPurity
bool isNull() const
Checks for null.
double pz() const
z coordinate of momentum vector
MonitorElement * h_diffPy
double qoverpError() const
error on signed transverse curvature
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
MonitorElement * h_diffQoverpError
void setCurrentFolder(const std::string &fullpath)
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
MonitorElement * h_diffDxy
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * h_diffHitPatternNumberOfLostInnerHits
MonitorElement * h_diffHitPatternNumberOfValidPixelHits
virtual ~PackedCandidateTrackValidator()
bool quality(const TrackQuality) const
Track quality.
MonitorElement * h_diffNdof
int numberOfLostHits(HitCategory category) const
MonitorElement * h_diffVx
double vy() const
y coordinate of the reference point on track
MonitorElement * h_diffQoverp
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h_diffHitPatternNumberOfValidHits
MonitorElement * h_diffDxyError
MonitorElement * h_diffPt
int numberOfValidPixelHits() const
int charge() const
track electric charge
bool hasValidHitInFirstPixelBarrel() const
MonitorElement * h_diffTheta
MonitorElement * h_diffDz
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_diffNumberOfHits
MonitorElement * h_diffEtaError
double py() const
y coordinate of momentum vector
double vx() const
x coordinate of the reference point on track
double thetaError() const
error on theta