ATLAS Offline Software
Functions | Variables
dqt_zlumi_alleff_HIST Namespace Reference

Functions

def extract (histogram)
 

Variables

float ACCEPTANCE = 3.323224e-01
 
 parser = argparse.ArgumentParser()
 
 type
 
 str
 
 help
 
 default
 
 action
 
 args = parser.parse_args()
 
 infilename = args.infile
 
 infile = ROOT.TFile.Open(infilename, 'READ')
 
 runmode = args.mode
 
 runname = None
 
list lbdirs = []
 
 lbnums = sorted([int(_[3:]) for _ in lbdirs])
 
 effcyt
 
 effcyr
 
 effcya
 
 effcydir
 
 fout = ROOT.TFile(args.out if args.out else '%s_all.root' % runname[4:], 'RECREATE')
 
 o_run = array('I', [0])
 
 o_lb = array('I', [0])
 
 o_lbwhen = array('d', [0., 0.])
 
 o_z_one = array('f', [0.])
 
 o_z_two = array('f', [0.])
 
 o_trigeff = array('f', [0.])
 
 o_trigeffstat = array('f', [0.])
 
 o_recoeff = array('f', [0.])
 
 o_recoeffstat = array('f', [0.])
 
 o_alleff = array('f', [0.])
 
 o_alleffstat = array('f', [0.])
 
 o_ae = array('f', [0.])
 
 o_aestat = array('f', [0.])
 
 tl = ROOT.TTree( 'lumitree', 'Luminosity tree' )
 
 lblb = fetch_iovs("LBLB", runs=int(runname[4:])).by_run
 
 h = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_eltrigtp_matches' % (runname, lb))
 
 hmo = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_os' % (runname, lb))
 
 hms = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_ss' % (runname, lb))
 
 hno = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_os' % (runname, lb))
 
 hns = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_ss' % (runname, lb))
 
 lbnum = int(lb[3:])
 
tuple yld = (h[2], h[3])
 
tuple ylderr = (h.GetBinError(2), h.GetBinError(3))
 
 A = float(matchos-matchss)
 
 B = float(nomatchos-nomatchss)
 
int eff = 1./(float(A)/B/2.+1.)
 
tuple inverrsq = ((1/2./B)*ylderr[0])**2+((A/2./B**2)*ylderr[1])**2
 
 iov = lblb[int(runname[4:])][lbnum-1]
 
 matchos
 
 matchoserr
 
 matchss
 
 matchsserr
 
 nomatchos
 
 nomatchoserr
 
 nomatchss
 
 nomatchsserr
 
tuple Aerr = (matchoserr**2+matchsserr**2)**.5
 
tuple Berr = (nomatchoserr**2+nomatchsserr**2)**.5
 
 c1 = ROOT.TCanvas()
 
 sumweights = infile.Get('%s/GLOBAL/DQTDataFlow/m_sumweights' % runname)
 
 ctr = infile.Get('%s/GLOBAL/DQTGlobalWZFinder/m_Z_Counter_el' % runname)
 
 ctrbin = ctr.FindBin(o_lb[0])
 
 p = ctr[ctrbin]/sumweights[ibin]
 
 leg = ROOT.TLegend(0.65, 0.7, 0.89, 0.89)
 
 effcyrat = effcydir.Clone()
 

Function Documentation

◆ extract()

def dqt_zlumi_alleff_HIST.extract (   histogram)

Definition at line 126 of file dqt_zlumi_alleff_HIST.py.

126  def extract(histogram):
127  dbl = ROOT.Double()
128  rv1 = histogram.IntegralAndError(21, 30, dbl)
129  return (rv1, float(dbl))

Variable Documentation

◆ A

dqt_zlumi_alleff_HIST.A = float(matchos-matchss)

Definition at line 110 of file dqt_zlumi_alleff_HIST.py.

◆ ACCEPTANCE

float dqt_zlumi_alleff_HIST.ACCEPTANCE = 3.323224e-01

Definition at line 9 of file dqt_zlumi_alleff_HIST.py.

◆ action

dqt_zlumi_alleff_HIST.action

