#include <DQM/TrackerMonitorTrack/src/TrackingMonitor.cc>
Monitoring source for general quantities related to tracks.
Definition at line 32 of file TrackingMonitor.h.
TrackingMonitor::TrackingMonitor | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 43 of file TrackingMonitor.cc.
: dqmStore_( edm::Service<DQMStore>().operator->() ) , conf_ ( iConfig ) , theTrackAnalyzer( new TrackAnalyzer(conf_) ) , theTrackBuildingAnalyzer( new TrackBuildingAnalyzer(conf_) ) , NumberOfTracks(NULL) , NumberOfMeanRecHitsPerTrack(NULL) , NumberOfMeanLayersPerTrack(NULL) , NumberOfGoodTracks(NULL) , FractionOfGoodTracks(NULL) , NumberOfSeeds(NULL) , NumberOfTrackCandidates(NULL) , GoodTracksFractionVsLS(NULL) , GoodTracksNumberOfRecHitsPerTrackVsLS(NULL) , builderName( conf_.getParameter<std::string>("TTRHBuilder")) , doTrackerSpecific_( conf_.getParameter<bool>("doTrackerSpecific") ) , doLumiAnalysis( conf_.getParameter<bool>("doLumiAnalysis")) , doProfilesVsLS_( conf_.getParameter<bool>("doProfilesVsLS")) , doAllPlots( conf_.getParameter<bool>("doAllPlots")) , doGeneralPropertiesPlots_( conf_.getParameter<bool>("doGeneralPropertiesPlots")) , doHitPropertiesPlots_( conf_.getParameter<bool>("doHitPropertiesPlots")) , genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig)) { }
TrackingMonitor::~TrackingMonitor | ( | ) |
Definition at line 69 of file TrackingMonitor.cc.
References genTriggerEventFlag_, theTrackAnalyzer, and theTrackBuildingAnalyzer.
{ if (theTrackAnalyzer) delete theTrackAnalyzer; if (theTrackBuildingAnalyzer) delete theTrackBuildingAnalyzer; if (genTriggerEventFlag_) delete genTriggerEventFlag_; }
void TrackingMonitor::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDAnalyzer.
Definition at line 334 of file TrackingMonitor.cc.
References GenericTriggerEventFlag::accept(), TrackAnalyzer::analyze(), TrackBuildingAnalyzer::analyze(), bsSrc, builderName, ClusterLabels, conf_, doAllPlots, doAllSeedPlots, doGeneralPropertiesPlots_, doProfilesVsLS_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, MonitorElement::Fill(), cropTnPTrees::frac, FractionOfGoodTracks, genTriggerEventFlag_, edm::EventSetup::get(), edm::Event::getByLabel(), edm::ParameterSet::getParameter(), GoodTracksFractionVsLS, GoodTracksNumberOfRecHitsPerTrackVsLS, reco::TrackBase::highPurity, i, edm::EventBase::id(), edm::HandleBase::isValid(), reco::TrackBase::loose, edm::EventID::luminosityBlock(), NumberOfGoodTracks, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfPixelClus, NumberOfSeeds, NumberOfStripClus, NumberOfTrackCandidates, NumberOfTracks, NumberOfTrkVsClus, GenericTriggerEventFlag::on(), RatioOfPixelAndStripClus, runTrackBuildingAnalyzerForSeed, SeedsVsClusters, setNclus(), edm::View< T >::size(), theTrackAnalyzer, theTrackBuildingAnalyzer, theTTRHBuilder, and reco::TrackBase::tight.
{ // Filter out events if Trigger Filtering is requested if (genTriggerEventFlag_->on()&& ! genTriggerEventFlag_->accept( iEvent, iSetup) ) return; // input tags for collections from the configuration edm::InputTag trackProducer = conf_.getParameter<edm::InputTag>("TrackProducer"); edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer"); edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer"); edm::InputTag bsSrc = conf_.getParameter<edm::InputTag>("beamSpot"); std::string Quality = conf_.getParameter<std::string>("Quality"); std::string Algo = conf_.getParameter<std::string>("AlgoName"); // Analyse the tracks // if the collection is empty, do not fill anything // ---------------------------------------------------------------------------------// // get the track collection edm::Handle<reco::TrackCollection> trackHandle; iEvent.getByLabel(trackProducer, trackHandle); if (trackHandle.isValid()) { reco::TrackCollection trackCollection = *trackHandle; // calculate the mean # rechits and layers int totalNumTracks = 0, totalRecHits = 0, totalLayers = 0; int totalNumHPTracks = 0, totalNumPt1Tracks = 0, totalNumHPPt1Tracks = 0; for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track) { if( track->quality(reco::TrackBase::highPurity) ) { ++totalNumHPTracks; if ( track->pt() >= 1. ) { ++totalNumHPPt1Tracks; if ( doProfilesVsLS_ || doAllPlots) GoodTracksNumberOfRecHitsPerTrackVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),track->recHitsSize()); } } if ( track->pt() >= 1. ) ++totalNumPt1Tracks; if( Quality == "highPurity") { if( !track->quality(reco::TrackBase::highPurity) ) continue; } else if( Quality == "tight") { if( !track->quality(reco::TrackBase::tight) ) continue; } else if( Quality == "loose") { if( !track->quality(reco::TrackBase::loose) ) continue; } totalNumTracks++; totalRecHits += track->found(); totalLayers += track->hitPattern().trackerLayersWithMeasurement(); // do analysis per track theTrackAnalyzer->analyze(iEvent, iSetup, *track); } if (doGeneralPropertiesPlots_ || doAllPlots){ NumberOfTracks->Fill(totalNumTracks); NumberOfGoodTracks->Fill(totalNumHPPt1Tracks); } double frac = 0.; if (totalNumPt1Tracks > 0) frac = static_cast<double>(totalNumHPPt1Tracks)/static_cast<double>(totalNumPt1Tracks); if (doGeneralPropertiesPlots_ || doAllPlots) FractionOfGoodTracks->Fill(frac); if ( doProfilesVsLS_ || doAllPlots) GoodTracksFractionVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),frac); if (doGeneralPropertiesPlots_ || doAllPlots){ if( totalNumTracks > 0 ) { double meanRecHits = static_cast<double>(totalRecHits) / static_cast<double>(totalNumTracks); double meanLayers = static_cast<double>(totalLayers) / static_cast<double>(totalNumTracks); NumberOfMeanRecHitsPerTrack->Fill(meanRecHits); NumberOfMeanLayersPerTrack->Fill(meanLayers); } } // Analyse the Track Building variables // if the collection is empty, do not fill anything // ---------------------------------------------------------------------------------// // fill the TrackCandidate info if (doTkCandPlots) { // magnetic field edm::ESHandle<MagneticField> theMF; iSetup.get<IdealMagneticFieldRecord>().get(theMF); // get the beam spot edm::Handle<reco::BeamSpot> recoBeamSpotHandle; iEvent.getByLabel(bsSrc,recoBeamSpotHandle); const reco::BeamSpot& bs = *recoBeamSpotHandle; // get the candidate collection edm::Handle<TrackCandidateCollection> theTCHandle; iEvent.getByLabel(tcProducer, theTCHandle ); const TrackCandidateCollection& theTCCollection = *theTCHandle; if (theTCHandle.isValid()) { NumberOfTrackCandidates->Fill(theTCCollection.size()); iSetup.get<TransientRecHitRecord>().get(builderName,theTTRHBuilder); for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand) { theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *cand, bs, theMF, theTTRHBuilder); } } else { edm::LogWarning("TrackingMonitor") << "No Track Candidates in the event. Not filling associated histograms"; } } //plots for trajectory seeds if (doAllSeedPlots || doSeedNumberPlot || doSeedVsClusterPlot || runTrackBuildingAnalyzerForSeed){ // get the seed collection edm::Handle<edm::View<TrajectorySeed> > seedHandle; iEvent.getByLabel(seedProducer, seedHandle); const edm::View<TrajectorySeed>& seedCollection = *seedHandle; // fill the seed info if (seedHandle.isValid()) { if(doAllSeedPlots || doSeedNumberPlot) NumberOfSeeds->Fill(seedCollection.size()); if(doAllSeedPlots || doSeedVsClusterPlot){ std::vector<int> NClus; setNclus(iEvent,NClus); for (uint i=0; i< ClusterLabels.size(); i++){ SeedsVsClusters[i]->Fill(NClus[i],seedCollection.size()); } } if (doAllSeedPlots || runTrackBuildingAnalyzerForSeed){ //here duplication of mag field and be informations is needed to allow seed and track cand histos to be independent // magnetic field edm::ESHandle<MagneticField> theMF; iSetup.get<IdealMagneticFieldRecord>().get(theMF); // get the beam spot edm::Handle<reco::BeamSpot> recoBeamSpotHandle; iEvent.getByLabel(bsSrc,recoBeamSpotHandle); const reco::BeamSpot& bs = *recoBeamSpotHandle; iSetup.get<TransientRecHitRecord>().get(builderName,theTTRHBuilder); for(size_t i=0; i < seedHandle->size(); ++i) { edm::RefToBase<TrajectorySeed> seed(seedHandle, i); theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *seed, bs, theMF, theTTRHBuilder); } } } else { edm::LogWarning("TrackingMonitor") << "No Trajectory seeds in the event. Not filling associated histograms"; } } if (doTrackerSpecific_ || doAllPlots) { edm::Handle< edmNew::DetSetVector<SiStripCluster> > strip_clusters; iEvent.getByLabel("siStripClusters", strip_clusters); edm::Handle< edmNew::DetSetVector<SiPixelCluster> > pixel_clusters; iEvent.getByLabel("siPixelClusters", pixel_clusters); if (strip_clusters.isValid() && pixel_clusters.isValid()) { unsigned int ncluster_pix = (*pixel_clusters).dataSize(); unsigned int ncluster_strip = (*strip_clusters).dataSize(); double ratio = 0.0; if ( ncluster_pix > 0) ratio = atan(ncluster_pix*1.0/ncluster_strip); NumberOfStripClus->Fill(ncluster_strip); NumberOfPixelClus->Fill(ncluster_pix); RatioOfPixelAndStripClus->Fill(ratio); NumberOfTrkVsClus->Fill(totalNumTracks, ncluster_strip+ncluster_pix); } } } else { return; } }
void TrackingMonitor::beginJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 77 of file TrackingMonitor.cc.
References TrackAnalyzer::beginJob(), TrackBuildingAnalyzer::beginJob(), DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), ClusterLabels, conf_, doAllPlots, doAllSeedPlots, doGeneralPropertiesPlots_, doLumiAnalysis, doProfilesVsLS_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, dqmStore_, FractionOfGoodTracks, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), GoodTracksFractionVsLS, GoodTracksNumberOfRecHitsPerTrackVsLS, histname, i, edm::InputTag::label(), NumberOfGoodTracks, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfPixelClus, NumberOfSeeds, NumberOfStripClus, NumberOfTrackCandidates, NumberOfTracks, NumberOfTrkVsClus, RatioOfPixelAndStripClus, runTrackBuildingAnalyzerForSeed, SeedsVsClusters, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), TrackAnalyzer::setLumiFlag(), MonitorElement::setLumiFlag(), setMaxMinBin(), theTrackAnalyzer, and theTrackBuildingAnalyzer.
{ // parameters from the configuration std::string Quality = conf_.getParameter<std::string>("Quality"); std::string AlgoName = conf_.getParameter<std::string>("AlgoName"); std::string MEFolderName = conf_.getParameter<std::string>("FolderName"); // test for the Quality veriable validity if( Quality != "") { if( Quality != "highPurity" && Quality != "tight" && Quality != "loose") { edm::LogWarning("TrackingMonitor") << "Qualty Name is invalid, using no quality criterea by default"; Quality = ""; } } // use the AlgoName and Quality Name std::string CatagoryName = Quality != "" ? AlgoName + "_" + Quality : AlgoName; // get binning from the configuration int TKNoBin = conf_.getParameter<int>( "TkSizeBin"); double TKNoMin = conf_.getParameter<double>("TkSizeMin"); double TKNoMax = conf_.getParameter<double>("TkSizeMax"); int TCNoBin = conf_.getParameter<int>( "TCSizeBin"); double TCNoMin = conf_.getParameter<double>("TCSizeMin"); double TCNoMax = conf_.getParameter<double>("TCSizeMax"); int TKNoSeedBin = conf_.getParameter<int>( "TkSeedSizeBin"); double TKNoSeedMin = conf_.getParameter<double>("TkSeedSizeMin"); double TKNoSeedMax = conf_.getParameter<double>("TkSeedSizeMax"); int MeanHitBin = conf_.getParameter<int>( "MeanHitBin"); double MeanHitMin = conf_.getParameter<double>("MeanHitMin"); double MeanHitMax = conf_.getParameter<double>("MeanHitMax"); int MeanLayBin = conf_.getParameter<int>( "MeanLayBin"); double MeanLayMin = conf_.getParameter<double>("MeanLayMin"); double MeanLayMax = conf_.getParameter<double>("MeanLayMax"); int LSBin = conf_.getParameter<int>( "LSBin"); int LSMin = conf_.getParameter<double>("LSMin"); int LSMax = conf_.getParameter<double>("LSMax"); std::string StateName = conf_.getParameter<std::string>("MeasurementState"); if ( StateName != "OuterSurface" && StateName != "InnerSurface" && StateName != "ImpactPoint" && StateName != "default" && StateName != "All" ) { // print warning edm::LogWarning("TrackingMonitor") << "State Name is invalid, using 'ImpactPoint' by default"; } dqmStore_->setCurrentFolder(MEFolderName); // book the General Property histograms // ---------------------------------------------------------------------------------// if (doGeneralPropertiesPlots_ || doAllPlots){ dqmStore_->setCurrentFolder(MEFolderName+"/GeneralProperties"); histname = "NumberOfTracks_" + CatagoryName; NumberOfTracks = dqmStore_->book1D(histname, histname, TKNoBin, TKNoMin, TKNoMax); NumberOfTracks->setAxisTitle("Number of Tracks per Event", 1); NumberOfTracks->setAxisTitle("Number of Events", 2); histname = "NumberOfMeanRecHitsPerTrack_" + CatagoryName; NumberOfMeanRecHitsPerTrack = dqmStore_->book1D(histname, histname, MeanHitBin, MeanHitMin, MeanHitMax); NumberOfMeanRecHitsPerTrack->setAxisTitle("Mean number of RecHits per Track", 1); NumberOfMeanRecHitsPerTrack->setAxisTitle("Entries", 2); histname = "NumberOfMeanLayersPerTrack_" + CatagoryName; NumberOfMeanLayersPerTrack = dqmStore_->book1D(histname, histname, MeanLayBin, MeanLayMin, MeanLayMax); NumberOfMeanLayersPerTrack->setAxisTitle("Mean number of Layers per Track", 1); NumberOfMeanLayersPerTrack->setAxisTitle("Entries", 2); histname = "NumberOfGoodTracks_" + CatagoryName; NumberOfGoodTracks = dqmStore_->book1D(histname, histname, TKNoBin, TKNoMin, TKNoMax); NumberOfGoodTracks->setAxisTitle("Number of Good Tracks per Event", 1); NumberOfGoodTracks->setAxisTitle("Number of Events", 2); histname = "FractionOfGoodTracks_" + CatagoryName; FractionOfGoodTracks = dqmStore_->book1D(histname, histname, 101, -0.005, 1.005); FractionOfGoodTracks->setAxisTitle("Fraction of High Purity Tracks (Tracks with Pt>1GeV)", 1); FractionOfGoodTracks->setAxisTitle("Entries", 2); } // book profile plots vs LS : //--------------------------- if ( doProfilesVsLS_ || doAllPlots) { histname = "GoodTracksFractionVsLS_"+ CatagoryName; GoodTracksFractionVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax,0,1.1,""); GoodTracksFractionVsLS->getTH1()->SetBit(TH1::kCanRebin); GoodTracksFractionVsLS->setAxisTitle("#Lumi section",1); GoodTracksFractionVsLS->setAxisTitle("Fraction of Good Tracks",2); histname = "GoodTracksNumberOfRecHitsPerTrackVsLS_" + CatagoryName; GoodTracksNumberOfRecHitsPerTrackVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax,0.,40.,""); GoodTracksNumberOfRecHitsPerTrackVsLS->getTH1()->SetBit(TH1::kCanRebin); GoodTracksNumberOfRecHitsPerTrackVsLS->setAxisTitle("#Lumi section",1); GoodTracksNumberOfRecHitsPerTrackVsLS->setAxisTitle("Mean number of RecHits per Good track",2); } theTrackAnalyzer->beginJob(dqmStore_); // book the Seed Property histograms // ---------------------------------------------------------------------------------// dqmStore_->setCurrentFolder(MEFolderName+"/TrackBuilding"); doAllSeedPlots=conf_.getParameter<bool>("doSeedParameterHistos"); doSeedNumberPlot=conf_.getParameter<bool>("doSeedNumberHisto"); doSeedVsClusterPlot=conf_.getParameter<bool>("doSeedVsClusterHisto"); // if (doAllPlots) doAllSeedPlots=true; runTrackBuildingAnalyzerForSeed=(doAllSeedPlots || conf_.getParameter<bool>("doSeedPTHisto") ||conf_.getParameter<bool>("doSeedETAHisto") || conf_.getParameter<bool>("doSeedPHIHisto") || conf_.getParameter<bool>("doSeedPHIVsETAHisto") || conf_.getParameter<bool>("doSeedThetaHisto") || conf_.getParameter<bool>("doSeedQHisto") || conf_.getParameter<bool>("doSeedDxyHisto") || conf_.getParameter<bool>("doSeedDzHisto") || conf_.getParameter<bool>("doSeedNRecHitsHisto") || conf_.getParameter<bool>("doSeedNVsPhiProf")|| conf_.getParameter<bool>("doSeedNVsEtaProf")); edm::InputTag seedProducer = conf_.getParameter<edm::InputTag>("SeedProducer"); if (doAllSeedPlots || doSeedNumberPlot){ histname = "NumberOfSeeds_"+ seedProducer.label() + "_"+ CatagoryName; NumberOfSeeds = dqmStore_->book1D(histname, histname, TKNoSeedBin, TKNoSeedMin, TKNoSeedMax); NumberOfSeeds->setAxisTitle("Number of Seeds per Event", 1); NumberOfSeeds->setAxisTitle("Number of Events", 2); } if (doAllSeedPlots || doSeedVsClusterPlot){ ClusterLabels= conf_.getParameter<std::vector<std::string> >("ClusterLabels"); std::vector<double> histoMin,histoMax; std::vector<int> histoBin; //these vectors are for max min and nbins in histograms int NClusPxBin = conf_.getParameter<int>( "NClusPxBin"); double NClusPxMin = conf_.getParameter<double>("NClusPxMin"); double NClusPxMax = conf_.getParameter<double>("NClusPxMax"); int NClusStrBin = conf_.getParameter<int>( "NClusStrBin"); double NClusStrMin = conf_.getParameter<double>("NClusStrMin"); double NClusStrMax = conf_.getParameter<double>("NClusStrMax"); setMaxMinBin(histoMin,histoMax,histoBin,NClusStrMin,NClusStrMax,NClusStrBin,NClusPxMin,NClusPxMax,NClusPxBin); for (uint i=0; i<ClusterLabels.size(); i++){ histname = "SeedsVsClusters_" + seedProducer.label() + "_Vs_" + ClusterLabels[i] + "_" + CatagoryName; SeedsVsClusters.push_back(dynamic_cast<MonitorElement*>(dqmStore_->book2D(histname, histname, histoBin[i], histoMin[i], histoMax[i], TKNoSeedBin, TKNoSeedMin, TKNoSeedMax))); SeedsVsClusters[i]->setAxisTitle("Number of Clusters", 1); SeedsVsClusters[i]->setAxisTitle("Number of Seeds", 2); } } doTkCandPlots=conf_.getParameter<bool>("doTrackCandHistos"); // if (doAllPlots) doTkCandPlots=true; if (doTkCandPlots){ edm::InputTag tcProducer = conf_.getParameter<edm::InputTag>("TCProducer"); histname = "NumberOfTrackCandidates_"+ tcProducer.label() + "_"+ CatagoryName; NumberOfTrackCandidates = dqmStore_->book1D(histname, histname, TCNoBin, TCNoMin, TCNoMax); NumberOfTrackCandidates->setAxisTitle("Number of Track Candidates per Event", 1); NumberOfTrackCandidates->setAxisTitle("Number of Event", 2); } theTrackBuildingAnalyzer->beginJob(dqmStore_); if (doLumiAnalysis) { if (NumberOfTracks) NumberOfTracks->setLumiFlag(); if (NumberOfGoodTracks) NumberOfGoodTracks->setLumiFlag(); if (FractionOfGoodTracks) FractionOfGoodTracks->setLumiFlag(); theTrackAnalyzer->setLumiFlag(); } if (doTrackerSpecific_ || doAllPlots) { int NClusPxBin = conf_.getParameter<int>( "NClusPxBin"); double NClusPxMin = conf_.getParameter<double>("NClusPxMin"); double NClusPxMax = conf_.getParameter<double>("NClusPxMax"); int NClusStrBin = conf_.getParameter<int>( "NClusStrBin"); double NClusStrMin = conf_.getParameter<double>("NClusStrMin"); double NClusStrMax = conf_.getParameter<double>("NClusStrMax"); int NClus2DTotBin = conf_.getParameter<int>( "NClus2DTotBin"); double NClus2DTotMin = conf_.getParameter<double>("NClus2DTotMin"); double NClus2DTotMax = conf_.getParameter<double>("NClus2DTotMax"); int NTrk2DBin = conf_.getParameter<int>( "NTrk2DBin"); double NTrk2DMin = conf_.getParameter<double>("NTrk2DMin"); double NTrk2DMax = conf_.getParameter<double>("NTrk2DMax"); dqmStore_->setCurrentFolder(MEFolderName+"/HitProperties"); histname = "NumberOfClustersInPixel_" + CatagoryName; NumberOfPixelClus = dqmStore_->book1D(histname, histname, NClusPxBin, NClusPxMin, NClusPxMax); NumberOfPixelClus->setAxisTitle("# of Clusters in Pixel", 1); NumberOfPixelClus->setAxisTitle("Number of Events", 2); histname = "NumberOfClustersInStrip_" + CatagoryName; NumberOfStripClus = dqmStore_->book1D(histname, histname, NClusStrBin, NClusStrMin, NClusStrMax); NumberOfStripClus->setAxisTitle("# of Clusters in Strip Detectors", 1); NumberOfStripClus->setAxisTitle("Number of Events", 2); histname = "RatioOfPixelAndStripClusters_" + CatagoryName; RatioOfPixelAndStripClus = dqmStore_->book1D(histname, histname, 100, 0.0, 1.6); RatioOfPixelAndStripClus->setAxisTitle("ArcTan(PixelCluster/StripClusters)", 1); RatioOfPixelAndStripClus->setAxisTitle("Number of Events", 2); histname = "TracksVsClusters_" + CatagoryName; NumberOfTrkVsClus = dqmStore_->book2D(histname,histname,NTrk2DBin,NTrk2DMin,NTrk2DMax, NClus2DTotBin,NClus2DTotMin,NClus2DTotMax); NumberOfTrkVsClus->setAxisTitle("Number of Tracks", 1); NumberOfTrkVsClus->setAxisTitle("# of Clusters in (Pixel+Strip) Detectors", 2); } }
void TrackingMonitor::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumi, |
const edm::EventSetup & | eSetup | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 322 of file TrackingMonitor.cc.
References doLumiAnalysis, TrackAnalyzer::doSoftReset(), dqmStore_, FractionOfGoodTracks, NumberOfGoodTracks, NumberOfTracks, DQMStore::softReset(), and theTrackAnalyzer.
void TrackingMonitor::beginRun | ( | const edm::Run & | iRun, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 313 of file TrackingMonitor.cc.
References genTriggerEventFlag_, GenericTriggerEventFlag::initRun(), and GenericTriggerEventFlag::on().
{ // Initialize the GenericTriggerEventFlag if ( genTriggerEventFlag_->on() ) genTriggerEventFlag_->initRun( iRun, iSetup ); }
void TrackingMonitor::doProfileX | ( | TH2 * | th2, |
MonitorElement * | me | ||
) | [private] |
void TrackingMonitor::doProfileX | ( | MonitorElement * | th2m, |
MonitorElement * | me | ||
) | [private] |
void TrackingMonitor::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 548 of file TrackingMonitor.cc.
References conf_, dqmStore_, edm::ParameterSet::getParameter(), dumpDBToFile_GT_ttrig_cfg::outputFileName, DQMStore::save(), and DQMStore::showDirStructure().
{ bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile"); std::string outputFileName = conf_.getParameter<std::string>("OutputFileName"); if(outputMEsInRootFile) { dqmStore_->showDirStructure(); dqmStore_->save(outputFileName); } }
void TrackingMonitor::endRun | ( | const edm::Run & | , |
const edm::EventSetup & | |||
) | [virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 537 of file TrackingMonitor.cc.
References DQMStore::disableSoftReset(), doLumiAnalysis, dqmStore_, FractionOfGoodTracks, NumberOfGoodTracks, NumberOfTracks, theTrackAnalyzer, and TrackAnalyzer::undoSoftReset().
void TrackingMonitor::setMaxMinBin | ( | std::vector< double > & | arrayMin, |
std::vector< double > & | arrayMax, | ||
std::vector< int > & | arrayBin, | ||
double | smin, | ||
double | smax, | ||
int | sbin, | ||
double | pmin, | ||
double | pmax, | ||
int | pbin | ||
) | [virtual] |
Definition at line 559 of file TrackingMonitor.cc.
References ClusterLabels, EcalCondTools::compare(), and i.
Referenced by beginJob().
{ arrayMin.resize(ClusterLabels.size()); arrayMax.resize(ClusterLabels.size()); arrayBin.resize(ClusterLabels.size()); for (uint i=0; i<ClusterLabels.size(); ++i){ if (ClusterLabels[i].compare("Pix")==0) {arrayMin[i]=pmin; arrayMax[i]=pmax; arrayBin[i]=pbin;} else if(ClusterLabels[i].compare("Strip")==0){arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;} else if(ClusterLabels[i].compare("Tot")==0){arrayMin[i]=smin; arrayMax[i]=smax+pmax; arrayBin[i]=sbin;} else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined, using strip parameters "; arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;} } }
void TrackingMonitor::setNclus | ( | const edm::Event & | iEvent, |
std::vector< int > & | arrayNclus | ||
) | [virtual] |
Definition at line 577 of file TrackingMonitor.cc.
References ClusterLabels, EcalCondTools::compare(), edm::Event::getByLabel(), i, and edm::HandleBase::isValid().
Referenced by analyze().
{ int ncluster_pix=-1; int ncluster_strip=-1; edm::Handle< edmNew::DetSetVector<SiStripCluster> > strip_clusters; iEvent.getByLabel("siStripClusters", strip_clusters); edm::Handle< edmNew::DetSetVector<SiPixelCluster> > pixel_clusters; iEvent.getByLabel("siPixelClusters", pixel_clusters); if (strip_clusters.isValid() && pixel_clusters.isValid()) { ncluster_pix = (*pixel_clusters).dataSize(); ncluster_strip = (*strip_clusters).dataSize(); } arrayNclus.resize(ClusterLabels.size()); for (uint i=0; i<ClusterLabels.size(); ++i){ if (ClusterLabels[i].compare("Pix")==0) arrayNclus[i]=ncluster_pix ; else if(ClusterLabels[i].compare("Strip")==0) arrayNclus[i]=ncluster_strip; else if(ClusterLabels[i].compare("Tot")==0)arrayNclus[i]=ncluster_pix+ncluster_strip; else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined using stri parametrs "; arrayNclus[i]=ncluster_strip ;} } }
edm::InputTag TrackingMonitor::bsSrc [private] |
Definition at line 61 of file TrackingMonitor.h.
Referenced by analyze().
std::string TrackingMonitor::builderName [private] |
Definition at line 94 of file TrackingMonitor.h.
Referenced by analyze().
std::vector<std::string> TrackingMonitor::ClusterLabels [private] |
Definition at line 78 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), setMaxMinBin(), and setNclus().
edm::ParameterSet TrackingMonitor::conf_ [private] |
Definition at line 58 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), and endJob().
bool TrackingMonitor::doAllPlots [private] |
Definition at line 101 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doAllSeedPlots [private] |
Definition at line 100 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doDCAPlots_ [private] |
Definition at line 102 of file TrackingMonitor.h.
bool TrackingMonitor::doGeneralPropertiesPlots_ [private] |
Definition at line 103 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doHitPropertiesPlots_ [private] |
Definition at line 104 of file TrackingMonitor.h.
bool TrackingMonitor::doLumiAnalysis [private] |
Definition at line 98 of file TrackingMonitor.h.
Referenced by beginJob(), beginLuminosityBlock(), and endRun().
bool TrackingMonitor::doProfilesVsLS_ [private] |
Definition at line 99 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doSeedNumberPlot [private] |
Definition at line 106 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doSeedVsClusterPlot [private] |
Definition at line 107 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doTkCandPlots [private] |
Definition at line 105 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::doTrackerSpecific_ [private] |
Definition at line 97 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
DQMStore* TrackingMonitor::dqmStore_ [private] |
Definition at line 57 of file TrackingMonitor.h.
Referenced by beginJob(), beginLuminosityBlock(), endJob(), and endRun().
Definition at line 73 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), beginLuminosityBlock(), and endRun().
Definition at line 110 of file TrackingMonitor.h.
Referenced by analyze(), beginRun(), and ~TrackingMonitor().
Definition at line 91 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
Definition at line 92 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
std::string TrackingMonitor::histname [private] |
Definition at line 55 of file TrackingMonitor.h.
Referenced by beginJob().
Definition at line 72 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), beginLuminosityBlock(), and endRun().
Definition at line 69 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
Definition at line 68 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
MonitorElement* TrackingMonitor::NumberOfPixelClus [private] |
Definition at line 85 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
MonitorElement* TrackingMonitor::NumberOfSeeds [private] |
Definition at line 76 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
MonitorElement* TrackingMonitor::NumberOfStripClus [private] |
Definition at line 86 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
Definition at line 82 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
MonitorElement* TrackingMonitor::NumberOfTracks [private] |
Definition at line 67 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), beginLuminosityBlock(), and endRun().
MonitorElement* TrackingMonitor::NumberOfTrkVsClus [private] |
Definition at line 88 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
Definition at line 87 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
bool TrackingMonitor::runTrackBuildingAnalyzerForSeed [private] |
Definition at line 108 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
std::vector<MonitorElement *> TrackingMonitor::SeedsVsClusters [private] |
Definition at line 77 of file TrackingMonitor.h.
Referenced by analyze(), and beginJob().
TrackAnalyzer* TrackingMonitor::theTrackAnalyzer [private] |
Definition at line 63 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), beginLuminosityBlock(), endRun(), and ~TrackingMonitor().
Definition at line 64 of file TrackingMonitor.h.
Referenced by analyze(), beginJob(), and ~TrackingMonitor().
Definition at line 95 of file TrackingMonitor.h.
Referenced by analyze().