Esempio n. 1
0
def creationLoop(directory):
    global opt, args

    #    startMass=[ 110.0, 140.0, 160.0, 290.0, 350.0, 400.0, 600.0 ]
    #    stepSizes=[ 0.5, 0.5, 2.0, 5.0, 10.0, 20.0, 50.0 ]
    #    endVal=[ 60, 40, 65, 12, 5, 10, 9 ]

    startMass = [110.0, 124.5, 126.5, 130.0, 160.0, 290.0, 350.0, 400.0, 600.0]
    stepSizes = [0.5, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 50.0]
    endVal = [29, 20, 7, 30, 65, 12, 5, 10, 9]

    #    startMass=[ 400.0, 600.0 ]
    #    stepSizes=[ 20.0, 50.0 ]
    #    endVal=[      10,   9 ]

    #    startMass=[ 400.0 ]
    #    stepSizes=[ 0.5 ]
    #    endVal=[ 1 ]

    myClass = mainClass()

    myReader4e = inputReader(opt.inputDir + "/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir + "/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir + "/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()

    a = 0
    while (a < len(startMass)):

        c = 0
        while (c < endVal[a]):

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + (step * c)
            mhs = str(mh).replace('.0', '')
            makeDirectory(directory + '/HCG/' + mhs)
            makeDirectory(directory + '/HCG_XSxBR/' + mhs)

            print mh
            myClass.makeCardsWorkspaces(mh, directory, theInputs4e,
                                        opt.templateDir, opt.massError,
                                        opt.is2D, opt.mekd)
            myClass.makeCardsWorkspaces(mh, directory, theInputs4mu,
                                        opt.templateDir, opt.massError,
                                        opt.is2D, opt.mekd)
            myClass.makeCardsWorkspaces(mh, directory, theInputs2e2mu,
                                        opt.templateDir, opt.massError,
                                        opt.is2D, opt.mekd)

            c += 1

        a += 1
def creationLoop(directory):
    global opt, args
    
#    startMass=[ 110.0, 140.0, 160.0, 290.0, 350.0, 400.0, 600.0 ]
#    stepSizes=[ 0.5, 0.5, 2.0, 5.0, 10.0, 20.0, 50.0 ]
#    endVal=[ 60, 40, 65, 12, 5, 10, 9 ]

    startMass=[ 110.0, 124.5, 126.5, 130.0, 160.0, 290.0, 350.0, 400.0, 600.0 ]
    stepSizes=[ 0.5, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 50.0 ]
    endVal=[ 29, 20, 7,  30, 65, 12, 5, 10, 9 ]

#    startMass=[ 400.0, 600.0 ]
#    stepSizes=[ 20.0, 50.0 ]
#    endVal=[      10,   9 ]


#    startMass=[ 400.0 ]
#    stepSizes=[ 0.5 ]
#    endVal=[ 1 ]

    myClass = mainClass()
    
    myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()

    
    a=0
    while (a < len(startMass) ):
	
	c = 0
        while (c < endVal[a] ): 
            
            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + ( step * c ) 
            mhs = str(mh).replace('.0','')
            makeDirectory(directory+'/HCG/'+mhs)
            makeDirectory(directory+'/HCG_XSxBR/'+mhs)

            print mh
            myClass.makeCardsWorkspaces(mh,directory,theInputs4e,opt.templateDir,opt.massError,opt.is2D,opt.mekd)
            myClass.makeCardsWorkspaces(mh,directory,theInputs4mu,opt.templateDir,opt.massError,opt.is2D,opt.mekd)
            myClass.makeCardsWorkspaces(mh,directory,theInputs2e2mu,opt.templateDir,opt.massError,opt.is2D,opt.mekd)
                          
            c += 1
            

	a += 1
def creationLoop(directory):
    global opt, args

    startMass=[ opt.mPOLE ]
    stepSizes=[ 0.1]
    endVal=[     1]

    if (opt.model== '1D'):
      myClass = properties_datacardClass(opt.analysis, opt.production)
    elif (opt.model== 'phase'):
      myClass = properties_datacardClass_phase()
    elif (opt.model== '2D'):
      myClass = properties_datacardClass_2D()
    else:
      print 'Unknown model '+opt.model+'. Exiting.'
      sys.exit()

    myClass.loadIncludes()

    myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()


    a=0
    while (a < len(startMass) ):

	c = 0
        while (c < endVal[a] ):

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + ( step * c )
            mhs = str(mh).replace('.0','')

            print mh

            sqrts = str(theInputs4e['sqrts']).replace('.0','')

            #makeDirectory(directory+'/HCG/'+mhs+'/'+sqrts+'TeV')
            #makeDirectory(directory+'/HCG_XSxBR/'+mhs+'/'+sqrts+'TeV')
            myClass.makeCardsWorkspaces(mh,directory,theInputs4e,opt)
            myClass.makeCardsWorkspaces(mh,directory,theInputs4mu,opt)
            myClass.makeCardsWorkspaces(mh,directory,theInputs2e2mu,opt)

            c += 1


	a += 1
def creationLoop(directory):
    global opt, args

    startMass=[ 91.2 ]
    stepSizes=[ 0.1 ]
    endVal=[     1 ]

    if (opt.model== 'Z4l'):
      myClass = properties_datacardClass_Z4l()
    else:
      print 'Unknown model '+opt.model+'. Exiting.'
      sys.exit()

    myClass.loadIncludes()

    myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()


    a=0
    while (a < len(startMass) ):

	c = 0
        while (c < endVal[a] ):

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + ( step * c )
            mhs = str(mh).replace('.0','')

            print mh

            makeDirectory(directory+'/HCG/'+mhs)
            makeDirectory(directory+'/HCG_XSxBR/'+mhs)
            myClass.makeCardsWorkspaces(mh,directory,theInputs4e,opt)
            myClass.makeCardsWorkspaces(mh,directory,theInputs4mu,opt)
            myClass.makeCardsWorkspaces(mh,directory,theInputs2e2mu,opt)

            c += 1


	a += 1
Esempio n. 5
0
def creationLoop(directory):
    global opt, args

    startMass = [125.0]
    stepSizes = [1.0]
    endVal = [2]

    myClass = datacardClass()
    myClass.loadIncludes()

    myReader4e = inputReader(opt.inputDir + "/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir + "/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir + "/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()

    a = 0
    while (a < len(startMass)):

        c = 0
        while (c < endVal[a]):

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + (step * c)
            mhs = str(mh).replace('.0', '')
            makeDirectory(directory + '/HCG/' + mhs)
            makeDirectory(directory + '/HCG_XSxBR/' + mhs)

            print mh
            myClass.makeCardsWorkspaces(mh, opt.is2D, directory, theInputs4e,
                                        opt.templateDir, opt.spinCode,
                                        opt.massError)
            myClass.makeCardsWorkspaces(mh, opt.is2D, directory, theInputs4mu,
                                        opt.templateDir, opt.spinCode,
                                        opt.massError)
            myClass.makeCardsWorkspaces(mh, opt.is2D, directory,
                                        theInputs2e2mu, opt.templateDir,
                                        opt.spinCode, opt.massError)

            c += 1

        a += 1
def creationLoop(directory):
    global opt, args
    
    startMass=[ 125.0 ]
    stepSizes=[ 1.0 ]
    endVal=[ 2 ]

    myClass = datacardClass()
    myClass.loadIncludes()
    
    myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()

    myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()

    myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()

    
    a=0
    while (a < len(startMass) ):
	
	c = 0
        while (c < endVal[a] ): 
            
            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + ( step * c ) 
            mhs = str(mh).replace('.0','')
            makeDirectory(directory+'/HCG/'+mhs)
            makeDirectory(directory+'/HCG_XSxBR/'+mhs)

            print mh
            myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs4e,opt.templateDir,opt.spinCode, opt.massError)
            myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs4mu,opt.templateDir,opt.spinCode, opt.massError)
            myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs2e2mu,opt.templateDir,opt.spinCode, opt.massError)
                          
            c += 1


	a += 1
