Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to disable DDU trigger plots in DT DQM Online Trigger checks … #16739

Merged
merged 10 commits into from Feb 1, 2017
Expand Up @@ -13,4 +13,6 @@
folderRoot = cms.untracked.string('')
)

from Configuration.Eras.Modifier_run2_25ns_specific_cff import run2_25ns_specific
run2_25ns_specific.toModify( triggerEfficiencyTest,hwSources = cms.untracked.vstring('TM') )

4 changes: 3 additions & 1 deletion DQM/DTMonitorClient/python/dtLocalTriggerTest_cfi.py
Expand Up @@ -6,7 +6,7 @@
# run in online environment
runOnline = cms.untracked.bool(True),
# kind of trigger data processed by DTLocalTriggerTask
hwSources = cms.untracked.vstring('TM','DDU','COM'),
hwSources = cms.untracked.vstring('TM','DDU'),
# false if DTLocalTriggerTask used LTC digis
localrun = cms.untracked.bool(True),
# root folder for booking of histograms
Expand All @@ -25,4 +25,6 @@

)

from Configuration.Eras.Modifier_run2_25ns_specific_cff import run2_25ns_specific
run2_25ns_specific.toModify( triggerTest,hwSources = cms.untracked.vstring('TM') )

2 changes: 2 additions & 0 deletions DQM/DTMonitorClient/python/dtTriggerEfficiencyTest_cfi.py
Expand Up @@ -15,4 +15,6 @@
detailedAnalysis = cms.untracked.bool(False)
)

from Configuration.Eras.Modifier_run2_25ns_specific_cff import run2_25ns_specific
run2_25ns_specific.toModify( triggerEffTest,hwSources = cms.untracked.vstring('TM') )

