Changeset View
Changeset View
Standalone View
Standalone View
examples/GenFit3pi.py.in
- This file was moved from examples/GenFit3pi.py.
#!/usr/bin/env python | |||||
""" | """ | ||||
Copyright 2017 University of Warwick | Copyright 2017 University of Warwick | ||||
Licensed under the Apache License, Version 2.0 (the "License"); | Licensed under the Apache License, Version 2.0 (the "License"); | ||||
you may not use this file except in compliance with the License. | you may not use this file except in compliance with the License. | ||||
You may obtain a copy of the License at | You may obtain a copy of the License at | ||||
Show All 10 Lines | |||||
Paul Harrison | Paul Harrison | ||||
Thomas Latham | Thomas Latham | ||||
""" | """ | ||||
import sys | import sys | ||||
# Process the command-line arguments | # Process the command-line arguments | ||||
def usage( progName ) : | def usage( progName ) : | ||||
print 'Usage:' | print('Usage:') | ||||
print '%s gen [nExpt = 1] [firstExpt = 0]' % progName | print('%s gen [nExpt = 1] [firstExpt = 0]' % progName) | ||||
print '%s fit <iFit> [nExpt = 1] [firstExpt = 0]' % progName | print('%s fit <iFit> [nExpt = 1] [firstExpt = 0]' % progName) | ||||
if len(sys.argv) < 2 : | if len(sys.argv) < 2 : | ||||
usage( sys.argv[0] ) | usage( sys.argv[0] ) | ||||
sys.exit(1) | sys.exit(1) | ||||
command = sys.argv[1] | command = sys.argv[1] | ||||
command = command.lower() | command = command.lower() | ||||
Show All 15 Lines | if len(sys.argv) > 3 : | ||||
if len(sys.argv) > 4 : | if len(sys.argv) > 4 : | ||||
firstExpt = int( sys.argv[4] ) | firstExpt = int( sys.argv[4] ) | ||||
else : | else : | ||||
usage( sys.argv[0] ) | usage( sys.argv[0] ) | ||||
sys.exit(1) | sys.exit(1) | ||||
# Import ROOT and load the appropriate libraries | # Import ROOT and load the appropriate libraries | ||||
import ROOT | import ROOT | ||||
ROOT.gSystem.AddDynamicPath('@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@') | |||||
ROOT.gSystem.Load('libEG') | ROOT.gSystem.Load('libEG') | ||||
ROOT.gSystem.Load('libHist') | ROOT.gSystem.Load('libHist') | ||||
ROOT.gSystem.Load('libMatrix') | ROOT.gSystem.Load('libMatrix') | ||||
ROOT.gSystem.Load('libTree') | ROOT.gSystem.Load('libTree') | ||||
ROOT.gSystem.Load('libTreePlayer') | ROOT.gSystem.Load('libTreePlayer') | ||||
ROOT.gSystem.Load('libMinuit') | ROOT.gSystem.Load('libMinuit') | ||||
ROOT.gSystem.Load('../lib/libLaura++.so') | ROOT.gSystem.Load('libLaura++') | ||||
# If you want to use square DP histograms for efficiency, | # If you want to use square DP histograms for efficiency, | ||||
# backgrounds or you just want the square DP co-ordinates | # backgrounds or you just want the square DP co-ordinates | ||||
# stored in the toy MC ntuple then set this to True | # stored in the toy MC ntuple then set this to True | ||||
squareDP = False | squareDP = False | ||||
# This defines the DP => decay is B+ -> pi+ pi+ pi- | # This defines the DP => decay is B+ -> pi+ pi+ pi- | ||||
# Particle 1 = pi+ | # Particle 1 = pi+ | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |