00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __CINT__
00014 #include "RooGlobalFunc.h"
00015 #endif
00016 #include "RooRealVar.h"
00017 #include "RooDataSet.h"
00018 #include "RooPolynomial.h"
00019 #include "RooCategory.h"
00020 #include "RooMappedCategory.h"
00021 #include "RooMultiCategory.h"
00022 #include "RooSuperCategory.h"
00023 #include "Roo1DTable.h"
00024 #include "TCanvas.h"
00025 #include "TAxis.h"
00026 #include "RooPlot.h"
00027 using namespace RooFit ;
00028
00029
00030 void rf406_cattocatfuncs()
00031 {
00032
00033
00034
00035
00036 RooCategory tagCat("tagCat","Tagging category") ;
00037 tagCat.defineType("Lepton") ;
00038 tagCat.defineType("Kaon") ;
00039 tagCat.defineType("NetTagger-1") ;
00040 tagCat.defineType("NetTagger-2") ;
00041 tagCat.Print() ;
00042
00043
00044 RooCategory b0flav("b0flav","B0 flavour eigenstate") ;
00045 b0flav.defineType("B0",-1) ;
00046 b0flav.defineType("B0bar",1) ;
00047 b0flav.Print() ;
00048
00049
00050 RooRealVar x("x","x",0,10) ;
00051 RooPolynomial p("p","p",x) ;
00052 RooDataSet* data = p.generate(RooArgSet(x,b0flav,tagCat),10000) ;
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 RooMappedCategory tcatType("tcatType","tagCat type",tagCat,"Cut based") ;
00063
00064
00065 tcatType.map("Lepton","Cut based") ;
00066 tcatType.map("Kaon","Cut based") ;
00067
00068
00069 tcatType.map("NetTagger*","Neural Network") ;
00070
00071
00072 Roo1DTable* mtable = data->table(tcatType) ;
00073 mtable->Print("v") ;
00074
00075
00076
00077
00078
00079
00080
00081
00082 RooSuperCategory b0Xtcat("b0Xtcat","b0flav X tagCat",RooArgSet(b0flav,tagCat)) ;
00083
00084
00085 Roo1DTable* stable = data->table(b0Xtcat) ;
00086 stable->Print("v") ;
00087
00088
00089 b0Xtcat.setLabel("{B0bar;Lepton}") ;
00090
00091
00092
00093
00094
00095 RooMultiCategory b0Xttype("b0Xttype","b0flav X tagType",RooArgSet(b0flav,tcatType)) ;
00096
00097
00098 Roo1DTable* xtable = data->table(b0Xttype) ;
00099 xtable->Print("v") ;
00100
00101
00102 }