示例#1
0
from TrigEgammaDevelopments.Event import EventLooper
from TrigEgammaDevelopments.AlgBaseTool import AlgBaseTool
from TrigEgammaDevelopments.tools.EfficiencyTool import EfficiencyTool
from TrigEgammaDevelopments.tools.QuadrantTool import QuadrantTool
from TrigEgammaDevelopments.tools.EmulationTool import EmulationTool
from TrigEgammaDevelopments.tools.EventSelection import EventSelection
from TrigEgammaDevelopments.selector.SelectorAlgTool import CaloRingerSelectorTool, egammaRingerPid
from TrigEgammaDevelopments.dataframe import ElectronCandidate
from TuningTools.dataframe.EnumCollection import Dataframe as DataframeEnum
from RingerCore import LoggingLevel, restoreStoreGate

store = restoreStoreGate('histos.root')

alg1 = QuadrantTool("QuadrantProbes")
alg1.basepath = 'Event/QuadrantTool/ZeeProbes'
alg1.add_quadrant('EFCalo_isLHVLooseCaloOnly_rel21_20170217',
                  'EFCalo_isRingerVLoose_v5')
alg1.add_quadrant('EFCalo_isLHLooseCaloOnly_rel21_20170217',
                  'EFCalo_isRingerLoose_v5')
alg1.add_quadrant('EFCalo_isLHMediumCaloOnly_rel21_20170217',
                  'EFCalo_isRingerMedium_v5')
alg1.add_quadrant('EFCalo_isLHTightCaloOnly_rel21_20170217',
                  'EFCalo_isRingerTight_v5')
alg1.add_quadrant(
    'EFCalo_isLHVLooseCaloOnly_rel21_20170217&HLT_isLHVLoose_rel21_20170217',
    'EFCalo_isRingerVLoose_v5&HLT_isLHVLoose_rel21_20170217')
alg1.add_quadrant(
    'EFCalo_isLHLooseCaloOnly_rel21_20170217&HLT_isLHLoose_rel21_20170217',
    'EFCalo_isRingerLoose_v5&HLT_isLHLoose_rel21_20170217')
alg1.add_quadrant(
    'EFCalo_isLHMediumCaloOnly_rel21_20170217&HLT_isLHMedium_rel21_20170217',
示例#2
0
mcpath = 'data/mc15_13TeV.ZeeLHLoose.JF17Truth.correction.root'
pppath = 'data/data16_13TeV.periodAtoK.physicsMain.ZeeLHLoose.correction.root'
mcBasepath = 'Event/Correction'
ppBasepath = 'Event/Correction'
nEtBins = 5
nEtaBins = 4

from RingerCore import restoreStoreGate
from TrigEgammaDevelopments.plots.AtlasStyle import *
from ROOT import TCanvas, TLegend, kBlack, kBlue, kRed, kGreen, kAzure

SetAtlasStyle()
storeMC = restoreStoreGate(mcpath)
storePP = restoreStoreGate(pppath)

pidnames = ['Tight', 'Medium', 'Loose', 'VeryLoose']

for pid in pidnames:

    for etBinIdx in range(nEtBins):

        canvas = TCanvas('canvas', 'canvas', 1800, 1000)
        canvas.Divide(nEtaBins, 2)
        objHolder = []
        ringerName = ('EFCalo_isRinger%s_v5') % (pid.replace('Very', 'V'))

        # for windows X 2 lines
        for etaBinIdx in range(nEtaBins):

            binname = ('et%d_eta%d') % (etBinIdx, etaBinIdx)
示例#3
0
import sys, os
if len(sys.argv) == 1:
    parser.print_help()
    sys.exit(1)

args = parser.parse_args()

# treat data input
# convert to int
relax = {'Tight':args.relax[0],'Medium':args.relax[1],\
         'Loose':args.relax[2],'VLoose':args.relax[3]}

from RingerCore import restoreStoreGate

sg1 = restoreStoreGate(args.inputFile)

# Calibration configs
algCalib = EffCorrTool('NNCalibration')
algCalib.setEtBinningValues(args.etbins)
algCalib.setEtaBinningValues(args.etabins)
algCalib.doTrigger = True
algCalib.setAlias(args.name)
algCalib.setLimits(args.limits)

from TrigEgammaDevelopments.helper import createEmulation_trigger_20170221_v6

algEmu, chains_emulated = createEmulation_trigger_20170221_v6()
chains = [pair[0] for key, pair in chains_emulated.iteritems()]
selectors = {}
示例#4
0
from TrigEgammaDevelopments.helper import createEmulation_trigger_20170221_v6
# Create emulation Ringer tool

algEmu, chains_emulated = createEmulation_trigger_20170221_v6()
chains = [pair[0] for key, pair in chains_emulated.iteritems()]
print chains

from TrigEgammaDevelopments.tools import DistributionTool
algDist = DistributionTool('DistributionTool')
algDist.setDiscriminantList(chains)
algDist.doTrigger = True

from RingerCore import restoreStoreGate
sg1 = restoreStoreGate('data/distributions_probes.root')
sg2 = restoreStoreGate('data/distributions_fakes.root')
#algDist.setStoreSvc(sg1)

from ROOT import kRed, kAzure
#algDist.plot(dirname = 'DistributionProbes', basecolor=kAzure+7)
algDist.setStoreSvc(sg1)
algDist.plot(dirname = 'DistributionProbes', basecolor=kAzure+7,
    pdftitle = 'MC15c and data16_13TeV comparison (Probes Distributions)',\
    pdfoutput = 'probes_distributions')

algDist.setStoreSvc(sg2)
algDist.plot(dirname = 'DistributionFakes', basecolor=kRed-7,
    pdftitle = 'MC15c and data16_13TeV comparison (Fake Distributions)',\
    pdfoutput = 'fakes_distributions')