def creationLoop(directory):
    global opt, args

    startMass=[ 240, 300 ]

    myClass = width_datacardClass()
    myClass.loadIncludes()
    
    myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()
    
    myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()
    
    myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()

    
    a=0
    while (a < len(startMass) ):
	
       mh = startMass[a]
       mhs = str(mh).replace('.0','')
       
       print mh
       
       makeDirectory(directory+'/HCG/'+mhs)
       makeDirectory(directory+'/HCG_XSxBR/'+mhs)
       myClass.makeCardsWorkspaces(mh,directory,theInputs4e,opt.templateDir)
       myClass.makeCardsWorkspaces(mh,directory,theInputs4mu,opt.templateDir)
       myClass.makeCardsWorkspaces(mh,directory,theInputs2e2mu,opt.templateDir)
       
       
       a += 1
Esempio n. 8
0
    def executar(self):
        try:
            f = open(self.args[1], "rt")
        except IOError:
            print "O arquivo de entrada não existe.\nFinalizando..."
            sys.exit()

        reader = inputReader(f)
        listacsv = reader.executar()

        for row in listacsv:
            self.processos.append(Processo(row))

        algoritmo = self.selecionarAlgoritmo()
        algoritmo.executar()

        reporter = outputWriter(self.args, self.processos)
        reporter.executar()
Esempio n. 9
0
def creationLoop(directory):
    global opt, args

    #    startMass=[ 380.0, 400.0, 600.0 ]
    #    stepSizes=[ 10.0,   20.0, 50.0 ]
    #    endVal=[ 1, 10, 9 ]

    #    startMass=[ 200.0, 290.0, 350.0, 400.0, 600.0 ]
    #    stepSizes=[  2.0,   5.0,   10.0,  20.0,  50.0 ]
    #    endVal   =[   45,    12,    4,     10,    9   ]

    startMass = [124.5]
    stepSizes = [0.1]
    endVal = [20]

    #    startMass=  [ 110.0, 124.5, 126.5, 130.0]
    #    stepSizes=  [  0.5,   0.1,   0.5,   1.0]
    #    endVal=     [  29,     20,    7,     30]

    #    startMass=[ 127.0, 130.0, 160.0]
    #    stepSizes=[ 0.5,    1.0,   2.0]
    #    endVal=[     6,      30,    21]

    myClass = datacardClass()
    myClass.loadIncludes()

    if (opt.useJET == 0):
        myReader4e = inputReader(opt.inputDir + "/inputs_4e.txt")
        myReader4e.readInputs()
        theInputs4e = myReader4e.getInputs()

        myReader4mu = inputReader(opt.inputDir + "/inputs_4mu.txt")
        myReader4mu.readInputs()
        theInputs4mu = myReader4mu.getInputs()

        myReader2e2mu = inputReader(opt.inputDir + "/inputs_2e2mu.txt")
        myReader2e2mu.readInputs()
        theInputs2e2mu = myReader2e2mu.getInputs()

    if (opt.useJET == 1 or opt.useJET == 2 or opt.useJET == 3
            or opt.useJET == 4):
        myReader4e_0 = inputReader(opt.inputDir + "_tagged/inputs_4e_0.txt")
        myReader4e_0.readInputs()
        theInputs4e_0 = myReader4e_0.getInputs()

        myReader4mu_0 = inputReader(opt.inputDir + "_tagged/inputs_4mu_0.txt")
        myReader4mu_0.readInputs()
        theInputs4mu_0 = myReader4mu_0.getInputs()

        myReader2e2mu_0 = inputReader(opt.inputDir +
                                      "_tagged/inputs_2e2mu_0.txt")
        myReader2e2mu_0.readInputs()
        theInputs2e2mu_0 = myReader2e2mu_0.getInputs()

        myReader4e_1 = inputReader(opt.inputDir + "_tagged/inputs_4e_1.txt")
        myReader4e_1.readInputs()
        theInputs4e_1 = myReader4e_1.getInputs()

        myReader4mu_1 = inputReader(opt.inputDir + "_tagged/inputs_4mu_1.txt")
        myReader4mu_1.readInputs()
        theInputs4mu_1 = myReader4mu_1.getInputs()

        myReader2e2mu_1 = inputReader(opt.inputDir +
                                      "_tagged/inputs_2e2mu_1.txt")
        myReader2e2mu_1.readInputs()
        theInputs2e2mu_1 = myReader2e2mu_1.getInputs()

    a = 0
    while (a < len(startMass)):

        c = 0
        while (c < endVal[a]):

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + (step * c)
            mhs = str(mh).replace('.0', '')

            print mh
            if (opt.useJET == 0):
                makeDirectory(directory + '/HCG/' + mhs)
                makeDirectory(directory + '/HCG_XSxBR/' + mhs)
                myClass.makeCardsWorkspaces(mh, opt.is2D, directory,
                                            theInputs4e, opt.templateDir,
                                            opt.massError, opt.mekd)
                myClass.makeCardsWorkspaces(mh, opt.is2D, directory,
                                            theInputs4mu, opt.templateDir,
                                            opt.massError, opt.mekd)
                myClass.makeCardsWorkspaces(mh, opt.is2D, directory,
                                            theInputs2e2mu, opt.templateDir,
                                            opt.massError, opt.mekd)
            if (opt.useJET == 1):
                makeDirectory(directory + '_tagged/HCG/' + mhs)
                makeDirectory(directory + '_tagged/HCG_XSxBR/' + mhs)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)

                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)

            if (opt.useJET == 2):
                makeDirectory(directory + '_tagged/HCG/' + mhs)
                makeDirectory(directory + '_tagged/HCG_XSxBR/' + mhs)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)

                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 1)

            if (opt.useJET == 3):
                makeDirectory(directory + '_tagged/HCG/' + mhs)
                makeDirectory(directory + '_tagged/HCG_XSxBR/' + mhs)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 1)

                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)

            if (opt.useJET == 4):
                makeDirectory(directory + '_tagged/HCG/' + mhs)
                makeDirectory(directory + '_tagged/HCG_XSxBR/' + mhs)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_0, opt.templateDir,
                                            opt.massError, opt.mekd, 0, 0)

                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4e_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs4mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)
                myClass.makeCardsWorkspaces(mh, opt.is2D,
                                            directory + '_tagged',
                                            theInputs2e2mu_1, opt.templateDir,
                                            opt.massError, opt.mekd, 1, 0)

            c += 1

        a += 1
