MakeSystFhicls.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import os, sys
4 
5 detectors = [ "nd", "fd" ]
6 
7 metadata = { "lightdowncalibup":"lldown",
8  "lightupcalibdown":"llup",
9  "detectoraging": "detectoraging",
10  "calibup": "calibup",
11  "calibdown": "calibdown",
12  "calibshape": "calibshape" }
13 
14 shape = { "lightdowncalibup": "@local::calibrator_prod5_lldown_calibup_{0}",
15  "lightupcalibdown": "@local::calibrator_prod5_llup_calibdown_{0}",
16  "detectoraging": "@local::calibrator_prod5_detectoraging_{0}",
17  "calibup": "@local::calibrator_prod5_calibup",
18  "calibdown": "@local::calibrator_prod5_calibdown",
19  "calibshape": "@local::calibrator_prod5_calibshape_{0}" }
20 
21 inputfhicl = { "nd": "prod_full_nd_datamc_prod5_job.fcl",
22  "fd": "prod_full_fd_mc_prod5_job.fcl" }
23 
24 
25 for det in detectors:
26  for syst in metadata.keys():
27  filename = inputfhicl[det].replace("_prod5","_"+syst+"_prod5")
28  print filename
29  fout = open(filename,"w")
30 
31  print >>fout, '#include "'+inputfhicl[det]+'"'
32  print >>fout, ""
33  print >>fout, 'physics.analyzers.metadata.params.NOVA.Systematic: "'+metadata[syst]+'"'
34  print >>fout, 'services.Calibrator: '+shape[syst].format(det)
35  print >>fout, ""
36 
37  fout.close()
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
procfile open("FD_BRL_v0.txt")