Example #1
0
#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
          for iTarget in TargetList:
            wspace=iComb
            for iPar in range(1,len(paramSet['names'])) :
              parVal=str(paramSet['values'][iSet][iPar])
              parVal = parVal.replace('.','d')
              for iRule in paramSet['rules'] : parVal = parVal.replace(iRule,paramSet['rules'][iRule])
              wspace += '_' + paramSet['names'][iPar] + '_' + parVal
            if options.energy != 0: wspace += '_' + str(options.energy) + 'TeV'
            if iAltModel != 'NONE' and 'AltModel' in targets[iTarget]  and targets[iTarget]['AltModel'] == 'Gen' : wspace += '_' + iAltModel 
            #else                  : wspace += '_78TeV' 
Example #2
0
 if isValidEnergy and isValidPurpose:
     massList = combTools.MassList_Filter(cardtypes,
                                          channels[options.Version],
                                          combinations, options.purpose,
                                          options.masses, iComb,
                                          energyList).get()
     print '---------------------- Building cards for combination: ' + iComb
     if 'targetdir' in cardtypes[options.purpose]:
         TargetDir = workspace + '/' + options.Version + '/' + cardtypes[
             options.purpose]['targetdir'] + '/' + iComb
     else:
         TargetDir = workspace + '/' + options.Version + '/' + cardDir + '/' + iComb
     print 'Target Dir : ' + TargetDir
     print 'Masses List: ' + str(massList)
     paramSet = combTools.ParamSet_Maker(cardtypes,
                                         channels[options.Version],
                                         options.purpose, options.masses,
                                         'NONE', energyList).get()
     for iSet in range(0, len(paramSet['values'])):
         iMass = paramSet['values'][iSet][0]
         for iAltModel in options.AltModel:
             toCombine = []
             #toMove = []
             for iChannel in combinations[iComb]['channels']:
                 for iEnergy in energyList:
                     if (iEnergy in channels[options.Version][iChannel]):
                         if (iMass >= channels[options.Version][iChannel]
                             [iEnergy]['mrange'][0]) and (
                                 iMass <= channels[options.Version]
                                 [iChannel][iEnergy]['mrange'][1]):
                             if 'hcp2012' in channels[options.Version][
                                     iChannel][iEnergy]['dir']: