CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrackSplittingMonitor Class Reference

#include <DQM/TrackingMonitor/src/TrackSplittingMonitor.cc>

Inheritance diagram for TrackSplittingMonitor:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 TrackSplittingMonitor (const edm::ParameterSet &)
 
 ~TrackSplittingMonitor () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void doProfileX (TH2 *th2, MonitorElement *me)
 
void doProfileX (MonitorElement *th2m, MonitorElement *me)
 

Private Attributes

edm::ParameterSet conf_
 
edm::ESHandle< CSCGeometrycscGeometry
 
double d0Cut_
 
MonitorElementdcurvAbsoluteResiduals_global_
 
MonitorElementdcurvAbsoluteResiduals_tracker_
 
MonitorElementdcurvNormalizedResiduals_global_
 
MonitorElementdcurvNormalizedResiduals_tracker_
 
MonitorElementddxyAbsoluteResiduals_global_
 
MonitorElementddxyAbsoluteResiduals_tracker_
 
MonitorElementddxyNormalizedResiduals_global_
 
MonitorElementddxyNormalizedResiduals_tracker_
 
MonitorElementddzAbsoluteResiduals_global_
 
MonitorElementddzAbsoluteResiduals_tracker_
 
MonitorElementddzNormalizedResiduals_global_
 
MonitorElementddzNormalizedResiduals_tracker_
 
MonitorElementdphiAbsoluteResiduals_global_
 
MonitorElementdphiAbsoluteResiduals_tracker_
 
MonitorElementdphiNormalizedResiduals_global_
 
MonitorElementdphiNormalizedResiduals_tracker_
 
MonitorElementdptAbsoluteResiduals_global_
 
MonitorElementdptAbsoluteResiduals_tracker_
 
MonitorElementdptNormalizedResiduals_global_
 
MonitorElementdptNormalizedResiduals_tracker_
 
DQMStoredqmStore_
 
edm::ESHandle< DTGeometrydtGeometry
 
MonitorElementdthetaAbsoluteResiduals_global_
 
MonitorElementdthetaAbsoluteResiduals_tracker_
 
MonitorElementdthetaNormalizedResiduals_global_
 
MonitorElementdthetaNormalizedResiduals_tracker_
 
double dzCut_
 
std::string histname
 
double norchiCut_
 
int pixelHitsPerLeg_
 
bool plotMuons_
 
double ptCut_
 
edm::ESHandle< RPCGeometryrpcGeometry
 
edm::InputTag splitMuons_
 
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
 
edm::InputTag splitTracks_
 
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
 
edm::ESHandle< TrackerGeometrytheGeometry
 
edm::ESHandle< MagneticFieldtheMagField
 
int totalHitsPerLeg_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Monitoring source for general quantities related to tracks.

Definition at line 40 of file TrackSplittingMonitor.h.

Constructor & Destructor Documentation

TrackSplittingMonitor::TrackSplittingMonitor ( const edm::ParameterSet iConfig)
explicit

Definition at line 32 of file TrackSplittingMonitor.cc.

References conf_, d0Cut_, dzCut_, edm::ParameterSet::getParameter(), norchiCut_, pixelHitsPerLeg_, plotMuons_, ptCut_, splitMuons_, splitMuonsToken_, splitTracks_, splitTracksToken_, and totalHitsPerLeg_.

33  : dqmStore_(edm::Service<DQMStore>().operator->()), conf_(iConfig) {
34  splitTracks_ = conf_.getParameter<edm::InputTag>("splitTrackCollection");
35  splitMuons_ = conf_.getParameter<edm::InputTag>("splitMuonCollection");
36  splitTracksToken_ = consumes<std::vector<reco::Track> >(splitTracks_);
37  splitMuonsToken_ = mayConsume<std::vector<reco::Muon> >(splitMuons_);
38 
39  plotMuons_ = conf_.getParameter<bool>("ifPlotMuons");
40 
41  // cuts
42  pixelHitsPerLeg_ = conf_.getParameter<int>("pixelHitsPerLeg");
43  totalHitsPerLeg_ = conf_.getParameter<int>("totalHitsPerLeg");
44  d0Cut_ = conf_.getParameter<double>("d0Cut");
45  dzCut_ = conf_.getParameter<double>("dzCut");
46  ptCut_ = conf_.getParameter<double>("ptCut");
47  norchiCut_ = conf_.getParameter<double>("norchiCut");
48 }
T getParameter(std::string const &) const
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
TrackSplittingMonitor::~TrackSplittingMonitor ( )
override

