ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
AnalysisCommon
PMGTools
python
python/test_PMGCrossSectionTool.py
Go to the documentation of this file.
1
#!/bin/env python
2
3
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4
import
ROOT
5
6
def
main
():
7
from
PathResolver
import
PathResolver
8
9
tool = ROOT.PMGTools.PMGCrossSectionTool(
'MyXSectionTool'
)
10
11
fn =
'/eos/atlas/atlascerngroupdisk/asg-calib/dev/PMGTools/PMGxsecDB_mc16.txt'
12
fn =
PathResolver.FindCalibFile
(fn)
13
vv = ROOT.std.vector(
'std::string'
)()
14
vv.push_back(fn)
15
16
tool.readInfosFromFiles(vv)
17
18
# take a Ztautau sample as example ( users should get this from the EventInfo )
19
sample_id = 361108
20
e_tag = 3601
21
22
print
(
'%d sample loaded'
% tool.getLoadedDSIDs().
size
())
23
print
()
24
print
(
'Sample dsid = '
, sample_id)
25
print
(
'Sample e-tag = '
, e_tag)
26
print
(
'Sample name = '
, tool.getSampleName(sample_id, e_tag))
27
print
(
'xsection [pb] = '
, tool.getSampleXsection(sample_id, e_tag))
28
print
(
'filter eff = '
, tool.getFilterEff(sample_id, e_tag))
29
print
(
'k factor = '
, tool.getKfactor(sample_id, e_tag))
30
print
(
'xsection uncertainty = '
, tool.getXsectionUncertainty(sample_id, e_tag))
31
print
(
'xsection uncertainty up = '
, tool.getXsectionUncertaintyUP(sample_id, e_tag))
32
print
(
'xsection uncertainty down = '
, tool.getXsectionUncertaintyDOWN(sample_id, e_tag))
33
34
print
()
35
36
if
__name__ ==
'__main__'
:
37
ROOT.gROOT.ProcessLine(
'.x $ROOTCOREDIR/scripts/load_packages.C'
)
38
main
()
size
size_t size() const
Number of registered mappings.
print
void print(char *figname, TCanvas *c1)
Definition
TRTCalib_StrawStatusPlots.cxx:26
PathResolver::FindCalibFile
static std::string FindCalibFile(const std::string &logical_file_name)
Definition
PathResolver.h:63
test_PMGCrossSectionTool.main
main()
Definition
python/test_PMGCrossSectionTool.py:6
Generated on
for ATLAS Offline Software by
1.17.0