CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
BDHadronTrackMonitoringAnalyzer Class Reference

#include <BDHadronTrackMonitoringAnalyzer.h>

Inheritance diagram for BDHadronTrackMonitoringAnalyzer:

Public Types

enum  HistoryClasses {
  BCWeakDecay =0, BWeakDecay =1, CWeakDecay =2, PU =3,
  Other =4, Fake =5
}
 

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 BDHadronTrackMonitoringAnalyzer (const edm::ParameterSet &pSet)
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 ~BDHadronTrackMonitoringAnalyzer ()
 

Static Public Attributes

static const std::vector< std::string > TrkHistCat = {"BCWeakDecay", "BWeakDecay", "CWeakDecay", "PU", "Other", "Fake"}
 

Private Attributes

TrackClassifier classifier_
 
edm::InputTag ClusterTPMapSrc_
 
edm::EDGetTokenT< ClusterTPAssociationclusterTPMapToken_
 
double decayLength_
 
double distJetAxis_
 
std::string ipTagInfos_
 
double maxJetEta_
 
double minJetPt_
 
MonitorElementnTrk_bjet [6]
 
MonitorElementnTrk_cjet [6]
 
MonitorElementnTrk_dusgjet [6]
 
MonitorElementnTrkAll_bjet
 
MonitorElementnTrkAll_cjet
 
MonitorElementnTrkAll_dusgjet
 
edm::EDGetTokenT< pat::JetCollectionPatJetCollectionTag_
 
edm::InputTag PatJetSrc_
 
edm::EDGetTokenT< reco::VertexCollectionPrimaryVertexColl_
 
edm::InputTag PVSrc_
 
edm::EDGetTokenT< reco::TrackCollectionTrackCollectionTag_
 
edm::InputTag TrackSrc_
 
MonitorElementTrkDxy_alljets [6]
 
MonitorElementTrkDz_alljets [6]
 
MonitorElementTrkEta_alljets [6]
 
MonitorElementTrkHitAll_alljets [6]
 
MonitorElementTrkHitPixel_alljets [6]
 
MonitorElementTrkHitStrip_alljets [6]
 
MonitorElementTrkPhi_alljets [6]
 
MonitorElementTrkPt_alljets [6]
 
MonitorElementTrkTruthDxy_alljets [5]
 
MonitorElementTrkTruthDz_alljets [5]
 
MonitorElementTrkTruthEta_alljets [5]
 
MonitorElementTrkTruthHitAll_alljets [5]
 
MonitorElementTrkTruthHitPixel_alljets [5]
 
MonitorElementTrkTruthHitStrip_alljets [5]
 
MonitorElementTrkTruthPhi_alljets [5]
 
MonitorElementTrkTruthPt_alljets [5]
 

Detailed Description

Top level steering routine for B + D hadron track monitoring tool from RECODEBUG samples.

Definition at line 54 of file BDHadronTrackMonitoringAnalyzer.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

BDHadronTrackMonitoringAnalyzer::BDHadronTrackMonitoringAnalyzer ( const edm::ParameterSet pSet)
explicit

Definition at line 21 of file BDHadronTrackMonitoringAnalyzer.cc.

References ClusterTPMapSrc_, clusterTPMapToken_, PatJetCollectionTag_, PatJetSrc_, PrimaryVertexColl_, PVSrc_, TrackCollectionTag_, and TrackSrc_.