Definition at line 50 of file TrackSplittingMonitor.cc.

50 {}

Member Function Documentation

void TrackSplittingMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 178 of file TrackSplittingMonitor.cc.

References cscGeometry, reco::TrackBase::d0(), d0Cut_, reco::TrackBase::d0Error(), ddxyAbsoluteResiduals_global_, ddxyAbsoluteResiduals_tracker_, ddxyNormalizedResiduals_global_, ddxyNormalizedResiduals_tracker_, DEFINE_FWK_MODULE, dtGeometry, reco::TrackBase::dz(), dzCut_, reco::TrackBase::dzError(), dqm::impl::MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), reco::Muon::globalTrack(), edm::HandleBase::isValid(), norchiCut_, reco::TrackBase::normalizedChi2(), reco::TrackBase::phi(), reco::TrackBase::phiError(), PixelSubdetector::PixelBarrel, pixelHitsPerLeg_, plotMuons_, funct::pow(), reco::TrackBase::pt(), HLT_2018_cff::pt1, HLT_2018_cff::pt2, ptCut_, reco::TrackBase::ptError(), reco::Track::recHitsBegin(), reco::Track::recHitsEnd(), rpcGeometry, RecoMuonCosmics_cff::splitMuons, splitMuonsToken_, splitTracksToken_, mathSSE::sqrt(), theGeometry, theMagField, reco::TrackBase::theta(), reco::TrackBase::thetaError(), and totalHitsPerLeg_.

