CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrackBuildingAnalyzer Class Reference

#include <TrackBuildingAnalyzer.h>

Public Member Functions

virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrajectorySeed &seed, const reco::BeamSpot &bs, const edm::ESHandle< MagneticField > &theMF, const edm::ESHandle< TransientTrackingRecHitBuilder > &theTTRHBuilder)
 
virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackCandidate &candidate, const reco::BeamSpot &bs, const edm::ESHandle< MagneticField > &theMF, const edm::ESHandle< TransientTrackingRecHitBuilder > &theTTRHBuilder)
 
virtual void initHisto (DQMStore::IBooker &ibooker)
 
 TrackBuildingAnalyzer (const edm::ParameterSet &)
 
virtual ~TrackBuildingAnalyzer ()
 

Private Member Functions

void bookHistos (std::string sname, DQMStore::IBooker &ibooker)
 
void fillHistos (const edm::EventSetup &iSetup, const reco::Track &track, std::string sname)
 

Private Attributes

edm::ParameterSet conf_
 
bool doAllPlots
 
bool doAllSeedPlots
 
bool doAllTCPlots
 
bool doDxy
 
bool doDz
 
bool doETA
 
bool doNRecHits
 
bool doPHI
 
bool doPHIVsETA
 
bool doProfETA
 
bool doProfPHI
 
bool doPT
 
bool doQ
 
bool doStopSource
 
bool doTCPlots
 
bool doTheta
 
std::string histname
 
MonitorElementNumberOfRecHitsPerSeed
 
MonitorElementNumberOfRecHitsPerSeedVsEtaProfile
 
MonitorElementNumberOfRecHitsPerSeedVsPhiProfile
 
MonitorElementNumberOfRecHitsPerTrackCand
 
MonitorElementNumberOfRecHitsPerTrackCandVsEtaProfile
 
MonitorElementNumberOfRecHitsPerTrackCandVsPhiProfile
 
MonitorElementSeedDxy
 
MonitorElementSeedDz
 
MonitorElementSeedEta
 
MonitorElementSeedPhi
 
MonitorElementSeedPhiVsEta
 
MonitorElementSeedPt
 
MonitorElementSeedQ
 
MonitorElementSeedTheta
 
MonitorElementstoppingSource
 
MonitorElementstoppingSourceVSeta
 
MonitorElementstoppingSourceVSphi
 
MonitorElementTrackCandDxy
 
MonitorElementTrackCandDz
 
MonitorElementTrackCandEta
 
MonitorElementTrackCandPhi
 
MonitorElementTrackCandPhiVsEta
 
MonitorElementTrackCandPt
 
MonitorElementTrackCandQ
 
MonitorElementTrackCandTheta
 

Detailed Description

Monitoring source for general quantities related to tracks.

Definition at line 34 of file TrackBuildingAnalyzer.h.

Constructor & Destructor Documentation

TrackBuildingAnalyzer::TrackBuildingAnalyzer ( const edm::ParameterSet iConfig)

Definition at line 21 of file TrackBuildingAnalyzer.cc.

22  : conf_( iConfig )
23  , SeedPt(NULL)
24  , SeedEta(NULL)
25  , SeedPhi(NULL)
27  , SeedTheta(NULL)
28  , SeedQ(NULL)
29  , SeedDxy(NULL)
30  , SeedDz(NULL)
37 {
38 }
MonitorElement * stoppingSourceVSphi
#define NULL
Definition: scimark2.h:8
MonitorElement * stoppingSource
MonitorElement * NumberOfRecHitsPerSeed
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
MonitorElement * stoppingSourceVSeta
MonitorElement * SeedPhiVsEta
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
TrackBuildingAnalyzer::~TrackBuildingAnalyzer ( )
virtual

Definition at line 40 of file TrackBuildingAnalyzer.cc.

41 {
42 }

Member Function Documentation

void TrackBuildingAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const TrajectorySeed seed,
const reco::BeamSpot bs,
const edm::ESHandle< MagneticField > &  theMF,
const edm::ESHandle< TransientTrackingRecHitBuilder > &  theTTRHBuilder 
)
virtual

Definition at line 323 of file TrackBuildingAnalyzer.cc.

