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

Auto validation 62 x slhc #2469

Merged
merged 5 commits into from Feb 20, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 47 additions & 24 deletions Configuration/Applications/python/ConfigBuilder.py
Expand Up @@ -1621,38 +1621,56 @@ def prepare_POSTRECO(self, sequence = None):


def prepare_VALIDATION(self, sequence = 'validation'):
print sequence,"in preparing validation"
self.loadDefaultOrSpecifiedCFF(sequence,self.VALIDATIONDefaultCFF)
from Validation.Configuration.autoValidation import autoValidation
#in case VALIDATION:something:somethingelse -> something,somethingelse
sequence=sequence.split('.')[-1]
if sequence.find(',')!=-1:
prevalSeqName=sequence.split(',')[0]
valSeqName=sequence.split(',')[1]
prevalSeqName=sequence.split(',')[0].split('+')
valSeqName=sequence.split(',')[1].split('+')
self.expandMapping(prevalSeqName,autoValidation,index=0)
self.expandMapping(valSeqName,autoValidation,index=1)
else:
postfix=''
if sequence:
postfix='_'+sequence
prevalSeqName='prevalidation'+postfix
valSeqName='validation'+postfix
if not hasattr(self.process,valSeqName):
prevalSeqName=''
valSeqName=sequence

if not 'DIGI' in self.stepMap and not self._options.fast and not valSeqName.startswith('genvalid'):
if '@' in sequence:
prevalSeqName=sequence.split('+')
valSeqName=sequence.split('+')
self.expandMapping(prevalSeqName,autoValidation,index=0)
self.expandMapping(valSeqName,autoValidation,index=1)
else:
postfix=''
if sequence:
postfix='_'+sequence
prevalSeqName=['prevalidation'+postfix]
valSeqName=['validation'+postfix]
if not hasattr(self.process,valSeqName[0]):
prevalSeqName=['']
valSeqName=[sequence]

def NFI(index):
##name from index, required to keep backward compatibility
if index==0:
return ''
else:
return '%s'%index

if not 'DIGI' in self.stepMap and not self._options.fast and not any(map( lambda s : s.startswith('genvalid'), valSeqName)):
if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
self._options.restoreRNDSeeds=True

#rename the HLT process in validation steps
if ('HLT' in self.stepMap and not self._options.fast) or self._options.hltProcess:
self.renameHLTprocessInSequence(valSeqName)
if prevalSeqName:
self.renameHLTprocessInSequence(prevalSeqName)

if prevalSeqName:
self.process.prevalidation_step = cms.Path( getattr(self.process, prevalSeqName ) )
self.schedule.append(self.process.prevalidation_step)

self.process.validation_step = cms.EndPath( getattr(self.process,valSeqName ) )
self.schedule.append(self.process.validation_step)
for s in valSeqName+prevalSeqName:
if s:
self.renameHLTprocessInSequence(s)
for (i,s) in enumerate(prevalSeqName):
if s:
setattr(self.process,'prevalidation_step%s'%NFI(i), cms.Path( getattr(self.process, s)) )
self.schedule.append(getattr(self.process,'prevalidation_step%s'%NFI(i)))

for (i,s) in enumerate(valSeqName):
setattr(self.process,'validation_step%s'%NFI(i), cms.EndPath( getattr(self.process, s)))
self.schedule.append(getattr(self.process,'validation_step%s'%NFI(i)))

if not 'DIGI' in self.stepMap and not self._options.fast:
self.executeAndRemember("process.mix.playback = True")
Expand All @@ -1662,7 +1680,8 @@ def prepare_VALIDATION(self, sequence = 'validation'):

if hasattr(self.process,"genstepfilter") and len(self.process.genstepfilter.triggerConditions):
#will get in the schedule, smoothly
self.process.validation_step._seq = self.process.genstepfilter * self.process.validation_step._seq
for (i,s) in enumerate(valSeqName):
getattr(self.process,'validation_step%s'%NFI(i))._seq = self.process.genstepfilter * getattr(self.process,'validation_step%s'%NFI(i))._seq