21  :
22  distJetAxis_ ( pSet.getParameter<double>("distJetAxisCut") ),
23  decayLength_ ( pSet.getParameter<double>("decayLengthCut") ),
24  minJetPt_ ( pSet.getParameter<double>("minJetPt") ),
25  maxJetEta_ ( pSet.getParameter<double>("maxJetEta") ),
26  ipTagInfos_ ( pSet.getParameter<std::string>("ipTagInfos") ),
27  PatJetSrc_ ( pSet.getParameter<InputTag>("PatJetSource") ),
28  TrackSrc_ ( pSet.getParameter<InputTag>("TrackSource") ),
29  PVSrc_ ( pSet.getParameter<InputTag>("PrimaryVertexSource") ),
30  ClusterTPMapSrc_ ( pSet.getParameter<InputTag>("clusterTPMap") ),
31  classifier_(pSet, consumesCollector())
32 
33 {
34  PatJetCollectionTag_ = consumes<pat::JetCollection>(PatJetSrc_);
35  TrackCollectionTag_ = consumes<reco::TrackCollection>(TrackSrc_);
36  PrimaryVertexColl_ = consumes<reco::VertexCollection>(PVSrc_);
37  clusterTPMapToken_ = consumes<ClusterTPAssociation>(ClusterTPMapSrc_);
38  //TrkHistCat = {"BCWeakDecay", "BWeakDecay", "CWeakDecay", "PU", "Other", "Fake"};
39 }
T getParameter(std::string const &) const
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
edm::EDGetTokenT< reco::TrackCollection > TrackCollectionTag_
edm::EDGetTokenT< reco::VertexCollection > PrimaryVertexColl_
edm::EDGetTokenT< pat::JetCollection > PatJetCollectionTag_
BDHadronTrackMonitoringAnalyzer::~BDHadronTrackMonitoringAnalyzer ( )

Definition at line 101 of file BDHadronTrackMonitoringAnalyzer.cc.

102 {
103 }

Member Function Documentation

void BDHadronTrackMonitoringAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Definition at line 113 of file BDHadronTrackMonitoringAnalyzer.cc.

References funct::abs(), BCWeakDecay, TransientTrackBuilder::build(), TrackCategories::BWeakDecay, BWeakDecay, classifier_, IPTools::closestApproachToJet(), clusterTPMapToken_, compare(), RecoVertex::convertPos(), TrackCategories::CWeakDecay, CWeakDecay, listHistos::decayLength, decayLength_, DEFINE_FWK_MODULE, distJetAxis_, reco::TrackBase::dxy(), reco::TrackBase::dz(), MillePedeFileConverter_cfg::e, reco::TrackBase::eta(), TrackClassifier::evaluate(), TrackCategories::Fake, Fake, reco::TransientTrack::field(), MonitorElement::Fill(), TrackCategories::flags(), edm::EventSetup::get(), edm::Event::getByToken(), TrackHistory::getMatchedTrackingParticle(), TrajectoryStateOnSurface::globalPosition(), TrackClassifier::history(), reco::TrackBase::hitPattern(), mps_fire::i, reco::TransientTrack::impactPointState(), ipTagInfos_, OmniClusterRef::isPixel(), OmniClusterRef::isStrip(), TrajectoryStateOnSurface::isValid(), OmniClusterRef::isValid(), metsig::jet, IPTools::jetTrackDistance(), ClusterTPAssociation::map(), maxJetEta_, minJetPt_, TrackClassifier::newEvent(), nTrk_bjet, nTrk_cjet, nTrk_dusgjet, nTrkAll_bjet, nTrkAll_cjet, nTrkAll_dusgjet, reco::TrackBase::numberOfValidHits(), reco::HitPattern::numberOfValidPixelHits(), reco::HitPattern::numberOfValidStripHits(), Other, AlCaHLTBitMon_ParallelJobs::p, PatJetCollectionTag_, reco::TrackBase::phi(), reco::Vertex::position(), impactParameterTagInfos_cfi::primaryVertex, PrimaryVertexColl_, reco::TrackBase::pt(), PU, MetAnalyzer::pv(), trackingPlots::selectedTracks, TrackCategories::SignalEvent, mathSSE::sqrt(), reco::btag::toTrack(), toTrackRef(), TrackCollectionTag_, TrkDxy_alljets, TrkDz_alljets, TrkEta_alljets, TrkHistCat, TrkHitAll_alljets, TrkHitPixel_alljets, TrkHitStrip_alljets, TrkPhi_alljets, TrkPt_alljets, TrkTruthDxy_alljets, TrkTruthDz_alljets, TrkTruthEta_alljets, TrkTruthHitAll_alljets, TrkTruthHitPixel_alljets, TrkTruthHitStrip_alljets, TrkTruthPhi_alljets, and TrkTruthPt_alljets.