References TrajectoryStateOnSurface::charge(), funct::cos(), eta, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), PV3DBase< T, PVType, FrameType >::phi(), phi(), edm::ESHandle< class >::product(), EnergyCorrector::pt, TrajectorySeed::recHits(), funct::sin(), mathSSE::sqrt(), TrajectorySeed::startingState(), PV3DBase< T, PVType, FrameType >::theta(), theta(), trajectoryStateTransform::transientState(), findQualityFiles::v, PV3DBase< T, PVType, FrameType >::x(), reco::BeamSpot::x0(), PV3DBase< T, PVType, FrameType >::y(), reco::BeamSpot::y0(), PV3DBase< T, PVType, FrameType >::z(), and reco::BeamSpot::z0().

Referenced by TrackingMonitor::analyze().

331 {
332  TSCBLBuilderNoMaterial tscblBuilder;
333 
334  //get parameters and errors from the candidate state
335  auto const & theG = ((TkTransientTrackingRecHitBuilder const *)(theTTRHBuilder.product()))->geometry();
336  auto const & candSS = candidate.startingState();
337  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( candSS, &(theG->idToDet(candSS.detId())->surface()), theMF.product());
338  TrajectoryStateClosestToBeamLine tsAtClosestApproachSeed = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
339  if(!(tsAtClosestApproachSeed.isValid())) {
340  edm::LogVerbatim("TrackBuilding") << "TrajectoryStateClosestToBeamLine not valid";
341  return;
342  }
343  GlobalPoint v0 = tsAtClosestApproachSeed.trackStateAtPCA().position();
344  GlobalVector p = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
345  GlobalPoint v(v0.x()-bs.x0(),v0.y()-bs.y0(),v0.z()-bs.z0());
346 
347  double pt = sqrt(state.globalMomentum().perp2());
348  double eta = state.globalPosition().eta();
349  double phi = state.globalPosition().phi();
350  double theta = state.globalPosition().theta();
351  //double pm = sqrt(state.globalMomentum().mag2());
352  //double pz = state.globalMomentum().z();
353  //double qoverp = tsAtClosestApproachSeed.trackStateAtPCA().charge()/p.mag();
354  //double theta = p.theta();
355  //double lambda = M_PI/2-p.theta();
356  double numberOfHits = candidate.recHits().second-candidate.recHits().first;
357  double dxy = (-v.x()*sin(p.phi())+v.y()*cos(p.phi()));
358  double dz = v.z() - (v.x()*p.x()+v.y()*p.y())/p.perp() * p.z()/p.perp();
359 
360  // fill the ME's
361  if (doAllSeedPlots || doQ)SeedQ->Fill( state.charge() );
362  if (doAllSeedPlots || doPT) SeedPt->Fill( pt );
363  if (doAllSeedPlots || doETA) SeedEta->Fill( eta );
364  if (doAllSeedPlots || doPHI) SeedPhi->Fill( phi );
365  if (doAllSeedPlots || doPHIVsETA) SeedPhiVsEta->Fill( eta, phi);
366  if (doAllSeedPlots || doTheta) SeedTheta->Fill( theta );
367  if (doAllSeedPlots || doDxy) SeedDxy->Fill( dxy );
368  if (doAllSeedPlots || doDz) SeedDz->Fill( dz );
369  if (doAllSeedPlots || doNRecHits) NumberOfRecHitsPerSeed->Fill( numberOfHits );
370  if (doAllSeedPlots || doProfETA) NumberOfRecHitsPerSeedVsEtaProfile->Fill( eta, numberOfHits );
371  if (doAllSeedPlots || doProfPHI) NumberOfRecHitsPerSeedVsPhiProfile->Fill( phi, numberOfHits );
372 
373 }
double z0() const
z coordinate
Definition: BeamSpot.h:68
T perp() const
Definition: PV3DBase.h:72
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Geom::Theta< T > theta() const
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
T perp2() const
Definition: PV3DBase.h:71
void Fill(long long x)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
MonitorElement * NumberOfRecHitsPerSeed
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
T sqrt(T t)
Definition: SSEVec.h:18
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
T const * product() const
Definition: ESHandle.h:86
MonitorElement * SeedPhiVsEta
T eta() const
Definition: PV3DBase.h:76
GlobalVector globalMomentum() const
double y0() const
y coordinate
Definition: BeamSpot.h:66
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
T x() const
Definition: PV3DBase.h:62
double x0() const
x coordinate
Definition: BeamSpot.h:64
void TrackBuildingAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const TrackCandidate candidate,
const reco::BeamSpot bs,
const edm::ESHandle< MagneticField > &  theMF,
const edm::ESHandle< TransientTrackingRecHitBuilder > &  theTTRHBuilder 
)
virtual

