コード例 #1
0
 def repchi_2(x):        
     startT=time.time()
     nn=[0.184739, 6.22437, 588.193, 2.44327, -2.51106, 0.,  x[0],x[1],x[2]]    
     harpy.setNPparameters_uTMDPDF(nn)
     print('np set =',["{:8.3f}".format(i) for i in x], end =" ")    
     
     ccDY2,cc3=DataProcessor.harpyInterface.ComputeChi2(repDataDY)
     
     cc=ccDY2/totalNnew
     endT=time.time()
     print(':->',cc,'       t=',endT-startT)
     return ccDY2
コード例 #2
0
#######################################
#Initialize artemide
#######################################
import harpy
path_to_constants = MAINPATH + "FittingPrograms/Sivers20/Constants-files/"
#harpy.initialize(path_to_constants+"const-Sivers20_lo")

# harpy.initialize(path_to_constants+"const-Sivers20_nnlo_piK")

if (useOrder == "nnlo"):
    harpy.initialize(path_to_constants + "const-Sivers20_nnlo")

    #### All=0 Case
    harpy.setNPparameters_TMDR([2., 0.0398333])
    harpy.setNPparameters_uTMDPDF([
        0.185239, 6.22706, 580.946, 2.44166, -2.53161, 0., 0.0014, 0.442, 4.14
    ])
    harpy.setNPparameters_uTMDFF([0.279443, 0.460015, 0.435955, 0.551302])

    # # #### All=0 case piK
    # harpy.setNPparameters_TMDR([2., 0.0394095])
    # harpy.setNPparameters_uTMDPDF([0.180718, 4.38119, 426.208, 2.22347, -0.0646396, 0., 0.17, 0.48, 2.15])
    # harpy.setNPparameters_uTMDFF([0.293548, 0.462093, 0.442867, 0.590596, 0.427915, 0.462578, 0.304421,1.18113])
elif (useOrder == "n3lo"):
    harpy.initialize(path_to_constants + "const-Sivers20_n3lo")
    #### All=0 Case n3lo
    harpy.setNPparameters_TMDR([2., 0.0442327])
    harpy.setNPparameters_uTMDPDF(
        [0.17975, 3.9081, 453.883, 2.07199, 1.60774, 0, 0.0014, 0.442, 4.14])
    harpy.setNPparameters_uTMDFF([0.26994, 0.456091, 0.423312, 0.615092])
コード例 #3
0
def SetUnReplica(n):
    unSet.SetReplica(n, part="TMDR")
    unSet.SetReplica(n, part="uTMDFF")
    rr = unSet.GetReplica(n, part="uTMDPDF")
    harpy.setNPparameters_uTMDPDF(rr[:-1] + [0.0014, 0.442, 4.14])
コード例 #4
0
path_to_constants = MAINPATH + "FittingPrograms/Sivers20/Constants-files/"
#harpy.initialize(path_to_constants+"const-Sivers20_lo")

# harpy.initialize(path_to_constants+"const-Sivers20_nnlo_piK")

if (useOrder == "nnlo"):
    harpy.initialize(path_to_constants + "const-Sivers20_nnlo")

    #### All=0 Case
    unSet = DataProcessor.ArtemideReplicaSet.ReadRepFile(
        "/home/vla18041/LinkData2/arTeMiDe_Repository/artemide/Models/SV19/Replicas/DY+SIDIS/SV19_nnlo_all=0.rep"
    )
    unSet.SetReplica(0, part="TMDR")
    unSet.SetReplica(0, part="uTMDFF")
    rr = unSet.GetReplica(0, part="uTMDPDF")
    harpy.setNPparameters_uTMDPDF(rr[:-1] + [0.0014, 0.442, 4.14])

    # # #### All=0 case piK
    # harpy.setNPparameters_TMDR([2., 0.0394095])
    # harpy.setNPparameters_uTMDPDF([0.180718, 4.38119, 426.208, 2.22347, -0.0646396, 0., 0.17, 0.48, 2.15])
    # harpy.setNPparameters_uTMDFF([0.293548, 0.462093, 0.442867, 0.590596, 0.427915, 0.462578, 0.304421,1.18113])
