本文整理汇总了C++中Analysis::CalcSweight方法的典型用法代码示例。如果您正苦于以下问题:C++ Analysis::CalcSweight方法的具体用法?C++ Analysis::CalcSweight怎么用?C++ Analysis::CalcSweight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis::CalcSweight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
RooAbsPdf * corrPdfDDB = new RooGenericPdf(Form("corrPdfDDB_%i",i),DDnormB+"*"+afbBpdf,RooArgSet(*cosThetaB, *afbB, *cB1DD, *cB2DD) );
TCut cutLL = CutsDef::LLcut + (TCut)curq2cut;
TCut cutDD = CutsDef::DDcut + (TCut)curq2cut;
if(dodata=="genMC")
{
corrPdfLLB = new RooGenericPdf("corrPdfLL",afbBpdf,RooArgSet(*cosThetaB, *afbB, *cB1LL, *cB2LL) );
corrPdfDDB = new RooGenericPdf("corrPdfDD",afbBpdf,RooArgSet(*cosThetaB, *afbB, *cB1DD, *cB2DD) );
corrPdfLL = new RooGenericPdf("corrPdfLL",afbLpdf,RooArgSet(*cosThetaL, *afb, *fL, *c1LL, *c2LL) );
corrPdfDD = new RooGenericPdf("corrPdfDD",afbLpdf,RooArgSet(*cosThetaL, *afb, *fL, *c1DD, *c2DD) );
cutLL = (TCut)curq2cut;
cutDD = (TCut)curq2cut;
}
Analysis * anaLL = new Analysis(Form("LL_mass_%i",i),"Lb",data,&cutLL,MM);
anaLL->AddVariable(cosThetaL);
anaLL->AddVariable(cosThetaB);
anaLL->AddVariable("J_psi_1S_MM");
if(dodata!="data") anaLL->SetWeight(wstr);
RooDataSet * dataLL = anaLL->GetDataSet("-recalc-docuts");
Analysis * anaDD = new Analysis(Form("DD_mass_%i",i),"Lb",data,&cutDD,MM);
anaDD->AddVariable(cosThetaL);
anaDD->AddVariable(cosThetaB);
anaDD->AddVariable("J_psi_1S_MM");
if(dodata!="data") anaDD->SetWeight(wstr);
RooDataSet * dataDD = anaDD->GetDataSet("-recalc-docuts");
RooDataSet * sdataDD, * sdataLL;
if(dodata=="data")
{
sdataLL = anaLL->CalcSweight("",massModel.c_str(),"Exp");
if(printSw) {
GetFrame(MM,NULL,sdataLL,"-nochi2",30,NULL,0,"M(#Lambda#mu#mu) (MeV/c^{2})")->Draw();
ceff->Print("Mass_LL_sWeighted"+q2name+".pdf");
GetFrame(cosThetaL,NULL,sdataLL,"-nochi2",6,NULL,0,"cos#theta_{l}")->Draw();
ceff->Print("cosThetaL_LL_sWeighted"+q2name+".pdf");
GetFrame(cosThetaL,NULL,dataLL,"-nochi2",6,NULL,0,"cos#theta_{l}")->Draw();
ceff->Print("cosThetaL_LL_"+q2name+".pdf");
}
sdataDD = anaDD->CalcSweight("",massModel.c_str(),"Exp");
if(printSw) {
GetFrame(MM,NULL,sdataDD,"-nochi2",30,NULL,0,"M(#Lambda#mu#mu) (MeV/c^{2})")->Draw();
ceff->Print("Mass_DD_sWeighted"+q2name+".pdf");
GetFrame(cosThetaL,NULL,sdataDD,"-nochi2",10,NULL,0,"cos#theta_{l}")->Draw();
ceff->Print("cosThetaL_DD_sWeighted"+q2name+".pdf");
GetFrame(cosThetaL,NULL,dataDD,"-nochi2",10,NULL,0,"cos#theta_{l}")->Draw();
ceff->Print("cosThetaL_DD_"+q2name+".pdf");
}
}
else { sdataLL = dataLL; sdataDD = dataDD; }
histFile->cd();
TTree * LLTree = (TTree*)sdataLL->tree();
LLTree->SetName(Form("treeLL_%i",i));
LLlist->Add(LLTree);
TTree * DDTree = (TTree*)sdataDD->tree();
DDTree->SetName(Form("treeDD_%i",i));
DDlist->Add(DDTree);