parentSCEZ = parentZ + sce_offsets_v[2]
                scedr = np.sqrt((parentSCEX - vtxX)**2 +
                                (parentSCEY - vtxY)**2 +
                                (parentSCEZ - vtxZ)**2)
            else:
                parentSCEX = parentX
                parentSCEY = parentY
                parentSCEZ = parentZ
                scedr = 99997

        # for 1mu1p (only difference is energy used)
        Ecal_1m1p = ECal(mE, pE, 'muon', B=BE)
        dEp_1m1p = EpCCQE - Ecal_1m1p
        dEm_1m1p = EmCCQE - Ecal_1m1p
        dEmp_1m1p = EpCCQE - EmCCQE
        pTRat_1m1p = pTransRat(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        Q2cal_1m1p = Q2(Ecal_1m1p, mE, lTh, 'muon')
        Q3_1m1p, Q0_1m1p = Getq3q0(pE, mE, pTh, lTh, pPh, lPh, 'muon', B=BE)
        EHad_1m1p = (Ecal_1m1p - mE - 105.66)
        y_1m1p = EHad_1m1p / Ecal_1m1p
        x_1m1p = Q2cal_1m1p / (2 * 939.5654 * EHad_1m1p)
        sph_1m1p = sqrt(dEp_1m1p**2 + dEm_1m1p**2 + dEmp_1m1p**2)
        phiT_1m1p = GetPhiT(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        pzenu_1m1p = Getpz(mE, pE, lTh, pTh, 'muon') - Ecal_1m1p
        pT_1m1p = pTrans(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        alphT_1m1p = alphaT(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        CCQE_energy_shift_1m1p = SensibleMinimize(mE,
                                                  pE,
                                                  lTh,
                                                  pTh,
                                                  lPh,
Exemplo n.º 2
0
        openAng = OpenAngle(pTh, lTh, pPh, lPh)
        shwFrac = shrFrac[IDvtx]
        eta = abs(ev.Avg_Ion_v[pid] - ev.Avg_Ion_v[lid]) / (ev.Avg_Ion_v[pid] +
                                                            ev.Avg_Ion_v[lid])

        longtracklen = max(ev.Length_v)
        shorttracklen = min(ev.Length_v)
        maxshrFrac = max(shrFracPart[IDvtx])
        minshrFrac = min(shrFracPart[IDvtx])

        # for 1mu1p (only difference is energy used)
        Ecal_1m1p = ECal(mE, pE, 'muon')
        dEp_1m1p = EpCCQE - Ecal_1m1p
        dEm_1m1p = EmCCQE - Ecal_1m1p
        dEmp_1m1p = EpCCQE - EmCCQE
        pTRat_1m1p = pTransRat(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        Q2cal_1m1p = Q2(Ecal_1m1p, mE, lTh, 'muon')
        EHad_1m1p = (Ecal_1m1p - mE - 105.66)
        y_1m1p = EHad_1m1p / Ecal_1m1p
        x_1m1p = Q2cal_1m1p / (2 * 939.5654 * EHad_1m1p)
        sph_1m1p = sqrt(dEp_1m1p**2 + dEm_1m1p**2 + dEmp_1m1p**2)
        phiT_1m1p = GetPhiT(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        pT_1m1p = pTrans(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        pzenu_1m1p = Getpz(mE, pE, lTh, pTh, 'muon') - Ecal_1m1p
        alphT_1m1p = alphaT(mE, pE, lTh, pTh, lPh, pPh, 'muon')
        CCQE_energy_shift_1m1p = SensibleMinimize(mE, pE, lTh, pTh, lPh, pPh,
                                                  'muon')

        # Now boost these badbois
        pEB_1m1p, mEB_1m1p, pThB_1m1p, mThB_1m1p, pPhB_1m1p, mPhB_1m1p, EcalB_1m1p, EpCCQEB_1m1p, EmCCQEB_1m1p, sphB_1m1p = BoostTracks(
            mE, pE, lTh, pTh, lPh, pPh, 'muon')