elif (useOrder == "n3lo"):
    harpy.initialize(path_to_constants + "const-Sivers20_n3lo")

    #### All=0 Case n3lo
    unSet = DataProcessor.ArtemideReplicaSet.ReadRepFile(
        "/home/vla18041/LinkData2/arTeMiDe_Repository/artemide/Models/SV19/Replicas/DY+SIDIS/SV19_n3lo_all=0.rep"
    )
    unSet.SetReplica(0, part="TMDR")
    unSet.SetReplica(0, part="uTMDFF")
    rr = unSet.GetReplica(0, part="uTMDPDF")
コード例 #5
0
import DataProcessor.ArtemideReplicaSet

MAINPATH = "/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/"

#%%
#######################################
#Initialize artemide
#######################################
import harpy

path_to_constants = MAINPATH + "FittingPrograms/SV19/Constants-files/" + "DY+SIDIS_nnlo/const-DY+SIDIS_NNPDF31+DSS_nnlo"

harpy.initialize(path_to_constants)

harpy.setNPparameters_TMDR([1.93, 0.0434])
harpy.setNPparameters_uTMDPDF(
    [0.253434, 9.04351, 346.999, 2.47992, -5.69988, 0.1, 0.])
harpy.setNPparameters_uTMDFF([0.264, 0.479, 0.459, 0.539])


#%%
##################Cut function
def cutFunc(p):
    if p["type"] == "DY":
        delta = p["<qT>"] / p["<Q>"]
    return delta < 0.25, p


