#include <Validation/RecoMuon/src/RecoMuonValidator.h>
Public Member Functions | |
virtual void | analyze (const edm::Event &event, const edm::EventSetup &eventSetup) |
virtual void | beginJob (const edm::EventSetup &eventSetup) |
virtual void | endJob () |
RecoMuonValidator (const edm::ParameterSet &pset) | |
~RecoMuonValidator () | |
Protected Attributes | |
CommonME * | commonME_ |
bool | doAbsEta_ |
bool | doAssoc_ |
TrackAssociatorBase * | glbMuAssociator_ |
edm::InputTag | glbMuAssocLabel_ |
edm::InputTag | glbMuLabel_ |
MuonME * | glbMuME_ |
edm::InputTag | muonLabel_ |
std::string | outputFileName_ |
edm::InputTag | simLabel_ |
TrackAssociatorBase * | staMuAssociator_ |
edm::InputTag | staMuAssocLabel_ |
edm::InputTag | staMuLabel_ |
MuonME * | staMuME_ |
std::string | subDir_ |
DQMStore * | theDQM |
MuonServiceProxy * | theMuonService |
TrackingParticleSelector | tpSelector_ |
TrackAssociatorBase * | trkMuAssociator_ |
edm::InputTag | trkMuAssocLabel_ |
edm::InputTag | trkMuLabel_ |
MuonME * | trkMuME_ |
unsigned int | verbose_ |
Classes | |
struct | CommonME |
struct | MuonME |
Definition at line 19 of file RecoMuonValidator.h.
RecoMuonValidator::RecoMuonValidator | ( | const edm::ParameterSet & | pset | ) |
Definition at line 337 of file RecoMuonValidator.cc.
References DQMStore::book1D(), RecoMuonValidator::MuonME::bookHistograms(), DQMStore::bookString(), DQMStore::cd(), commonME_, doAbsEta_, doAssoc_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), glbMuAssocLabel_, glbMuLabel_, glbMuME_, RecoMuonValidator::CommonME::hNMuon_, RecoMuonValidator::CommonME::hNSim_, RecoMuonValidator::CommonME::hNSimHits_, RecoMuonValidator::CommonME::hSimEta_, RecoMuonValidator::CommonME::hSimP_, RecoMuonValidator::CommonME::hSimPhi_, RecoMuonValidator::CommonME::hSimPt_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHits_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHits_, edm::InputTag::instance(), edm::InputTag::label(), muonLabel_, MuonServiceProxy_cff::MuonServiceProxy, outputFileName_, Pi, DQMStore::setCurrentFolder(), DQMStore::showDirStructure(), simLabel_, staMuAssocLabel_, staMuLabel_, staMuME_, subDir_, theDQM, theMuonService, tpSelector_, trkMuAssocLabel_, trkMuLabel_, trkMuME_, and verbose_.
00338 { 00339 verbose_ = pset.getUntrackedParameter<unsigned int>("verbose", 0); 00340 00341 outputFileName_ = pset.getUntrackedParameter<string>("outputFileName", ""); 00342 00343 // Set histogram dimensions 00344 HistoDimensions hDim; 00345 00346 hDim.nBinP = pset.getUntrackedParameter<unsigned int>("nBinP"); 00347 hDim.minP = pset.getUntrackedParameter<double>("minP"); 00348 hDim.maxP = pset.getUntrackedParameter<double>("maxP"); 00349 00350 hDim.nBinPt = pset.getUntrackedParameter<unsigned int>("nBinPt"); 00351 hDim.minPt = pset.getUntrackedParameter<double>("minPt"); 00352 hDim.maxPt = pset.getUntrackedParameter<double>("maxPt"); 00353 00354 doAbsEta_ = pset.getUntrackedParameter<bool>("doAbsEta"); 00355 hDim.doAbsEta = doAbsEta_; 00356 hDim.nBinEta = pset.getUntrackedParameter<unsigned int>("nBinEta"); 00357 hDim.minEta = pset.getUntrackedParameter<double>("minEta"); 00358 hDim.maxEta = pset.getUntrackedParameter<double>("maxEta"); 00359 00360 hDim.nBinPhi = pset.getUntrackedParameter<unsigned int>("nBinPhi"); 00361 hDim.minPhi = pset.getUntrackedParameter<double>("minPhi", -TMath::Pi()); 00362 hDim.maxPhi = pset.getUntrackedParameter<double>("maxPhi", TMath::Pi()); 00363 00364 hDim.nBinErr = pset.getUntrackedParameter<unsigned int>("nBinErr"); 00365 hDim.nBinPull = pset.getUntrackedParameter<unsigned int>("nBinPull"); 00366 00367 hDim.wPull = pset.getUntrackedParameter<double>("wPull"); 00368 00369 hDim.minErrP = pset.getUntrackedParameter<double>("minErrP"); 00370 hDim.maxErrP = pset.getUntrackedParameter<double>("maxErrP"); 00371 00372 hDim.minErrPt = pset.getUntrackedParameter<double>("minErrPt"); 00373 hDim.maxErrPt = pset.getUntrackedParameter<double>("maxErrPt"); 00374 00375 hDim.minErrQPt = pset.getUntrackedParameter<double>("minErrQPt"); 00376 hDim.maxErrQPt = pset.getUntrackedParameter<double>("maxErrQPt"); 00377 00378 hDim.minErrEta = pset.getUntrackedParameter<double>("minErrEta"); 00379 hDim.maxErrEta = pset.getUntrackedParameter<double>("maxErrEta"); 00380 00381 hDim.minErrPhi = pset.getUntrackedParameter<double>("minErrPhi"); 00382 hDim.maxErrPhi = pset.getUntrackedParameter<double>("maxErrPhi"); 00383 00384 hDim.minErrDxy = pset.getUntrackedParameter<double>("minErrDxy"); 00385 hDim.maxErrDxy = pset.getUntrackedParameter<double>("maxErrDxy"); 00386 00387 hDim.minErrDz = pset.getUntrackedParameter<double>("minErrDz" ); 00388 hDim.maxErrDz = pset.getUntrackedParameter<double>("maxErrDz" ); 00389 00390 hDim.nTrks = pset.getUntrackedParameter<unsigned int>("nTrks"); 00391 hDim.nAssoc = pset.getUntrackedParameter<unsigned int>("nAssoc"); 00392 hDim.nDof = pset.getUntrackedParameter<unsigned int>("nDof", 55); 00393 00394 // Labels for simulation and reconstruction tracks 00395 simLabel_ = pset.getParameter<InputTag>("simLabel" ); 00396 trkMuLabel_ = pset.getParameter<InputTag>("trkMuLabel"); 00397 staMuLabel_ = pset.getParameter<InputTag>("staMuLabel"); 00398 glbMuLabel_ = pset.getParameter<InputTag>("glbMuLabel"); 00399 muonLabel_ = pset.getParameter<InputTag>("muonLabel"); 00400 00401 // Labels for sim-reco association 00402 doAssoc_ = pset.getUntrackedParameter<bool>("doAssoc", true); 00403 trkMuAssocLabel_ = pset.getParameter<InputTag>("trkMuAssocLabel"); 00404 staMuAssocLabel_ = pset.getParameter<InputTag>("staMuAssocLabel"); 00405 glbMuAssocLabel_ = pset.getParameter<InputTag>("glbMuAssocLabel"); 00406 00407 // seedPropagatorName_ = pset.getParameter<string>("SeedPropagator"); 00408 00409 ParameterSet tpset = pset.getParameter<ParameterSet>("tpSelector"); 00410 tpSelector_ = TrackingParticleSelector(tpset.getParameter<double>("ptMin"), 00411 tpset.getParameter<double>("minRapidity"), 00412 tpset.getParameter<double>("maxRapidity"), 00413 tpset.getParameter<double>("tip"), 00414 tpset.getParameter<double>("lip"), 00415 tpset.getParameter<int>("minHit"), 00416 tpset.getParameter<bool>("signalOnly"), 00417 tpset.getParameter<bool>("chargedOnly"), 00418 tpset.getParameter<std::vector<int> >("pdgId")); 00419 00420 // the service parameters 00421 ParameterSet serviceParameters 00422 = pset.getParameter<ParameterSet>("ServiceParameters"); 00423 theMuonService = new MuonServiceProxy(serviceParameters); 00424 00425 // retrieve the instance of DQMService 00426 theDQM = 0; 00427 theDQM = Service<DQMStore>().operator->(); 00428 00429 if ( ! theDQM ) { 00430 LogError("RecoMuonValidator") << "DQMService not initialized\n"; 00431 return; 00432 } 00433 00434 subDir_ = pset.getUntrackedParameter<string>("subDir"); 00435 if ( subDir_.empty() ) subDir_ = "RecoMuonV"; 00436 if ( subDir_[subDir_.size()-1] == '/' ) subDir_.erase(subDir_.size()-1); 00437 00438 // book histograms 00439 theDQM->cd(); 00440 00441 theDQM->setCurrentFolder(subDir_+"/Muons"); 00442 00443 commonME_ = new CommonME; 00444 trkMuME_ = new MuonME; 00445 staMuME_ = new MuonME; 00446 glbMuME_ = new MuonME; 00447 00448 commonME_->hSimP_ = theDQM->book1D("SimP" , "p of simTracks" , hDim.nBinP , hDim.minP , hDim.maxP ); 00449 commonME_->hSimPt_ = theDQM->book1D("SimPt" , "p_{T} of simTracks", hDim.nBinPt , hDim.minPt , hDim.maxPt ); 00450 commonME_->hSimEta_ = theDQM->book1D("SimEta", "#eta of simTracks" , hDim.nBinEta, hDim.minEta, hDim.maxEta); 00451 commonME_->hSimPhi_ = theDQM->book1D("SimPhi", "#phi of simTracks" , hDim.nBinPhi, hDim.minPhi, hDim.maxPhi); 00452 00453 commonME_->hNSim_ = theDQM->book1D("NSim" , "Number of particles per event", hDim.nTrks, 0, hDim.nTrks); 00454 commonME_->hNMuon_ = theDQM->book1D("NMuon", "Number of muons per event" , hDim.nTrks, 0, hDim.nTrks); 00455 00456 const int nHits = 40; 00457 commonME_->hNSimHits_ = theDQM->book1D("NSimHits", "Number of simHits", nHits, 0, nHits); 00458 00459 commonME_->hTrkToGlbDiffNTrackerHits_ = theDQM->book1D("TrkGlbDiffNTrackerHits", "Difference of number of tracker hits (tkMuon - globalMuon)", nHits/4, 0, nHits); 00460 commonME_->hStaToGlbDiffNMuonHits_ = theDQM->book1D("StaGlbDiffNMuonHits", "Difference of number of muon hits (staMuon - globalMuon", nHits/4, 0, nHits); 00461 00462 // - histograms on tracking variables 00463 theDQM->setCurrentFolder(subDir_+"/Trk"); 00464 theDQM->bookString("TrackLabel", trkMuLabel_.label()+"_"+trkMuLabel_.instance()); 00465 theDQM->bookString("AssocLabel", trkMuAssocLabel_.label()); 00466 00467 theDQM->setCurrentFolder(subDir_+"/Sta"); 00468 theDQM->bookString("TrackLabel", staMuLabel_.label()+"_"+staMuLabel_.instance()); 00469 theDQM->bookString("AssocLabel", staMuAssocLabel_.label()); 00470 00471 theDQM->setCurrentFolder(subDir_+"/Glb"); 00472 theDQM->bookString("TrackLabel", glbMuLabel_.label()+"_"+glbMuLabel_.instance()); 00473 theDQM->bookString("AssocLabel", glbMuAssocLabel_.label()); 00474 00475 trkMuME_->bookHistograms(theDQM, subDir_+"/Trk", hDim); 00476 staMuME_->bookHistograms(theDQM, subDir_+"/Sta", hDim); 00477 glbMuME_->bookHistograms(theDQM, subDir_+"/Glb", hDim); 00478 00479 if ( verbose_ > 0 ) theDQM->showDirStructure(); 00480 00481 }
RecoMuonValidator::~RecoMuonValidator | ( | ) |
Definition at line 483 of file RecoMuonValidator.cc.
References theMuonService.
00484 { 00485 if ( theMuonService ) delete theMuonService; 00486 }
void RecoMuonValidator::analyze | ( | const edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 515 of file RecoMuonValidator.cc.
References TrackAssociatorBase::associateRecoToSim(), TrackAssociatorBase::associateSimToReco(), edm::View< T >::begin(), commonME_, doAbsEta_, doAssoc_, edm::AssociationMap< Tag >::end(), edm::View< T >::end(), RecoMuonValidator::MuonME::fill(), edm::AssociationMap< Tag >::find(), edm::Ref< C, T, F >::get(), glbMuAssociator_, glbMuAssocLabel_, glbMuLabel_, glbMuME_, RecoMuonValidator::CommonME::hNMuon_, RecoMuonValidator::MuonME::hNMuonHits_, RecoMuonValidator::MuonME::hNMuonHits_vs_Eta_, RecoMuonValidator::MuonME::hNMuonHits_vs_Pt_, RecoMuonValidator::CommonME::hNSim_, RecoMuonValidator::CommonME::hNSimHits_, RecoMuonValidator::MuonME::hNSimToReco_, RecoMuonValidator::MuonME::hNTrackerHits_, RecoMuonValidator::MuonME::hNTrackerHits_vs_Eta_, RecoMuonValidator::MuonME::hNTrackerHits_vs_Pt_, RecoMuonValidator::MuonME::hNTrks_, RecoMuonValidator::MuonME::hNTrksEta_, RecoMuonValidator::MuonME::hNTrksPt_, RecoMuonValidator::CommonME::hSimEta_, RecoMuonValidator::CommonME::hSimP_, RecoMuonValidator::CommonME::hSimPhi_, RecoMuonValidator::CommonME::hSimPt_, RecoMuonValidator::CommonME::hStaToGlbDiffNMuonHits_, RecoMuonValidator::CommonME::hTrkToGlbDiffNTrackerHits_, i, muonColl, muonLabel_, edm::Handle< T >::product(), simLabel_, edm::View< T >::size(), staMuAssociator_, staMuAssocLabel_, staMuLabel_, staMuME_, theDQM, tpSelector_, trkMuAssociator_, trkMuAssocLabel_, trkMuLabel_, and trkMuME_.
00516 { 00517 if ( ! theDQM ) { 00518 LogError("RecoMuonValidator") << "DQMService not initialized\n"; 00519 return; 00520 } 00521 00522 // Get TrackingParticles 00523 Handle<TrackingParticleCollection> simHandle; 00524 event.getByLabel(simLabel_, simHandle); 00525 const TrackingParticleCollection simColl = *(simHandle.product()); 00526 00527 // Get Muon Tracks 00528 Handle<View<Track> > trkMuHandle; 00529 event.getByLabel(trkMuLabel_, trkMuHandle); 00530 View<Track> trkMuColl = *(trkMuHandle.product()); 00531 00532 Handle<View<Track> > staMuHandle; 00533 event.getByLabel(staMuLabel_, staMuHandle); 00534 View<Track> staMuColl = *(staMuHandle.product()); 00535 00536 Handle<View<Track> > glbMuHandle; 00537 event.getByLabel(glbMuLabel_, glbMuHandle); 00538 View<Track> glbMuColl = *(glbMuHandle.product()); 00539 00540 // Get Muons 00541 Handle<View<Muon> > muonHandle; 00542 event.getByLabel(muonLabel_, muonHandle); 00543 View<Muon> muonColl = *(muonHandle.product()); 00544 00545 // Get Association maps 00546 SimToRecoCollection simToTrkMuColl; 00547 SimToRecoCollection simToStaMuColl; 00548 SimToRecoCollection simToGlbMuColl; 00549 00550 RecoToSimCollection trkMuToSimColl; 00551 RecoToSimCollection staMuToSimColl; 00552 RecoToSimCollection glbMuToSimColl; 00553 00554 if ( doAssoc_ ) { 00555 // SimToReco associations 00556 simToTrkMuColl = trkMuAssociator_->associateSimToReco(trkMuHandle, simHandle, &event); 00557 simToStaMuColl = staMuAssociator_->associateSimToReco(staMuHandle, simHandle, &event); 00558 simToGlbMuColl = glbMuAssociator_->associateSimToReco(glbMuHandle, simHandle, &event); 00559 00560 // // RecoToSim associations 00561 trkMuToSimColl = trkMuAssociator_->associateRecoToSim(trkMuHandle, simHandle, &event); 00562 staMuToSimColl = staMuAssociator_->associateRecoToSim(staMuHandle, simHandle, &event); 00563 glbMuToSimColl = glbMuAssociator_->associateRecoToSim(glbMuHandle, simHandle, &event); 00564 } 00565 else { 00566 // SimToReco associations 00567 Handle<SimToRecoCollection> simToTrkMuHandle; 00568 event.getByLabel(trkMuAssocLabel_, simToTrkMuHandle); 00569 simToTrkMuColl = *(simToTrkMuHandle.product()); 00570 00571 Handle<SimToRecoCollection> simToStaMuHandle; 00572 event.getByLabel(staMuAssocLabel_, simToStaMuHandle); 00573 simToStaMuColl = *(simToStaMuHandle.product()); 00574 00575 Handle<SimToRecoCollection> simToGlbMuHandle; 00576 event.getByLabel(glbMuAssocLabel_, simToGlbMuHandle); 00577 simToGlbMuColl = *(simToGlbMuHandle.product()); 00578 00579 // RecoToSim associations 00580 Handle<RecoToSimCollection> trkMuToSimHandle; 00581 event.getByLabel(trkMuAssocLabel_, trkMuToSimHandle); 00582 trkMuToSimColl = *(trkMuToSimHandle.product()); 00583 00584 Handle<RecoToSimCollection> staMuToSimHandle; 00585 event.getByLabel(staMuAssocLabel_, staMuToSimHandle); 00586 staMuToSimColl = *(staMuToSimHandle.product()); 00587 00588 Handle<RecoToSimCollection> glbMuToSimHandle; 00589 event.getByLabel(glbMuAssocLabel_, glbMuToSimHandle); 00590 glbMuToSimColl = *(glbMuToSimHandle.product()); 00591 } 00592 00593 const TrackingParticleCollection::size_type nSim = simColl.size(); 00594 commonME_->hNSim_->Fill(nSim); 00595 00596 commonME_->hNMuon_->Fill(muonColl.size()); 00597 00598 trkMuME_->hNTrks_->Fill(trkMuColl.size()); 00599 staMuME_->hNTrks_->Fill(staMuColl.size()); 00600 glbMuME_->hNTrks_->Fill(glbMuColl.size()); 00601 00602 // Analyzer reco::Muon 00603 for(View<Muon>::const_iterator iMuon = muonColl.begin(); 00604 iMuon != muonColl.end(); ++iMuon) { 00605 int trkNTrackerHits = 0, glbNTrackerHits = 0; 00606 int staNMuonHits = 0, glbNMuonHits = 0; 00607 00608 if ( iMuon->isTrackerMuon() ) { 00609 const TrackRef trkTrack = iMuon->track(); 00610 00611 trkNTrackerHits = trkTrack->hitPattern().numberOfValidTrackerHits(); 00612 00613 trkMuME_->hNTrackerHits_->Fill(trkNTrackerHits); 00614 trkMuME_->hNTrackerHits_vs_Pt_->Fill(trkTrack->pt(), trkNTrackerHits); 00615 trkMuME_->hNTrackerHits_vs_Eta_->Fill(trkTrack->eta(), trkNTrackerHits); 00616 } 00617 00618 if ( iMuon->isStandAloneMuon() ) { 00619 const TrackRef staTrack = iMuon->standAloneMuon(); 00620 00621 staNMuonHits = staTrack->recHitsSize(); 00622 00623 staMuME_->hNMuonHits_->Fill(staNMuonHits); 00624 staMuME_->hNMuonHits_vs_Pt_->Fill(staTrack->pt(), staNMuonHits); 00625 staMuME_->hNMuonHits_vs_Eta_->Fill(staTrack->eta(), staNMuonHits); 00626 00627 staMuME_->hNTrksEta_->Fill(staTrack->eta()); 00628 staMuME_->hNTrksPt_->Fill(staTrack->pt()); 00629 00630 } 00631 00632 if ( iMuon->isGlobalMuon() ) { 00633 const TrackRef glbTrack = iMuon->combinedMuon(); 00634 00635 glbNTrackerHits = glbTrack->hitPattern().numberOfValidTrackerHits(); 00636 glbNMuonHits = glbTrack->hitPattern().numberOfValidMuonHits(); 00637 00638 glbMuME_->hNTrackerHits_->Fill(glbNTrackerHits); 00639 glbMuME_->hNTrackerHits_vs_Pt_->Fill(glbTrack->pt(), glbNTrackerHits); 00640 glbMuME_->hNTrackerHits_vs_Eta_->Fill(glbTrack->eta(), glbNTrackerHits); 00641 00642 glbMuME_->hNMuonHits_->Fill(glbNMuonHits); 00643 glbMuME_->hNMuonHits_vs_Pt_->Fill(glbTrack->pt(), glbNMuonHits); 00644 glbMuME_->hNMuonHits_vs_Eta_->Fill(glbTrack->eta(), glbNMuonHits); 00645 00646 glbMuME_->hNTrksEta_->Fill(glbTrack->eta()); 00647 glbMuME_->hNTrksPt_->Fill(glbTrack->pt()); 00648 00649 } 00650 00651 commonME_->hTrkToGlbDiffNTrackerHits_->Fill(trkNTrackerHits-glbNTrackerHits); 00652 commonME_->hStaToGlbDiffNMuonHits_->Fill(staNMuonHits-glbNMuonHits); 00653 } 00654 00655 // Analyzer reco::Track 00656 for(TrackingParticleCollection::size_type i=0; i<nSim; i++) { 00657 TrackingParticleRef simRef(simHandle, i); 00658 const TrackingParticle* simTP = simRef.get(); 00659 if ( ! tpSelector_(*simTP) ) continue; 00660 00661 const double simP = simRef->p(); 00662 const double simPt = simRef->pt(); 00663 const double simEta = doAbsEta_ ? fabs(simRef->eta()) : simRef->eta(); 00664 const double simPhi = simRef->phi(); 00665 00666 const unsigned int nSimHits = simRef->pSimHit_end() - simRef->pSimHit_begin(); 00667 00668 commonME_->hSimP_ ->Fill(simP ); 00669 commonME_->hSimPt_ ->Fill(simPt ); 00670 commonME_->hSimEta_->Fill(simEta); 00671 commonME_->hSimPhi_->Fill(simPhi); 00672 00673 commonME_->hNSimHits_->Fill(nSimHits); 00674 00675 // Get sim-reco association for a simRef 00676 vector<pair<RefToBase<Track>, double> > trkMuRefV, staMuRefV, glbMuRefV; 00677 if ( simToTrkMuColl.find(simRef) != simToTrkMuColl.end() ) { 00678 trkMuRefV = simToTrkMuColl[simRef]; 00679 00680 trkMuME_->hNSimToReco_->Fill(trkMuRefV.size()); 00681 if ( ! trkMuRefV.empty() ) { 00682 const Track* trkMuTrack = trkMuRefV.begin()->first.get(); 00683 // const double assocQuality = trkMuRefV.begin()->second; 00684 00685 trkMuME_->fill(simTP, trkMuTrack); 00686 } 00687 } 00688 00689 if ( simToStaMuColl.find(simRef) != simToStaMuColl.end() ) { 00690 staMuRefV = simToStaMuColl[simRef]; 00691 00692 staMuME_->hNSimToReco_->Fill(staMuRefV.size()); 00693 if ( ! staMuRefV.empty() ) { 00694 const Track* staMuTrack = staMuRefV.begin()->first.get(); 00695 // const double assocQuality = staMuRefV.begin().second; 00696 00697 staMuME_->fill(simTP, staMuTrack); 00698 } 00699 } 00700 00701 if ( simToGlbMuColl.find(simRef) != simToGlbMuColl.end() ) { 00702 glbMuRefV = simToGlbMuColl[simRef]; 00703 00704 glbMuME_->hNSimToReco_->Fill(glbMuRefV.size()); 00705 if ( ! glbMuRefV.empty() ) { 00706 const Track* glbMuTrack = glbMuRefV.begin()->first.get(); 00707 // const double assocQuality = glbMuRefV.begin().second; 00708 00709 glbMuME_->fill(simTP, glbMuTrack); 00710 } 00711 } 00712 } 00713 }
void RecoMuonValidator::beginJob | ( | const edm::EventSetup & | eventSetup | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 488 of file RecoMuonValidator.cc.
References doAssoc_, edm::EventSetup::get(), glbMuAssociator_, glbMuAssocLabel_, edm::InputTag::label(), edm::ESHandle< T >::product(), staMuAssociator_, staMuAssocLabel_, theMuonService, trkMuAssociator_, and trkMuAssocLabel_.
00489 { 00490 if ( theMuonService ) theMuonService->update(eventSetup); 00491 00492 trkMuAssociator_ = 0; 00493 staMuAssociator_ = 0; 00494 glbMuAssociator_ = 0; 00495 if ( doAssoc_ ) { 00496 ESHandle<TrackAssociatorBase> trkMuAssocHandle; 00497 eventSetup.get<TrackAssociatorRecord>().get(trkMuAssocLabel_.label(), trkMuAssocHandle); 00498 trkMuAssociator_ = const_cast<TrackAssociatorBase*>(trkMuAssocHandle.product()); 00499 00500 ESHandle<TrackAssociatorBase> staMuAssocHandle; 00501 eventSetup.get<TrackAssociatorRecord>().get(staMuAssocLabel_.label(), staMuAssocHandle); 00502 staMuAssociator_ = const_cast<TrackAssociatorBase*>(staMuAssocHandle.product()); 00503 00504 ESHandle<TrackAssociatorBase> glbMuAssocHandle; 00505 eventSetup.get<TrackAssociatorRecord>().get(glbMuAssocLabel_.label(), glbMuAssocHandle); 00506 glbMuAssociator_ = const_cast<TrackAssociatorBase*>(glbMuAssocHandle.product()); 00507 } 00508 }
Reimplemented from edm::EDAnalyzer.
Definition at line 510 of file RecoMuonValidator.cc.
References outputFileName_, DQMStore::save(), and theDQM.
00511 { 00512 if ( theDQM && ! outputFileName_.empty() ) theDQM->save(outputFileName_); 00513 }
CommonME* RecoMuonValidator::commonME_ [protected] |
Definition at line 57 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
bool RecoMuonValidator::doAbsEta_ [protected] |
Definition at line 48 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
bool RecoMuonValidator::doAssoc_ [protected] |
Definition at line 49 of file RecoMuonValidator.h.
Referenced by analyze(), beginJob(), and RecoMuonValidator().
TrackAssociatorBase * RecoMuonValidator::glbMuAssociator_ [protected] |
edm::InputTag RecoMuonValidator::glbMuAssocLabel_ [protected] |
Definition at line 40 of file RecoMuonValidator.h.
Referenced by analyze(), beginJob(), and RecoMuonValidator().
edm::InputTag RecoMuonValidator::glbMuLabel_ [protected] |
Definition at line 35 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
MuonME * RecoMuonValidator::glbMuME_ [protected] |
Definition at line 54 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
edm::InputTag RecoMuonValidator::muonLabel_ [protected] |
Definition at line 36 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
std::string RecoMuonValidator::outputFileName_ [protected] |
edm::InputTag RecoMuonValidator::simLabel_ [protected] |
Definition at line 32 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
TrackAssociatorBase * RecoMuonValidator::staMuAssociator_ [protected] |
edm::InputTag RecoMuonValidator::staMuAssocLabel_ [protected] |
Definition at line 39 of file RecoMuonValidator.h.
Referenced by analyze(), beginJob(), and RecoMuonValidator().
edm::InputTag RecoMuonValidator::staMuLabel_ [protected] |
Definition at line 34 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
MuonME * RecoMuonValidator::staMuME_ [protected] |
Definition at line 54 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
std::string RecoMuonValidator::subDir_ [protected] |
DQMStore* RecoMuonValidator::theDQM [protected] |
Definition at line 46 of file RecoMuonValidator.h.
Referenced by analyze(), endJob(), and RecoMuonValidator().
MuonServiceProxy* RecoMuonValidator::theMuonService [protected] |
Definition at line 45 of file RecoMuonValidator.h.
Referenced by beginJob(), RecoMuonValidator(), and ~RecoMuonValidator().
Definition at line 51 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
TrackAssociatorBase* RecoMuonValidator::trkMuAssociator_ [protected] |
edm::InputTag RecoMuonValidator::trkMuAssocLabel_ [protected] |
Definition at line 38 of file RecoMuonValidator.h.
Referenced by analyze(), beginJob(), and RecoMuonValidator().
edm::InputTag RecoMuonValidator::trkMuLabel_ [protected] |
Definition at line 33 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
MuonME* RecoMuonValidator::trkMuME_ [protected] |
Definition at line 54 of file RecoMuonValidator.h.
Referenced by analyze(), and RecoMuonValidator().
unsigned int RecoMuonValidator::verbose_ [protected] |