def METHOD_NAME(process, premix=False):
    nopremix = not premix
    global _loadDigiAliasesWasCalledPremix
    _loadDigiAliasesWasCalledPremix = premix
    process.ecalPreshowerDigis = cms.EDAlias(
        **{"simEcalPreshowerDigis" if nopremix else "DMEcalPreshowerDigis" :
               cms.VPSet(
                cms.PSet(
                    type = cms.string("ESDigiCollection")
                    )
                )
           }
          )
    process.ecalDigis = cms.EDAlias(
        **{"simEcalDigis" if nopremix else "DMEcalDigis" : 
           cms.VPSet(
                cms.PSet(
                    type = cms.string("EBDigiCollection")
                    ),
                cms.PSet(
                    type = cms.string("EEDigiCollection")
                    ),
                cms.PSet(
                    type = cms.string("EBSrFlagsSorted"),
                    fromProductInstance = cms.string('ebSrFlags'),
                    toProductInstance = cms.string('')),
                cms.PSet(
                    type = cms.string("EESrFlagsSorted"),
                    fromProductInstance = cms.string('eeSrFlags'),
                    toProductInstance = cms.string(''),
                    )
                ),
           "simEcalTriggerPrimitiveDigis" if nopremix else "DMEcalTriggerPrimitiveDigis" :
           cms.VPSet(
                cms.PSet(
                    type = cms.string("EcalTriggerPrimitiveDigisSorted"),
                    fromProductInstance = cms.string(""),
                    toProductInstance = cms.string("EcalTriggerPrimitives")
                    )
                )
           }
          )
    process.hcalDigis = cms.EDAlias(
        **{"simHcalDigis" if nopremix else "DMHcalDigis" :
            cms.VPSet(
                cms.PSet(type = cms.string("HBHEDataFramesSorted")),
                cms.PSet(type = cms.string("HFDataFramesSorted")),
                cms.PSet(type = cms.string("HODataFramesSorted")),
                cms.PSet(
                    type = cms.string('QIE10DataFrameHcalDataFrameContainer'),
                    fromProductInstance = cms.string('HFQIE10DigiCollection'),
                    toProductInstance = cms.string('')
                ),
                cms.PSet(
                    type = cms.string('QIE11DataFrameHcalDataFrameContainer'),
                    fromProductInstance = cms.string('HBHEQIE11DigiCollection'),
                    toProductInstance = cms.string('')
                )
            )
           }
          )
    process.muonDTDigis = cms.EDAlias(
        simMuonDTDigis = cms.VPSet(
                cms.PSet(
                    type = cms.string("DTLayerIdDTDigiMuonDigiCollection")
                    ),
                #cms.PSet(
                #    type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection")
                #    )
                )
          )
    process.muonRPCDigis = cms.EDAlias(
        simMuonRPCDigis = cms.VPSet(
                cms.PSet(
                    type = cms.string("RPCDetIdRPCDigiMuonDigiCollection")
                    ),
                #cms.PSet(
                #    type = cms.string("RPCDigiSimLinkedmDetSetVector")
                #    )
                )
          )
    process.muonCSCDigis = cms.EDAlias(
        simMuonCSCDigis = cms.VPSet(
                cms.PSet(
                    type = cms.string("CSCDetIdCSCWireDigiMuonDigiCollection"),
                    fromProductInstance = cms.string("MuonCSCWireDigi"),
                    toProductInstance = cms.string("MuonCSCWireDigi")),
                cms.PSet(
                    type = cms.string("CSCDetIdCSCStripDigiMuonDigiCollection"),
                    fromProductInstance = cms.string("MuonCSCStripDigi"),
                    toProductInstance = cms.string("MuonCSCStripDigi")),
                #cms.PSet(
                #    type = cms.string('StripDigiSimLinkedmDetSetVector')
                #    ),
                )
          )