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 330 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().

338 {
339  TSCBLBuilderNoMaterial tscblBuilder;
340 
341  //get parameters and errors from the candidate state
342  auto const & theG = ((TkTransientTrackingRecHitBuilder const *)(theTTRHBuilder.product()))->geometry();
343  auto const & candSS = candidate.startingState();
344  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( candSS, &(theG->idToDet(candSS.detId())->surface()), theMF.product());
345  TrajectoryStateClosestToBeamLine tsAtClosestApproachSeed = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
346  if(!(tsAtClosestApproachSeed.isValid())) {
347  edm::LogVerbatim("TrackBuilding") << "TrajectoryStateClosestToBeamLine not valid";
348  return;
349  }
350  GlobalPoint v0 = tsAtClosestApproachSeed.trackStateAtPCA().position();
351  GlobalVector p = tsAtClosestApproachSeed.trackStateAtPCA().momentum();
352  GlobalPoint v(v0.x()-bs.x0(),v0.y()-bs.y0(),v0.z()-bs.z0());
353 
354  double pt = sqrt(state.globalMomentum().perp2());
355  double eta = state.globalPosition().eta();
356  double phi = state.globalPosition().phi();
357  double theta = state.globalPosition().theta();
358  //double pm = sqrt(state.globalMomentum().mag2());
359  //double pz = state.globalMomentum().z();
360  //double qoverp = tsAtClosestApproachSeed.trackStateAtPCA().charge()/p.mag();
361  //double theta = p.theta();
362  //double lambda = M_PI/2-p.theta();
363  double numberOfHits = candidate.recHits().second-candidate.recHits().first;
364  double dxy = (-v.x()*sin(p.phi())+v.y()*cos(p.phi()));
365  double dz = v.z() - (v.x()*p.x()+v.y()*p.y())/p.perp() * p.z()/p.perp();
366 
367  // fill the ME's
368  if (doAllSeedPlots || doQ)SeedQ->Fill( state.charge() );
369  if (doAllSeedPlots || doPT) SeedPt->Fill( pt );
370  if (doAllSeedPlots || doETA) SeedEta->Fill( eta );
371  if (doAllSeedPlots || doPHI) SeedPhi->Fill( phi );
372  if (doAllSeedPlots || doPHIVsETA) SeedPhiVsEta->Fill( eta, phi);
373  if (doAllSeedPlots || doTheta) SeedTheta->Fill( theta );
374  if (doAllSeedPlots || doDxy) SeedDxy->Fill( dxy );
375  if (doAllSeedPlots || doDz) SeedDz->Fill( dz );
376  if (doAllSeedPlots || doNRecHits) NumberOfRecHitsPerSeed->Fill( numberOfHits );
377  if (doAllSeedPlots || doProfETA) NumberOfRecHitsPerSeedVsEtaProfile->Fill( eta, numberOfHits );
378  if (doAllSeedPlots || doProfPHI) NumberOfRecHitsPerSeedVsPhiProfile->Fill( phi, numberOfHits );
379 
380 }
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 385 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().

