hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
anaBeamMCTuple_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3import os
4import baseConfig as base
5
6#options = base.parser.parse_args()
7
8
9base.parser.add_argument("-w", "--tracking", type=str, dest="tracking",
10 help="Which tracking to use to make plots", metavar="tracking", default="KF")
11options = base.parser.parse_args()
12
13
14print(options)
15
16# Use the input file to set the output file name
17infile = options.inFilename
18outfile = options.outFilename
19
20analysis = "beam"
21
22
23
24print('Input file: %s' % infile)
25print('Output file: %s' % outfile)
26print('Analysis : %s' % analysis)
27
29
30p.run_mode = 1
31p.skip_events = options.skip_events
32p.max_events = options.nevents
33
34#p.max_events = 1000
35
36# Library containing processors
37p.add_library("libprocessors")
38
39
42
43mcana = HpstrConf.Processor('mcana', 'MCAnaProcessor')
44
45
49mcana.parameters["debug"] = 0
50mcana.parameters["anaName"] = "mcAna"
51mcana.parameters["partColl"] = "MCParticle"
52mcana.parameters["trkrHitColl"] = "TrackerHits"
53mcana.parameters["ecalHitColl"] = "EcalHits"
54mcana.parameters["analysis"] = analysis
55mcana.parameters["histCfg"] = os.environ['HPSTR_BASE']+'/analysis/plotconfigs/mc/beamMC.json'
56
57# Sequence which the processors will run.
58p.sequence = [mcana]
59
60p.input_files = infile
61p.output_files = [outfile]
62
63p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4