Skip to content

Commit

Permalink
Merge pull request #12924 from mtosi/from-CMSSW_8_0_0_pre4_newTrackCo…
Browse files Browse the repository at this point in the history
…llInDQM
  • Loading branch information
cmsbuild committed Jan 19, 2016
2 parents 701e018 + 0423c2e commit 6501b8d
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 5 deletions.
8 changes: 4 additions & 4 deletions DQM/TrackingMonitor/src/VertexMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ VertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
double bxlumi = 0.;
if ( doPlotsVsBXlumi_ )
bxlumi = lumiDetails_->getValue(iEvent);
std::cout << "bxlumi : " << bxlumi << std::endl;
// std::cout << "bxlumi : " << bxlumi << std::endl;

size_t totalNumPV = 0;
size_t totalNumBADndofPV = 0;
Expand All @@ -97,7 +97,7 @@ VertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
if ( pvHandle.isValid() )
{
totalNumPV = pvHandle->size();
std::cout << "totalNumPV : " << totalNumPV << std::endl;
// std::cout << "totalNumPV : " << totalNumPV << std::endl;
for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
pv != pvHandle->end(); ++pv) {
//--- count pv w/ ndof < 4
Expand All @@ -117,14 +117,14 @@ VertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
if ( selpvHandle.isValid() )
totalNumGoodPV = selpvHandle->size();
else return;
std::cout << "totalNumGoodPV: " << totalNumGoodPV << std::endl;
// std::cout << "totalNumGoodPV: " << totalNumGoodPV << std::endl;
if ( doPlotsVsGoodPVtx_ ) {
NumberOfPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumPV );
NumberOfBADndofPVtxVsGoodPVtx -> Fill( totalNumGoodPV, totalNumBADndofPV );
}

double fracGoodPV = double(totalNumGoodPV)/double(totalNumPV);
std::cout << "fracGoodPV: " << fracGoodPV << std::endl;
// std::cout << "fracGoodPV: " << fracGoodPV << std::endl;

NumberOfGoodPVtx -> Fill( totalNumGoodPV );
FractionOfGoodPVtx -> Fill( fracGoodPV );
Expand Down
93 changes: 92 additions & 1 deletion DQM/TrackingMonitorSource/python/TrackCollections2monitor_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,51 @@
mainfolderName = {}
vertexfolderName = {}
sequenceName = {}
trackPtN = {}
trackPtMin = {}
trackPtMax = {}
doPlotsPCA = {}
numCutString = {}
denCutString = {}
doGoodTracksPlots = {}
doTrackerSpecific = {}
doHitPropertiesPlots = {}
doGeneralPropertiesPlots = {}
doBeamSpotPlots = {}
doSeedParameterHistos = {}
doRecHitVsPhiVsEtaPerTrack = {}
doGoodTrackRecHitVsPhiVsEtaPerTrack = {}
doLayersVsPhiVsEtaPerTrack = {}
doGoodTrackLayersVsPhiVsEtaPerTrack = {}
doPUmonitoring = {}
doPlotsVsBXlumi = {}
doPlotsVsGoodPVtx = {}
doEffFromHitPattern = {}

selectedTracks = []

