Exemple #1
0
PhysModelList = combTools.PhysModelList_Filter(physmodels,options.models).get()
TargetList    = combTools.TargetList_Filter(targets,options.targets).get()

if options.runBatch or options.runGrid: 
  print 'Call BATV Tools Init'  
  jobs = batchTools.batchJobs(channels,combinations,'results',combList,energyList,PhysModelList,TargetList,options.batchSplit,options.masses,options.unblind,options.Version,options.AltModel,options.runGrid )

if options.runGrid:
  CrabDB = {}

#Run Combine
for iComb in combList:
    print '---------------------- Computing results for combination: '+iComb
    for iModel in PhysModelList:
      print '---------------------------> Model = '+iModel 
      cardDir   = combTools.CardDir_Filter(cardtypes,physmodels[iModel]['cardtype']).get() 
      massList  = combTools.MassList_Filter(cardtypes,channels[options.Version],combinations,physmodels[iModel]['cardtype'],options.masses,iComb,energyList).get()
      if 'targetdir' in cardtypes[physmodels[iModel]['cardtype']]:
        TargetDir=workspace+'/'+options.Version+'/'+cardtypes[physmodels[iModel]['cardtype']]['targetdir']+'/'+iComb
        TargetDirGrid=workspace.split('/')[-2]+'/'+options.Version+'/'+cardtypes[physmodels[iModel]['cardtype']]['targetdir']+'/'+iComb
      else:
        TargetDir=workspace+'/'+options.Version+'/'+cardDir+'/'+iComb
        TargetDirGrid=workspace.split('/')[-2]+'/'+options.Version+'/'+cardDir+'/'+iComb
      print 'Target Dir : '+TargetDir
      print 'Masses List: '+str(massList)
      paramSet   = combTools.ParamSet_Maker(cardtypes,channels[options.Version],physmodels[iModel]['cardtype'],options.masses,'NONE',energyList).get()
      for iSet in range(0,len(paramSet['values'])) :
        iMass = paramSet['values'][iSet][0]
        print '------------------------------> Mass = '+str(iMass) + ' (Set: ' + str(paramSet['values'][iSet]) + ' )'       
        for iAltModel in options.AltModel:
          print '------------------------------> AltModel = '+iAltModel
Exemple #2
0
                  dest="Dictionary",
                  help="Datacards Dictionary",
                  default='Configs.HWW2012',
                  type='string')

(options, args) = parser.parse_args()

# Read Combination python config
exec('from %s import *' % (options.Dictionary))
print DefaultVersion
if options.Version == 'None': options.Version = DefaultVersion

# Parse arguments
print '==== Data Cards Version : ', options.Version
combList = combTools.CombList_Filter(combinations, options.combs).get()
cardDir = combTools.CardDir_Filter(cardtypes, options.purpose).get()
energyList = combTools.EnergyList_Filter(options.energy).get()

# Build combinations
for iComb in combList:
    # Validate Combination Energy
    isValidEnergy = False
    for iEnergy in combinations[iComb]['energies']:
        if (options.energy == 7 or options.energy == 0) and iEnergy == '7TeV':
            isValidEnergy = True
        if (options.energy == 8 or options.energy == 0) and iEnergy == '8TeV':
            isValidEnergy = True
    # Validate Combination Purpose
    isValidPurpose = False
    for purpose in combinations[iComb]['purposes']:
        if options.purpose == purpose: