# start by getting seed number import sys SEED = None for tmp in sys.argv[1:]: try: SEED = int(tmp) except ValueError: print ('DEBUG: argument %s is no number, trying next argument as' 'seed') % tmp if None == SEED: print 'ERROR: no seed given' sys.exit(1) # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile config = configDictFromFile('time-conf001.py') print 'CONFIGURATION' for k in sorted(config.keys()): print ' %32s: %32s' % (k, config[k]) # start with RooFit stuff from ROOT import ( RooRealVar, RooConstVar, RooCategory, RooWorkspace, RooArgSet, RooArgList, RooLinkedList, RooAbsReal, RooRandom, TRandom3 ) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9) RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-9) RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setCatLabel('method','15Points') RooAbsReal.defaultIntegratorConfig().getConfigSection(
rootInFile = TFile("../BsStuff.root") keyList = rootInFile.GetListOfKeys() keyList.At(0).ReadObj().Print() keyList.At(1).ReadObj().Print() tupleDataSet = rootInFile.Get('treeData') if not os.path.isfile(tupleDictFilename) or tupleDictFilename == "-": print "Filename argument invalid; running for default tuple dictionary file" tupleDictFilename = os.environ[ "B2DXFITTERSROOT"] + "/tutorial/tupleDict2.py" tupleDict = importTupleDict(tupleDictFilename) tupleDataSet = tupleDataSet.reduce('osDecision==ssDecision') from B2DXFitters.utils import configDictFromFile config = configDictFromFile('bsConfig.py') # start with RooFit stuff from ROOT import (RooRealVar, RooConstVar, RooCategory, RooWorkspace, RooArgSet, RooArgList, RooLinkedList, RooAbsReal, RooRandom, TRandom3, MistagDistribution, MistagCalibration, RooFormulaVar) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9) RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-9) RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setCatLabel( 'method', '15Points') RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setRealValue('maxSeg', 1000) RooAbsReal.defaultIntegratorConfig().method1D().setLabel(
for tmp in sys.argv[1:]: try: SEED = int(tmp) except ValueError: print ('DEBUG: argument %s is no number, trying next argument as' 'seed') % tmp if None == SEED: print 'ERROR: no seed given' sys.exit(1) #DELET THIS #SEED = 42 # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile config = configDictFromFile('time-conf003a.py') config1 = configDictFromFile('fit-time-conf003.py') print config #config['MistagCalibParams']['etaavg']=0.2 #config['TrivialMistagParams']['omegaavg']=0.2 #print config #import sys #sys.exit(0) # start with RooFit stuff from ROOT import ( RooRealVar, RooConstVar, RooCategory, RooWorkspace, RooArgSet, RooArgList, RooLinkedList, RooAbsReal, RooRandom, TRandom3, MistagDistribution, MistagCalibration, RooFormulaVar ) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9)
# start by getting seed number import sys SEED = None for tmp in sys.argv[1:]: try: SEED = int(tmp) except ValueError: print('DEBUG: argument %s is no number, trying next argument as' 'seed') % tmp if None == SEED: print 'ERROR: no seed given' sys.exit(1) # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile config = configDictFromFile('time-conf004.py') # start with RooFit stuff from ROOT import (RooRealVar, RooConstVar, RooCategory, RooWorkspace, RooArgSet, RooArgList, RooLinkedList, RooAbsReal, RooRandom, TRandom3, MistagDistribution, MistagCalibration, RooDecay, RooTruthModel, RooProdPdf, RooPolynomial) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9) RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-9) RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setCatLabel('method', '15Points') RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setRealValue('maxSeg', 1000) RooAbsReal.defaultIntegratorConfig().method1D().setLabel( 'RooAdaptiveGaussKronrodIntegrator1D')
# start by getting seed number import sys SEED = None for tmp in sys.argv: try: SEED = int(tmp) except ValueError: print ('DEBUG: argument %s is no number, trying next argument as' 'seed') % tmp if None == SEED: print 'ERROR: no seed given' sys.exit(1) # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile config = configDictFromFile('decRateCoeff_Bd_conf_PEDTE.py') print 'CONFIGURATION' for k in sorted(config.keys()): print ' %32s: %32s' % (k, config[k]) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9) RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-9) RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setCatLabel('method','15Points') RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setRealValue('maxSeg', 1000) RooAbsReal.defaultIntegratorConfig().method1D().setLabel( 'RooAdaptiveGaussKronrodIntegrator1D') RooAbsReal.defaultIntegratorConfig().method1DOpen().setLabel(
# start by getting seed number import sys SEED = None for tmp in sys.argv: try: SEED = int(tmp) except ValueError: print('DEBUG: argument %s is no number, trying next argument as' 'seed') % tmp if None == SEED: print 'ERROR: no seed given' sys.exit(1) # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile config = configDictFromFile('decRateCoeff_Bd_conf_MeanRes.py') print 'CONFIGURATION' for k in sorted(config.keys()): print ' %32s: %32s' % (k, config[k]) # safe settings for numerical integration (if needed) RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-9) RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-9) RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setCatLabel('method', '15Points') RooAbsReal.defaultIntegratorConfig().getConfigSection( 'RooAdaptiveGaussKronrodIntegrator1D').setRealValue('maxSeg', 1000) RooAbsReal.defaultIntegratorConfig().method1D().setLabel( 'RooAdaptiveGaussKronrodIntegrator1D') RooAbsReal.defaultIntegratorConfig().method1DOpen().setLabel(
print "TAGGERTYPE = ", taggerType if originSuffix == 'MC': rootfile = TFile( '/mnt/cdrom/Bs2Dspipipi_MC_fullSel_reweighted_combined.root', 'READ') weightVarName = 'weight' else: rootfile = TFile('/mnt/cdrom/data_Bs2Dspipipi_11_final_sweight.root', 'READ') weightVarName = 'weight' # then read config dictionary from a file from B2DXFitters.utils import configDictFromFile if originSuffix == 'MC': config = configDictFromFile('time-conf003-bs.py') config1 = configDictFromFile('fit-time-conf003-bs.py') else: config = configDictFromFile('time-conf003-bsData.py') config1 = configDictFromFile('fit-time-conf003-bsData.py') config['DataSetVarNameMapping']['qt'] = config['DataSetVarNameMapping'][ 'qt' + taggerType] config['DataSetVarNameMapping'].pop('qtSS1') config['DataSetVarNameMapping'].pop('qtSS2') config['DataSetVarNameMapping'].pop('qtOS') config['DataSetVarNameMapping']['eta'] = config['DataSetVarNameMapping'][ 'eta' + taggerType] config['DataSetVarNameMapping'].pop('etaSS1') config['DataSetVarNameMapping'].pop('etaSS2')