178  {
181  iSetup.get<MuonGeometryRecord>().get(dtGeometry);
182  iSetup.get<MuonGeometryRecord>().get(cscGeometry);
183  iSetup.get<MuonGeometryRecord>().get(rpcGeometry);
184 
186  iEvent.getByToken(splitTracksToken_, splitTracks);
187  if (!splitTracks.isValid())
188  return;
189 
191  if (plotMuons_) {
192  iEvent.getByToken(splitMuonsToken_, splitMuons);
193  }
194 
195  if (splitTracks->size() == 2) {
196  // check that there are 2 tracks in split track collection
197  edm::LogInfo("TrackSplittingMonitor") << "Split Track size: " << splitTracks->size();
198 
199  // split tracks calculations
200  reco::Track track1 = splitTracks->at(0);
201  reco::Track track2 = splitTracks->at(1);
202 
203  // -------------------------- basic selection ---------------------------
204 
205  // hit counting
206  // looping through the hits for track 1
207  double nRechits1 = 0;
208  double nRechitinBPIX1 = 0;
209  for (trackingRecHit_iterator iHit = track1.recHitsBegin(); iHit != track1.recHitsEnd(); ++iHit) {
210  if ((*iHit)->isValid()) {
211  nRechits1++;
212  int type = (*iHit)->geographicalId().subdetId();
213  if (type == int(PixelSubdetector::PixelBarrel)) {
214  ++nRechitinBPIX1;
215  }
216  }
217  }
218  // looping through the hits for track 2
219  double nRechits2 = 0;
220  double nRechitinBPIX2 = 0;
221  for (trackingRecHit_iterator iHit = track2.recHitsBegin(); iHit != track2.recHitsEnd(); ++iHit) {
222  if ((*iHit)->isValid()) {
223  nRechits2++;
224  int type = (*iHit)->geographicalId().subdetId();
225  if (type == int(PixelSubdetector::PixelBarrel)) {
226  ++nRechitinBPIX2;
227  }
228  }
229  }
230 
231  // DCA of each track
232  double d01 = track1.d0();
233  double dz1 = track1.dz();
234  double d02 = track2.d0();
235  double dz2 = track2.dz();
236 
237  // pT of each track
238  double pt1 = track1.pt();
239  double pt2 = track2.pt();
240 
241  // chi2 of each track
242  double norchi1 = track1.normalizedChi2();
243  double norchi2 = track2.normalizedChi2();
244 
245  // basic selection
246  // pixel hits and total hits
247  if ((nRechitinBPIX1 >= pixelHitsPerLeg_) && (nRechitinBPIX1 >= pixelHitsPerLeg_) &&
248  (nRechits1 >= totalHitsPerLeg_) && (nRechits2 >= totalHitsPerLeg_)) {
249  // dca cut
250  if (((fabs(d01) < d0Cut_)) && (fabs(d02) < d0Cut_) && (fabs(dz2) < dzCut_) && (fabs(dz2) < dzCut_)) {
251  // pt cut
252  if ((pt1 + pt2) / 2 < ptCut_) {
253  // chi2 cut
254  if ((norchi1 < norchiCut_) && (norchi2 < norchiCut_)) {
255  // passed all cuts...
256  edm::LogInfo("TrackSplittingMonitor") << " Setected after all cuts ?";
257 
258  double ddxyVal = d01 - d02;
259  double ddzVal = dz1 - dz2;
260  double dphiVal = track1.phi() - track2.phi();
261  double dthetaVal = track1.theta() - track2.theta();
262  double dptVal = pt1 - pt2;
263  double dcurvVal = (1 / pt1) - (1 / pt2);
264 
265  double d01ErrVal = track1.d0Error();
266  double d02ErrVal = track2.d0Error();
267  double dz1ErrVal = track1.dzError();
268  double dz2ErrVal = track2.dzError();
269  double phi1ErrVal = track1.phiError();
270  double phi2ErrVal = track2.phiError();
271  double theta1ErrVal = track1.thetaError();
272  double theta2ErrVal = track2.thetaError();
273  double pt1ErrVal = track1.ptError();
274  double pt2ErrVal = track2.ptError();
275 
276  ddxyAbsoluteResiduals_tracker_->Fill(10000.0 * ddxyVal / sqrt(2.0));
277  ddxyAbsoluteResiduals_tracker_->Fill(10000.0 * ddzVal / sqrt(2.0));
278  ddxyAbsoluteResiduals_tracker_->Fill(1000.0 * dphiVal / sqrt(2.0));
279  ddxyAbsoluteResiduals_tracker_->Fill(1000.0 * dthetaVal / sqrt(2.0));
280  ddxyAbsoluteResiduals_tracker_->Fill(dptVal / sqrt(2.0));
281  ddxyAbsoluteResiduals_tracker_->Fill(dcurvVal / sqrt(2.0));
282 
283  ddxyNormalizedResiduals_tracker_->Fill(ddxyVal / sqrt(d01ErrVal * d01ErrVal + d02ErrVal * d02ErrVal));
284  ddxyNormalizedResiduals_tracker_->Fill(ddzVal / sqrt(dz1ErrVal * dz1ErrVal + dz2ErrVal * dz2ErrVal));
285  ddxyNormalizedResiduals_tracker_->Fill(dphiVal / sqrt(phi1ErrVal * phi1ErrVal + phi2ErrVal * phi2ErrVal));
287  sqrt(theta1ErrVal * theta1ErrVal + theta2ErrVal * theta2ErrVal));
288  ddxyNormalizedResiduals_tracker_->Fill(dptVal / sqrt(pt1ErrVal * pt1ErrVal + pt2ErrVal * pt2ErrVal));
290  dcurvVal / sqrt(pow(pt1ErrVal, 2) / pow(pt1, 4) + pow(pt2ErrVal, 2) / pow(pt2, 4)));
291 
292  // if do the same for split muons
293  if (plotMuons_ && splitMuons.isValid()) {
294  int gmCtr = 0;
295  bool topGlobalMuonFlag = false;
296  bool bottomGlobalMuonFlag = false;
297  int topGlobalMuon = -1;
298  int bottomGlobalMuon = -1;
299  double topGlobalMuonNorchi2 = 1e10;
300  double bottomGlobalMuonNorchi2 = 1e10;
301 
302  // check if usable split global muons
303  for (std::vector<reco::Muon>::const_iterator gmI = splitMuons->begin(); gmI != splitMuons->end(); gmI++) {
304  if (gmI->isTrackerMuon() && gmI->isStandAloneMuon() && gmI->isGlobalMuon()) {
305  reco::TrackRef trackerTrackRef1(splitTracks, 0);
306  reco::TrackRef trackerTrackRef2(splitTracks, 1);
307 
308  if (gmI->innerTrack() == trackerTrackRef1) {
309  if (gmI->globalTrack()->normalizedChi2() < topGlobalMuonNorchi2) {
310  topGlobalMuonFlag = true;
311  topGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
312  topGlobalMuon = gmCtr;
313  }
314  }
315  if (gmI->innerTrack() == trackerTrackRef2) {
316  if (gmI->globalTrack()->normalizedChi2() < bottomGlobalMuonNorchi2) {
317  bottomGlobalMuonFlag = true;
318  bottomGlobalMuonNorchi2 = gmI->globalTrack()->normalizedChi2();
319  bottomGlobalMuon = gmCtr;
320  }
321  }
322  }
323  gmCtr++;
324  }
325 
326  if (bottomGlobalMuonFlag && topGlobalMuonFlag) {
327  reco::Muon muonTop = splitMuons->at(topGlobalMuon);
328  reco::Muon muonBottom = splitMuons->at(bottomGlobalMuon);
329 
330  reco::TrackRef glb1 = muonTop.globalTrack();
331  reco::TrackRef glb2 = muonBottom.globalTrack();
332 
333  double ddxyValGlb = glb1->d0() - glb2->d0();
334  double ddzValGlb = glb1->dz() - glb2->dz();
335  double dphiValGlb = glb1->phi() - glb2->phi();
336  double dthetaValGlb = glb1->theta() - glb2->theta();
337  double dptValGlb = glb1->pt() - glb2->pt();
338  double dcurvValGlb = (1 / glb1->pt()) - (1 / glb2->pt());
339 
340  double d01ErrValGlb = glb1->d0Error();
341  double d02ErrValGlb = glb2->d0Error();
342  double dz1ErrValGlb = glb1->dzError();
343  double dz2ErrValGlb = glb2->dzError();
344  double phi1ErrValGlb = glb1->phiError();
345  double phi2ErrValGlb = glb2->phiError();
346  double theta1ErrValGlb = glb1->thetaError();
347  double theta2ErrValGlb = glb2->thetaError();
348  double pt1ErrValGlb = glb1->ptError();
349  double pt2ErrValGlb = glb2->ptError();
350 
351  ddxyAbsoluteResiduals_global_->Fill(10000.0 * ddxyValGlb / sqrt(2.0));
352  ddxyAbsoluteResiduals_global_->Fill(10000.0 * ddzValGlb / sqrt(2.0));
353  ddxyAbsoluteResiduals_global_->Fill(1000.0 * dphiValGlb / sqrt(2.0));
354  ddxyAbsoluteResiduals_global_->Fill(1000.0 * dthetaValGlb / sqrt(2.0));
355  ddxyAbsoluteResiduals_global_->Fill(dptValGlb / sqrt(2.0));
356  ddxyAbsoluteResiduals_global_->Fill(dcurvValGlb / sqrt(2.0));
357 
359  sqrt(d01ErrValGlb * d01ErrValGlb + d02ErrValGlb * d02ErrValGlb));
361  sqrt(dz1ErrValGlb * dz1ErrValGlb + dz2ErrValGlb * dz2ErrValGlb));
363  dphiValGlb / sqrt(phi1ErrValGlb * phi1ErrValGlb + phi2ErrValGlb * phi2ErrValGlb));
365  dthetaValGlb / sqrt(theta1ErrValGlb * theta1ErrValGlb + theta2ErrValGlb * theta2ErrValGlb));
367  sqrt(pt1ErrValGlb * pt1ErrValGlb + pt2ErrValGlb * pt2ErrValGlb));
369  dcurvValGlb / sqrt(pow(pt1ErrValGlb, 2) / pow(pt1, 4) + pow(pt2ErrValGlb, 2) / pow(pt2, 4)));
370  }
371 
372  } // end of split muons loop
373  }
374  }
375  }
376  }
377  }
378 }
type
Definition: HCALResponse.h:21
edm::ESHandle< TrackerGeometry > theGeometry
double d0Error() const
error on d0
Definition: TrackBase.h:719
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:590
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:572
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
double theta() const
polar angle
Definition: TrackBase.h:581
MonitorElement * ddxyNormalizedResiduals_tracker_
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:614
edm::ESHandle< RPCGeometry > rpcGeometry
edm::EDGetTokenT< std::vector< reco::Muon > > splitMuonsToken_
void Fill(long long x)
MonitorElement * ddxyNormalizedResiduals_global_
T sqrt(T t)
Definition: SSEVec.h:19
double pt() const
track transverse momentum
Definition: TrackBase.h:602
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:696
double phiError() const
error on phi
Definition: TrackBase.h:713
edm::ESHandle< MagneticField > theMagField
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
Definition: Track.h:88
bool isValid() const
Definition: HandleBase.h:70
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:596
double dzError() const
error on dz
Definition: TrackBase.h:725
MonitorElement * ddxyAbsoluteResiduals_global_
edm::ESHandle< DTGeometry > dtGeometry
T get() const
Definition: EventSetup.h:73
edm::EDGetTokenT< std::vector< reco::Track > > splitTracksToken_
edm::ESHandle< CSCGeometry > cscGeometry
MonitorElement * ddxyAbsoluteResiduals_tracker_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
double thetaError() const
error on theta
Definition: TrackBase.h:704
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:51
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
Definition: Track.h:91
void TrackSplittingMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 52 of file TrackSplittingMonitor.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), conf_, dcurvAbsoluteResiduals_global_, dcurvAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::dcurvBin, TrackSplittingMonitor_cfi::dcurvMax, TrackSplittingMonitor_cfi::dcurvMin, dcurvNormalizedResiduals_global_, dcurvNormalizedResiduals_tracker_, ddxyAbsoluteResiduals_global_, ddxyAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::ddxyBin, TrackSplittingMonitor_cfi::ddxyMax, TrackSplittingMonitor_cfi::ddxyMin, ddxyNormalizedResiduals_global_, ddxyNormalizedResiduals_tracker_, ddzAbsoluteResiduals_global_, ddzAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::ddzBin, TrackSplittingMonitor_cfi::ddzMax, TrackSplittingMonitor_cfi::ddzMin, ddzNormalizedResiduals_global_, ddzNormalizedResiduals_tracker_, dphiAbsoluteResiduals_global_, dphiAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::dphiBin, TrackSplittingMonitor_cfi::dphiMax, TrackSplittingMonitor_cfi::dphiMin, dphiNormalizedResiduals_global_, dphiNormalizedResiduals_tracker_, dptAbsoluteResiduals_global_, dptAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::dptBin, TrackSplittingMonitor_cfi::dptMax, TrackSplittingMonitor_cfi::dptMin, dptNormalizedResiduals_global_, dptNormalizedResiduals_tracker_, dthetaAbsoluteResiduals_global_, dthetaAbsoluteResiduals_tracker_, TrackSplittingMonitor_cfi::dthetaBin, TrackSplittingMonitor_cfi::dthetaMax, TrackSplittingMonitor_cfi::dthetaMin, dthetaNormalizedResiduals_global_, dthetaNormalizedResiduals_tracker_, edm::ParameterSet::getParameter(), TrackSplittingMonitor_cfi::normBin, TrackSplittingMonitor_cfi::normMax, TrackSplittingMonitor_cfi::normMin, plotMuons_, dqm::impl::MonitorElement::setAxisTitle(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

56 {
57  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
58  ibooker.setCurrentFolder(MEFolderName);
59 
60  // bin declarations
61  int ddxyBin = conf_.getParameter<int>("ddxyBin");
62  double ddxyMin = conf_.getParameter<double>("ddxyMin");
63  double ddxyMax = conf_.getParameter<double>("ddxyMax");
64 
65  int ddzBin = conf_.getParameter<int>("ddzBin");
66  double ddzMin = conf_.getParameter<double>("ddzMin");
67  double ddzMax = conf_.getParameter<double>("ddzMax");
68 
69  int dphiBin = conf_.getParameter<int>("dphiBin");
70  double dphiMin = conf_.getParameter<double>("dphiMin");
71  double dphiMax = conf_.getParameter<double>("dphiMax");
72 
73  int dthetaBin = conf_.getParameter<int>("dthetaBin");
74  double dthetaMin = conf_.getParameter<double>("dthetaMin");
75  double dthetaMax = conf_.getParameter<double>("dthetaMax");
76 
77  int dptBin = conf_.getParameter<int>("dptBin");
78  double dptMin = conf_.getParameter<double>("dptMin");
79  double dptMax = conf_.getParameter<double>("dptMax");
80 
81  int dcurvBin = conf_.getParameter<int>("dcurvBin");
82  double dcurvMin = conf_.getParameter<double>("dcurvMin");
83  double dcurvMax = conf_.getParameter<double>("dcurvMax");
84 
85  int normBin = conf_.getParameter<int>("normBin");
86  double normMin = conf_.getParameter<double>("normMin");
87  double normMax = conf_.getParameter<double>("normMax");
88 
89  // declare histogram
91  ibooker.book1D("ddxyAbsoluteResiduals_tracker", "ddxyAbsoluteResiduals_tracker", ddxyBin, ddxyMin, ddxyMax);
93  ibooker.book1D("ddzAbsoluteResiduals_tracker", "ddzAbsoluteResiduals_tracker", ddzBin, ddzMin, ddzMax);
95  ibooker.book1D("dphiAbsoluteResiduals_tracker", "dphiAbsoluteResiduals_tracker", dphiBin, dphiMin, dphiMax);
96  dthetaAbsoluteResiduals_tracker_ = ibooker.book1D(
97  "dthetaAbsoluteResiduals_tracker", "dthetaAbsoluteResiduals_tracker", dthetaBin, dthetaMin, dthetaMax);
99  ibooker.book1D("dptAbsoluteResiduals_tracker", "dptAbsoluteResiduals_tracker", dptBin, dptMin, dptMax);
101  ibooker.book1D("dcurvAbsoluteResiduals_tracker", "dcurvAbsoluteResiduals_tracker", dcurvBin, dcurvMin, dcurvMax);
102 
104  ibooker.book1D("ddxyNormalizedResiduals_tracker", "ddxyNormalizedResiduals_tracker", normBin, normMin, normMax);
106  ibooker.book1D("ddzNormalizedResiduals_tracker", "ddzNormalizedResiduals_tracker", normBin, normMin, normMax);
108  ibooker.book1D("dphiNormalizedResiduals_tracker", "dphiNormalizedResiduals_tracker", normBin, normMin, normMax);
109  dthetaNormalizedResiduals_tracker_ = ibooker.book1D(
110  "dthetaNormalizedResiduals_tracker", "dthetaNormalizedResiduals_tracker", normBin, normMin, normMax);
112  ibooker.book1D("dptNormalizedResiduals_tracker", "dptNormalizedResiduals_tracker", normBin, normMin, normMax);
114  ibooker.book1D("dcurvNormalizedResiduals_tracker", "dcurvNormalizedResiduals_tracker", normBin, normMin, normMax);
115 
116  if (plotMuons_) {
118  ibooker.book1D("ddxyAbsoluteResiduals_global", "ddxyAbsoluteResiduals_global", ddxyBin, ddxyMin, ddxyMax);
120  ibooker.book1D("ddzAbsoluteResiduals_global", "ddzAbsoluteResiduals_global", ddzBin, ddzMin, ddzMax);
122  ibooker.book1D("dphiAbsoluteResiduals_global", "dphiAbsoluteResiduals_global", dphiBin, dphiMin, dphiMax);
123  dthetaAbsoluteResiduals_global_ = ibooker.book1D(
124  "dthetaAbsoluteResiduals_global", "dthetaAbsoluteResiduals_global", dthetaBin, dthetaMin, dthetaMax);
126  ibooker.book1D("dptAbsoluteResiduals_global", "dptAbsoluteResiduals_global", dptBin, dptMin, dptMax);
128  ibooker.book1D("dcurvAbsoluteResiduals_global", "dcurvAbsoluteResiduals_global", dcurvBin, dcurvMin, dcurvMax);
129 
131  ibooker.book1D("ddxyNormalizedResiduals_global", "ddxyNormalizedResiduals_global", normBin, normMin, normMax);
133  ibooker.book1D("ddzNormalizedResiduals_global", "ddzNormalizedResiduals_global", normBin, normMin, normMax);
135  ibooker.book1D("dphiNormalizedResiduals_global", "dphiNormalizedResiduals_global", normBin, normMin, normMax);
136  dthetaNormalizedResiduals_global_ = ibooker.book1D(
137  "dthetaNormalizedResiduals_global", "dthetaNormalizedResiduals_global", normBin, normMin, normMax);
139  ibooker.book1D("dptNormalizedResiduals_global", "dptNormalizedResiduals_global", normBin, normMin, normMax);
141  ibooker.book1D("dcurvNormalizedResiduals_global", "dcurvNormalizedResiduals_global", normBin, normMin, normMax);
142  }
143 
144  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta d_{xy})/#sqrt{2} [#mum]");
145  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta d_{z})/#sqrt{2} [#mum]");
146  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta #phi)/#sqrt{2} [mrad]");
147  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta #theta)/#sqrt{2} [mrad]");
148  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta pT)/#sqrt{2} [GeV]");
149  ddxyAbsoluteResiduals_tracker_->setAxisTitle("(#delta (1/pT))/#sqrt{2} [GeV^{-1}]");
150 
151  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta d_{xy}/#sigma(d_{xy}");
152  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta d_{z}/#sigma(d_{z})");
153  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta #phi/#sigma(d_{#phi})");
154  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta #theta/#sigma(d_{#theta})");
155  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta p_{T}/#sigma(p_{T})");
156  ddxyNormalizedResiduals_tracker_->setAxisTitle("#delta 1/p_{T}/#sigma(1/p_{T})");
157 
158  if (plotMuons_) {
159  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta d_{xy})/#sqrt{2} [#mum]");
160  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta d_{z})/#sqrt{2} [#mum]");
161  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta #phi)/#sqrt{2} [mrad]");
162  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta #theta)/#sqrt{2} [mrad]");
163  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta pT)/#sqrt{2} [GeV]");
164  ddxyAbsoluteResiduals_global_->setAxisTitle("(#delta (1/pT))/#sqrt{2} [GeV^{-1}]");
165 
166  ddxyNormalizedResiduals_global_->setAxisTitle("#delta d_{xy}/#sigma(d_{xy}");
167  ddxyNormalizedResiduals_global_->setAxisTitle("#delta d_{z}/#sigma(d_{z})");
168  ddxyNormalizedResiduals_global_->setAxisTitle("#delta #phi/#sigma(d_{#phi})");
169  ddxyNormalizedResiduals_global_->setAxisTitle("#delta #theta/#sigma(d_{#theta})");
170  ddxyNormalizedResiduals_global_->setAxisTitle("#delta p_{T}/#sigma(p_{T})");
171  ddxyNormalizedResiduals_global_->setAxisTitle("#delta 1/p_{T}/#sigma(1/p_{T})");
172  }
173 }
T getParameter(std::string const &) const
MonitorElement * dthetaAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_global_
MonitorElement * dthetaAbsoluteResiduals_tracker_
MonitorElement * ddzNormalizedResiduals_global_
MonitorElement * ddxyNormalizedResiduals_tracker_
MonitorElement * dcurvAbsoluteResiduals_tracker_
MonitorElement * ddzAbsoluteResiduals_global_
MonitorElement * dphiNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_tracker_
MonitorElement * ddxyNormalizedResiduals_global_
MonitorElement * dthetaNormalizedResiduals_global_
MonitorElement * dphiNormalizedResiduals_tracker_
MonitorElement * dcurvAbsoluteResiduals_global_
MonitorElement * dphiAbsoluteResiduals_tracker_
MonitorElement * ddzNormalizedResiduals_tracker_
MonitorElement * dptAbsoluteResiduals_global_
MonitorElement * dptAbsoluteResiduals_tracker_
MonitorElement * ddzAbsoluteResiduals_tracker_
MonitorElement * ddxyAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_tracker_
MonitorElement * dphiAbsoluteResiduals_global_
MonitorElement * dptNormalizedResiduals_tracker_
MonitorElement * dptNormalizedResiduals_global_
MonitorElement * ddxyAbsoluteResiduals_tracker_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void TrackSplittingMonitor::doProfileX ( TH2 *  th2,
MonitorElement me 
)
private
void TrackSplittingMonitor::doProfileX ( MonitorElement th2m,
MonitorElement me 
)
private