Definition at line 17 of file dqt_zlumi_alleff_HIST.py.

◆ Aerr

tuple dqt_zlumi_alleff_HIST.Aerr = (matchoserr**2+matchsserr**2)**.5

Definition at line 141 of file dqt_zlumi_alleff_HIST.py.

◆ args

dqt_zlumi_alleff_HIST.args = parser.parse_args()

Definition at line 21 of file dqt_zlumi_alleff_HIST.py.

◆ B

dqt_zlumi_alleff_HIST.B = float(nomatchos-nomatchss)

Definition at line 110 of file dqt_zlumi_alleff_HIST.py.

◆ Berr

dqt_zlumi_alleff_HIST.Berr = (nomatchoserr**2+nomatchsserr**2)**.5

Definition at line 143 of file dqt_zlumi_alleff_HIST.py.

◆ c1

dqt_zlumi_alleff_HIST.c1 = ROOT.TCanvas()

Definition at line 168 of file dqt_zlumi_alleff_HIST.py.

◆ ctr

dqt_zlumi_alleff_HIST.ctr = infile.Get('%s/GLOBAL/DQTGlobalWZFinder/m_Z_Counter_el' % runname)

Definition at line 193 of file dqt_zlumi_alleff_HIST.py.

◆ ctrbin

dqt_zlumi_alleff_HIST.ctrbin = ctr.FindBin(o_lb[0])

Definition at line 200 of file dqt_zlumi_alleff_HIST.py.

◆ default

dqt_zlumi_alleff_HIST.default

Definition at line 16 of file dqt_zlumi_alleff_HIST.py.

◆ eff

int dqt_zlumi_alleff_HIST.eff = 1./(float(A)/B/2.+1.)

Definition at line 113 of file dqt_zlumi_alleff_HIST.py.

◆ effcya

dqt_zlumi_alleff_HIST.effcya
Initial value:
1 = ROOT.TH1F('effcya', 'Combined acc x efficiency', lbnums[-1]-lbnums[0]+1, lbnums[0]-0.5,
2  lbnums[-1]+0.5)

Definition at line 53 of file dqt_zlumi_alleff_HIST.py.

◆ effcydir

dqt_zlumi_alleff_HIST.effcydir
Initial value:
1 = ROOT.TH1F('effcydir', 'Direct acc x efficiency', lbnums[-1]-lbnums[0]+1, lbnums[0]-0.5,
2  lbnums[-1]+0.5)

Definition at line 55 of file dqt_zlumi_alleff_HIST.py.

◆ effcyr

dqt_zlumi_alleff_HIST.effcyr
Initial value:
1 = ROOT.TH1F('effcyr', 'Loose muon reco efficiency', lbnums[-1]-lbnums[0]+1, lbnums[0]-0.5,
2  lbnums[-1]+0.5)

Definition at line 51 of file dqt_zlumi_alleff_HIST.py.

◆ effcyrat

dqt_zlumi_alleff_HIST.effcyrat = effcydir.Clone()

Definition at line 223 of file dqt_zlumi_alleff_HIST.py.

◆ effcyt

dqt_zlumi_alleff_HIST.effcyt
Initial value:
1 = ROOT.TH1F('effcyt', 'Trigger efficiency', lbnums[-1]-lbnums[0]+1, lbnums[0]-0.5,
2  lbnums[-1]+0.5)

Definition at line 49 of file dqt_zlumi_alleff_HIST.py.

◆ fout

dqt_zlumi_alleff_HIST.fout = ROOT.TFile(args.out if args.out else '%s_all.root' % runname[4:], 'RECREATE')

Definition at line 59 of file dqt_zlumi_alleff_HIST.py.

◆ h

dqt_zlumi_alleff_HIST.h = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_eltrigtp_matches' % (runname, lb))

Definition at line 95 of file dqt_zlumi_alleff_HIST.py.

◆ help

dqt_zlumi_alleff_HIST.help

Definition at line 13 of file dqt_zlumi_alleff_HIST.py.

◆ hmo

dqt_zlumi_alleff_HIST.hmo = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_os' % (runname, lb))

