diff --git a/[refs] b/[refs] index a7098a4899338..0a86194f8e9b2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/l1tmuon-upgrade-dev: da4beef1e275ffe4c1fb89e515c14dd436d190b4 +refs/heads/l1tmuon-upgrade-dev: 690a4df87fff6b3e45f825c46105474860e3ae0a diff --git a/trunk/DQMOffline/Alignment/interface/TkAlCaRecoMonitor.h b/trunk/DQMOffline/Alignment/interface/TkAlCaRecoMonitor.h index ce24f5302e704..e486743d01647 100644 --- a/trunk/DQMOffline/Alignment/interface/TkAlCaRecoMonitor.h +++ b/trunk/DQMOffline/Alignment/interface/TkAlCaRecoMonitor.h @@ -49,12 +49,17 @@ class TkAlCaRecoMonitor : public edm::EDAnalyzer { MonitorElement* jetPt_; MonitorElement* minJetDeltaR_; MonitorElement* minTrackDeltaR_; + MonitorElement* AlCaRecoTrackEfficiency_; //2D MonitorElement* Hits_ZvsR_; MonitorElement* Hits_XvsY_; bool fillInvariantMass_; bool runsOnReco_; + bool useSignedR_; + + edm::InputTag trackProducer_; + edm::InputTag referenceTrackProducer_; }; #endif diff --git a/trunk/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py b/trunk/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py index 9c62ba9c7a853..bf3229dd84fb8 100644 --- a/trunk/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py +++ b/trunk/DQMOffline/Alignment/python/ALCARECOTkAlDQM_cff.py @@ -144,7 +144,15 @@ TrackPtMin = cms.double(0), TrackPtMax = cms.double(500) ) -ALCARECOTkAlCosmicsCTF0TDQM = cms.Sequence( ALCARECOTkAlCosmicsCTF0TTrackingDQM ) +ALCARECOTkAlCosmicsCTF0TTkAlDQM = ALCARECOTkAlMinBiasTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName, + FolderName = 'TkAlCosmics', +# margins and settings + useSignedR = cms.bool(True) +) +ALCARECOTkAlCosmicsCTF0TDQM = cms.Sequence( ALCARECOTkAlCosmicsCTF0TTrackingDQM + ALCARECOTkAlCosmicsCTF0TTkAlDQM) ### TkAlCosmicsCosmicTF0T ### __selectionName = 'TkAlCosmicsCosmicTF0T' @@ -153,7 +161,12 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName ) -ALCARECOTkAlCosmicsCosmicTF0TDQM = cms.Sequence( ALCARECOTkAlCosmicsCosmicTF0TTrackingDQM ) +ALCARECOTkAlCosmicsCosmicTF0TTkAlDQM = ALCARECOTkAlCosmicsCTF0TTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName +) +ALCARECOTkAlCosmicsCosmicTF0TDQM = cms.Sequence( ALCARECOTkAlCosmicsCosmicTF0TTrackingDQM + ALCARECOTkAlCosmicsCosmicTF0TTkAlDQM ) ### TkAlCosmicsRS0T ### __selectionName = 'TkAlCosmicsRS0T' @@ -162,7 +175,12 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName ) -ALCARECOTkAlCosmicsRS0TDQM = cms.Sequence( ALCARECOTkAlCosmicsRS0TTrackingDQM ) +ALCARECOTkAlCosmicsRS0TTkAlDQM = ALCARECOTkAlCosmicsCTF0TTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName +) +ALCARECOTkAlCosmicsRS0TDQM = cms.Sequence( ALCARECOTkAlCosmicsRS0TTrackingDQM + ALCARECOTkAlCosmicsRS0TTkAlDQM) ### TkAlCosmicsCTF ### __selectionName = 'TkAlCosmicsCTF' @@ -171,7 +189,12 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName ) -ALCARECOTkAlCosmicsCTFDQM = cms.Sequence( ALCARECOTkAlCosmicsCTFTrackingDQM ) +ALCARECOTkAlCosmicsCTFTkAlDQM = ALCARECOTkAlCosmicsCTF0TTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName +) +ALCARECOTkAlCosmicsCTFDQM = cms.Sequence( ALCARECOTkAlCosmicsCTFTrackingDQM + ALCARECOTkAlCosmicsCTFTkAlDQM ) ### TkAlCosmicsCosmicTF ### __selectionName = 'TkAlCosmicsCosmicTF' @@ -180,7 +203,12 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName ) -ALCARECOTkAlCosmicsCosmicTFDQM = cms.Sequence( ALCARECOTkAlCosmicsCosmicTFTrackingDQM ) +ALCARECOTkAlCosmicsCosmicTFTkAlDQM = ALCARECOTkAlCosmicsCTF0TTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName +) +ALCARECOTkAlCosmicsCosmicTFDQM = cms.Sequence( ALCARECOTkAlCosmicsCosmicTFTrackingDQM + ALCARECOTkAlCosmicsCosmicTFTkAlDQM) ### TkAlCosmicsRS ### __selectionName = 'TkAlCosmicsRS' @@ -189,4 +217,9 @@ TrackProducer = 'ALCARECO'+__selectionName, AlgoName = 'ALCARECO'+__selectionName ) -ALCARECOTkAlCosmicsRSDQM = cms.Sequence( ALCARECOTkAlCosmicsRSTrackingDQM ) +ALCARECOTkAlCosmicsRSTkAlDQM = ALCARECOTkAlCosmicsCTF0TTkAlDQM.clone( +#names and desigantions + TrackProducer = 'ALCARECO'+__selectionName, + AlgoName = 'ALCARECO'+__selectionName +) +ALCARECOTkAlCosmicsRSDQM = cms.Sequence( ALCARECOTkAlCosmicsRSTrackingDQM + ALCARECOTkAlCosmicsRSTkAlDQM ) diff --git a/trunk/DQMOffline/Alignment/python/TkAlCaRecoMonitor_cfi.py b/trunk/DQMOffline/Alignment/python/TkAlCaRecoMonitor_cfi.py index 2a5b16b3a3992..6030a11a1a7ff 100644 --- a/trunk/DQMOffline/Alignment/python/TkAlCaRecoMonitor_cfi.py +++ b/trunk/DQMOffline/Alignment/python/TkAlCaRecoMonitor_cfi.py @@ -2,11 +2,17 @@ TkAlCaRecoMonitor = cms.EDAnalyzer("TkAlCaRecoMonitor", TrackProducer= cms.InputTag( "generalTracks" ), + ReferenceTrackProducer= cms.InputTag( "generalTracks" ), CaloJetCollection= cms.InputTag( "kt6CaloJets" ), AlgoName = cms.string("testTkAlCaReco"), MeasurementState = cms.string("default"),#All/OuterSurface/InnerSurface/ImpactPoint/default(track) runsOnReco = cms.bool(False), fillInvariantMass = cms.bool(False), + useSignedR = cms.bool(False), + # + TrackEfficiencyBin =cms.uint32(101), + TrackEfficiencyMin = cms.double(0.), + TrackEfficiencyMax = cms.double(1.01), # maxJetPt = cms.double(10), #GeV # @@ -26,8 +32,13 @@ MinTrackDeltaRMin = cms.double(0), MinTrackDeltaRMax = cms.double(3.2), # + HitMapsZBin = cms.uint32(300), + HitMapZMax = cms.double(300.), #cm + HitMapsRBin = cms.uint32(120), + HitMapRMax = cms.double(120.), #cm + # FolderName = cms.string("TkAlCaRecoMonitor"), - OutputMEsInRootFile = cms.bool(False), + OutputMEsInRootFile = cms.bool(True), OutputFileName = cms.string("MonitorTrack.root") ) diff --git a/trunk/DQMOffline/Alignment/src/TkAlCaRecoMonitor.cc b/trunk/DQMOffline/Alignment/src/TkAlCaRecoMonitor.cc index 6e4dd4b3a5528..4ea93ee35c771 100644 --- a/trunk/DQMOffline/Alignment/src/TkAlCaRecoMonitor.cc +++ b/trunk/DQMOffline/Alignment/src/TkAlCaRecoMonitor.cc @@ -35,6 +35,9 @@ void TkAlCaRecoMonitor::beginJob(edm::EventSetup const& iSetup) { std::string histname; //for naming the histograms according to algorithm used + trackProducer_ = conf_.getParameter("TrackProducer"); + referenceTrackProducer_ = conf_.getParameter("ReferenceTrackProducer"); + std::string AlgoName = conf_.getParameter("AlgoName"); std::string MEFolderName = conf_.getParameter("FolderName"); @@ -43,6 +46,7 @@ void TkAlCaRecoMonitor::beginJob(edm::EventSetup const& iSetup) { dqmStore_->setCurrentFolder(MEFolderName); fillInvariantMass_ = conf_.getParameter("fillInvariantMass"); runsOnReco_ = conf_.getParameter("runsOnReco"); + useSignedR_ = conf_.getParameter("useSignedR"); // unsigned int MassBin = conf_.getParameter("MassBin"); double MassMin = conf_.getParameter("MassMin"); @@ -77,15 +81,27 @@ void TkAlCaRecoMonitor::beginJob(edm::EventSetup const& iSetup) { histname = "MinTrackDeltaR_"; minTrackDeltaR_ = dqmStore_->book1D(histname+AlgoName, histname+AlgoName, MinTrackDeltaRBin, MinTrackDeltaRMin, MinTrackDeltaRMax); minTrackDeltaR_->setAxisTitle("minimal Track #DeltaR / rad"); + + unsigned int TrackEfficiencyBin = conf_.getParameter("TrackEfficiencyBin"); + double TrackEfficiencyMin = conf_.getParameter("TrackEfficiencyMin"); + double TrackEfficiencyMax = conf_.getParameter("TrackEfficiencyMax"); + + histname = "AlCaRecoTrackEfficiency_"; + AlCaRecoTrackEfficiency_ = dqmStore_->book1D(histname+AlgoName, histname+AlgoName, TrackEfficiencyBin, TrackEfficiencyMin, TrackEfficiencyMax); + AlCaRecoTrackEfficiency_->setAxisTitle("n("+trackProducer_.label()+") / n("+referenceTrackProducer_.label()+")"); + + int zBin = conf_.getParameter("HitMapsZBin"); //300 + double zMax = conf_.getParameter("HitMapZMax"); //300.0; //cm - int zBin = 300; - double zMax = 300.0; //cm - - int rBin = 120; - double rMax = 120.0; //cm + int rBin = conf_.getParameter("HitMapsRBin");//120; + double rMax = conf_.getParameter("HitMapRMax"); //120.0; //cm histname = "Hits_ZvsR_"; - Hits_ZvsR_ = dqmStore_->book2D(histname+AlgoName, histname+AlgoName, zBin, -zMax, zMax, rBin, 0.0, rMax); + double rMin = 0.0; + if( useSignedR_ ) + rMin = -rMax; + + Hits_ZvsR_ = dqmStore_->book2D(histname+AlgoName, histname+AlgoName, zBin, -zMax, zMax, rBin, rMin, rMax); histname = "Hits_XvsY_"; Hits_XvsY_ = dqmStore_->book2D(histname+AlgoName, histname+AlgoName, rBin, -rMax, rMax, rBin, -rMax, rMax); @@ -97,19 +113,19 @@ void TkAlCaRecoMonitor::beginJob(edm::EventSetup const& iSetup) { void TkAlCaRecoMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { using namespace edm; - InputTag trackProducer = conf_.getParameter("TrackProducer"); - Handle trackCollection; - iEvent.getByLabel(trackProducer, trackCollection); + iEvent.getByLabel(trackProducer_, trackCollection); if (!trackCollection.isValid()){ LogError("Alignment")<<"invalid trackcollection encountered!"; return; } - -// std::string recHitBuilderName = "WithTrackAngle"; -// edm::ESHandle recHitBuilderHandle; -// -// iSetup.get().get(recHitBuilderName,recHitBuilderHandle); + + Handle referenceTrackCollection; + iEvent.getByLabel(referenceTrackProducer_, referenceTrackCollection); + if (!trackCollection.isValid()){ + LogError("Alignment")<<"invalid reference track-collection encountered!"; + return; + } edm::ESHandle geometry; iSetup.get().get(geometry); @@ -125,6 +141,8 @@ void TkAlCaRecoMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& LogError("Alignment")<<"no jets found in event!"; } } + + AlCaRecoTrackEfficiency_->Fill( static_cast((*trackCollection).size()) / (*referenceTrackCollection).size() ); for( reco::TrackCollection::const_iterator track = (*trackCollection).begin(); track < (*trackCollection).end(); ++track ){ double dR = 0; @@ -151,6 +169,7 @@ void TkAlCaRecoMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& fillHitmaps( *track, *geometry ); //, recHitBuilderHandle } + if(fillInvariantMass_){ if((*trackCollection).size() == 2){ double theDaughterMass = 0.10565836; @@ -181,8 +200,10 @@ void TkAlCaRecoMonitor::fillHitmaps(const reco::Track &track, const TrackerGeome // The alternative would be the coarse estimation or a refit. //const GlobalPoint globP( gd->toGlobal( hit->localPosition() ) ); const GlobalPoint globP( gd->toGlobal( Local3DPoint(0.,0.,0.) ) ); - - Hits_ZvsR_->Fill( globP.z(), sqrt( globP.x()*globP.x() + globP.y()*globP.y() ) ); + double r = sqrt( globP.x()*globP.x() + globP.y()*globP.y() ); + if( useSignedR_ ) + r*= globP.y() / fabs( globP.y() ); + Hits_ZvsR_->Fill( globP.z(), r ); Hits_XvsY_->Fill( globP.x(), globP.y() ); }