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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual 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 ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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)
 

Detailed Description

Monitoring source for general quantities related to tracks.

Definition at line 44 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_.

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

Definition at line 54 of file TrackSplittingMonitor.cc.

54  {
55 }

Member Function Documentation

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

Definition at line 162 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(), 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(), hiDetachedQuadStep_cff::pt1, hiDetachedQuadStep_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_.

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

Implements DQMEDAnalyzer.

Definition at line 57 of file TrackSplittingMonitor.cc.

References DQMStore::IBooker::book1D(), conf_, dcurvAbsoluteResiduals_global_, dcurvAbsoluteResiduals_tracker_, dcurvNormalizedResiduals_global_, dcurvNormalizedResiduals_tracker_, ddxyAbsoluteResiduals_global_, ddxyAbsoluteResiduals_tracker_, ddxyNormalizedResiduals_global_, ddxyNormalizedResiduals_tracker_, ddzAbsoluteResiduals_global_, ddzAbsoluteResiduals_tracker_, ddzNormalizedResiduals_global_, ddzNormalizedResiduals_tracker_, dphiAbsoluteResiduals_global_, dphiAbsoluteResiduals_tracker_, dphiNormalizedResiduals_global_, dphiNormalizedResiduals_tracker_, dptAbsoluteResiduals_global_, dptAbsoluteResiduals_tracker_, dptNormalizedResiduals_global_, dptNormalizedResiduals_tracker_, dthetaAbsoluteResiduals_global_, dthetaAbsoluteResiduals_tracker_, dthetaNormalizedResiduals_global_, dthetaNormalizedResiduals_tracker_, edm::ParameterSet::getParameter(), plotMuons_, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