#%%
### Loading the DY data set
theData = DataProcessor.DataSet.LoadCSV(
    "/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/OtherPrograms/LHC_impact_Study/LHC13TeV-Empty.csv"
コード例 #6
0
MAINPATH="/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/OtherPrograms/TMDGrids/"
SAVEPATH="/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/OtherPrograms/TMDGrids/Grids/SV19_"+prefix+"/SV19_"+prefix

#%%
#######################################
# Initializing artemide
#######################################
import harpy
path_to_constants=MAINPATH+"Constants/"
#harpy.initialize(path_to_constants+"const-TMDPDF-NNPDF")
harpy.initialize(path_to_constants+"const-Vpion19_nnlo")

#rSet=DataProcessor.ArtemideReplicaSet.ReadRepFile("/home/vla18041/LinkData2/arTeMiDe_Repository/artemide/Models/SV19/Replicas/DY+SIDIS/SV19_n3lo_all=0.rep")
rSet=DataProcessor.ArtemideReplicaSet.ReadRepFile("/home/vla18041/LinkData2/arTeMiDe_Repository/artemide/Models/SV19/Replicas/DY+SIDIS/SV19_n3lo.rep")
rSet.SetReplica(num=0,part="TMDR")
harpy.setNPparameters_uTMDPDF([0.17975, 3.9081, 453.883, 2.07199, 1.60774, 0,  0.0014, 0.442, 4.14])


#%%
#######################################
# Save Grid specification
#######################################
with open(SAVEPATH+'.info', 'w') as outfile:
    outfile.write("SetDesc: Unpolarized TMDPDF (pion+) SV19_"+prefix+". The sets n=1,2,...,6 are"
                  +" boundaries of Hessian uncertanty band coresponding to 3 NP parameters of the model. \n")
    outfile.write("Authors: A.Vladimirov"+"\n"),
    outfile.write("Reference: arXiv:1907.10356"+"\n"),
    outfile.write("SetIndex: 710000"+"\n"),
    outfile.write("TMDScheme: Pavia TMDs"+"\n"),
    outfile.write("TMDType: pdf"+"\n"),
    outfile.write("CollDist: JAM18PionPDFnlo"+"\n"),
コード例 #7
0
import DataProcessor.harpyInterface
import DataProcessor.DataMultiSet

MAINPATH="/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/FittingPrograms/Vpion19/"
#%%
#######################################
#Initialize artemide with a replica -2
#######################################
import harpy
path_to_constants=MAINPATH+"Constants-files/"
#harpy.initialize(path_to_constants+"DY_nnlo/const-Vpion19_nnlo")
harpy.initialize(path_to_constants+"const-Vpion19_nnlo_all=0")

#### All=0 Case
harpy.setNPparameters_TMDR([2., 0.0398333])
harpy.setNPparameters_uTMDPDF([0.184739, 6.22437, 588.193, 2.44327, -2.51106, 0.,  0.17, 0.48, 2.15])


#%%
### read the list of files and return the list of DataSets
def loadThisData(listOfNames):    
    import DataProcessor.DataSet
    
    path_to_data="/home/vla18041/LinkData2/arTeMiDe_Repository/DataProcessor/DataLib/piDY/"
    
    
    dataCollection=[]
    for name in listOfNames:
        loadedData=DataProcessor.DataSet.LoadCSV(path_to_data+name+".csv")
        dataCollection.append(loadedData)   
コード例 #8
0
    def SetReplica(self, num=0, part='full'):
        """
        Set the replica according to the list

        Parameters
        ----------
        num : -1 = initla replica
              0  = mean replica
              1.... = replica from list
            The default is 0.
        
        part : string, optional
            Specification which part of the replica to be set. The default is "full".
            Possible values: 'full', 'TMDR', 'uTMDPDF', 'uTMDFF', 'lpTMDPDF', 'SiversTMDPDF', etc

        Returns
        -------
        None.

        """
        import harpy

        if (num == 0):
            r = self.meanReplica
        elif (num == -1):
            r = self.initialReplica
        else:
            r = self.replicaList[num - 1]

        ## resolvinf the part-condition
        if (part == "full"):
            doTMDR = True
            douTMDPDF = True
            douTMDFF = True
            dolpTMDPDF = True
            doSiversTMDPDF = True
        else:
            doTMDR = False
            douTMDPDF = False
            douTMDFF = False
            dolpTMDPDF = False
            doSiversTMDPDF = False

            if (part == 'TMDR'):
                doTMDR = True
            if (part == 'uTMDPDF'):
                douTMDPDF = True
            if (part == 'uTMDFF'):
                douTMDFF = True
            if (part == 'lpTMDPDF'):
                dolpTMDPDF = True
            if (part == 'SiversTMDPDF'):
                doSiversTMDPDF = True

        if (doTMDR and self._TMDRend >= self._TMDRstart + 1 > 0):
            harpy.setNPparameters_TMDR(r[self._TMDRstart:self._TMDRend])

        if (douTMDPDF and self._uTMDPDFend >= self._uTMDPDFstart + 1 > 0):
            if (self._c_uTMDPDFend >= self._c_uTMDPDFstart + 1 > 0):
                harpy.setPDFreplica(r[self._c_uTMDPDFstart])
            harpy.setNPparameters_uTMDPDF(
                r[self._uTMDPDFstart:self._uTMDPDFend])

        if (douTMDFF and self._uTMDFFend >= self._uTMDFFstart + 1 > 0):
            if (self._c_uTMDFFend >= self._c_uTMDFFstart + 1 > 0):
                print("Modification of FF replica is not implimented")
            harpy.setNPparameters_uTMDFF(r[self._uTMDFFstart:self._uTMDFFend])

        if (dolpTMDPDF and self._lpTMDPDFend >= self._lpTMDPDFstart + 1 > 0):
            if (self._c_lpTMDPDFend >= self._c_lpTMDPDFstart + 1 > 0):
                print("Modification of lpPDF replica is not implimented")
            harpy.setNPparameters_lpTMDPDF(
                r[self._lpTMDPDFstart:self._lpTMDPDFend])

        if (doSiversTMDPDF
                and self._SiversTMDPDFend >= self._SiversTMDPDFstart + 1 > 0):
            if (self._SiversTMDPDFend >= self._SiversTMDPDFstart + 1 > 0):
                print("Modification of Sivers replica is not implimented")
            harpy.setNPparameters_SiversTMDPDF(
                r[self._SiversTMDPDFstart:self._SiversTMDPDFend])