本文整理汇总了Python中ROOT.RooRealVar.getBins方法的典型用法代码示例。如果您正苦于以下问题:Python RooRealVar.getBins方法的具体用法?Python RooRealVar.getBins怎么用?Python RooRealVar.getBins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ROOT.RooRealVar
的用法示例。
在下文中一共展示了RooRealVar.getBins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RooRealVar
# 需要导入模块: from ROOT import RooRealVar [as 别名]
# 或者: from ROOT.RooRealVar import getBins [as 别名]
if gammaVal == 0.05 : sf = 5 ;
elif gammaVal == 0.15 : sf = 3 ;
elif gammaVal == 0.30 : sf = 1.5 ;
if gammaVal == 0.05 or mass[iMass] == 1000 : binWidth = 20;
elif gammaVal == 0.15 or mass[iMass] == 1500 : binWidth = 30;
elif gammaVal == 0.30 or mass[iMass] == 1500 : binWidth = 50;
elif gammaVal == 0.15 or mass[iMass] == 2000 : binWidth = 50;
elif gammaVal == 0.30 or mass[iMass] == 2000 : binWidth = 75;
else:
binWidth = 20;
rrv_mass_lvj = RooRealVar("rrv_mass_lvj_plot","M_{WW}",float(mass[iMass]),float(mass[iMass]-mass[iMass]*gammaVal*sf),float(mass[iMass]+mass[iMass]*gammaVal*sf),"GeV/c^{2}");
rrv_mass_lvj.setBins(int((rrv_mass_lvj.getMax()-rrv_mass_lvj.getMin())/binWidth));
rrv_mass_lvj.setMax(rrv_mass_lvj.getMin()+rrv_mass_lvj.getBins()*binWidth);
rrv_weight = RooRealVar("rrv_weight","rrv_weight",0. ,10000000.);
## open the signal file
fileIn = TFile(fileIn_name.Data());
treeIn = fileIn.Get("SelectedCandidatesPlain");
rdataset4fit_mlvj = RooDataSet("rdataset4fit_BulkG_WW_inclusive_M%3d_W%d_%s_mlvj"%(int(mass[iMass]),int(mass[iMass]*gammaVal),options.channel),"rdataset4fit_BulkG_WW_inclusive_M%3d_W%d_%s_mlvj"%(int(mass[iMass]),int(mass[iMass]*gammaVal),options.channel),RooArgSet(rrv_mass_lvj,rrv_weight),RooFit.WeightVar(rrv_weight));
luminosity = 19700;
tmp_scale_lumi = 0 ;
for iEvent in range(treeIn.GetEntries()):
if iEvent % 1000 == 0: print "iEvent: ",iEvent;