21 changes: 0 additions & 21 deletions DQM/DTMonitorClient/src/DTLocalTriggerTest.cc
Expand Up @@ -82,15 +82,6 @@ void DTLocalTriggerTest::Bookings(DQMStore::IBooker & ibooker, DQMStore::IGetter
bookWheelHistos(ibooker,wh,"CorrFractionPhi");
bookWheelHistos(ibooker,wh,"2ndFractionPhi");
bookWheelHistos(ibooker,wh,"TriggerInclusivePhi");
bookWheelHistos(ibooker,wh,"CorrectBXTheta");
// Changed after TM implementation, now we have always Theta information
// Changed 11/10/2916 M.C Fouz
/*
if (hwSource=="DDU") {
bookWheelHistos(ibooker,wh,"HFractionTheta");
}
*/
bookWheelHistos(ibooker,wh,"HFractionTheta");
}
}
}
Expand Down Expand Up @@ -197,25 +188,14 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker & ibooker, DQMSto
}
}
else {
// Changed by M.C.Fouz (11/10/2016)
// Perform TM/DDU common plot analysis (Phi ones)
// This was changed for DQM after TM IN but, in the Modules Source part, they are not defined as *_In
// and the histograms are not being filled, renamed with the same names as the modules
/*
TH2F * BXvsQual = getHisto<TH2F>(igetter.get(getMEName("BXvsQual_In","LocalTriggerPhiIn", chId)));
TH1F * BestQual = getHisto<TH1F>(igetter.get(getMEName("BestQual_In","LocalTriggerPhiIn", chId)));
TH2F * Flag1stvsQual = getHisto<TH2F>(igetter.get(getMEName("Flag1stvsQual_In","LocalTriggerPhiIn", chId)));
*/
TH2F * BXvsQual = getHisto<TH2F>(igetter.get(getMEName("BXvsQual","LocalTriggerPhiIn", chId)));
TH1F * BestQual = getHisto<TH1F>(igetter.get(getMEName("BestQual","LocalTriggerPhiIn", chId)));
TH2F * Flag1stvsQual = getHisto<TH2F>(igetter.get(getMEName("Flag1stvsQual","LocalTriggerPhiIn", chId)));
if (BXvsQual && Flag1stvsQual && BestQual) {

int corrSummary = 1;
int secondSummary = 1;

if (BestQual->GetEntries()>1) {

TH1D* BXHH = BXvsQual->ProjectionY("",6,7,"");
TH1D* Flag1st = Flag1stvsQual->ProjectionY();
int BXOK_bin = BXHH->GetEntries()>=1 ? BXHH->GetMaximumBin() : 51;
Expand Down Expand Up @@ -287,7 +267,6 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker & ibooker, DQMSto
innerME->find(fullName("CorrFractionPhi"))->second->setBinContent(sect,stat,corrFrac);
innerME->find(fullName("TriggerInclusivePhi"))->second->setBinContent(sect,stat,besttrigs);
innerME->find(fullName("2ndFractionPhi"))->second->setBinContent(sect,stat,secondFrac);

}

whME[wh].find(fullName("CorrFractionSummary"))->second->setBinContent(sect,stat,corrSummary);
Expand Down
23 changes: 14 additions & 9 deletions DQM/DTMonitorModule/python/dtDQMOfflineSources_Cosmics_cff.py
@@ -1,8 +1,8 @@
import FWCore.ParameterSet.Config as cms

from DQM.DTMonitorModule.dtChamberEfficiency_Cosmics_cfi import *
from DQM.DTMonitorModule.dtDCSByLumiTask_cfi import *
from DQM.DTMonitorModule.dtSegmentTask_cfi import *
from DQM.DTMonitorModule.dtDCSByLumiTask_cfi import *
from DQM.DTMonitorModule.dtRunConditionVar_cfi import *
dtSegmentAnalysisMonitor.detailedAnalysis = True
dtSegmentAnalysisMonitor.slideTimeBins = False
Expand All @@ -14,6 +14,10 @@
subSystemFolder = cms.untracked.string('DT')
)

# DT digitization and reconstruction
# Switched to TwinMux
from EventFilter.L1TXRawToDigi.twinMuxStage2Digis_cfi import *
from EventFilter.DTRawToDigi.dtunpackerDDUGlobal_cfi import *

dtDataIntegrityUnpacker = cms.EDProducer("DTUnpackingModule",
dataType = cms.string('DDU'),
Expand Down Expand Up @@ -42,11 +46,12 @@
from DQM.DTMonitorModule.dtTriggerEfficiencyTask_cfi import *

dtSourcesCosmics = cms.Sequence(dtDataIntegrityUnpacker +
DTDataIntegrityTask +
dtDCSByLumiMonitor +
dtRunConditionVar +
dtSegmentAnalysisMonitor +
dtResolutionAnalysisMonitor +
dtEfficiencyMonitor +
dtTriggerEfficiencyMonitor +
dqmInfoDT)
twinMuxStage2Digis +
DTDataIntegrityTask +
dtDCSByLumiMonitor +
dtRunConditionVar +
dtSegmentAnalysisMonitor +
dtResolutionAnalysisMonitor +
dtEfficiencyMonitor +
dtTriggerEfficiencyMonitor +
dqmInfoDT)
6 changes: 5 additions & 1 deletion DQM/DTMonitorModule/python/dtDQMOfflineSources_HI_cff.py
Expand Up @@ -14,6 +14,10 @@
subSystemFolder = cms.untracked.string('DT')
)

# DT digitization and reconstruction
# Switched to TwinMux
from EventFilter.L1TXRawToDigi.twinMuxStage2Digis_cfi import *
from EventFilter.DTRawToDigi.dtunpackerDDUGlobal_cfi import *

dtDataIntegrityUnpacker = cms.EDProducer("DTUnpackingModule",
dataType = cms.string('DDU'),
Expand All @@ -35,13 +39,13 @@
performDataIntegrityMonitor = cms.untracked.bool(True)
)
)

from DQM.DTMonitorModule.dtDataIntegrityTask_cfi import *
DTDataIntegrityTask.processingMode = "Offline"

from DQM.DTMonitorModule.dtTriggerEfficiencyTask_cfi import *

dtSources = cms.Sequence(dtDataIntegrityUnpacker +
twinMuxStage2Digis +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a tab left. Now it is even worse, tab + space + more space?
(also please check the other files...)

DTDataIntegrityTask +
dtDCSByLumiMonitor +
dtRunConditionVar +
Expand Down
5 changes: 5 additions & 0 deletions DQM/DTMonitorModule/python/dtDQMOfflineSources_cff.py
Expand Up @@ -14,6 +14,10 @@
subSystemFolder = cms.untracked.string('DT')
)

# DT digitization and reconstruction
# Switched to TwinMux
from EventFilter.L1TXRawToDigi.twinMuxStage2Digis_cfi import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @jfernan2 -all of the changes in this file need to be moved into the EventFilter package itself. (and the unpackers go into the raw2digi step not the dqm one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @davidlange6
Done. Should I do the same to the equivalent 80X and 81X PR too?
Thanks

from EventFilter.DTRawToDigi.dtunpackerDDUGlobal_cfi import *

dtDataIntegrityUnpacker = cms.EDProducer("DTUnpackingModule",
dataType = cms.string('DDU'),
Expand Down Expand Up @@ -42,6 +46,7 @@
from DQM.DTMonitorModule.dtTriggerEfficiencyTask_cfi import *

dtSources = cms.Sequence(dtDataIntegrityUnpacker +
twinMuxStage2Digis +
DTDataIntegrityTask +
dtDCSByLumiMonitor +
dtRunConditionVar +
Expand Down
2 changes: 2 additions & 0 deletions DQM/DTMonitorModule/python/dtTriggerBaseTask_cfi.py
Expand Up @@ -22,4 +22,6 @@
maxBXTM = cms.untracked.int32(2)
)

from Configuration.Eras.Modifier_run2_25ns_specific_cff import run2_25ns_specific
run2_25ns_specific.toModify( dtTriggerBaseMonitor, processDDU = cms.untracked.bool(False))

8 changes: 7 additions & 1 deletion DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py
Expand Up @@ -8,6 +8,7 @@

# labels of DDU/TM data and 4D segments
inputTagTM = cms.untracked.InputTag('dttfDigis'),
# inputTagTM = cms.untracked.InputTag('dttfDigis'),
inputTagDDU = cms.untracked.InputTag('muonDTDigis'),
inputTagSEG = cms.untracked.InputTag('dt4DSegments'),
inputTagGMT = cms.untracked.InputTag('gtDigis'),
Expand All @@ -16,10 +17,15 @@
minBXDDU = cms.untracked.int32(7), # min BX for DDU eff computation
maxBXDDU = cms.untracked.int32(15), # max BX for DDU eff computation

checkRPCtriggers = cms.untracked.bool(True),
nMinHitsPhi = cms.untracked.int32(5),
phiAccRange = cms.untracked.double(30.),

detailedAnalysis = cms.untracked.bool(False), #if true enables detailed analysis plots
)


#
# Modify for running in run 2 2016 data
#
from Configuration.Eras.Modifier_run2_25ns_specific_cff import run2_25ns_specific
run2_25ns_specific.toModify( dtTriggerEfficiencyMonitor, checkRPCtriggers = cms.untracked.bool(False),processDDU = cms.untracked.bool(False))
3 changes: 1 addition & 2 deletions DQM/DTMonitorModule/src/DTLocalTriggerBaseTask.cc
Expand Up @@ -119,7 +119,7 @@ void DTLocalTriggerBaseTask::bookHistograms(DQMStore::IBooker & ibooker, edm::Ru
bookHistos(ibooker, DTChamberId(wh,stat,sect));
}
}
bookHistos(ibooker, wh);
if (processDDU) bookHistos(ibooker, wh);
}
}

Expand Down Expand Up @@ -401,7 +401,6 @@ void DTLocalTriggerBaseTask::runTMAnalysis( std::vector<L1MuDTChambPhDigi> const
int qual = iph->code();
int is1st = iph->Ts2Tag() ? 1 : 0;
int bx = iph->bxNum() - is1st;

if (qual <0 || qual>6) continue; // Check that quality is in a valid range

DTChamberId dtChId(wh,st,sec);
Expand Down
18 changes: 9 additions & 9 deletions DQM/DTMonitorModule/src/DTLocalTriggerTask.cc
Expand Up @@ -140,13 +140,13 @@ void DTLocalTriggerTask::bookHistograms(DQMStore::IBooker & ibooker, edm::Run co
DTChamberId dtChId(wh,stat,sect);
if (parameters.getUntrackedParameter<bool>("process_tm", true)){ // TM data

bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BXvsQual"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BXvsQual_In"+(*trigSrcIt));
if (detailedAnalysis) {
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhirad"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhibend"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhirad_In"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_QualvsPhibend_In"+(*trigSrcIt));
}
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_Flag1stvsQual"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BestQual"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_Flag1stvsQual_In"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerPhiIn","TM_BestQual_In"+(*trigSrcIt));
if (stat!=4 && doTMTheta){
bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_PositionvsBX"+(*trigSrcIt));
bookHistos(ibooker, dtChId,"LocalTriggerTheta","TM_QualityvsBX"+(*trigSrcIt));
Expand Down Expand Up @@ -559,11 +559,11 @@ void DTLocalTriggerTask::runTMAnalysis(std::vector<L1MuDTChambPhDigi> const* phT
innerME.find("TM_QualvsPhirad"+trigsrc)->second->Fill(x,phcode); // SM Qual vs radial angle Phi view
}
else {
innerME.find("TM_BXvsQual"+trigsrc)->second->Fill(phcode,phbx-phi1st); // SM BX vs Qual Phi view (1st tracks)
innerME.find("TM_Flag1stvsQual"+trigsrc)->second->Fill(phcode,phi1st); // SM Qual 1st/2nd track flag Phi view
innerME.find("TM_BXvsQual_In"+trigsrc)->second->Fill(phcode,phbx-phi1st); // SM BX vs Qual Phi view (1st tracks)
innerME.find("TM_Flag1stvsQual_In"+trigsrc)->second->Fill(phcode,phi1st); // SM Qual 1st/2nd track flag Phi view
if (detailedAnalysis) {
innerME.find("TM_QualvsPhirad"+trigsrc)->second->Fill(x,phcode); // SM Qual vs radial angle Phi view
innerME.find("TM_QualvsPhibend"+trigsrc)->second->Fill(angle,phcode); // SM Qual vs bending Phi view
innerME.find("TM_QualvsPhirad_In"+trigsrc)->second->Fill(x,phcode); // SM Qual vs radial angle Phi view
innerME.find("TM_QualvsPhibend_In"+trigsrc)->second->Fill(angle,phcode); // SM Qual vs bending Phi view
}
}

Expand Down
17 changes: 4 additions & 13 deletions DQM/DTMonitorModule/src/DTTriggerEfficiencyTask.cc
Expand Up @@ -64,6 +64,7 @@ DTTriggerEfficiencyTask::DTTriggerEfficiencyTask(const edm::ParameterSet& ps) :
minBXDDU = parameters.getUntrackedParameter<int>("minBXDDU");
maxBXDDU = parameters.getUntrackedParameter<int>("maxBXDDU");

checkRPCtriggers = parameters.getUntrackedParameter<bool>("checkRPCtriggers");
nMinHitsPhi = parameters.getUntrackedParameter<int>("nMinHitsPhi");
phiAccRange = parameters.getUntrackedParameter<double>("phiAccRange");

Expand Down Expand Up @@ -94,7 +95,6 @@ void DTTriggerEfficiencyTask::bookHistograms(DQMStore::IBooker & ibooker,
LogTrace ("DTDQM|DTMonitorModule|DTTriggerEfficiencyTask") << "[DTTriggerEfficiencyTask]: bookHistograms" << endl;

nevents = 0;

for (int wh=-2;wh<=2;++wh){
vector<string>::const_iterator tagIt = processTags.begin();
vector<string>::const_iterator tagEnd = processTags.end();
Expand Down Expand Up @@ -122,11 +122,11 @@ void DTTriggerEfficiencyTask::analyze(const edm::Event& e, const edm::EventSetup

nevents++;

if (!hasRPCTriggers(e)) { return; }

if (checkRPCtriggers){ //For pre-2016 Era compatibility
if (!hasRPCTriggers(e)) { return; }
}
map<DTChamberId,const L1MuDTChambPhDigi*> phBestTM;
map<DTChamberId,const DTLocalTrigger*> phBestDDU;

// Getting best TM Stuff
edm::Handle<L1MuDTChambPhContainer> l1DTTPGPh;
e.getByToken(tm_Token_, l1DTTPGPh);
Expand Down Expand Up @@ -222,7 +222,6 @@ void DTTriggerEfficiencyTask::analyze(const edm::Event& e, const edm::EventSetup
// Plot filling
vector<const DTRecSegment4D*>::const_iterator btrack;
for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){

int wheel = (*btrack)->chamberId().wheel();
int station = (*btrack)->chamberId().station();
int scsector = 0;
Expand All @@ -235,16 +234,12 @@ void DTTriggerEfficiencyTask::analyze(const edm::Event& e, const edm::EventSetup
map<string, MonitorElement*> &innerWhME = wheelHistos[wheel];

if (fabs(xdir)<phiAccRange && nHitsPhi>=nMinHitsPhi){

vector<string>::const_iterator tagIt = processTags.begin();
vector<string>::const_iterator tagEnd = processTags.end();

for (; tagIt!=tagEnd; ++tagIt) {

int qual = (*tagIt) == "TM" ?
phBestTM.find(dtChId) != phBestTM.end() ? phBestTM[dtChId]->code() : -1 :
phBestDDU.find(dtChId) != phBestDDU.end() ? phBestDDU[dtChId]->quality() : -1;

innerWhME.find((*tagIt) + "_TrigEffDenum")->second->Fill(scsector,station);
if ( qual>=0 && qual<7 ) {
innerWhME.find((*tagIt) + "_TrigEffNum")->second->Fill(scsector,station);
Expand Down Expand Up @@ -395,7 +390,3 @@ void DTTriggerEfficiencyTask::bookWheelHistos(DQMStore::IBooker& ibooker,int whe
}


// Local Variables:
// show-trailing-whitespace: t
// truncate-lines: t
// End:
2 changes: 1 addition & 1 deletion DQM/DTMonitorModule/src/DTTriggerEfficiencyTask.h
Expand Up @@ -83,7 +83,7 @@ class DTTriggerEfficiencyTask: public DQMEDAnalyzer{

std::string SegmArbitration;

bool processTM, processDDU, detailedPlots;
bool processTM, processDDU, detailedPlots, checkRPCtriggers;
std::vector<std::string> processTags;
int minBXDDU, maxBXDDU;

Expand Down
4 changes: 2 additions & 2 deletions EventFilter/DTRawToDigi/python/dtunpackerDDUGlobal_cfi.py
Expand Up @@ -14,11 +14,11 @@
rosParameters = cms.PSet(
writeSC = cms.untracked.bool(True),
readingDDU = cms.untracked.bool(True),
performDataIntegrityMonitor = cms.untracked.bool(False),
performDataIntegrityMonitor = cms.untracked.bool(True),
readDDUIDfromDDU = cms.untracked.bool(True),
debug = cms.untracked.bool(False),
localDAQ = cms.untracked.bool(False)
),
localDAQ = cms.untracked.bool(False),
performDataIntegrityMonitor = cms.untracked.bool(False)
performDataIntegrityMonitor = cms.untracked.bool(True)
)