Member Data Documentation

edm::ParameterSet TrackSplittingMonitor::conf_
private

Definition at line 59 of file TrackSplittingMonitor.h.

Referenced by bookHistograms(), and TrackSplittingMonitor().

edm::ESHandle<CSCGeometry> TrackSplittingMonitor::cscGeometry
private

Definition at line 64 of file TrackSplittingMonitor.h.

Referenced by analyze().

double TrackSplittingMonitor::d0Cut_
private

Definition at line 75 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

MonitorElement* TrackSplittingMonitor::dcurvAbsoluteResiduals_global_
private

Definition at line 100 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvAbsoluteResiduals_tracker_
private

Definition at line 86 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvNormalizedResiduals_global_
private

Definition at line 107 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvNormalizedResiduals_tracker_
private

Definition at line 93 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyAbsoluteResiduals_global_
private

Definition at line 95 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyAbsoluteResiduals_tracker_
private

Definition at line 81 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyNormalizedResiduals_global_
private

Definition at line 102 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyNormalizedResiduals_tracker_
private

Definition at line 88 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzAbsoluteResiduals_global_
private

Definition at line 96 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzAbsoluteResiduals_tracker_
private

Definition at line 82 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzNormalizedResiduals_global_
private

Definition at line 103 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzNormalizedResiduals_tracker_
private