Definition at line 96 of file dqt_zlumi_alleff_HIST.py.

◆ hms

dqt_zlumi_alleff_HIST.hms = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_good_ss' % (runname, lb))

Definition at line 97 of file dqt_zlumi_alleff_HIST.py.

◆ hno

dqt_zlumi_alleff_HIST.hno = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_os' % (runname, lb))

Definition at line 98 of file dqt_zlumi_alleff_HIST.py.

◆ hns

dqt_zlumi_alleff_HIST.hns = infile.Get('%s/%s/GLOBAL/DQTGlobalWZFinder/m_ele_tight_bad_ss' % (runname, lb))

Definition at line 99 of file dqt_zlumi_alleff_HIST.py.

◆ infile

dqt_zlumi_alleff_HIST.infile = ROOT.TFile.Open(infilename, 'READ')

Definition at line 24 of file dqt_zlumi_alleff_HIST.py.

◆ infilename

dqt_zlumi_alleff_HIST.infilename = args.infile

Definition at line 23 of file dqt_zlumi_alleff_HIST.py.

◆ inverrsq

tuple dqt_zlumi_alleff_HIST.inverrsq = ((1/2./B)*ylderr[0])**2+((A/2./B**2)*ylderr[1])**2

Definition at line 114 of file dqt_zlumi_alleff_HIST.py.

◆ iov

dqt_zlumi_alleff_HIST.iov = lblb[int(runname[4:])][lbnum-1]

Definition at line 119 of file dqt_zlumi_alleff_HIST.py.

◆ lbdirs

list dqt_zlumi_alleff_HIST.lbdirs = []

Definition at line 41 of file dqt_zlumi_alleff_HIST.py.

◆ lblb

dqt_zlumi_alleff_HIST.lblb = fetch_iovs("LBLB", runs=int(runname[4:])).by_run

Definition at line 92 of file dqt_zlumi_alleff_HIST.py.

◆ lbnum

dqt_zlumi_alleff_HIST.lbnum = int(lb[3:])

Definition at line 106 of file dqt_zlumi_alleff_HIST.py.

◆ lbnums

dqt_zlumi_alleff_HIST.lbnums = sorted([int(_[3:]) for _ in lbdirs])

Definition at line 47 of file dqt_zlumi_alleff_HIST.py.

◆ leg

dqt_zlumi_alleff_HIST.leg = ROOT.TLegend(0.65, 0.7, 0.89, 0.89)

Definition at line 217 of file dqt_zlumi_alleff_HIST.py.

◆ matchos

dqt_zlumi_alleff_HIST.matchos

Definition at line 130 of file dqt_zlumi_alleff_HIST.py.

◆ matchoserr

dqt_zlumi_alleff_HIST.matchoserr

Definition at line 130 of file dqt_zlumi_alleff_HIST.py.

◆ matchss

dqt_zlumi_alleff_HIST.matchss

Definition at line 131 of file dqt_zlumi_alleff_HIST.py.

◆ matchsserr

dqt_zlumi_alleff_HIST.matchsserr

Definition at line 131 of file dqt_zlumi_alleff_HIST.py.

◆ nomatchos

dqt_zlumi_alleff_HIST.nomatchos

Definition at line 132 of file dqt_zlumi_alleff_HIST.py.

◆ nomatchoserr

dqt_zlumi_alleff_HIST.nomatchoserr

Definition at line 132 of file dqt_zlumi_alleff_HIST.py.

◆ nomatchss

dqt_zlumi_alleff_HIST.nomatchss

Definition at line 133 of file dqt_zlumi_alleff_HIST.py.

◆ nomatchsserr

dqt_zlumi_alleff_HIST.nomatchsserr

Definition at line 133 of file dqt_zlumi_alleff_HIST.py.

◆ o_ae

dqt_zlumi_alleff_HIST.o_ae = array('f', [0.])

Definition at line 71 of file dqt_zlumi_alleff_HIST.py.

◆ o_aestat

dqt_zlumi_alleff_HIST.o_aestat = array('f', [0.])