return

Expand Down Expand Up @@ -1811,7 +1830,11 @@ def prepare_HARVESTING(self, sequence = None):
# decide which HARVESTING paths to use
harvestingList = sequence.split("+")
from DQMOffline.Configuration.autoDQM import autoDQM
self.expandMapping(harvestingList,autoDQM,index=1)
from Validation.Configuration.autoValidation import autoValidation
import copy
combined_mapping = copy.deepcopy( autoDQM )
combined_mapping.update( autoValidation )
self.expandMapping(harvestingList,combined_mapping,index=-1)

if len(set(harvestingList))!=len(harvestingList):
harvestingList=list(set(harvestingList))
Expand Down
8 changes: 8 additions & 0 deletions Configuration/StandardSequences/python/Validation_cff.py
Expand Up @@ -26,6 +26,10 @@
from Validation.EventGenerator.BasicGenValidation_cff import *

prevalidation = cms.Sequence( globalPrevalidation * hltassociation )
prevalidationLiteTracking = cms.Sequence( prevalidation )
prevalidationLiteTracking.replace(globalPrevalidation,globalPrevalidationLiteTracking)



validation = cms.Sequence(cms.SequencePlaceholder("mix")
+genvalid_all
Expand All @@ -35,6 +39,10 @@
*globalValidation
*hltvalidation)

validationLiteTracking = cms.Sequence( validation )
validationLiteTracking.replace(globalValidation,globalValidationLiteTracking)
validationLiteTracking.remove(condDataValidation)

prevalidation_preprod = cms.Sequence( preprodPrevalidation )

validation_preprod = cms.Sequence(
Expand Down
2 changes: 2 additions & 0 deletions Validation/Configuration/python/autoValidation.py
@@ -0,0 +1,2 @@
autoValidation = { 'liteTracking' : ['prevalidationLiteTracking','validationLiteTracking','validationHarvesting']
}
31 changes: 31 additions & 0 deletions Validation/Configuration/python/globalValidation_cff.py
Expand Up @@ -84,3 +84,34 @@
+ pfTauRunDQMValidation
+ bTagPlotsMCbcl
)

#lite tracking validator to be used in the Validation matrix
liteTrackValidator=trackValidator.clone()
liteTrackValidator.label=cms.VInputTag(cms.InputTag("generalTracks"),
cms.InputTag("cutsRecoTracksHp")
)

#lite validation
globalValidationLiteTracking = cms.Sequence(globalValidation)
globalValidationLiteTracking.replace(trackValidator,liteTrackValidator)

#lite pre-validation
globalPrevalidationLiteTracking = cms.Sequence(globalPrevalidation)
globalPrevalidationLiteTracking.remove(cutsRecoTracksZero)
globalPrevalidationLiteTracking.remove(cutsRecoTracksZeroHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFirst)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFirstHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksSecond)
globalPrevalidationLiteTracking.remove(cutsRecoTracksSecondHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksThird)
globalPrevalidationLiteTracking.remove(cutsRecoTracksThirdHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFourth)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFourthHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFifth)
globalPrevalidationLiteTracking.remove(cutsRecoTracksFifthHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksSixth)
globalPrevalidationLiteTracking.remove(cutsRecoTracksSixthHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksNinth)
globalPrevalidationLiteTracking.remove(cutsRecoTracksNinthHp)
globalPrevalidationLiteTracking.remove(cutsRecoTracksTenth)
globalPrevalidationLiteTracking.remove(cutsRecoTracksTenthHp)
1 change: 0 additions & 1 deletion Validation/Configuration/python/postValidation_cff.py
Expand Up @@ -51,4 +51,3 @@
postValidation_gen = cms.Sequence(
EventGeneratorPostProcessor
)