Definition at line 89 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiAbsoluteResiduals_global_
private

Definition at line 97 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiAbsoluteResiduals_tracker_
private

Definition at line 83 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiNormalizedResiduals_global_
private

Definition at line 104 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiNormalizedResiduals_tracker_
private

Definition at line 90 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptAbsoluteResiduals_global_
private

Definition at line 99 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptAbsoluteResiduals_tracker_
private

Definition at line 85 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptNormalizedResiduals_global_
private

Definition at line 106 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptNormalizedResiduals_tracker_
private

Definition at line 92 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

DQMStore* TrackSplittingMonitor::dqmStore_
private

Definition at line 58 of file TrackSplittingMonitor.h.

edm::ESHandle<DTGeometry> TrackSplittingMonitor::dtGeometry
private

Definition at line 63 of file TrackSplittingMonitor.h.

Referenced by analyze().

MonitorElement* TrackSplittingMonitor::dthetaAbsoluteResiduals_global_
private

Definition at line 98 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaAbsoluteResiduals_tracker_
private

Definition at line 84 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaNormalizedResiduals_global_
private

Definition at line 105 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaNormalizedResiduals_tracker_
private

Definition at line 91 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

double TrackSplittingMonitor::dzCut_
private

Definition at line 76 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

std::string TrackSplittingMonitor::histname
private