Definition at line 378 of file TrackBuildingAnalyzer.cc.

References TrajectoryStateOnSurface::charge(), funct::cos(), TrackCollections2monitor_cff::doStopSource, eta, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), bookConverter::max, AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::perp2(), PV3DBase< T, PVType, FrameType >::phi(), phi(), edm::ESHandle< class >::product(), EnergyCorrector::pt, TrackCandidate::recHits(), funct::sin(), mathSSE::sqrt(), TrackCandidate::stopReason(), PV3DBase< T, PVType, FrameType >::theta(), theta(), TrackCandidate::trajectoryStateOnDet(), trajectoryStateTransform::transientState(), findQualityFiles::v, PV3DBase< T, PVType, FrameType >::x(), reco::BeamSpot::x0(), PV3DBase< T, PVType, FrameType >::y(), reco::BeamSpot::y0(), PV3DBase< T, PVType, FrameType >::z(), and reco::BeamSpot::z0().

386 {
387  TSCBLBuilderNoMaterial tscblBuilder;
388 
389  //get parameters and errors from the candidate state
390  auto const & theG = ((TkTransientTrackingRecHitBuilder const *)(theTTRHBuilder.product()))->geometry();
391  auto const & candSS = candidate.trajectoryStateOnDet();
392  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( candSS, &(theG->idToDet(candSS.detId())->surface()), theMF.product());
393  TrajectoryStateClosestToBeamLine tsAtClosestApproachTrackCand = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
394  if(!(tsAtClosestApproachTrackCand.isValid())) {
395  edm::LogVerbatim("TrackBuilding") << "TrajectoryStateClosestToBeamLine not valid";
396  return;
397  }
398  GlobalPoint v0 = tsAtClosestApproachTrackCand.trackStateAtPCA().position();
399  GlobalVector p = tsAtClosestApproachTrackCand.trackStateAtPCA().momentum();
400  GlobalPoint v(v0.x()-bs.x0(),v0.y()-bs.y0(),v0.z()-bs.z0());
401 
402  double pt = sqrt(state.globalMomentum().perp2());
403  double eta = state.globalPosition().eta();
404  double phi = state.globalPosition().phi();
405  double theta = state.globalPosition().theta();
406  //double pm = sqrt(state.globalMomentum().mag2());
407  //double pz = state.globalMomentum().z();
408  //double qoverp = tsAtClosestApproachTrackCand.trackStateAtPCA().charge()/p.mag();
409  //double theta = p.theta();
410  //double lambda = M_PI/2-p.theta();
411  double numberOfHits = candidate.recHits().second-candidate.recHits().first;
412  double dxy = (-v.x()*sin(p.phi())+v.y()*cos(p.phi()));
413 
414  double dz = v.z() - (v.x()*p.x()+v.y()*p.y())/p.perp() * p.z()/p.perp();
415 
416  if (doAllTCPlots || doStopSource) {
417  // stopping source
418  int max = stoppingSource->getNbinsX();
419  double stop = candidate.stopReason() > max ? double(max-1) : static_cast<double>(candidate.stopReason());
420  stoppingSource ->Fill(stop);
421  stoppingSourceVSeta ->Fill(eta,stop);
422  stoppingSourceVSphi ->Fill(phi,stop);
423  }
424 
425  if (doTCPlots){
426  // fill the ME's
427  if (doAllTCPlots) TrackCandQ->Fill( state.charge() );
428  TrackCandPt->Fill( pt );
429  TrackCandEta->Fill( eta );
430  TrackCandPhi->Fill( phi );
431  TrackCandPhiVsEta->Fill( eta, phi );
432  if (doTheta) TrackCandTheta->Fill( theta );
433  if (doAllTCPlots) TrackCandDxy->Fill( dxy );
434  if (doAllTCPlots) TrackCandDz->Fill( dz );
435  if (doAllTCPlots) NumberOfRecHitsPerTrackCand->Fill( numberOfHits );
436  if (doAllTCPlots) NumberOfRecHitsPerTrackCandVsEtaProfile->Fill( eta, numberOfHits );
437  if (doAllTCPlots) NumberOfRecHitsPerTrackCandVsPhiProfile->Fill( phi, numberOfHits );
438  }
439 }
MonitorElement * NumberOfRecHitsPerTrackCandVsPhiProfile
MonitorElement * TrackCandPt
double z0() const
z coordinate
Definition: BeamSpot.h:68
T perp() const
Definition: PV3DBase.h:72
range recHits() const
MonitorElement * TrackCandDz
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Geom::Theta< T > theta() const
T y() const
Definition: PV3DBase.h:63
MonitorElement * stoppingSourceVSphi
GlobalPoint globalPosition() const
T perp2() const
Definition: PV3DBase.h:71
MonitorElement * TrackCandPhi
MonitorElement * TrackCandPhiVsEta
void Fill(long long x)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
MonitorElement * NumberOfRecHitsPerTrackCandVsEtaProfile
MonitorElement * stoppingSource
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
MonitorElement * TrackCandDxy
T sqrt(T t)
Definition: SSEVec.h:18
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
MonitorElement * TrackCandEta
MonitorElement * stoppingSourceVSeta
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
T const * product() const
Definition: ESHandle.h:86
MonitorElement * TrackCandTheta
T eta() const
Definition: PV3DBase.h:76
GlobalVector globalMomentum() const
int getNbinsX(void) const
get # of bins in X-axis
double y0() const
y coordinate
Definition: BeamSpot.h:66
T x() const
Definition: PV3DBase.h:62
MonitorElement * NumberOfRecHitsPerTrackCand
uint8_t stopReason() const
double x0() const
x coordinate
Definition: BeamSpot.h:64
void TrackBuildingAnalyzer::bookHistos ( std::string  sname,
DQMStore::IBooker ibooker 
)
private
void TrackBuildingAnalyzer::fillHistos ( const edm::EventSetup iSetup,
const reco::Track track,
std::string  sname 
)
private
void TrackBuildingAnalyzer::initHisto ( DQMStore::IBooker ibooker)
virtual

