|
|
Go to the documentation of this file.
11 pfcand->gsfTrackRef().isAvailable())
13 else if (
pfcand->trackRef().isNonnull() &&
pfcand->trackRef().isAvailable())
21 "BCWeakDecay",
"BWeakDecay",
"CWeakDecay",
"PU",
"Other",
"Fake"};
25 : distJetAxis_(pSet.getParameter<double>(
"distJetAxisCut")),
26 decayLength_(pSet.getParameter<double>(
"decayLengthCut")),
27 minJetPt_(pSet.getParameter<double>(
"minJetPt")),
28 maxJetEta_(pSet.getParameter<double>(
"maxJetEta")),
29 ipTagInfos_(pSet.getParameter<
std::
string>(
"ipTagInfos")),
30 PatJetSrc_(pSet.getParameter<
InputTag>(
"PatJetSource")),
31 TrackSrc_(pSet.getParameter<
InputTag>(
"TrackSource")),
32 PVSrc_(pSet.getParameter<
InputTag>(
"PrimaryVertexSource")),
33 ClusterTPMapSrc_(pSet.getParameter<
InputTag>(
"clusterTPMap")),
34 classifier_(pSet, consumesCollector())
57 "nTrkAll_bjet",
"Number of selected tracks in b jets;number of selected tracks;jets", 16, -0.5, 15.5);
60 "nTrkAll_cjet",
"Number of selected tracks in c jets;number of selected tracks;jets", 16, -0.5, 15.5);
63 "nTrkAll_dusgjet",
"Number of selected tracks in dusg jets;number of selected tracks;jets", 16, -0.5, 15.5);
70 "Number of selected tracks in b jets (" +
TrkHistCat[
i] +
71 ");number of selected tracks (" +
TrkHistCat[
i] +
");jets",
78 "Number of selected tracks in c jets (" +
TrkHistCat[
i] +
79 ");number of selected tracks (" +
TrkHistCat[
i] +
");jets",
86 "Number of selected tracks in dusg jets (" +
TrkHistCat[
i] +
87 ");number of selected tracks (" +
TrkHistCat[
i] +
");jets",
172 "Number of tracker hits (" +
TrkHistCat[
i] +
" Truth);track number of all hits (" +
179 "Number of strip hits (" +
TrkHistCat[
i] +
" Truth);track number of strip hits (" +
186 "Number of pixel hits (" +
TrkHistCat[
i] +
" Truth);track number of pixel hits (" +
202 using P = std::pair<OmniClusterRef, TrackingParticleRef>;
203 bool compare(
const P &
i,
const P &
j) {
return i.second.index() >
j.second.index(); }
232 e(0, 0) = 0.0015 * 0.0015;
233 e(1, 1) = 0.0015 * 0.0015;
241 for (pat::JetCollection::const_iterator
jet = patJetsColl->begin();
jet != patJetsColl->end(); ++
jet) {
245 unsigned int flav =
abs(
jet->hadronFlavour());
250 const std::vector<edm::Ptr<reco::Candidate>> &
selectedTracks(trackIpTagInfo->selectedTracks());
252 unsigned int nseltracks = 0;
253 std::vector<int> nseltracksCat(
TrkHistCat.size(),
258 for (
unsigned int itt = 0; itt < nTrackSize; ++itt) {
284 double TrkPt = ptrack.
pt();
285 double TrkEta = ptrack.
eta();
286 double TrkPhi = ptrack.
phi();
287 double TrkDxy = ptrack.
dxy(
pv->position());
288 double TrkDz = ptrack.
dz(
pv->position());
293 double TrkTruthPt = -99;
294 double TrkTruthEta = -99;
295 double TrkTruthPhi = -99;
296 double TrkTruthDxy = -1;
297 double TrkTruthDz = -1;
298 int TrkTruthnHitAll = -1;
299 int TrkTruthnHitPixel = -1;
300 int TrkTruthnHitStrip = -1;
305 double quality_tpr =
res.second;
309 auto clusterTPmap = clusterToTPMap.
map();
310 std::sort(clusterTPmap.begin(), clusterTPmap.end(),
compare);
312 std::equal_range(clusterTPmap.begin(), clusterTPmap.end(), std::make_pair(
OmniClusterRef(), tpr),
compare);
313 if (quality_tpr != 0) {
314 TrkTruthPt = tpr->pt();
315 TrkTruthEta = tpr->eta();
316 TrkTruthPhi = tpr->phi();
321 TrkTruthDxy = (-(vertex_tpr.x() - vertex_pv.x()) * momentum_tpr.y() +
322 (vertex_tpr.y() - vertex_pv.y()) * momentum_tpr.x()) /
324 TrkTruthDz = (vertex_tpr.z() - vertex_pv.z()) - ((vertex_tpr.x() - vertex_pv.x()) * momentum_tpr.x() +
325 (vertex_tpr.y() - vertex_pv.y()) * momentum_tpr.y()) /
326 sqrt(momentum_tpr.perp2()) * momentum_tpr.z() /
327 sqrt(momentum_tpr.perp2());
330 TrkTruthnHitPixel = 0;
331 TrkTruthnHitStrip = 0;
332 if (clusterRange.first != clusterRange.second) {
333 for (
auto ip = clusterRange.first; ip != clusterRange.second; ++ip) {
336 TrkTruthnHitPixel += 1;
339 TrkTruthnHitStrip += 1;
343 TrkTruthnHitAll = TrkTruthnHitPixel + TrkTruthnHitStrip;
361 if (quality_tpr != 0) {
384 if (quality_tpr != 0) {
407 if (quality_tpr != 0) {
429 if (quality_tpr != 0) {
452 if (quality_tpr != 0) {
484 }
else if (flav == 4) {
edm::InputTag ClusterTPMapSrc_
edm::EDGetTokenT< pat::JetCollection > PatJetCollectionTag_
MonitorElement * nTrk_dusgjet[6]
MonitorElement * TrkTruthDxy_alljets[5]
MonitorElement * TrkTruthPt_alljets[5]
edm::EDGetTokenT< reco::TrackCollection > TrackCollectionTag_
TrackClassifier classifier_
const TrackHistory & history() const
Returns a reference to the track history used in the classification.
const reco::Track * toTrack(const reco::TrackBaseRef &t)
MonitorElement * nTrk_bjet[6]
math::Error< dimension >::type Error
covariance error matrix (3x3)
GlobalPoint globalPosition() const
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * nTrkAll_cjet
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
const std::pair< TrackingParticleRef, double > getMatchedTrackingParticle() const
T const * get() const
Returns C++ pointer to the item.
math::XYZVectorD Vector
point in the space
MonitorElement * nTrkAll_bjet
unsigned short numberOfValidHits() const
number of valid hits found
double pt() const
track transverse momentum
primaryVertex
hltOfflineBeamSpot for HLTMON
#define DEFINE_FWK_MODULE(type)
MonitorElement * TrkPt_alljets[6]
const TrackClassifier & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
const map_type & map() const
BDHadronTrackMonitoringAnalyzer(const edm::ParameterSet &pSet)
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...
static const std::vector< std::string > TrkHistCat
double phi() const
azimuthal angle of momentum vector
MonitorElement * TrkTruthHitAll_alljets[5]
MonitorElement * TrkTruthDz_alljets[5]
MonitorElement * nTrk_cjet[6]
MonitorElement * TrkTruthPhi_alljets[5]
MonitorElement * TrkDz_alljets[6]
MonitorElement * TrkTruthHitStrip_alljets[5]
MonitorElement * TrkTruthHitPixel_alljets[5]
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
MonitorElement * nTrkAll_dusgjet
double eta() const
pseudorapidity of momentum vector
TrajectoryStateOnSurface impactPointState() const
MonitorElement * TrkHitAll_alljets[6]
MonitorElement * TrkHitStrip_alljets[6]
MonitorElement * TrkTruthEta_alljets[5]
MonitorElement * TrkHitPixel_alljets[6]
const reco::TrackBaseRef toTrackRef(const edm::Ptr< reco::Candidate > &cnd)
const MagneticField * field() const
~BDHadronTrackMonitoringAnalyzer() override
MonitorElement * TrkEta_alljets[6]
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
math::XYZPoint Point
point in the space
int numberOfValidStripHits() const
edm::EDGetTokenT< reco::VertexCollection > PrimaryVertexColl_
int numberOfValidPixelHits() const
Particle reconstructed by the particle flow algorithm.
reco::Vertex::Point convertPos(const GlobalPoint &p)
reco::TransientTrack build(const reco::Track *p) const
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
Abs< T >::type abs(const T &t)
MonitorElement * TrkPhi_alljets[6]
std::pair< OmniClusterRef, TrackingParticleRef > P
bool compare(const P &i, const P &j)
math::XYZPointD Point
point in the space
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
const Flags & flags() const
Returns flags with the category descriptions.
std::vector< bool > Flags
Main types associated to the class.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * TrkDxy_alljets[6]