Definition at line 56 of file TrackSplittingMonitor.h.

double TrackSplittingMonitor::norchiCut_
private

Definition at line 78 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

int TrackSplittingMonitor::pixelHitsPerLeg_
private

Definition at line 73 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

bool TrackSplittingMonitor::plotMuons_
private

Definition at line 72 of file TrackSplittingMonitor.h.

Referenced by analyze(), bookHistograms(), and TrackSplittingMonitor().

double TrackSplittingMonitor::ptCut_
private
edm::ESHandle<RPCGeometry> TrackSplittingMonitor::rpcGeometry
private

Definition at line 65 of file TrackSplittingMonitor.h.

Referenced by analyze().

edm::InputTag TrackSplittingMonitor::splitMuons_
private

Definition at line 68 of file TrackSplittingMonitor.h.

Referenced by TrackSplittingMonitor().

edm::EDGetTokenT<std::vector<reco::Muon> > TrackSplittingMonitor::splitMuonsToken_
private

Definition at line 70 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

edm::InputTag TrackSplittingMonitor::splitTracks_
private

Definition at line 67 of file TrackSplittingMonitor.h.

Referenced by TrackSplittingMonitor().

edm::EDGetTokenT<std::vector<reco::Track> > TrackSplittingMonitor::splitTracksToken_
private

Definition at line 69 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

edm::ESHandle<TrackerGeometry> TrackSplittingMonitor::theGeometry
private

Definition at line 61 of file TrackSplittingMonitor.h.

Referenced by analyze().

edm::ESHandle<MagneticField> TrackSplittingMonitor::theMagField
private

Definition at line 62 of file TrackSplittingMonitor.h.

Referenced by analyze().

int TrackSplittingMonitor::totalHitsPerLeg_
private

Definition at line 74 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().