Definition at line 44 of file TrackBuildingAnalyzer.cc.

References HLT_25ns10e33_v2_cff::AlgoName, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), conf_, doAllPlots, doAllSeedPlots, doAllTCPlots, doDxy, doDz, doETA, doNRecHits, doPHI, doPHIVsETA, doProfETA, doProfPHI, doPT, doQ, doStopSource, doTCPlots, doTheta, HLT_25ns10e33_v2_cff::EtaMax, Gflash::EtaMin, edm::ParameterSet::getParameter(), histname, NumberOfRecHitsPerSeed, NumberOfRecHitsPerSeedVsEtaProfile, NumberOfRecHitsPerSeedVsPhiProfile, NumberOfRecHitsPerTrackCand, NumberOfRecHitsPerTrackCandVsEtaProfile, NumberOfRecHitsPerTrackCandVsPhiProfile, SeedDxy, SeedDz, SeedEta, SeedPhi, SeedPhiVsEta, SeedPt, SeedQ, SeedTheta, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), stoppingSource, stoppingSourceVSeta, stoppingSourceVSphi, AlCaHLTBitMon_QueryRunRegistry::string, TrackCandDxy, TrackCandDz, TrackCandEta, TrackCandPhi, TrackCandPhiVsEta, TrackCandPt, TrackCandQ, and TrackCandTheta.

Referenced by TrackingMonitor::bookHistograms().