mainfolderName ['generalTracks'] = 'Tracking/TrackParameters/generalTracks'
vertexfolderName['generalTracks'] = 'Tracking/PrimaryVertices/generalTracks'
trackPtN ['generalTracks'] = cms.int32(100)
trackPtMin ['generalTracks'] = cms.double(0.)
trackPtMax ['generalTracks'] = cms.double(100.)
doPlotsPCA ['generalTracks'] = cms.bool(False)
numCutString ['generalTracks'] = cms.string("")
denCutString ['generalTracks'] = cms.string("")
doGoodTracksPlots ['generalTracks'] = cms.bool(True)
doTrackerSpecific ['generalTracks'] = cms.bool(True)
doHitPropertiesPlots ['generalTracks'] = cms.bool(True)
doGeneralPropertiesPlots ['generalTracks'] = cms.bool(True)
doBeamSpotPlots ['generalTracks'] = cms.bool(True)
doSeedParameterHistos ['generalTracks'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['generalTracks'] = cms.bool(True)
doPUmonitoring ['generalTracks'] = cms.bool(False)
doPlotsVsBXlumi ['generalTracks'] = cms.bool(False)
doPlotsVsGoodPVtx ['generalTracks'] = cms.bool(True)
doEffFromHitPattern ['generalTracks'] = cms.bool(True)

trackSelector = cms.EDFilter('TrackSelector',
src = cms.InputTag('generalTracks'),
Expand All @@ -31,33 +61,78 @@
sequenceName ['highPurityPtRange0to1'] = cms.Sequence(highPurityPtRange0to1)
mainfolderName ['highPurityPtRange0to1'] = 'Tracking/TrackParameters/highPurityTracks/pt_0to1'
vertexfolderName['highPurityPtRange0to1'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_0to1'
trackPtN ['highPurityPtRange0to1'] = cms.int32(10)
trackPtMin ['highPurityPtRange0to1'] = cms.double(0.)
trackPtMax ['highPurityPtRange0to1'] = cms.double(1.)
numCutString ['highPurityPtRange0to1'] = cms.string("") # default: " pt >= 1 & quality('highPurity') "
denCutString ['highPurityPtRange0to1'] = cms.string(" pt >= 0 & pt < 1 ") # it is as in the default config (just be sure)
doPlotsPCA ['highPurityPtRange0to1'] = cms.bool(False)
doGoodTracksPlots ['highPurityPtRange0to1'] = cms.bool(False)
doTrackerSpecific ['highPurityPtRange0to1'] = cms.bool(False)
doHitPropertiesPlots ['highPurityPtRange0to1'] = cms.bool(True)
doGeneralPropertiesPlots ['highPurityPtRange0to1'] = cms.bool(True)
doBeamSpotPlots ['highPurityPtRange0to1'] = cms.bool(True)
doSeedParameterHistos ['highPurityPtRange0to1'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(False)
doLayersVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPtRange0to1'] = cms.bool(False)
doPUmonitoring ['highPurityPtRange0to1'] = cms.bool(True)
doPlotsVsBXlumi ['highPurityPtRange0to1'] = cms.bool(False)
doPlotsVsGoodPVtx ['highPurityPtRange0to1'] = cms.bool(True)
doEffFromHitPattern ['highPurityPtRange0to1'] = cms.bool(False)

highPurityPtRange1to10 = trackSelector.clone()
highPurityPtRange1to10.cut = cms.string("quality('highPurity') & pt >= 1 & pt < 10 ")

sequenceName ['highPurityPtRange1to10'] = cms.Sequence( highPurityPtRange1to10 )
mainfolderName ['highPurityPtRange1to10'] = 'Tracking/TrackParameters/highPurityTracks/pt_1to10'
vertexfolderName['highPurityPtRange1to10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1to10'
trackPtN ['highPurityPtRange1to10'] = cms.int32(10)
trackPtMin ['highPurityPtRange1to10'] = cms.double(1.)
trackPtMax ['highPurityPtRange1to10'] = cms.double(10.)
numCutString ['highPurityPtRange1to10'] = cms.string("") # default: " pt >= 1 & quality('highPurity') "
denCutString ['highPurityPtRange1to10'] = cms.string(" pt >= 1 & pt < 10 ") # it is as in the default config (just be sure)

doGoodTracksPlots ['highPurityPtRange1to10'] = cms.bool(True)
doTrackerSpecific ['highPurityPtRange1to10'] = cms.bool(True)
doHitPropertiesPlots ['highPurityPtRange1to10'] = cms.bool(True)
doGeneralPropertiesPlots ['highPurityPtRange1to10'] = cms.bool(True)
doBeamSpotPlots ['highPurityPtRange1to10'] = cms.bool(True)
doSeedParameterHistos ['highPurityPtRange1to10'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPtRange1to10'] = cms.bool(True)
doPUmonitoring ['highPurityPtRange1to10'] = cms.bool(False)
doPlotsVsBXlumi ['highPurityPtRange1to10'] = cms.bool(False)
doPlotsVsGoodPVtx ['highPurityPtRange1to10'] = cms.bool(True)
doEffFromHitPattern ['highPurityPtRange1to10'] = cms.bool(True)

highPurityPt10 = trackSelector.clone()
highPurityPt10.cut = cms.string("quality('highPurity') & pt >= 10")

sequenceName ['highPurityPt10'] = cms.Sequence( highPurityPt10 )
mainfolderName ['highPurityPt10'] = 'Tracking/TrackParameters/highPurityTracks/pt_10'
vertexfolderName['highPurityPt10'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_10'
trackPtN ['highPurityPt10'] = cms.int32(100)
trackPtMin ['highPurityPt10'] = cms.double(10.)
trackPtMax ['highPurityPt10'] = cms.double(110.)
numCutString ['highPurityPt10'] = cms.string("") # default: " pt >= 1 & quality('highPurity') "
denCutString ['highPurityPt10'] = cms.string(" pt >= 10 ") # it is as in the default config (just be sure)
doGoodTracksPlots ['highPurityPt10'] = cms.bool(True)
doTrackerSpecific ['highPurityPt10'] = cms.bool(True)
doHitPropertiesPlots ['highPurityPt10'] = cms.bool(True)
doGeneralPropertiesPlots ['highPurityPt10'] = cms.bool(True)
doBeamSpotPlots ['highPurityPt10'] = cms.bool(True)
doSeedParameterHistos ['highPurityPt10'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPt10'] = cms.bool(True)
doPUmonitoring ['highPurityPt10'] = cms.bool(False)
doPlotsVsBXlumi ['highPurityPt10'] = cms.bool(False)
doPlotsVsGoodPVtx ['highPurityPt10'] = cms.bool(True)
doEffFromHitPattern ['highPurityPt10'] = cms.bool(True)


###### old monitored track collections
Expand All @@ -67,18 +142,34 @@
sequenceName ['highPurityPt1'] = cms.Sequence(highPurityPt1)
mainfolderName ['highPurityPt1'] = 'Tracking/TrackParameters/highPurityTracks/pt_1'
vertexfolderName['highPurityPt1'] = 'Tracking/PrimaryVertices/highPurityTracks/pt_1'
trackPtN ['highPurityPt1'] = cms.int32(100)
trackPtMin ['highPurityPt1'] = cms.double(0.)
trackPtMax ['highPurityPt1'] = cms.double(100.)
doPlotsPCA ['highPurityPt1'] = cms.bool(True)
numCutString ['highPurityPt1'] = cms.string("") # default: " pt >= 1 & quality('highPurity') "
denCutString ['highPurityPt1'] = cms.string(" pt >= 1 ") # it is as in the default config (just be sure)
doGoodTracksPlots ['highPurityPt1'] = cms.bool(True)
doTrackerSpecific ['highPurityPt1'] = cms.bool(True)
doHitPropertiesPlots ['highPurityPt1'] = cms.bool(True)
doGeneralPropertiesPlots ['highPurityPt1'] = cms.bool(True)
doBeamSpotPlots ['highPurityPt1'] = cms.bool(True)
doSeedParameterHistos ['highPurityPt1'] = cms.bool(False)
doRecHitVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doGoodTrackRecHitVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doLayersVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doGoodTrackLayersVsPhiVsEtaPerTrack ['highPurityPt1'] = cms.bool(True)
doPUmonitoring ['highPurityPt1'] = cms.bool(False)
doPlotsVsBXlumi ['highPurityPt1'] = cms.bool(False)
doPlotsVsGoodPVtx ['highPurityPt1'] = cms.bool(True)
doEffFromHitPattern ['highPurityPt1'] = cms.bool(True)

selectedTracks.extend( ['generalTracks'] )
#selectedTracks.extend( ['highPurityPtRange0to1'] )
#selectedTracks.extend( ['highPurityPtRange1to10'] )
#selectedTracks.extend( ['highPurityPt10'] )

selectedTracks.extend( ['highPurityPt1'] )
selectedTracks.extend( ['highPurityPtRange0to1'] )

#selectedTracks2runSequence=cms.Sequence()
#for tracks in selectedTracks :
Expand Down
32 changes: 32 additions & 0 deletions DQM/TrackingMonitorSource/python/TrackingSourceConfig_Tier0_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
locals()[label].FolderName = cms.string(mainfolderName[tracks])
locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
locals()[label].TrackPtMin = trackPtMin[tracks]
locals()[label].TrackPtBin = trackPtN[tracks]
locals()[label].TrackPtMax = trackPtMax[tracks]
locals()[label].TrackPBin = trackPtN[tracks]
locals()[label].TrackPMin = trackPtMin[tracks]
locals()[label].TrackPMax = trackPtMax[tracks]
locals()[label].doDCAPlots = doPlotsPCA[tracks]
Expand All @@ -26,6 +28,20 @@
locals()[label].doSIPPlots = doPlotsPCA[tracks]
locals()[label].numCut = numCutString[tracks]
locals()[label].denCut = denCutString[tracks]
locals()[label].doGoodTracksPlots = doGoodTracksPlots [tracks]
locals()[label].doTrackerSpecific = doTrackerSpecific [tracks]
locals()[label].doHitPropertiesPlots = doHitPropertiesPlots [tracks]
locals()[label].doGeneralPropertiesPlots = doGeneralPropertiesPlots [tracks]
locals()[label].doBeamSpotPlots = doBeamSpotPlots [tracks]
locals()[label].doSeedParameterHistos = doSeedParameterHistos [tracks]
locals()[label].doRecHitVsPhiVsEtaPerTrack = doRecHitVsPhiVsEtaPerTrack [tracks]
locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
locals()[label].doLayersVsPhiVsEtaPerTrack = doLayersVsPhiVsEtaPerTrack [tracks]
locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
locals()[label].doPUmonitoring = doPUmonitoring [tracks]
locals()[label].doPlotsVsBXlumi = doPlotsVsBXlumi [tracks]
locals()[label].doPlotsVsGoodPVtx = doPlotsVsGoodPVtx [tracks]
locals()[label].doEffFromHitPattern = doEffFromHitPattern [tracks]
locals()[label].setLabel(label)


Expand All @@ -35,7 +51,9 @@
locals()[label].FolderName = cms.string(mainfolderName[tracks])
locals()[label].PVFolderName = cms.string(vertexfolderName[tracks])
locals()[label].TrackPtMin = trackPtMin[tracks]
locals()[label].TrackPtBin = trackPtN[tracks]
locals()[label].TrackPtMax = trackPtMax[tracks]
locals()[label].TrackPBin = trackPtN[tracks]
locals()[label].TrackPMin = trackPtMin[tracks]
locals()[label].TrackPMax = trackPtMax[tracks]
locals()[label].doDCAPlots = doPlotsPCA[tracks]
Expand All @@ -44,6 +62,20 @@
locals()[label].doSIPPlots = doPlotsPCA[tracks]
locals()[label].numCut = numCutString[tracks]
locals()[label].denCut = denCutString[tracks]
locals()[label].doGoodTracksPlots = doGoodTracksPlots [tracks]
locals()[label].doTrackerSpecific = doTrackerSpecific [tracks]
locals()[label].doHitPropertiesPlots = doHitPropertiesPlots [tracks]
locals()[label].doGeneralPropertiesPlots = doGeneralPropertiesPlots [tracks]
locals()[label].doBeamSpotPlots = doBeamSpotPlots [tracks]
locals()[label].doSeedParameterHistos = doSeedParameterHistos [tracks]
locals()[label].doRecHitVsPhiVsEtaPerTrack = doRecHitVsPhiVsEtaPerTrack [tracks]
locals()[label].doGoodTrackRecHitVsPhiVsEtaPerTrack = doGoodTrackRecHitVsPhiVsEtaPerTrack [tracks]
locals()[label].doLayersVsPhiVsEtaPerTrack = doLayersVsPhiVsEtaPerTrack [tracks]
locals()[label].doGoodTrackLayersVsPhiVsEtaPerTrack = doGoodTrackLayersVsPhiVsEtaPerTrack [tracks]
locals()[label].doPUmonitoring = doPUmonitoring [tracks]
locals()[label].doPlotsVsBXlumi = doPlotsVsBXlumi [tracks]
locals()[label].doPlotsVsGoodPVtx = doPlotsVsGoodPVtx [tracks]
locals()[label].doEffFromHitPattern = doEffFromHitPattern [tracks]
locals()[label].setLabel(label)


Expand Down

0 comments on commit 6501b8d

Please sign in to comment.