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.
Loading...
Searching...
No Matches
anaFeeSmearing_2021_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import os
3import sys
4import baseConfig as base
5
6options = base.parser.parse_args()
7
8# Use the input file to set the output file name
9inFilename = options.inFilename
10outFilename = options.outFilename
11
12# The seed is the file number.
13smearingSeed = options.seed
14
15print('Input file: %s' % inFilename)
16print('Output file: %s' % outFilename)
17
19
20p.run_mode = 1
21p.skip_events = options.skip_events
22p.max_events = options.nevents
23
24
25p.add_library("libprocessors")
26
27anaTrks = HpstrConf.Processor('anaTrks', 'FeeAnaProcessor')
28anaTrks.parameters["debug"] = 0
29anaTrks.parameters["seed"] = smearingSeed
30anaTrks.parameters["trkCollName"] = 'KalmanFullTracks'
31# FEE tracks come from the FinalStateParticles, where the track and its ECal cluster
32# are already associated at the LCIO stage (no manual track-cluster matching).
33anaTrks.parameters["fspCollName"] = 'FinalStateParticles_KF'
34anaTrks.parameters["histCfg"] = os.environ['HPSTR_BASE']+'/analysis/plotconfigs/fee_smearing/feeSmearing_2021.json'
35anaTrks.parameters["selectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/trackHit/trackHitAna.json'
36anaTrks.parameters["isData"] = options.isData
37
38# FEE (Full Energy Electron) selection
39anaTrks.parameters["requireElectron"] = 1 # track charge < 0
40anaTrks.parameters["requireCluster"] = 1 # require an associated full-energy cluster
41anaTrks.parameters["feeClusterEnergyMin"] = 2.5 # ~0.68 * 3.7 GeV beam
42# E/p window (off by default: [0, 99]); tighten once the ECal energy scale is calibrated
43anaTrks.parameters["eopMin"] = 0.0
44anaTrks.parameters["eopMax"] = 99.0
45
46#SmearingClosureTest
47# Track corrections (data scale corrections, MC smearing), applied to track_smeared:
48# one TrackCorrector JSON. doSmearing and the seed stay per-job parameters.
49anaTrks.parameters["trackCorrectionsCfg"] = os.environ['HPSTR_BASE']+"/analysis/data/corrections/fee_2021_meancorr.json"
50anaTrks.parameters["doSmearing"] = 1 #0 if options.isData else 1
51
52# Scale correction: "" = use omega-space means (default); "tanLambda" = p-space means
53
54RegionPath = os.environ['HPSTR_BASE']+"/analysis/selections/feeSmearing/"
55anaTrks.parameters["regionDefinitions"] = []
56
57p.sequence = [anaTrks]
58
59p.input_files = inFilename
60p.output_files = [outFilename]
61
62p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4