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

Enable tau validation for phase 2 #27120

Merged
merged 7 commits into from Jun 12, 2019
8 changes: 4 additions & 4 deletions DQMOffline/Configuration/python/DQMOffline_cff.py
Expand Up @@ -66,7 +66,7 @@
bTagPlotsDATA *
alcaBeamMonitor *
dqmPhysics *
produceDenoms *
produceDenomsData *
pfTauRunDQMValidation)
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel

Expand Down Expand Up @@ -121,7 +121,7 @@
DQMMessageLogger *
dqmPhysics *
pvMonitor *
produceDenoms
produceDenomsData
)

DQMOfflineCommon = cms.Sequence( dqmDcsInfo *
Expand All @@ -133,7 +133,7 @@
alcaBeamMonitor *
castorSources *
dqmPhysics *
produceDenoms *
produceDenomsData *
pfTauRunDQMValidation
)
DQMOfflineCommonSiStripZeroBias = cms.Sequence( dqmDcsInfo *
Expand All @@ -148,7 +148,7 @@
dqmPhysics *
pvMonitor *
materialDumperAnalyzer *
produceDenoms *
produceDenomsData *
pfTauRunDQMValidation
)
DQMOfflineLumi = cms.Sequence ( zcounting )
Expand Down
2 changes: 1 addition & 1 deletion FastSimulation/Configuration/python/DQMOfflineMC_cff.py
Expand Up @@ -15,7 +15,7 @@
pvMonitor *
bTagPlotsDATA *
dqmPhysics *
produceDenoms *
produceDenomsData *
pfTauRunDQMValidation

)
Expand Down
3 changes: 2 additions & 1 deletion Validation/Configuration/python/autoValidation.py
Expand Up @@ -6,6 +6,7 @@
'bTagOnlyValidation' : ['prebTagSequenceMC','bTagPlotsMCbcl','bTagCollectorSequenceMCbcl'],
'JetMETOnlyValidation' : ['globalPrevalidationJetMETOnly','globalValidationJetMETonly','postValidation_JetMET'],
'electronOnlyValidation' : ['', 'electronValidationSequence', 'electronPostValidationSequence'],
'tauOnlyValidation' : ['produceDenoms', 'pfTauRunDQMValidation', 'runTauEff'],
'hcalOnlyValidation' : ['globalPrevalidationHCAL','globalValidationHCAL','postValidation_HCAL'],
'baseValidation' : ['baseCommonPreValidation','baseCommonValidation','postValidation_common'],
'miniAODValidation' : ['prevalidationMiniAOD','validationMiniAOD','validationHarvestingMiniAOD'],
Expand All @@ -16,7 +17,7 @@
'OuterTrackerValidation' : ['', 'globalValidationOuterTracker', 'postValidationOuterTracker'],
}

_phase2_allowed = ['baseValidation','trackingValidation','muonOnlyValidation','JetMETOnlyValidation', 'electronOnlyValidation', 'bTagOnlyValidation','hcalOnlyValidation', 'HGCalValidation', 'MTDValidation', 'OuterTrackerValidation']
_phase2_allowed = ['baseValidation','trackingValidation','muonOnlyValidation','JetMETOnlyValidation', 'electronOnlyValidation', 'bTagOnlyValidation', 'tauOnlyValidation', 'hcalOnlyValidation', 'HGCalValidation', 'MTDValidation', 'OuterTrackerValidation']
autoValidation['phase2Validation'] = ['','','']
for i in range(0,3):
autoValidation['phase2Validation'][i] = '+'.join([_f for _f in [autoValidation[m][i] for m in _phase2_allowed] if _f])
2 changes: 1 addition & 1 deletion Validation/RecoTau/python/DQMSequences_cfi.py
Expand Up @@ -9,7 +9,7 @@
)


produceDenoms = cms.Sequence(
produceDenomsData = cms.Sequence(
produceDenominatorRealData+
produceDenominatorRealElectronsData+
produceDenominatorRealMuonsData
Expand Down
6 changes: 4 additions & 2 deletions Validation/RecoTau/python/dataTypes/ValidateTausOnZTT_cff.py
Expand Up @@ -5,9 +5,11 @@
from PhysicsTools.HepMCCandAlgos.genParticles_cfi import *
import PhysicsTools.PatAlgos.tools.helpers as helpers

tauGenJetsForVal = tauGenJets.clone()
Copy link
Contributor

Choose a reason for hiding this comment

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

@steggema I don't understand why this clone is needed since no modifications are done afterwards

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The point is that a MiniAOD era modifier changes process.tauGenJets, so it needs to have a different name and can't be the same object (i.e. if you write tauGenJetsForVal = tauGenJets it will just be a pointer). Maybe there's a better solution (... import as ... didn't work either).

Copy link
Contributor

Choose a reason for hiding this comment

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

I see thanks


# require generated tau to decay hadronically
objectTypeSelectedTauValDenominatorModuleZTT = cms.EDFilter("TauGenJetDecayModeSelector",
src = cms.InputTag("tauGenJets"),
src = cms.InputTag("tauGenJetsForVal"),
select = cms.vstring('oneProng0Pi0', 'oneProng1Pi0', 'oneProng2Pi0', 'oneProngOther',
'threeProng0Pi0', 'threeProng1Pi0', 'threeProngOther', 'rare'),
filter = cms.bool(False)
Expand Down Expand Up @@ -57,7 +59,7 @@
locals()[newAttr] = getattr(proc,newAttr)

produceDenominatorZTT = cms.Sequence(
tauGenJets
tauGenJetsForVal
+objectTypeSelectedTauValDenominatorModuleZTT
+kinematicSelectedTauValDenominatorZTT
)
Expand Down
3 changes: 2 additions & 1 deletion Validation/RecoTau/src/TauTagValidation.cc
Expand Up @@ -127,9 +127,10 @@ void TauTagValidation::bookHistograms(DQMStore::IBooker& ibooker,
MonitorElement *ptTemp, *etaTemp, *phiTemp, *pileupTemp, *tmpME, *summaryTemp;

ibooker.setCurrentFolder("RecoTauV/" + TauProducer_ + extensionName_ + "_Summary");
auto n_disc = !discriminators_.empty() ? discriminators_.size() : 21;
hinfo summaryHinfo = (histoSettings_.exists("summary"))
? hinfo(histoSettings_.getParameter<edm::ParameterSet>("summary"))
: hinfo(21, -0.5, 20.5);
: hinfo(n_disc, -0.5, n_disc - 0.5);
summaryTemp =
ibooker.book1D("summaryPlotNum", "summaryPlotNum", summaryHinfo.nbins, summaryHinfo.min, summaryHinfo.max);
summaryMap.insert(std::make_pair(refCollection_ + "Num", summaryTemp));
Expand Down