393 {
394  TSCBLBuilderNoMaterial tscblBuilder;
395 
396  //get parameters and errors from the candidate state
397  auto const & theG = ((TkTransientTrackingRecHitBuilder const *)(theTTRHBuilder.product()))->geometry();
398  auto const & candSS = candidate.trajectoryStateOnDet();
399  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( candSS, &(theG->idToDet(candSS.detId())->surface()), theMF.product());
400  TrajectoryStateClosestToBeamLine tsAtClosestApproachTrackCand = tscblBuilder(*state.freeState(),bs);//as in TrackProducerAlgorithm
401  if(!(tsAtClosestApproachTrackCand.isValid())) {
402  edm::LogVerbatim("TrackBuilding") << "TrajectoryStateClosestToBeamLine not valid";
403  return;
404  }
405  GlobalPoint v0 = tsAtClosestApproachTrackCand.trackStateAtPCA().position();
406  GlobalVector p = tsAtClosestApproachTrackCand.trackStateAtPCA().momentum();
407  GlobalPoint v(v0.x()-bs.x0(),v0.y()-bs.y0(),v0.z()-bs.z0());
408 
409  double pt = sqrt(state.globalMomentum().perp2());
410  double eta = state.globalPosition().eta();
411  double phi = state.globalPosition().phi();
412  double theta = state.globalPosition().theta();
413  //double pm = sqrt(state.globalMomentum().mag2());
414  //double pz = state.globalMomentum().z();
415  //double qoverp = tsAtClosestApproachTrackCand.trackStateAtPCA().charge()/p.mag();
416  //double theta = p.theta();
417  //double lambda = M_PI/2-p.theta();
418  double numberOfHits = candidate.recHits().second-candidate.recHits().first;
419  double dxy = (-v.x()*sin(p.phi())+v.y()*cos(p.phi()));
420 
421  double dz = v.z() - (v.x()*p.x()+v.y()*p.y())/p.perp() * p.z()/p.perp();
422 
423  if (doAllTCPlots || doStopSource) {
424  // stopping source
425  int max = stoppingSource->getNbinsX();
426  double stop = candidate.stopReason() > max ? double(max-1) : static_cast<double>(candidate.stopReason());
427  stoppingSource ->Fill(stop);
428  stoppingSourceVSeta ->Fill(eta,stop);
429  stoppingSourceVSphi ->Fill(phi,stop);
430  }
431 
432  if (doTCPlots){
433  // fill the ME's
434  if (doAllTCPlots) TrackCandQ->Fill( state.charge() );
435  TrackCandPt->Fill( pt );
436  TrackCandEta->Fill( eta );
437  TrackCandPhi->Fill( phi );
438  TrackCandPhiVsEta->Fill( eta, phi );
439  if (doTheta) TrackCandTheta->Fill( theta );
440  if (doAllTCPlots) TrackCandDxy->Fill( dxy );
441  if (doAllTCPlots) TrackCandDz->Fill( dz );
442  if (doAllTCPlots) NumberOfRecHitsPerTrackCand->Fill( numberOfHits );
443  if (doAllTCPlots) NumberOfRecHitsPerTrackCandVsEtaProfile->Fill( eta, numberOfHits );
444  if (doAllTCPlots) NumberOfRecHitsPerTrackCandVsPhiProfile->Fill( phi, numberOfHits );
445  }
446 }
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, Exception, 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(), SIZE, stoppingSource, stoppingSourceVSeta, stoppingSourceVSphi, StopReasonName::StopReasonName, 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  size_t StopReasonNameSize = sizeof(StopReasonName::StopReasonName)/sizeof(std::string);
211  if(StopReasonNameSize != static_cast<unsigned int>(StopReason::SIZE)) {
212  throw cms::Exception("Assert") << "StopReason::SIZE is " << static_cast<unsigned int>(StopReason::SIZE)
213  << " but StopReasonName's only for "
214  << StopReasonNameSize
215  << ". Please update DataFormats/TrackReco/interface/TrajectoryStopReasons.h.";
216  }
217 
218 
219  histname = "StoppingSource_"+seedProducer.label() + "_";
220  stoppingSource = ibooker.book1D(histname+CatagoryName,
221  histname+CatagoryName,
222  StopReasonNameSize,
223  0., double(StopReasonNameSize));
224  stoppingSource->setAxisTitle("stopping reason",1);
225  stoppingSource->setAxisTitle("Number of Tracks",2);
226 
227  histname = "StoppingSourceVSeta_"+seedProducer.label() + "_";
228  stoppingSourceVSeta = ibooker.book2D(histname+CatagoryName,
229  histname+CatagoryName,
230  EtaBin,
231  EtaMin,
232  EtaMax,
233  StopReasonNameSize,
234  0., double(StopReasonNameSize));
235  stoppingSourceVSeta->setAxisTitle("track #eta",1);
236  stoppingSourceVSeta->setAxisTitle("stopping reason",2);
237 
238  histname = "StoppingSourceVSphi_"+seedProducer.label() + "_";
239  stoppingSourceVSphi = ibooker.book2D(histname+CatagoryName,
240  histname+CatagoryName,
241  PhiBin,
242  PhiMin,
243  PhiMax,
244  StopReasonNameSize,
245  0., double(StopReasonNameSize));
246  stoppingSourceVSphi->setAxisTitle("track #phi",1);
247  stoppingSourceVSphi->setAxisTitle("stopping reason",2);
248 
249  for (size_t ibin=0; ibin<StopReasonNameSize; ibin++) {
253  }
254  }
255 
256 
257 
258  // book the TrackCandidate histograms
259  // ---------------------------------------------------------------------------------//
260 
261  if (doTCPlots){
262 
263  ibooker.setCurrentFolder(MEFolderName+"/TrackBuilding");
264 
265  histname = "TrackCandPt_"+tcProducer.label() + "_";
266  TrackCandPt = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackPtBin, TrackPtMin, TrackPtMax);
267  TrackCandPt->setAxisTitle("Track Candidate p_{T} (GeV/c)", 1);
268  TrackCandPt->setAxisTitle("Number of Track Candidates", 2);
269 
270  histname = "TrackCandEta_"+tcProducer.label() + "_";
271  TrackCandEta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax);
272  TrackCandEta->setAxisTitle("Track Candidate #eta", 1);
273  TrackCandEta->setAxisTitle("Number of Track Candidates", 2);
274 
275  histname = "TrackCandPhi_"+tcProducer.label() + "_";
276  TrackCandPhi = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax);
277  TrackCandPhi->setAxisTitle("Track Candidate #phi", 1);
278  TrackCandPhi->setAxisTitle("Number of Track Candidates", 2);
279 
280  if (doTheta) {
281  histname = "TrackCandTheta_"+tcProducer.label() + "_";
282  TrackCandTheta = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, ThetaBin, ThetaMin, ThetaMax);
283  TrackCandTheta->setAxisTitle("Track Candidate #theta", 1);
284  TrackCandTheta->setAxisTitle("Number of Track Candidates", 2);
285  }
286 
287  if (doAllTCPlots) {
288  histname = "TrackCandQ_"+tcProducer.label() + "_";
289  TrackCandQ = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TrackQBin, TrackQMin, TrackQMax);
290  TrackCandQ->setAxisTitle("Track Candidate Charge", 1);
291  TrackCandQ->setAxisTitle("Number of Track Candidates",2);
292 
293  histname = "TrackCandDxy_"+tcProducer.label() + "_";
294  TrackCandDxy = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCDxyBin, TCDxyMin, TCDxyMax);
295  TrackCandDxy->setAxisTitle("Track Candidate d_{xy} (cm)", 1);
296  TrackCandDxy->setAxisTitle("Number of Track Candidates",2);
297 
298  histname = "TrackCandDz_"+tcProducer.label() + "_";
299  TrackCandDz = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCDzBin, TCDzMin, TCDzMax);
300  TrackCandDz->setAxisTitle("Track Candidate d_{z} (cm)", 1);
301  TrackCandDz->setAxisTitle("Number of Track Candidates",2);
302 
303  histname = "NumberOfRecHitsPerTrackCand_"+tcProducer.label() + "_";
304  NumberOfRecHitsPerTrackCand = ibooker.book1D(histname+CatagoryName, histname+CatagoryName, TCHitBin, TCHitMin, TCHitMax);
305  NumberOfRecHitsPerTrackCand->setAxisTitle("Number of RecHits per Track Candidate", 1);
306  NumberOfRecHitsPerTrackCand->setAxisTitle("Number of Track Candidates",2);
307 
308  histname = "NumberOfRecHitsPerTrackCandVsPhiProfile_"+tcProducer.label() + "_";
309  NumberOfRecHitsPerTrackCandVsPhiProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, PhiBin, PhiMin, PhiMax, TCHitBin, TCHitMin, TCHitMax,"s");
310  NumberOfRecHitsPerTrackCandVsPhiProfile->setAxisTitle("Track Candidate #phi",1);
311  NumberOfRecHitsPerTrackCandVsPhiProfile->setAxisTitle("Number of RecHits of each Track Candidate",2);
312 
313  histname = "NumberOfRecHitsPerTrackCandVsEtaProfile_"+tcProducer.label() + "_";
314  NumberOfRecHitsPerTrackCandVsEtaProfile = ibooker.bookProfile(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, TCHitBin, TCHitMin, TCHitMax,"s");
315  NumberOfRecHitsPerTrackCandVsEtaProfile->setAxisTitle("Track Candidate #eta",1);
316  NumberOfRecHitsPerTrackCandVsEtaProfile->setAxisTitle("Number of RecHits of each Track Candidate",2);
317  }
318 
319  histname = "TrackCandPhiVsEta_"+tcProducer.label() + "_";
320  TrackCandPhiVsEta = ibooker.book2D(histname+CatagoryName, histname+CatagoryName, EtaBin, EtaMin, EtaMax, PhiBin, PhiMin, PhiMax);
321  TrackCandPhiVsEta->setAxisTitle("Track Candidate #eta", 1);
322  TrackCandPhiVsEta->setAxisTitle("Track Candidate #phi", 2);
323  }
324 
325 }
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
static const std::string StopReasonName[]
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().