45 {
46 
47  // parameters from the configuration
49  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
50 
51  // std::cout << "[TrackBuildingAnalyzer::beginRun] AlgoName: " << AlgoName << std::endl;
52 
53  // use the AlgoName and Quality Name
54  std::string CatagoryName = AlgoName;
55 
56  // get binning from the configuration
57  int TrackPtBin = conf_.getParameter<int>( "TrackPtBin");
58  double TrackPtMin = conf_.getParameter<double>("TrackPtMin");
59  double TrackPtMax = conf_.getParameter<double>("TrackPtMax");
60 
61  int PhiBin = conf_.getParameter<int>( "PhiBin");
62  double PhiMin = conf_.getParameter<double>("PhiMin");
63  double PhiMax = conf_.getParameter<double>("PhiMax");
64 
65  int EtaBin = conf_.getParameter<int>( "EtaBin");
66  double EtaMin = conf_.getParameter<double>("EtaMin");
67  double EtaMax = conf_.getParameter<double>("EtaMax");
68 
69  int ThetaBin = conf_.getParameter<int>( "ThetaBin");
70  double ThetaMin = conf_.getParameter<double>("ThetaMin");
71  double ThetaMax = conf_.getParameter<double>("ThetaMax");
72 
73  int TrackQBin = conf_.getParameter<int>( "TrackQBin");
74  double TrackQMin = conf_.getParameter<double>("TrackQMin");
75  double TrackQMax = conf_.getParameter<double>("TrackQMax");
76 
77  int SeedDxyBin = conf_.getParameter<int>( "SeedDxyBin");
78  double SeedDxyMin = conf_.getParameter<double>("SeedDxyMin");
79  double SeedDxyMax = conf_.getParameter<double>("SeedDxyMax");
80 
81  int SeedDzBin = conf_.getParameter<int>( "SeedDzBin");
82  double SeedDzMin = conf_.getParameter<double>("SeedDzMin");
83  double SeedDzMax = conf_.getParameter<double>("SeedDzMax");
84 
85  int SeedHitBin = conf_.getParameter<int>( "SeedHitBin");
86  double SeedHitMin = conf_.getParameter<double>("SeedHitMin");
87  double SeedHitMax = conf_.getParameter<double>("SeedHitMax");
88 
89  int TCDxyBin = conf_.getParameter<int>( "TCDxyBin");
90  double TCDxyMin = conf_.getParameter<double>("TCDxyMin");
91  double TCDxyMax = conf_.getParameter<double>("TCDxyMax");
92 
93  int TCDzBin = conf_.getParameter<int>( "TCDzBin");
94  double TCDzMin = conf_.getParameter<double>("TCDzMin");
95  double TCDzMax = conf_.getParameter<double>("TCDzMax");
96 
97  int TCHitBin = conf_.getParameter<int>( "TCHitBin");
98  double TCHitMin = conf_.getParameter<double>("TCHitMin");
99  double TCHitMax = conf_.getParameter<double>("TCHitMax");
100 
101 
102  edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer");
103  edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer");
104 
105  doAllPlots = conf_.getParameter<bool>("doAllPlots");
106  doAllSeedPlots = conf_.getParameter<bool>("doSeedParameterHistos");
107  doTCPlots = conf_.getParameter<bool>("doTrackCandHistos");
108  doAllTCPlots = conf_.getParameter<bool>("doAllTrackCandHistos");
109  doPT = conf_.getParameter<bool>("doSeedPTHisto");
110  doETA = conf_.getParameter<bool>("doSeedETAHisto");
111  doPHI = conf_.getParameter<bool>("doSeedPHIHisto");
112  doPHIVsETA = conf_.getParameter<bool>("doSeedPHIVsETAHisto");
113  doTheta = conf_.getParameter<bool>("doSeedThetaHisto");
114  doQ = conf_.getParameter<bool>("doSeedQHisto");
115  doDxy = conf_.getParameter<bool>("doSeedDxyHisto");
116  doDz = conf_.getParameter<bool>("doSeedDzHisto");
117  doNRecHits = conf_.getParameter<bool>("doSeedNRecHitsHisto");
118  doProfPHI = conf_.getParameter<bool>("doSeedNVsPhiProf");
119  doProfETA = conf_.getParameter<bool>("doSeedNVsEtaProf");
120  doStopSource = conf_.getParameter<bool>("doStopSource");
121 
122  // if (doAllPlots){doAllSeedPlots=true; doTCPlots=true;}
123 
124  ibooker.setCurrentFolder(MEFolderName);
125 
126  // book the Seed histograms
127  // ---------------------------------------------------------------------------------//
128  // std::cout << "[TrackBuildingAnalyzer::beginRun] MEFolderName: " << MEFolderName << std::endl;
129  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
130 
131  if (doAllSeedPlots || doPT) {
132  histname = "SeedPt_"+seedProducer.label() + "_";
133  SeedPt = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackPtBin, TrackPtMin, TrackPtMax);
134  SeedPt->setAxisTitle("Seed p_{T} (GeV/c)", 1);
135  SeedPt->setAxisTitle("Number of Seeds", 2);
136  }
137 
138  if (doAllSeedPlots || doETA) {
139  histname = "SeedEta_"+seedProducer.label() + "_";
140  SeedEta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax);
141  SeedEta->setAxisTitle("Seed #eta", 1);
142  SeedEta->setAxisTitle("Number of Seeds", 2);
143  }
144 
145  if (doAllSeedPlots || doPHI) {
146  histname = "SeedPhi_"+seedProducer.label() + "_";
147  SeedPhi = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax);
148  SeedPhi->setAxisTitle("Seed #phi", 1);
149  SeedPhi->setAxisTitle("Number of Seed", 2);
150  }
151 
152  if (doAllSeedPlots || doPHIVsETA) {
153  histname = "SeedPhiVsEta_"+seedProducer.label() + "_";
154  SeedPhiVsEta = ibooker.book2D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
155  SeedPhiVsEta->setAxisTitle("Seed #eta", 1);
156  SeedPhiVsEta->setAxisTitle("Seed #phi", 2);
157  }
158 
159  if (doAllSeedPlots || doTheta){
160  histname = "SeedTheta_"+seedProducer.label() + "_";
161  SeedTheta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, ThetaBin, ThetaMin, ThetaMax);
162  SeedTheta->setAxisTitle("Seed #theta", 1);
163  SeedTheta->setAxisTitle("Number of Seeds", 2);
164  }
165 
166  if (doAllSeedPlots || doQ){
167  histname = "SeedQ_"+seedProducer.label() + "_";
168  SeedQ = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackQBin, TrackQMin, TrackQMax);
169  SeedQ->setAxisTitle("Seed Charge", 1);
170  SeedQ->setAxisTitle("Number of Seeds",2);
171  }
172 
173  if (doAllSeedPlots || doDxy){
174  histname = "SeedDxy_"+seedProducer.label() + "_";
175  SeedDxy = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, SeedDxyBin, SeedDxyMin, SeedDxyMax);
176  SeedDxy->setAxisTitle("Seed d_{xy} (cm)", 1);
177  SeedDxy->setAxisTitle("Number of Seeds",2);
178  }
179 
180  if (doAllSeedPlots || doDz){
181  histname = "SeedDz_"+seedProducer.label() + "_";
182  SeedDz = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, SeedDzBin, SeedDzMin, SeedDzMax);
183  SeedDz->setAxisTitle("Seed d_{z} (cm)", 1);
184  SeedDz->setAxisTitle("Number of Seeds",2);
185  }
186 
187  if (doAllSeedPlots || doNRecHits){
188  histname = "NumberOfRecHitsPerSeed_"+seedProducer.label() + "_";
189  NumberOfRecHitsPerSeed = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, SeedHitBin, SeedHitMin, SeedHitMax);
190  NumberOfRecHitsPerSeed->setAxisTitle("Number of RecHits per Seed", 1);
191  NumberOfRecHitsPerSeed->setAxisTitle("Number of Seeds",2);
192  }
193 
194  if (doAllSeedPlots || doProfPHI){
195  histname = "NumberOfRecHitsPerSeedVsPhiProfile_"+seedProducer.label() + "_";
196  NumberOfRecHitsPerSeedVsPhiProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax, SeedHitBin, SeedHitMin, SeedHitMax,"s");
198  NumberOfRecHitsPerSeedVsPhiProfile->setAxisTitle("Number of RecHits of each Seed",2);
199  }
200 
201  if (doAllSeedPlots || doProfETA){
202  histname = "NumberOfRecHitsPerSeedVsEtaProfile_"+seedProducer.label() + "_";
203  NumberOfRecHitsPerSeedVsEtaProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, SeedHitBin, SeedHitMin, SeedHitMax,"s");
205  NumberOfRecHitsPerSeedVsEtaProfile->setAxisTitle("Number of RecHits of each Seed",2);
206  }
207 
208  if (doAllTCPlots || doStopSource) {
209  // DataFormats/TrackReco/interface/TrajectoryStopReasons.h
210  std::vector<std::string> StopReasonName = { "UNINITIALIZED", "MAX_HITS", "MAX_LOST_HITS", "MAX_CONSECUTIVE_LOST_HITS", "LOST_HIT_FRACTION", "MIN_PT", "CHARGE_SIGNIFICANCE", "LOOPER", "MAX_CCC_LOST_HITS", "NO_SEGMENTS_FOR_VALID_LAYERS", "NOT_STOPPED" };
211 
212  histname = "StoppingSource_"+seedProducer.label() + "_";
213  stoppingSource = ibooker.book1D(histname+CatagoryName,
214  histname+CatagoryName,
215  StopReasonName.size(),
216  0., double(StopReasonName.size()));
217  stoppingSource->setAxisTitle("stopping reason",1);
218  stoppingSource->setAxisTitle("Number of Tracks",2);
219 
220  histname = "StoppingSourceVSeta_"+seedProducer.label() + "_";
221  stoppingSourceVSeta = ibooker.book2D(histname+CatagoryName,
222  histname+CatagoryName,
223  EtaBin,
224  EtaMin,
225  EtaMax,
226  StopReasonName.size(),
227  0., double(StopReasonName.size()));
228  stoppingSourceVSeta->setAxisTitle("track #eta",1);
229  stoppingSourceVSeta->setAxisTitle("stopping reason",2);
230 
231  histname = "StoppingSourceVSphi_"+seedProducer.label() + "_";
232  stoppingSourceVSphi = ibooker.book2D(histname+CatagoryName,
233  histname+CatagoryName,
234  PhiBin,
235  PhiMin,
236  PhiMax,
237  StopReasonName.size(),
238  0., double(StopReasonName.size()));
239  stoppingSourceVSphi->setAxisTitle("track #phi",1);
240  stoppingSourceVSphi->setAxisTitle("stopping reason",2);
241 
242  for (size_t ibin=0; ibin<StopReasonName.size(); ibin++) {
243  stoppingSource->setBinLabel(ibin+1,StopReasonName[ibin],1);
244  stoppingSourceVSeta->setBinLabel(ibin+1,StopReasonName[ibin],2);
245  stoppingSourceVSphi->setBinLabel(ibin+1,StopReasonName[ibin],2);
246  }
247  }
248 
249 
250 
251  // book the TrackCandidate histograms
252  // ---------------------------------------------------------------------------------//
253 
254  if (doTCPlots){
255 
256  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
257 
258  histname = "TrackCandPt_"+tcProducer.label() + "_";
259  TrackCandPt = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackPtBin, TrackPtMin, TrackPtMax);
260  TrackCandPt->setAxisTitle("Track Candidate p_{T} (GeV/c)", 1);
261  TrackCandPt->setAxisTitle("Number of Track Candidates", 2);
262 
263  histname = "TrackCandEta_"+tcProducer.label() + "_";
264  TrackCandEta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax);
265  TrackCandEta->setAxisTitle("Track Candidate #eta", 1);
266  TrackCandEta->setAxisTitle("Number of Track Candidates", 2);
267 
268  histname = "TrackCandPhi_"+tcProducer.label() + "_";
269  TrackCandPhi = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax);
270  TrackCandPhi->setAxisTitle("Track Candidate #phi", 1);
271  TrackCandPhi->setAxisTitle("Number of Track Candidates", 2);
272 
273  if (doTheta) {
274  histname = "TrackCandTheta_"+tcProducer.label() + "_";
275  TrackCandTheta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, ThetaBin, ThetaMin, ThetaMax);
276  TrackCandTheta->setAxisTitle("Track Candidate #theta", 1);
277  TrackCandTheta->setAxisTitle("Number of Track Candidates", 2);
278  }
279 
280  if (doAllTCPlots) {
281  histname = "TrackCandQ_"+tcProducer.label() + "_";
282  TrackCandQ = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackQBin, TrackQMin, TrackQMax);
283  TrackCandQ->setAxisTitle("Track Candidate Charge", 1);
284  TrackCandQ->setAxisTitle("Number of Track Candidates",2);
285 
286  histname = "TrackCandDxy_"+tcProducer.label() + "_";
287  TrackCandDxy = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCDxyBin, TCDxyMin, TCDxyMax);
288  TrackCandDxy->setAxisTitle("Track Candidate d_{xy} (cm)", 1);
289  TrackCandDxy->setAxisTitle("Number of Track Candidates",2);
290 
291  histname = "TrackCandDz_"+tcProducer.label() + "_";
292  TrackCandDz = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCDzBin, TCDzMin, TCDzMax);
293  TrackCandDz->setAxisTitle("Track Candidate d_{z} (cm)", 1);
294  TrackCandDz->setAxisTitle("Number of Track Candidates",2);
295 
296  histname = "NumberOfRecHitsPerTrackCand_"+tcProducer.label() + "_";
297  NumberOfRecHitsPerTrackCand = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCHitBin, TCHitMin, TCHitMax);
298  NumberOfRecHitsPerTrackCand->setAxisTitle("Number of RecHits per Track Candidate", 1);
299  NumberOfRecHitsPerTrackCand->setAxisTitle("Number of Track Candidates",2);
300 
301  histname = "NumberOfRecHitsPerTrackCandVsPhiProfile_"+tcProducer.label() + "_";
302  NumberOfRecHitsPerTrackCandVsPhiProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax, TCHitBin, TCHitMin, TCHitMax,"s");
303  NumberOfRecHitsPerTrackCandVsPhiProfile->setAxisTitle("Track Candidate #phi",1);
304  NumberOfRecHitsPerTrackCandVsPhiProfile->setAxisTitle("Number of RecHits of each Track Candidate",2);
305 
306  histname = "NumberOfRecHitsPerTrackCandVsEtaProfile_"+tcProducer.label() + "_";
307  NumberOfRecHitsPerTrackCandVsEtaProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, TCHitBin, TCHitMin, TCHitMax,"s");
308  NumberOfRecHitsPerTrackCandVsEtaProfile->setAxisTitle("Track Candidate #eta",1);
309  NumberOfRecHitsPerTrackCandVsEtaProfile->setAxisTitle("Number of RecHits of each Track Candidate",2);
310  }
311 
312  histname = "TrackCandPhiVsEta_"+tcProducer.label() + "_";
313  TrackCandPhiVsEta = ibooker.book2D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
314  TrackCandPhiVsEta->setAxisTitle("Track Candidate #eta", 1);
315  TrackCandPhiVsEta->setAxisTitle("Track Candidate #phi", 2);
316  }
317 
318 }
MonitorElement * NumberOfRecHitsPerTrackCandVsPhiProfile
MonitorElement * TrackCandPt
T getParameter(std::string const &) const
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * TrackCandDz
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)
MonitorElement * stoppingSourceVSphi
MonitorElement * TrackCandPhi
MonitorElement * TrackCandPhiVsEta
MonitorElement * NumberOfRecHitsPerTrackCandVsEtaProfile
MonitorElement * stoppingSource
MonitorElement * NumberOfRecHitsPerSeed
MonitorElement * NumberOfRecHitsPerSeedVsPhiProfile
MonitorElement * TrackCandDxy
MonitorElement * TrackCandEta
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
const double EtaMin[kNumberCalorimeter]
MonitorElement * stoppingSourceVSeta
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * TrackCandTheta
MonitorElement * SeedPhiVsEta
MonitorElement * NumberOfRecHitsPerSeedVsEtaProfile
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * NumberOfRecHitsPerTrackCand