61 {
62 
63  std::string MEFolderName = conf_.getParameter<std::string>("FolderName");
64  ibooker.setCurrentFolder(MEFolderName);
65 
66  // bin declarations
67  int ddxyBin = conf_.getParameter<int>("ddxyBin");
68  double ddxyMin = conf_.getParameter<double>("ddxyMin");
69  double ddxyMax = conf_.getParameter<double>("ddxyMax");
70 
71  int ddzBin = conf_.getParameter<int>("ddzBin");
72  double ddzMin = conf_.getParameter<double>("ddzMin");
73  double ddzMax = conf_.getParameter<double>("ddzMax");
74 
75  int dphiBin = conf_.getParameter<int>("dphiBin");
76  double dphiMin = conf_.getParameter<double>("dphiMin");
77  double dphiMax = conf_.getParameter<double>("dphiMax");
78 
79  int dthetaBin = conf_.getParameter<int>("dthetaBin");
80  double dthetaMin = conf_.getParameter<double>("dthetaMin");
81  double dthetaMax = conf_.getParameter<double>("dthetaMax");
82 
83  int dptBin = conf_.getParameter<int>("dptBin");
84  double dptMin = conf_.getParameter<double>("dptMin");
85  double dptMax = conf_.getParameter<double>("dptMax");
86 
87  int dcurvBin = conf_.getParameter<int>("dcurvBin");
88  double dcurvMin = conf_.getParameter<double>("dcurvMin");
89  double dcurvMax = conf_.getParameter<double>("dcurvMax");
90 
91  int normBin = conf_.getParameter<int>("normBin");
92  double normMin = conf_.getParameter<double>("normMin");
93  double normMax = conf_.getParameter<double>("normMax");
94 
95  // declare histogram
96  ddxyAbsoluteResiduals_tracker_ = ibooker.book1D( "ddxyAbsoluteResiduals_tracker", "ddxyAbsoluteResiduals_tracker", ddxyBin, ddxyMin, ddxyMax );
97  ddzAbsoluteResiduals_tracker_ = ibooker.book1D( "ddzAbsoluteResiduals_tracker", "ddzAbsoluteResiduals_tracker", ddzBin, ddzMin, ddzMax );
98  dphiAbsoluteResiduals_tracker_ = ibooker.book1D( "dphiAbsoluteResiduals_tracker", "dphiAbsoluteResiduals_tracker", dphiBin, dphiMin, dphiMax );
99  dthetaAbsoluteResiduals_tracker_ = ibooker.book1D( "dthetaAbsoluteResiduals_tracker", "dthetaAbsoluteResiduals_tracker", dthetaBin, dthetaMin, dthetaMax );
100  dptAbsoluteResiduals_tracker_ = ibooker.book1D( "dptAbsoluteResiduals_tracker", "dptAbsoluteResiduals_tracker", dptBin, dptMin, dptMax );
101  dcurvAbsoluteResiduals_tracker_ = ibooker.book1D( "dcurvAbsoluteResiduals_tracker", "dcurvAbsoluteResiduals_tracker", dcurvBin, dcurvMin, dcurvMax );
102 
103  ddxyNormalizedResiduals_tracker_ = ibooker.book1D( "ddxyNormalizedResiduals_tracker", "ddxyNormalizedResiduals_tracker", normBin, normMin, normMax );
104  ddzNormalizedResiduals_tracker_ = ibooker.book1D( "ddzNormalizedResiduals_tracker", "ddzNormalizedResiduals_tracker", normBin, normMin, normMax );
105  dphiNormalizedResiduals_tracker_ = ibooker.book1D( "dphiNormalizedResiduals_tracker", "dphiNormalizedResiduals_tracker", normBin, normMin, normMax );
106  dthetaNormalizedResiduals_tracker_ = ibooker.book1D( "dthetaNormalizedResiduals_tracker", "dthetaNormalizedResiduals_tracker", normBin, normMin, normMax );
107  dptNormalizedResiduals_tracker_ = ibooker.book1D( "dptNormalizedResiduals_tracker", "dptNormalizedResiduals_tracker", normBin, normMin, normMax );
108  dcurvNormalizedResiduals_tracker_ = ibooker.book1D( "dcurvNormalizedResiduals_tracker", "dcurvNormalizedResiduals_tracker", normBin, normMin, normMax );
109 
110  if (plotMuons_){
111  ddxyAbsoluteResiduals_global_ = ibooker.book1D( "ddxyAbsoluteResiduals_global", "ddxyAbsoluteResiduals_global", ddxyBin, ddxyMin, ddxyMax );
112  ddzAbsoluteResiduals_global_ = ibooker.book1D( "ddzAbsoluteResiduals_global", "ddzAbsoluteResiduals_global", ddzBin, ddzMin, ddzMax );
113  dphiAbsoluteResiduals_global_ = ibooker.book1D( "dphiAbsoluteResiduals_global", "dphiAbsoluteResiduals_global", dphiBin, dphiMin, dphiMax );
114  dthetaAbsoluteResiduals_global_ = ibooker.book1D( "dthetaAbsoluteResiduals_global", "dthetaAbsoluteResiduals_global", dthetaBin, dthetaMin, dthetaMax );
115  dptAbsoluteResiduals_global_ = ibooker.book1D( "dptAbsoluteResiduals_global", "dptAbsoluteResiduals_global", dptBin, dptMin, dptMax );
116  dcurvAbsoluteResiduals_global_ = ibooker.book1D( "dcurvAbsoluteResiduals_global", "dcurvAbsoluteResiduals_global", dcurvBin, dcurvMin, dcurvMax );
117 
118  ddxyNormalizedResiduals_global_ = ibooker.book1D( "ddxyNormalizedResiduals_global", "ddxyNormalizedResiduals_global", normBin, normMin, normMax );
119  ddzNormalizedResiduals_global_ = ibooker.book1D( "ddzNormalizedResiduals_global", "ddzNormalizedResiduals_global", normBin, normMin, normMax );
120  dphiNormalizedResiduals_global_ = ibooker.book1D( "dphiNormalizedResiduals_global", "dphiNormalizedResiduals_global", normBin, normMin, normMax );
121  dthetaNormalizedResiduals_global_ = ibooker.book1D( "dthetaNormalizedResiduals_global", "dthetaNormalizedResiduals_global", normBin, normMin, normMax );
122  dptNormalizedResiduals_global_ = ibooker.book1D( "dptNormalizedResiduals_global", "dptNormalizedResiduals_global", normBin, normMin, normMax );
123  dcurvNormalizedResiduals_global_ = ibooker.book1D( "dcurvNormalizedResiduals_global", "dcurvNormalizedResiduals_global", normBin, normMin, normMax );
124  }
125 
126  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta d_{xy})/#sqrt{2} [#mum]" );
127  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta d_{z})/#sqrt{2} [#mum]" );
128  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta #phi)/#sqrt{2} [mrad]" );
129  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta #theta)/#sqrt{2} [mrad]" );
130  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta pT)/#sqrt{2} [GeV]" );
131  ddxyAbsoluteResiduals_tracker_->setAxisTitle( "(#delta (1/pT))/#sqrt{2} [GeV^{-1}]" );
132 
133  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta d_{xy}/#sigma(d_{xy}" );
134  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta d_{z}/#sigma(d_{z})" );
135  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta #phi/#sigma(d_{#phi})" );
136  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta #theta/#sigma(d_{#theta})" );
137  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta p_{T}/#sigma(p_{T})" );
138  ddxyNormalizedResiduals_tracker_->setAxisTitle( "#delta 1/p_{T}/#sigma(1/p_{T})" );
139 
140  if (plotMuons_){
141  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta d_{xy})/#sqrt{2} [#mum]" );
142  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta d_{z})/#sqrt{2} [#mum]" );
143  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta #phi)/#sqrt{2} [mrad]" );
144  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta #theta)/#sqrt{2} [mrad]" );
145  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta pT)/#sqrt{2} [GeV]" );
146  ddxyAbsoluteResiduals_global_->setAxisTitle( "(#delta (1/pT))/#sqrt{2} [GeV^{-1}]" );
147 
148  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta d_{xy}/#sigma(d_{xy}" );
149  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta d_{z}/#sigma(d_{z})" );
150  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta #phi/#sigma(d_{#phi})" );
151  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta #theta/#sigma(d_{#theta})" );
152  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta p_{T}/#sigma(p_{T})" );
153  ddxyNormalizedResiduals_global_->setAxisTitle( "#delta 1/p_{T}/#sigma(1/p_{T})" );
154  }
155 
156 }
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 * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * ddzNormalizedResiduals_tracker_
MonitorElement * dptAbsoluteResiduals_global_
MonitorElement * dptAbsoluteResiduals_tracker_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * ddzAbsoluteResiduals_tracker_
MonitorElement * ddxyAbsoluteResiduals_global_
MonitorElement * dcurvNormalizedResiduals_tracker_
MonitorElement * dphiAbsoluteResiduals_global_
MonitorElement * dptNormalizedResiduals_tracker_
MonitorElement * dptNormalizedResiduals_global_
MonitorElement * ddxyAbsoluteResiduals_tracker_
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 64 of file TrackSplittingMonitor.h.

