lawrenceleejr / ZeroLeptonAnalysis

1 stars 3 forks source link

Differences between RJigsaw fitting setup and MEff #18

Closed lawrenceleejr closed 8 years ago

lawrenceleejr commented 8 years ago

Below, current RJigsaw is < and recent MEff is >.

195,196c195
< # configMgr.nTOYs = 5000      # number of toys when doing frequentist calculator
< configMgr.nTOYs = 100      # number of toys when doing frequentist calculator

---
> configMgr.nTOYs = 5000      # number of toys when doing frequentist calculator
477a649,651
> sysWeight_theoSysSigUp = myreplace(configMgr.weights, ["normWeightUp"], "normWeight")
> sysWeight_theoSysSigDown = myreplace(configMgr.weights, ["normWeightDown"], "normWeight")
> theoSysSig = Systematic("SigXSec", configMgr.weights, sysWeight_theoSysSigUp, sysWeight_theoSysSigDown, "weight", "overallSys")
721c974
<         if zlFitterConfig.useBTagUncertainties and "bTagWeight" in regionDict[regionName].extraWeightList:

---
>         if zlFitterConfig.useBTagUncertainties and "btagSystWeights[0]" in regionDict[regionName].extraWeightList:

Let's just change the whole block to match theirs:


        #bTagging uncertainties        
        if zlFitterConfig.useBTagUncertainties and "btagSystWeights[0]" in regionDict[regionName].extraWeightList:

            btagSystematicList = []

            bTagSystWeightsBUp = myreplace(REGION.weights, ["btagSystWeights[1]"] , "btagSystWeights[0]")
            bTagSystWeightsBDown = myreplace(REGION.weights, ["btagSystWeights[2]"] , "btagSystWeights[0]")
            btagSystematicList.append(Systematic("EFF_B", REGION.weights  , bTagSystWeightsBUp, bTagSystWeightsBDown, "weight", "overallNormHistoSys"))

            bTagSystWeightsCUp = myreplace(REGION.weights, ["btagSystWeights[3]"] , "btagSystWeights[0]")
            bTagSystWeightsCDown = myreplace(REGION.weights, ["btagSystWeights[4]"] , "btagSystWeights[0]")
            btagSystematicList.append(Systematic("EFF_C", REGION.weights  , bTagSystWeightsCUp, bTagSystWeightsCDown, "weight", "overallNormHistoSys"))

            bTagSystWeightsLUp = myreplace(REGION.weights, ["btagSystWeights[5]"] , "btagSystWeights[0]")
            bTagSystWeightsLDown = myreplace(REGION.weights, ["btagSystWeights[6]"] , "btagSystWeights[0]")
            btagSystematicList.append(Systematic("EFF_Light", REGION.weights  , bTagSystWeightsLUp, bTagSystWeightsLDown, "weight", "overallNormHistoSys"))

            bTagSystWeightsExtrapolationUp = myreplace(REGION.weights, ["btagSystWeights[7]"] , "btagSystWeights[0]")
            bTagSystWeightsExtrapolationDown = myreplace(REGION.weights, ["btagSystWeights[8]"] , "btagSystWeights[0]")
            btagSystematicList.append(Systematic("EFF_extrapolation", REGION.weights  , bTagSystWeightsExtrapolationUp, bTagSystWeightsExtrapolationDown, "weight", "overallNormHistoSys"))

            bTagSystWeightsExtrapolationFromCharmUp = myreplace(REGION.weights, ["btagSystWeights[9]"] , "btagSystWeights[0]")
            bTagSystWeightsExtrapolationFromCharmDown = myreplace(REGION.weights, ["btagSystWeights[10]"] , "btagSystWeights[0]")
            btagSystematicList.append(Systematic("EFF_extrapolation_from_charm", REGION.weights  , bTagSystWeightsExtrapolationFromCharmUp, bTagSystWeightsExtrapolationFromCharmDown, "weight", "overallNormHistoSys"))

            for sam in REGION.sampleList:
                if sam.name==zlFitterConfig.zSampleName: continue #ATT : prb with Z samples!!!!!
                for sys in btagSystematicList:
                    sam.addSystematic(sys)

but it probably shouldn't be wrapped in the if statement for precomputed

<     #JER systematics
<     jetSystematicList.append(Systematic("JER","","_JET_JER_SINGLE_NP_1up","_JET_JER_SINGLE_NP_1up","tree","overallNormHistoSysOneSideSym"))# ATT: Not sure that it should be symmetrized
< 

---
>     # JER systematics
>     # ATT: Not sure that it should be symmetrized    
>     jetSystematicList.append(Systematic("JER", "", "_JET_JER_SINGLE_NP_1up", "", "tree", "overallNormHistoSysOneSide"))
946,949c1173,1175
<     metSystematicList.append(Systematic("MET_SoftTrk_ResoPara","","_MET_SoftTrk_ResoPara","_MET_SoftTrk_ResoPara","tree","overallNormHistoSysOneSideSym"))
<     metSystematicList.append(Systematic("MET_SoftTrk_ResoPerp","","_MET_SoftTrk_ResoPerp","_MET_SoftTrk_ResoPerp","tree","overallNormHistoSysOneSideSym"))
<     metSystematicList.append(Systematic("MET_SoftTrk_Scale","","_MET_SoftTrk_ScaleUp","_MET_SoftTrk_ScaleDown","tree","overallNormHistoSys"))
< 

---
>     metSystematicList.append(Systematic("MET_SoftTrk_ResoPara", "", "_MET_SoftTrk_ResoPara", "", "tree", "overallNormHistoSysOneSide"))
>     metSystematicList.append(Systematic("MET_SoftTrk_ResoPerp", "", "_MET_SoftTrk_ResoPerp", "", "tree", "overallNormHistoSysOneSide"))
>     metSystematicList.append(Systematic("MET_SoftTrk_Scale", "", "_MET_SoftTrk_ScaleUp", "_MET_SoftTrk_ScaleDown", "tree", "overallNormHistoSys"))
lawrenceleejr commented 8 years ago

Most fixed in #19