Member Data Documentation

edm::ParameterSet TrackBuildingAnalyzer::conf_
private

Definition at line 66 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doAllPlots
private

Definition at line 101 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doAllSeedPlots
private

Definition at line 102 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doAllTCPlots
private

Definition at line 104 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doDxy
private

Definition at line 111 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doDz
private

Definition at line 112 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doETA
private

Definition at line 106 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doNRecHits
private

Definition at line 113 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doPHI
private

Definition at line 107 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doPHIVsETA
private

Definition at line 108 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doProfETA
private

Definition at line 115 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doProfPHI
private

Definition at line 114 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doPT
private

Definition at line 105 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doQ
private

Definition at line 110 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doStopSource
private

Definition at line 116 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doTCPlots
private

Definition at line 103 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

bool TrackBuildingAnalyzer::doTheta
private

Definition at line 109 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

std::string TrackBuildingAnalyzer::histname
private

Definition at line 98 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerSeed
private

Definition at line 77 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerSeedVsEtaProfile
private

Definition at line 79 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerSeedVsPhiProfile
private

Definition at line 78 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCand
private

Definition at line 90 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCandVsEtaProfile
private

Definition at line 92 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::NumberOfRecHitsPerTrackCandVsPhiProfile
private

Definition at line 91 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedDxy
private

Definition at line 75 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedDz
private

Definition at line 76 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedEta
private

Definition at line 70 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedPhi
private

Definition at line 71 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedPhiVsEta
private

Definition at line 72 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedPt
private

Definition at line 69 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedQ
private

Definition at line 74 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::SeedTheta
private

Definition at line 73 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::stoppingSource
private

Definition at line 94 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::stoppingSourceVSeta
private

Definition at line 95 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::stoppingSourceVSphi
private

Definition at line 96 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandDxy
private

Definition at line 88 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandDz
private

Definition at line 89 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandEta
private

Definition at line 83 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandPhi
private

Definition at line 84 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandPhiVsEta
private

Definition at line 85 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandPt
private

Definition at line 82 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandQ
private

Definition at line 87 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().

MonitorElement* TrackBuildingAnalyzer::TrackCandTheta
private

Definition at line 86 of file TrackBuildingAnalyzer.h.

Referenced by initHisto().