114 {
115 
117  iEvent.getByToken(PatJetCollectionTag_, patJetsColl);
118 
120  iEvent.getByToken(TrackCollectionTag_,tracksHandle);
121 
122  edm::Handle<ClusterTPAssociation> pCluster2TPListH;
123  iEvent.getByToken(clusterTPMapToken_, pCluster2TPListH);
124  const ClusterTPAssociation& clusterToTPMap = *pCluster2TPListH;
125 
127  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder", trackBuilder);
128 
129  classifier_.newEvent(iEvent, iSetup);
130 
131  // -----Primary Vertex-----
132  const reco::Vertex *pv;
133 
135  iEvent.getByToken(PrimaryVertexColl_,primaryVertex);
136 
137  bool pvFound = (primaryVertex->size() != 0);
138  if ( pvFound ) {
139  pv = &(*primaryVertex->begin());
140  }
141  else {
143  e(0,0)=0.0015*0.0015;
144  e(1,1)=0.0015*0.0015;
145  e(2,2)=15.*15.;
146  reco::Vertex::Point p(0,0,0);
147  pv= new reco::Vertex(p,e,1,1,1);
148  }
149  // -----------------------
150 
151  // -------- Loop Over Jets ----------
152  for ( pat::JetCollection::const_iterator jet = patJetsColl->begin(); jet != patJetsColl->end(); ++jet ) {
153  if ( jet->pt() < minJetPt_ || std::fabs(jet->eta()) > maxJetEta_ ) continue;
154 
155  unsigned int flav = abs(jet->hadronFlavour());
156 
157  //std::cout << "patJet collection has pfImpactParameterTagInfo?: " << jet->hasTagInfo("pfImpactParameter") << std::endl;
158  const CandIPTagInfo *trackIpTagInfo = jet->tagInfoCandIP(ipTagInfos_.c_str());
159  const std::vector<edm::Ptr<reco::Candidate> > & selectedTracks( trackIpTagInfo->selectedTracks() );
160 
161 
162  unsigned int nseltracks = 0;
163  std::vector<int> nseltracksCat(TrkHistCat.size(),0); // following the order of TrkHistCat
164 
165  unsigned int nTrackSize = selectedTracks.size(); // number of tracks from IPInfos to loop over
166  // -------- Loop Over (selected) Tracks ----------
167  for (unsigned int itt=0; itt < nTrackSize; ++itt)
168  {
169  const TrackBaseRef ptrackRef = toTrackRef(selectedTracks[itt]);
170  const reco::Track * ptrackPtr = reco::btag::toTrack(ptrackRef);
171  const reco::Track & ptrack = *ptrackPtr;
172 
173  reco::TransientTrack transientTrack = trackBuilder->build(ptrackPtr);
174  GlobalVector direction(jet->px(), jet->py(), jet->pz());
175 
176  Double_t distJetAxis = IPTools::jetTrackDistance(transientTrack, direction, *pv).second.value();
177 
178  Double_t decayLength=999;
179  TrajectoryStateOnSurface closest = IPTools::closestApproachToJet(transientTrack.impactPointState(), *pv, direction, transientTrack.field());
180  if (closest.isValid())
181  decayLength = (closest.globalPosition() - RecoVertex::convertPos(pv->position())).mag();
182  else
183  decayLength = 999;
184 
185  // extra cut ons the tracks
186  if (std::fabs(distJetAxis) > distJetAxis_ || decayLength > decayLength_){
187  continue;
188  }
189  nseltracks+=1; // if it passed these cuts, nselectedtracks +1
190 
191 
193 
194  double TrkPt = ptrack.pt();
195  double TrkEta = ptrack.eta();
196  double TrkPhi = ptrack.phi();
197  double TrkDxy = ptrack.dxy(pv->position());
198  double TrkDz = ptrack.dz(pv->position());
199  int TrknHitAll = ptrack.numberOfValidHits();
200  int TrknHitPixel = ptrack.hitPattern().numberOfValidPixelHits();
201  int TrknHitStrip = ptrack.hitPattern().numberOfValidStripHits();
202 
203 
204  double TrkTruthPt=-99;
205  double TrkTruthEta=-99;
206  double TrkTruthPhi=-99;
207  double TrkTruthDxy=-1;
208  double TrkTruthDz=-1;
209  int TrkTruthnHitAll=-1;
210  int TrkTruthnHitPixel=-1;
211  int TrkTruthnHitStrip=-1;
212 
213  // Get corresponding Trackingparticle
214  std::pair<TrackingParticleRef, double> res = classifier_.history().getMatchedTrackingParticle();
215  TrackingParticleRef tpr = res.first;
216  double quality_tpr = res.second;
217 
218  // Match TP to hit-cluster (re-ordering according to TP rather than clusters and look for equal_range of a given tpr)
219  auto clusterTPmap = clusterToTPMap.map();
220  std::sort(clusterTPmap.begin(), clusterTPmap.end(), compare);
221  auto clusterRange = std::equal_range(clusterTPmap.begin(), clusterTPmap.end(),std::make_pair(OmniClusterRef(), tpr), compare);
222  if (quality_tpr != 0) {
223 
224  TrkTruthPt = tpr->pt();
225  TrkTruthEta = tpr->eta();
226  TrkTruthPhi = tpr->phi();
227 
228  TrackingParticle::Point vertex_pv = pv->position();
229  TrackingParticle::Point vertex_tpr = tpr->vertex();
230  TrackingParticle::Vector momentum_tpr = tpr->momentum();
231  TrkTruthDxy = (-(vertex_tpr.x()-vertex_pv.x())*momentum_tpr.y()+(vertex_tpr.y()-vertex_pv.y())*momentum_tpr.x())/tpr->pt();
232  TrkTruthDz = (vertex_tpr.z()-vertex_pv.z()) - ((vertex_tpr.x()-vertex_pv.x())*momentum_tpr.x()+(vertex_tpr.y()-vertex_pv.y())*momentum_tpr.y())/sqrt(momentum_tpr.perp2()) * momentum_tpr.z()/sqrt(momentum_tpr.perp2());
233 
234  TrkTruthnHitAll = 0;
235  TrkTruthnHitPixel = 0;
236  TrkTruthnHitStrip = 0;
237  if( clusterRange.first != clusterRange.second ) {
238  for( auto ip=clusterRange.first; ip != clusterRange.second; ++ip ) {
239  const OmniClusterRef& cluster = ip->first;
240  if (cluster.isPixel() && cluster.isValid()){ TrkTruthnHitPixel+=1;}
241  if (cluster.isStrip() && cluster.isValid()){ TrkTruthnHitStrip+=1;}
242  }
243  }
244  TrkTruthnHitAll = TrkTruthnHitPixel + TrkTruthnHitStrip;
245 
246  }
247 
248 
249 
250  // ----------- Filling the correct histograms based on jet flavour and Track history Category --------
251 
252  //BCWeakDecay
263  if (quality_tpr != 0) {
272  }
273  }
274  //BWeakDecay
275  else if ( theFlag[TrackCategories::SignalEvent] && theFlag[TrackCategories::BWeakDecay] && !theFlag[TrackCategories::CWeakDecay] ) {
285  if (quality_tpr != 0) {
294  }
295  }
296  //CWeakDecay
297  else if ( theFlag[TrackCategories::SignalEvent] && !theFlag[TrackCategories::BWeakDecay] && theFlag[TrackCategories::CWeakDecay] ) {
307  if (quality_tpr != 0) {
316  }
317  }
318  //PU
319  else if ( !theFlag[TrackCategories::SignalEvent] && !theFlag[TrackCategories::Fake] ) {
320  nseltracksCat[BDHadronTrackMonitoringAnalyzer::PU] += 1;
329  if (quality_tpr != 0) {
338  }
339  }
340  //Other
341  else if ( theFlag[TrackCategories::SignalEvent] && !theFlag[TrackCategories::BWeakDecay] && !theFlag[TrackCategories::CWeakDecay] ){
342  nseltracksCat[BDHadronTrackMonitoringAnalyzer::Other] += 1;
351  if (quality_tpr != 0) {
360  }
361  }
362  //Fake
363  else if ( !theFlag[TrackCategories::SignalEvent] && theFlag[TrackCategories::Fake] ) {
364  nseltracksCat[BDHadronTrackMonitoringAnalyzer::Fake] += 1;
373  // NO TRUTH FOR FAKES!!!
374  }
375 
376 
377 
378  }
379  // -------- END Loop Over (selected) Tracks ----------
380  // Still have to fill some jet-flavour specific variables
381  if (flav == 5){
382  nTrkAll_bjet->Fill(nseltracks);
383  for (unsigned int i = 0; i < TrkHistCat.size(); i++){
384  nTrk_bjet[i]->Fill(nseltracksCat[i]);
385  }
386  }
387  else if (flav == 4){
388  nTrkAll_cjet->Fill(nseltracks);
389  for (unsigned int i = 0; i < TrkHistCat.size(); i++){
390  nTrk_cjet[i]->Fill(nseltracksCat[i]);
391  }
392  }
393  else {
394  nTrkAll_dusgjet->Fill(nseltracks);
395  for (unsigned int i = 0; i < TrkHistCat.size(); i++){
396  nTrk_dusgjet[i]->Fill(nseltracksCat[i]);
397  }
398  }
399 
400  }
401  // -------- END Loop Over Jets ----------
402 
403  if (!pvFound){delete pv;}
404 
405 
406 }
reco::Vertex::Point convertPos(const GlobalPoint &p)
bool isStrip() const
bool compare(const P &i, const P &j)
edm::EDGetTokenT< ClusterTPAssociation > clusterTPMapToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
edm::EDGetTokenT< reco::TrackCollection > TrackCollectionTag_
edm::EDGetTokenT< reco::VertexCollection > PrimaryVertexColl_
reco::TransientTrack build(const reco::Track *p) const
int numberOfValidStripHits() const
Definition: HitPattern.h:853
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:43
GlobalPoint globalPosition() const
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:645
TrajectoryStateOnSurface closestApproachToJet(const TrajectoryStateOnSurface &state, const reco::Vertex &vertex, const GlobalVector &aJetDirection, const MagneticField *field)
Definition: IPTools.cc:177
const MagneticField * field() const
TrackHistory const & history() const
Returns a reference to the track history used in the classification.
const reco::Track * toTrack(const reco::TrackBaseRef &t)
Definition: IPTagInfo.h:24
const Point & position() const
position
Definition: Vertex.h:109
Definition: Electron.h:4
std::pair< double, Measurement1D > jetTrackDistance(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:200
void Fill(long long x)
edm::EDGetTokenT< pat::JetCollection > PatJetCollectionTag_
math::XYZPointD Point
point in the space
bool isValid() const
TrackClassifier const & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:651
T sqrt(T t)
Definition: SSEVec.h:18
double pt() const
track transverse momentum
Definition: TrackBase.h:621
def pv(vc)
Definition: MetAnalyzer.py:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:820
static const std::vector< std::string > TrkHistCat
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
bool isPixel() const
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...
Definition: TrackBase.h:609
const Flags & flags() const
Returns flags with the category descriptions.
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:446
const T & get() const
Definition: EventSetup.h:55
const reco::TrackBaseRef toTrackRef(const edm::Ptr< reco::Candidate > &cnd)
const map_type & map() const
int numberOfValidPixelHits() const
Definition: HitPattern.h:838
std::vector< bool > Flags
Main types associated to the class.
TrajectoryStateOnSurface impactPointState() const
const std::pair< TrackingParticleRef, double > getMatchedTrackingParticle() const
Definition: TrackHistory.h:68
math::XYZVectorD Vector
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...
Definition: TrackBase.h:591
void BDHadronTrackMonitoringAnalyzer::bookHistograms ( DQMStore::IBooker ibook,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Definition at line 46 of file BDHadronTrackMonitoringAnalyzer.cc.

References DQMStore::IBooker::book1D(), mps_fire::i, nTrk_bjet, nTrk_cjet, nTrk_dusgjet, nTrkAll_bjet, nTrkAll_cjet, nTrkAll_dusgjet, DQMStore::IBooker::setCurrentFolder(), RecoBTag::setTDRStyle(), TrkDxy_alljets, TrkDz_alljets, TrkEta_alljets, TrkHistCat, TrkHitAll_alljets, TrkHitPixel_alljets, TrkHitStrip_alljets, TrkPhi_alljets, TrkPt_alljets, TrkTruthDxy_alljets, TrkTruthDz_alljets, TrkTruthEta_alljets, TrkTruthHitAll_alljets, TrkTruthHitPixel_alljets, TrkTruthHitStrip_alljets, TrkTruthPhi_alljets, and TrkTruthPt_alljets.

47 {
48  ibook.setCurrentFolder("BDHadronTracks/JetContent");
49  //
50  // Book all histograms.
51  //
53 
54 
55  nTrkAll_bjet = ibook.book1D("nTrkAll_bjet","Number of selected tracks in b jets;number of selected tracks;jets",16,-0.5,15.5);
56 
57  nTrkAll_cjet = ibook.book1D("nTrkAll_cjet","Number of selected tracks in c jets;number of selected tracks;jets",16,-0.5,15.5);
58 
59  nTrkAll_dusgjet = ibook.book1D("nTrkAll_dusgjet","Number of selected tracks in dusg jets;number of selected tracks;jets",16,-0.5,15.5);
60 
61  // Loop over different Track History Categories
62  for (unsigned int i = 0; i < TrkHistCat.size(); i++){
63  ibook.setCurrentFolder("BDHadronTracks/JetContent");
64  // b jets
65  nTrk_bjet[i] = ibook.book1D("nTrk_bjet_"+TrkHistCat[i],"Number of selected tracks in b jets ("+TrkHistCat[i]+");number of selected tracks ("+TrkHistCat[i]+");jets",16,-0.5,15.5);
66 
67  // c jets
68  nTrk_cjet[i] = ibook.book1D("nTrk_cjet_"+TrkHistCat[i],"Number of selected tracks in c jets ("+TrkHistCat[i]+");number of selected tracks ("+TrkHistCat[i]+");jets",16,-0.5,15.5);
69 
70  // dusg jets
71  nTrk_dusgjet[i] = ibook.book1D("nTrk_dusgjet_"+TrkHistCat[i],"Number of selected tracks in dusg jets ("+TrkHistCat[i]+");number of selected tracks ("+TrkHistCat[i]+");jets",16,-0.5,15.5);
72 
73  ibook.setCurrentFolder("BDHadronTracks/TrackInfo");
74  // track properties for all flavours combined
75  TrkPt_alljets[i] = ibook.book1D("TrkPt_"+TrkHistCat[i],"Track pT ("+TrkHistCat[i]+");track p_{T} ("+TrkHistCat[i]+");tracks",30,0,100);
76  TrkEta_alljets[i] = ibook.book1D("TrkEta_"+TrkHistCat[i],"Track #eta ("+TrkHistCat[i]+");track #eta ("+TrkHistCat[i]+");tracks",30,-2.5,2.5);
77  TrkPhi_alljets[i] = ibook.book1D("TrkPhi_"+TrkHistCat[i],"Track #phi ("+TrkHistCat[i]+");track #phi ("+TrkHistCat[i]+");tracks",30,-3.15,3.15);
78  TrkDxy_alljets[i] = ibook.book1D("TrkDxy_"+TrkHistCat[i],"Track dxy ("+TrkHistCat[i]+");track dxy ("+TrkHistCat[i]+");tracks",30,-0.1,0.1);
79  TrkDz_alljets[i] = ibook.book1D("TrkDz_"+TrkHistCat[i],"Track dz ("+TrkHistCat[i]+");track dz ("+TrkHistCat[i]+");tracks",30,-0.1,0.1);
80  TrkHitAll_alljets[i] = ibook.book1D("TrkHitAll_"+TrkHistCat[i],"Number of tracker hits ("+TrkHistCat[i]+");track number of all hits ("+TrkHistCat[i]+");tracks",31,-0.5,30.5);
81  TrkHitStrip_alljets[i] = ibook.book1D("TrkHitStrip_"+TrkHistCat[i],"Number of strip hits ("+TrkHistCat[i]+");track number of strip hits ("+TrkHistCat[i]+");tracks",31,-0.5,30.5);
82  TrkHitPixel_alljets[i] = ibook.book1D("TrkHitPixel_"+TrkHistCat[i],"Number of pixel hits ("+TrkHistCat[i]+");track number of pixel hits ("+TrkHistCat[i]+");tracks",9,-0.5,8.5);
83 
84  ibook.setCurrentFolder("BDHadronTracks/TrackTruthInfo");
85  if (i < 5){ // Fakes (i == 5) have no truth by definition!
86  TrkTruthPt_alljets[i] = ibook.book1D("TrkTruthPt_"+TrkHistCat[i],"Track pT ("+TrkHistCat[i]+" Truth);track p_{T} ("+TrkHistCat[i]+" Truth);tracks",30,0,100);
87  TrkTruthEta_alljets[i] = ibook.book1D("TrkTruthEta_"+TrkHistCat[i],"Track #eta ("+TrkHistCat[i]+" Truth);track #eta ("+TrkHistCat[i]+" Truth);tracks",30,-2.5,2.5);
88  TrkTruthPhi_alljets[i] = ibook.book1D("TrkTruthPhi_"+TrkHistCat[i],"Track #phi ("+TrkHistCat[i]+" Truth);track #phi ("+TrkHistCat[i]+" Truth);tracks",30,-3.15,3.15);
89  TrkTruthDxy_alljets[i] = ibook.book1D("TrkTruthDxy_"+TrkHistCat[i],"Track dxy ("+TrkHistCat[i]+" Truth);track dxy ("+TrkHistCat[i]+" Truth);tracks",30,-0.1,0.1);
90  TrkTruthDz_alljets[i] = ibook.book1D("TrkTruthDz_"+TrkHistCat[i],"Track dz ("+TrkHistCat[i]+" Truth);track dz ("+TrkHistCat[i]+" Truth);tracks",30,-0.1,0.1);
91  TrkTruthHitAll_alljets[i] = ibook.book1D("TrkTruthHitAll_"+TrkHistCat[i],"Number of tracker hits ("+TrkHistCat[i]+" Truth);track number of all hits ("+TrkHistCat[i]+" Truth);tracks",31,-0.5,30.5);
92  TrkTruthHitStrip_alljets[i] = ibook.book1D("TrkTruthHitStrip_"+TrkHistCat[i],"Number of strip hits ("+TrkHistCat[i]+" Truth);track number of strip hits ("+TrkHistCat[i]+" Truth);tracks",31,-0.5,30.5);
93  TrkTruthHitPixel_alljets[i] = ibook.book1D("TrkTruthHitPixel_"+TrkHistCat[i],"Number of pixel hits ("+TrkHistCat[i]+" Truth);track number of pixel hits ("+TrkHistCat[i]+" Truth);tracks",9,-0.5,8.5);
94  }
95  }
96 }
TStyle * setTDRStyle()
Definition: Tools.cc:346
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
static const std::vector< std::string > TrkHistCat
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277

Member Data Documentation

TrackClassifier BDHadronTrackMonitoringAnalyzer::classifier_
private

Definition at line 91 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

edm::InputTag BDHadronTrackMonitoringAnalyzer::ClusterTPMapSrc_
private

Definition at line 82 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by BDHadronTrackMonitoringAnalyzer().

edm::EDGetTokenT<ClusterTPAssociation> BDHadronTrackMonitoringAnalyzer::clusterTPMapToken_
private

Definition at line 88 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and BDHadronTrackMonitoringAnalyzer().

double BDHadronTrackMonitoringAnalyzer::decayLength_
private

Definition at line 71 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

double BDHadronTrackMonitoringAnalyzer::distJetAxis_
private

Definition at line 70 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

std::string BDHadronTrackMonitoringAnalyzer::ipTagInfos_
private

Definition at line 76 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

double BDHadronTrackMonitoringAnalyzer::maxJetEta_
private

Definition at line 73 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

double BDHadronTrackMonitoringAnalyzer::minJetPt_
private

Definition at line 72 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrk_bjet[6]
private

Definition at line 97 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrk_cjet[6]
private

Definition at line 100 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrk_dusgjet[6]
private

Definition at line 103 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrkAll_bjet
private

Definition at line 96 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrkAll_cjet
private

Definition at line 99 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::nTrkAll_dusgjet
private

Definition at line 102 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<pat::JetCollection> BDHadronTrackMonitoringAnalyzer::PatJetCollectionTag_
private

Definition at line 85 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and BDHadronTrackMonitoringAnalyzer().

edm::InputTag BDHadronTrackMonitoringAnalyzer::PatJetSrc_
private

Definition at line 79 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by BDHadronTrackMonitoringAnalyzer().

edm::EDGetTokenT<reco::VertexCollection> BDHadronTrackMonitoringAnalyzer::PrimaryVertexColl_
private

Definition at line 87 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and BDHadronTrackMonitoringAnalyzer().

edm::InputTag BDHadronTrackMonitoringAnalyzer::PVSrc_
private

Definition at line 81 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by BDHadronTrackMonitoringAnalyzer().

edm::EDGetTokenT<reco::TrackCollection> BDHadronTrackMonitoringAnalyzer::TrackCollectionTag_
private

Definition at line 86 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and BDHadronTrackMonitoringAnalyzer().

edm::InputTag BDHadronTrackMonitoringAnalyzer::TrackSrc_
private

Definition at line 80 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by BDHadronTrackMonitoringAnalyzer().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkDxy_alljets[6]
private

Definition at line 109 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkDz_alljets[6]
private

Definition at line 110 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkEta_alljets[6]
private

Definition at line 107 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

const std::vector< std::string > BDHadronTrackMonitoringAnalyzer::TrkHistCat = {"BCWeakDecay", "BWeakDecay", "CWeakDecay", "PU", "Other", "Fake"}
static
MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkHitAll_alljets[6]
private

Definition at line 111 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkHitPixel_alljets[6]
private

Definition at line 113 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkHitStrip_alljets[6]
private

Definition at line 112 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkPhi_alljets[6]
private

Definition at line 108 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* BDHadronTrackMonitoringAnalyzer::TrkPt_alljets[6]
private

Definition at line 106 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthDxy_alljets[5]
private

Definition at line 109 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthDz_alljets[5]
private

Definition at line 110 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthEta_alljets[5]
private

Definition at line 107 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthHitAll_alljets[5]
private

Definition at line 111 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthHitPixel_alljets[5]
private

Definition at line 113 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthHitStrip_alljets[5]
private

Definition at line 112 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthPhi_alljets[5]
private

Definition at line 108 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().

MonitorElement * BDHadronTrackMonitoringAnalyzer::TrkTruthPt_alljets[5]
private

Definition at line 106 of file BDHadronTrackMonitoringAnalyzer.h.

Referenced by analyze(), and bookHistograms().