Esempio n. 10
0
def creationLoop(directory):
    global opt, args

    #    startMass=[ 110.0, 140.0, 160.0, 290.0, 350.0, 400.0, 600.0 ]
    #    stepSizes=[ 0.5, 0.5, 2.0, 5.0, 10.0, 20.0, 50.0 ]
    #    endVal=[ 60, 40, 65, 12, 5, 10, 9 ]

    #    startMass=[ 110.0, 124.5, 126.5, 130.0, 160.0, 290.0, 350.0, 400.0, 600.0 ]
    #    stepSizes=[ 0.5, 0.1, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 50.0 ]
    #    endVal=[ 29, 20, 7,  30, 65, 12, 5, 10, 9 ]

    #    startMass=[ 400.0, 600.0 ]
    #    stepSizes=[ 20.0, 50.0 ]
    #    endVal=[      10,   9 ]

    startMass = [126.0]
    stepSizes = [0.5]
    endVal = [1]

    myClass = mainClass()

    myReader4e = inputReader(opt.inputDir + "/inputs_4e.txt")
    myReader4e.readInputs()
    theInputs4e = myReader4e.getInputs()
    theInputs4e["unfold"] = opt.unfold
    theInputs4e["unfolded"] = opt.unfolded

    myReader4mu = inputReader(opt.inputDir + "/inputs_4mu.txt")
    myReader4mu.readInputs()
    theInputs4mu = myReader4mu.getInputs()
    theInputs4mu["unfold"] = opt.unfold
    theInputs4mu["unfolded"] = opt.unfolded

    myReader2e2mu = inputReader(opt.inputDir + "/inputs_2e2mu.txt")
    myReader2e2mu.readInputs()
    theInputs2e2mu = myReader2e2mu.getInputs()
    theInputs2e2mu["unfold"] = opt.unfold
    theInputs2e2mu["unfolded"] = opt.unfolded

    if opt.user_option != "UseFromInputFile":
        theInputs4e["user_option"] = opt.user_option
        theInputs4mu["user_option"] = opt.user_option
        theInputs2e2mu["user_option"] = opt.user_option

    if opt.lumi != "UseFromInputFile":
        theInputs4e["lumi"] = float(opt.lumi)
        theInputs4mu["lumi"] = float(opt.lumi)
        theInputs2e2mu["lumi"] = float(opt.lumi)

    if opt.termNames != "UseDeafaultTerms":
        termNames = opt.termNames.split(",")
        print "@@@@ Using termNames = {0}".format(str(termNames))

        theInputs4e["termNames"] = termNames
        theInputs4mu["termNames"] = termNames
        theInputs2e2mu["termNames"] = termNames

    a = 0
    while a < len(startMass):

        c = 0
        while c < endVal[a]:

            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + (step * c)
            mhs = str(mh).replace(".0", "")
            makeDirectory(directory + "/HCG/" + mhs)
            makeDirectory(directory + "/HCG_XSxBR/" + mhs)

            print mh
            myClass.makeCardsWorkspaces(
                mh, directory, theInputs4e, opt.templateDir, opt.massError, opt.is2D, opt.mekd, opt.hypothesis
            )
            myClass.makeCardsWorkspaces(
                mh, directory, theInputs4mu, opt.templateDir, opt.massError, opt.is2D, opt.mekd, opt.hypothesis
            )
            myClass.makeCardsWorkspaces(
                mh, directory, theInputs2e2mu, opt.templateDir, opt.massError, opt.is2D, opt.mekd, opt.hypothesis
            )

            c += 1

        a += 1
Esempio n. 11
0
def creationLoop(directory):
    global opt, args
    
#    startMass=[ 380.0, 400.0, 600.0 ]
#    stepSizes=[ 10.0,   20.0, 50.0 ]
#    endVal=[ 1, 10, 9 ]

#    startMass=[ 200.0, 290.0, 350.0, 400.0, 600.0 ]
#    stepSizes=[  2.0,   5.0,   10.0,  20.0,  50.0 ]
#    endVal   =[   45,    12,    4,     10,    9   ]

    startMass=[ 125.6]
    stepSizes=[ 0.1]
    endVal=[     1]

#    startMass=  [ 110.0, 124.5, 126.5, 130.0]
#    stepSizes=  [  0.5,   0.1,   0.5,   1.0]
#    endVal=     [  29,     20,    7,     30]

#    startMass=[ 127.0, 130.0, 160.0]
#    stepSizes=[ 0.5,    1.0,   2.0]
#    endVal=[     6,      30,    21]


    myClass = datacardClass()
    myClass.loadIncludes()

    if (opt.useJET == 0):
        myReader4e = inputReader(opt.inputDir+"/inputs_4e.txt")
        myReader4e.readInputs()
        theInputs4e = myReader4e.getInputs()
        
        myReader4mu = inputReader(opt.inputDir+"/inputs_4mu.txt")
        myReader4mu.readInputs()
        theInputs4mu = myReader4mu.getInputs()
        
        myReader2e2mu = inputReader(opt.inputDir+"/inputs_2e2mu.txt")
        myReader2e2mu.readInputs()
        theInputs2e2mu = myReader2e2mu.getInputs()

    if (opt.useJET == 1 or opt.useJET == 2 or opt.useJET == 3 or opt.useJET == 4):
        myReader4e_0 = inputReader(opt.inputDir+"_tagged/inputs_4e_0.txt")
        myReader4e_0.readInputs()
        theInputs4e_0 = myReader4e_0.getInputs()
        
        myReader4mu_0 = inputReader(opt.inputDir+"_tagged/inputs_4mu_0.txt")
        myReader4mu_0.readInputs()
        theInputs4mu_0 = myReader4mu_0.getInputs()
        
        myReader2e2mu_0 = inputReader(opt.inputDir+"_tagged/inputs_2e2mu_0.txt")
        myReader2e2mu_0.readInputs()
        theInputs2e2mu_0 = myReader2e2mu_0.getInputs()

        myReader4e_1 = inputReader(opt.inputDir+"_tagged/inputs_4e_1.txt")
        myReader4e_1.readInputs()
        theInputs4e_1 = myReader4e_1.getInputs()
        
        myReader4mu_1 = inputReader(opt.inputDir+"_tagged/inputs_4mu_1.txt")
        myReader4mu_1.readInputs()
        theInputs4mu_1 = myReader4mu_1.getInputs()
        
        myReader2e2mu_1 = inputReader(opt.inputDir+"_tagged/inputs_2e2mu_1.txt")
        myReader2e2mu_1.readInputs()
        theInputs2e2mu_1 = myReader2e2mu_1.getInputs() 

    
    a=0
    while (a < len(startMass) ):
	
	c = 0
        while (c < endVal[a] ): 
            
            mStart = startMass[a]
            step = stepSizes[a]
            mh = mStart + ( step * c ) 
            mhs = str(mh).replace('.0','')

            print mh
            if (opt.useJET == 0):
                makeDirectory(directory+'/HCG/'+mhs)
                makeDirectory(directory+'/HCG_XSxBR/'+mhs)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs4e,opt.templateDir, opt.massError, opt.mekd)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs4mu,opt.templateDir,opt.massError, opt.mekd)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory,theInputs2e2mu,opt.templateDir,opt.massError, opt.mekd)
            if (opt.useJET == 1):
                makeDirectory(directory+'_tagged/HCG/'+mhs)
                makeDirectory(directory+'_tagged/HCG_XSxBR/'+mhs)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_0,opt.templateDir, opt.massError, opt.mekd,0,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_0,opt.templateDir,opt.massError, opt.mekd,0,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_0,opt.templateDir,opt.massError, opt.mekd,0,1)
                
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_1,opt.templateDir, opt.massError, opt.mekd,1,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_1,opt.templateDir,opt.massError, opt.mekd,1,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_1,opt.templateDir,opt.massError, opt.mekd,1,1)

            if (opt.useJET == 2):
                makeDirectory(directory+'_tagged/HCG/'+mhs)
                makeDirectory(directory+'_tagged/HCG_XSxBR/'+mhs)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_0,opt.templateDir, opt.massError, opt.mekd,0,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_0,opt.templateDir,opt.massError, opt.mekd,0,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_0,opt.templateDir,opt.massError, opt.mekd,0,0)
                
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_1,opt.templateDir, opt.massError, opt.mekd,1,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_1,opt.templateDir,opt.massError, opt.mekd,1,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_1,opt.templateDir,opt.massError, opt.mekd,1,1)

            if (opt.useJET == 3):
                makeDirectory(directory+'_tagged/HCG/'+mhs)
                makeDirectory(directory+'_tagged/HCG_XSxBR/'+mhs)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_0,opt.templateDir, opt.massError, opt.mekd,0,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_0,opt.templateDir,opt.massError, opt.mekd,0,1)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_0,opt.templateDir,opt.massError, opt.mekd,0,1)
                
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_1,opt.templateDir, opt.massError, opt.mekd,1,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_1,opt.templateDir,opt.massError, opt.mekd,1,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_1,opt.templateDir,opt.massError, opt.mekd,1,0)

            if (opt.useJET == 4):
                makeDirectory(directory+'_tagged/HCG/'+mhs)
                makeDirectory(directory+'_tagged/HCG_XSxBR/'+mhs)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_0,opt.templateDir, opt.massError, opt.mekd,0,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_0,opt.templateDir,opt.massError, opt.mekd,0,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_0,opt.templateDir,opt.massError, opt.mekd,0,0)
                
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4e_1,opt.templateDir, opt.massError, opt.mekd,1,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs4mu_1,opt.templateDir,opt.massError, opt.mekd,1,0)
                myClass.makeCardsWorkspaces(mh,opt.is2D,directory+'_tagged',theInputs2e2mu_1,opt.templateDir,opt.massError, opt.mekd,1,0)
                
            c += 1
            

	a += 1