Skip to content

Commit

Permalink
Changes to disable DDU trigger plots in DT DQM Online Trigger checks …
Browse files Browse the repository at this point in the history
…and disable check on RPC paths for TriggerEfficiency studies in DT DQM Offline. Port to 90X of PR 16679
  • Loading branch information
jfernan2 committed Nov 23, 2016
1 parent 125fa86 commit cd59556
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 52 deletions.
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'),
hwSources = cms.untracked.vstring('TM'),
# false if DTLocalTriggerTask used LTC digis
localrun = cms.untracked.bool(True),
# root folder for booking of histograms
Expand Down
2 changes: 1 addition & 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'),
# false if DTLocalTriggerTask used LTC digis
localrun = cms.untracked.bool(True),
# root folder for booking of histograms
Expand Down
2 changes: 1 addition & 1 deletion DQM/DTMonitorClient/python/dtTriggerEfficiencyTest_cfi.py
Expand Up @@ -6,7 +6,7 @@
# run in online environment
runOnline = cms.untracked.bool(False),
# kind of trigger data processed by DTLocalTriggerTask
hwSources = cms.untracked.vstring('TM','DDU'),
hwSources = cms.untracked.vstring('TM'),
# false if DTLocalTriggerTask used LTC digis
localrun = cms.untracked.bool(True),
# root folder for booking of histograms
Expand Down
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
2 changes: 1 addition & 1 deletion DQM/DTMonitorModule/python/dtTriggerBaseTask_cfi.py
Expand Up @@ -6,7 +6,7 @@
targetBXTM = cms.untracked.int32(0),
targetBXDDU = cms.untracked.int32(9),
bestTrigAccRange = cms.untracked.int32(3),
processDDU = cms.untracked.bool(True),
processDDU = cms.untracked.bool(False),
processTM = cms.untracked.bool(True),
nTimeBins = cms.untracked.int32(100),
nLSTimeBin = cms.untracked.int32(15),
Expand Down
7 changes: 4 additions & 3 deletions DQM/DTMonitorModule/python/dtTriggerEfficiencyTask_cfi.py
Expand Up @@ -7,11 +7,12 @@
SegmArbitration = cms.untracked.string("SegmentAndTrackArbitration"),

# labels of DDU/TM data and 4D segments
inputTagTM = cms.untracked.InputTag('dttfDigis'),
inputTagDDU = cms.untracked.InputTag('muonDTDigis'),
inputTagTM = cms.untracked.InputTag('twinMuxStage2Digis:PhIn'),
# inputTagTM = cms.untracked.InputTag('dttfDigis'),
inputTagDDU = cms.untracked.InputTag('dtunpacker'),
inputTagSEG = cms.untracked.InputTag('dt4DSegments'),
inputTagGMT = cms.untracked.InputTag('gtDigis'),
processDDU = cms.untracked.bool(True), # if true enables DDU data analysis
processDDU = cms.untracked.bool(False), # if true enables DDU data analysis
processTM = cms.untracked.bool(True), # if true enables TM data analysis
minBXDDU = cms.untracked.int32(7), # min BX for DDU eff computation
maxBXDDU = cms.untracked.int32(15), # max BX for DDU eff computation
Expand Down
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
14 changes: 1 addition & 13 deletions DQM/DTMonitorModule/src/DTTriggerEfficiencyTask.cc
Expand Up @@ -94,7 +94,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 +121,9 @@ void DTTriggerEfficiencyTask::analyze(const edm::Event& e, const edm::EventSetup

nevents++;

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

// 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 +219,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 +231,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 +387,3 @@ void DTTriggerEfficiencyTask::bookWheelHistos(DQMStore::IBooker& ibooker,int whe
}


// Local Variables:
// show-trailing-whitespace: t
// truncate-lines: t
// End:

0 comments on commit cd59556

Please sign in to comment.