Definition at line 72 of file dqt_zlumi_alleff_HIST.py.

◆ o_alleff

dqt_zlumi_alleff_HIST.o_alleff = array('f', [0.])

Definition at line 69 of file dqt_zlumi_alleff_HIST.py.

◆ o_alleffstat

dqt_zlumi_alleff_HIST.o_alleffstat = array('f', [0.])

Definition at line 70 of file dqt_zlumi_alleff_HIST.py.

◆ o_lb

dqt_zlumi_alleff_HIST.o_lb = array('I', [0])

Definition at line 61 of file dqt_zlumi_alleff_HIST.py.

◆ o_lbwhen

dqt_zlumi_alleff_HIST.o_lbwhen = array('d', [0., 0.])

Definition at line 62 of file dqt_zlumi_alleff_HIST.py.

◆ o_recoeff

dqt_zlumi_alleff_HIST.o_recoeff = array('f', [0.])

Definition at line 67 of file dqt_zlumi_alleff_HIST.py.

◆ o_recoeffstat

dqt_zlumi_alleff_HIST.o_recoeffstat = array('f', [0.])

Definition at line 68 of file dqt_zlumi_alleff_HIST.py.

◆ o_run

dqt_zlumi_alleff_HIST.o_run = array('I', [0])

Definition at line 60 of file dqt_zlumi_alleff_HIST.py.

◆ o_trigeff

dqt_zlumi_alleff_HIST.o_trigeff = array('f', [0.])

Definition at line 65 of file dqt_zlumi_alleff_HIST.py.

◆ o_trigeffstat

dqt_zlumi_alleff_HIST.o_trigeffstat = array('f', [0.])

Definition at line 66 of file dqt_zlumi_alleff_HIST.py.

◆ o_z_one

dqt_zlumi_alleff_HIST.o_z_one = array('f', [0.])

Definition at line 63 of file dqt_zlumi_alleff_HIST.py.

◆ o_z_two

dqt_zlumi_alleff_HIST.o_z_two = array('f', [0.])

Definition at line 64 of file dqt_zlumi_alleff_HIST.py.

◆ p

dqt_zlumi_alleff_HIST.p = ctr[ctrbin]/sumweights[ibin]

Definition at line 203 of file dqt_zlumi_alleff_HIST.py.

◆ parser

dqt_zlumi_alleff_HIST.parser = argparse.ArgumentParser()

Definition at line 12 of file dqt_zlumi_alleff_HIST.py.

◆ runmode

dqt_zlumi_alleff_HIST.runmode = args.mode

Definition at line 26 of file dqt_zlumi_alleff_HIST.py.

◆ runname

dqt_zlumi_alleff_HIST.runname = None

Definition at line 30 of file dqt_zlumi_alleff_HIST.py.

◆ str

dqt_zlumi_alleff_HIST.str

Definition at line 13 of file dqt_zlumi_alleff_HIST.py.

◆ sumweights

dqt_zlumi_alleff_HIST.sumweights = infile.Get('%s/GLOBAL/DQTDataFlow/m_sumweights' % runname)

Definition at line 192 of file dqt_zlumi_alleff_HIST.py.

◆ tl

dqt_zlumi_alleff_HIST.tl = ROOT.TTree( 'lumitree', 'Luminosity tree' )

Definition at line 73 of file dqt_zlumi_alleff_HIST.py.

◆ type

dqt_zlumi_alleff_HIST.type

Definition at line 13 of file dqt_zlumi_alleff_HIST.py.

◆ yld

tuple dqt_zlumi_alleff_HIST.yld = (h[2], h[3])

Definition at line 107 of file dqt_zlumi_alleff_HIST.py.

◆ ylderr

tuple dqt_zlumi_alleff_HIST.ylderr = (h.GetBinError(2), h.GetBinError(3))

Definition at line 108 of file dqt_zlumi_alleff_HIST.py.

dqt_zlumi_alleff_HIST.extract
def extract(histogram)
Definition: dqt_zlumi_alleff_HIST.py:126
readCCLHist.float
float
Definition: readCCLHist.py:83