Referenced by bookHistograms(), and TrackSplittingMonitor().

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

Definition at line 69 of file TrackSplittingMonitor.h.

Referenced by analyze().

double TrackSplittingMonitor::d0Cut_
private

Definition at line 80 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

MonitorElement* TrackSplittingMonitor::dcurvAbsoluteResiduals_global_
private

Definition at line 106 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvAbsoluteResiduals_tracker_
private

Definition at line 92 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvNormalizedResiduals_global_
private

Definition at line 113 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dcurvNormalizedResiduals_tracker_
private

Definition at line 99 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyAbsoluteResiduals_global_
private

Definition at line 101 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyAbsoluteResiduals_tracker_
private

Definition at line 87 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyNormalizedResiduals_global_
private

Definition at line 108 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddxyNormalizedResiduals_tracker_
private

Definition at line 94 of file TrackSplittingMonitor.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzAbsoluteResiduals_global_
private

Definition at line 102 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzAbsoluteResiduals_tracker_
private

Definition at line 88 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzNormalizedResiduals_global_
private

Definition at line 109 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::ddzNormalizedResiduals_tracker_
private

Definition at line 95 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiAbsoluteResiduals_global_
private

Definition at line 103 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiAbsoluteResiduals_tracker_
private

Definition at line 89 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiNormalizedResiduals_global_
private

Definition at line 110 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dphiNormalizedResiduals_tracker_
private

Definition at line 96 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptAbsoluteResiduals_global_
private

Definition at line 105 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptAbsoluteResiduals_tracker_
private

Definition at line 91 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptNormalizedResiduals_global_
private

Definition at line 112 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dptNormalizedResiduals_tracker_
private

Definition at line 98 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

DQMStore* TrackSplittingMonitor::dqmStore_
private

Definition at line 63 of file TrackSplittingMonitor.h.

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

Definition at line 68 of file TrackSplittingMonitor.h.

Referenced by analyze().

MonitorElement* TrackSplittingMonitor::dthetaAbsoluteResiduals_global_
private

Definition at line 104 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaAbsoluteResiduals_tracker_
private

Definition at line 90 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaNormalizedResiduals_global_
private

Definition at line 111 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

MonitorElement* TrackSplittingMonitor::dthetaNormalizedResiduals_tracker_
private

Definition at line 97 of file TrackSplittingMonitor.h.

Referenced by bookHistograms().

double TrackSplittingMonitor::dzCut_
private

Definition at line 81 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

std::string TrackSplittingMonitor::histname
private

Definition at line 61 of file TrackSplittingMonitor.h.

double TrackSplittingMonitor::norchiCut_
private

Definition at line 83 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

int TrackSplittingMonitor::pixelHitsPerLeg_
private

Definition at line 78 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

bool TrackSplittingMonitor::plotMuons_
private

Definition at line 77 of file TrackSplittingMonitor.h.

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

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

Definition at line 70 of file TrackSplittingMonitor.h.

Referenced by analyze().

edm::InputTag TrackSplittingMonitor::splitMuons_
private

Definition at line 73 of file TrackSplittingMonitor.h.

Referenced by TrackSplittingMonitor().

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

Definition at line 75 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

edm::InputTag TrackSplittingMonitor::splitTracks_
private

Definition at line 72 of file TrackSplittingMonitor.h.

Referenced by TrackSplittingMonitor().

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

Definition at line 74 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().

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

Definition at line 66 of file TrackSplittingMonitor.h.

Referenced by analyze().

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

Definition at line 67 of file TrackSplittingMonitor.h.

Referenced by analyze().

int TrackSplittingMonitor::totalHitsPerLeg_
private

Definition at line 79 of file TrackSplittingMonitor.h.

Referenced by analyze(), and TrackSplittingMonitor().