void FindFuncsLT(){ TGraph * FNegvsLT = new TGraph(); FNegvsLT->SetName("FNegvsLT"); double par[3] = {mtop, MW, mB}; for(int i = 0; i<1000; i++){ double x[4] = {1, 0, i*0.001, 0}; cout<<x[1]<<"\t"<<FNeg(x, par)<<endl; FNegvsLT->SetPoint(i, (i*0.001), FNeg(x, par)); } FNegvsLT->SaveAs("FNegvsLT.C"); TGraph * FPosvsLT = new TGraph(); FPosvsLT->SetName("FPosvsLT"); for(int i = 0; i<1000; i++){ double x[4] = {1, 0, i*0.001, 0}; cout<<x[1]<<"\t"<<FR(x, par)<<endl; FPosvsLT->SetPoint(i, (i*0.001), FR(x, par)); } FPosvsLT->SaveAs("FPosvsLT.C"); TGraph * FZerovsLT = new TGraph(); FZerovsLT->SetName("FZerovsLT"); for(int i = 0; i<1000; i++){ double x[4] = {1, 0, i*0.001, 0}; cout<<x[1]<<"\t"<<FZero(x, par)<<endl; FZerovsLT->SetPoint(i, (i*0.001), FZero(x, par)); } FZerovsLT->SaveAs("FZerovsLT.C"); }
void processmarriage(const char* ifname="marry.txt",const char* ofname="marry.root"){ vector<int> mage; vector<float> mpercent; vector<int> fage; vector<float> fpercent; mage.push_back(0); mpercent.push_back(0.0); fage.push_back(0); fpercent.push_back(0.0); ifstream marry(ifname); while(1){ int gender,year; float percent; marry >> gender >> year >> percent; if(!marry.good())break; if(gender == 1){ mage.push_back(year); mpercent.push_back(percent); } if(gender == 0){ fage.push_back(year); fpercent.push_back(percent); } } TFile* outfile = new TFile(ofname,"RECREATE"); TGraph* man = new TGraph(mage.size()); TGraph* woman = new TGraph(fage.size()); for(int i = 0; i < (int)mage.size(); i++){ man->SetPoint(i,mage[i],mpercent[i]); } for(int i = 0; i < (int)fage.size(); i++){ woman->SetPoint(i,fage[i],fpercent[i]); } man->SetName("man"); woman->SetName("woman"); man->Write(); woman->Write(); outfile->Write(); outfile->Close(); }
TGraph* makeGraph(const TArrayI& adcs, Int_t rate) { Int_t last = adcs.fArray[0]; TArrayI counts(4); TGraph* graph = new TGraph(rate * adcs.fN); graph->SetLineColor(rate); graph->SetMarkerColor(rate); graph->SetMarkerStyle(20+rate); graph->SetLineStyle(rate); graph->SetName(Form("rate%d", rate)); graph->SetTitle(Form("Rate %d", rate)); for (Int_t i = 0; i < adcs.fN; i++) { counts.Reset(-1); convert(rate, adcs.fArray[i], last, counts); for (Int_t j = 0; j < rate; j++) { Int_t idx = (i * rate + j); Double_t x = (i + (rate > 1 ? Float_t(j+1) / rate-1 : 0)); graph->SetPoint(idx, x, counts[j]); } last = counts[rate - 1]; } return graph; }
TGraph* getRoC( TH1D* h1_signal, TH1D* h1_bg ) { TGraph* graph = new TGraph(); graph->SetName("RoC"); int nbins = h1_signal->GetNbinsX(); for( unsigned ibin=1; ibin<nbins+1; ++ibin ) { float eff_signal_num = h1_signal->Integral( ibin, nbins ); float eff_signal_denom = h1_signal->Integral( 1, nbins ); float eff_bg_num = h1_bg->Integral( ibin, nbins ); float eff_bg_denom = h1_bg->Integral( 1, nbins ); float eff_signal = eff_signal_num/eff_signal_denom; float eff_bg = eff_bg_num/eff_bg_denom; graph->SetPoint( ibin-1, 1.-eff_bg, eff_signal ); } //for bins return graph; }
TGraph* getGraph(string name, int color, int width, int style, TLegend* LEG, TGraph* Ref, int type, string filePath){ // filePath+="/LimitSummary"; FILE* pFile = fopen(filePath.c_str(),"r"); if(!pFile){printf("Can't open %s\n",filePath.c_str()); exit(0);} double mass, th, exp, obs, unused;// char buffer[1024]; TGraph* graph = new TGraph(250); int N=0; while(fscanf(pFile,"$%le$ & $%le$ & $[%le,%le]$ & $[%le,%le]$ & $%le$ & Th=$%le$ & pValue=$%le$\\\\\\hline\n",&mass, &exp, &unused, &unused, &unused,&unused,&obs, &th, &unused) != EOF){ // printf("%i %f - %f - %f\n",N,mass,exp, th); double value = exp; if(abs(type)==0) value = th; else if(abs(type)==1) value = exp; else value = obs; // if(type<0 && filePath.find("cp0.80")!=string::npos) value *= pow(0.8, 2); // if(type<0 && filePath.find("cp0.60")!=string::npos) value *= pow(0.6, 2); // if(type<0 && filePath.find("cp0.30")!=string::npos) value *= pow(0.3, 2); // if(type<0 && filePath.find("cp0.10")!=string::npos) value *= pow(0.1, 2); if(Ref){value/=Ref->Eval(mass);} graph->SetPoint(N, mass, value);N++; if(N>100)break; } graph->Set(N); graph->SetName(name.c_str()); graph->SetLineColor(color); graph->SetLineWidth(width); graph->SetLineStyle(style); if(LEG)LEG->AddEntry(graph, name.c_str() ,"L"); return graph; }
void KVCanvas::ProjectionX(TH2* hh) { TString pname = Form("%s_px", hh->GetName()); Int_t ip = 1; while (gROOT->FindObject(pname.Data())) { pname = Form("%s_px%d", hh->GetName(), ip); ip++; } TH1* px = hh->ProjectionX(pname.Data()); if (!px) return; Double_t minY = (hh->GetYaxis()->GetXmin()); Double_t maxY = (hh->GetYaxis()->GetXmax()); Double_t dY = (maxY - minY) * 0.8; Double_t maxH = px->GetBinContent(px->GetMaximumBin()); TGraph* gg = 0; if ((gg = (TGraph*)gROOT->FindObject(Form("%s_gjx", hh->GetName())))) gg->Delete(); gg = new TGraph; for (int i = 0; i < px->GetNbinsX(); i++) { gg->SetPoint(i, px->GetBinCenter(i), minY + px->GetBinContent(i)*dY / maxH); } gg->SetName(Form("%s_gjx", hh->GetName())); gg->SetTitle(Form("%s_gjx", hh->GetName())); gg->SetLineColor(kBlack); gg->SetMarkerColor(kBlack); gg->SetMarkerStyle(8); gg->Draw("PL"); Modified(); Update(); }
TGraph * makeOBV(TGraph *Graph1){ TGraph *gr = new TGraph(); double X; double Y; int pp=0; Graph1->GetPoint(1,X,Y); for (double MDM=1;MDM<=Y;MDM+=0.1){ gr->SetPoint(pp,MDM,vecF(X,MDM)); pp++; } for (int p =1;p<Graph1->GetN();p++){ Graph1->GetPoint(p,X,Y); if (!(X >1)) continue; std::cout << X << " " << Y << std::endl; gr->SetPoint(pp,Y,vecF(X,Y)); pp++; } gr->GetXaxis()->SetTitle("m_{DM}"); gr->GetYaxis()->SetTitle("#sigma_{SD}"); gr->SetName(Form("%s_DD",Graph1->GetName())); gr->SetLineStyle(Graph1->GetLineStyle()); gr->SetLineColor(Graph1->GetLineColor()); gr->SetLineWidth(Graph1->GetLineWidth()); return gr; }
TGraph* tgraph(const char* name, const char* title, int color) { TGraph* t = new TGraph(); t->SetName(name); t->SetTitle(title); t->SetLineColor(color); return t; }
TGraph* ContourGraph( TH2F* hist,double xmin=16, double xmax=90) { //temporary canvas TCanvas* MOO = new TCanvas( TString::Format("dummy_canvas_%s", hist->GetName()), "A scan of m_{0} versus m_{12}", 0, 0, 650,640); MOO->cd(); TGraph* gr0 = new TGraph(); TH2F* h = (TH2F*)hist->Clone(); TGraph* gr = (TGraph*)gr0->Clone(TString::Format("gr_%s", h->GetName())); cout << "==> Will dumb histogram: " << h->GetName() << " into a graph" <<endl; h->SetContour( 1 ); //h->GetXaxis()->SetRangeUser(250,1200); h->GetXaxis()->SetRangeUser(xmin, xmax); //h->GetYaxis()->SetRangeUser(2,50); double pval = CombinationGlob::cl_percent[1]; std::cout << pval << std::endl; double signif = TMath::NormQuantile(1-pval); h->SetContourLevel( 0, signif ); h->Draw("CONT LIST"); h->SetDirectory(0); gPad->Update(); TObjArray *contours = (TObjArray*) gROOT->GetListOfSpecials()->FindObject("contours"); Int_t ncontours = contours->GetSize(); cout << "Found " << ncontours << " contours " << endl; TList *list = (TList*)contours->At(0); contours->Print("v"); if(!list) return NULL; gr = (TGraph*)list->First(); if(!gr) return NULL; gr->SetName(TString::Format("gr_%s", hist->GetName())); //gr->SetName(hist->GetName()); int N = gr->GetN(); double x0, y0; for(int j=0; j<N; j++) { gr->GetPoint(j,x0,y0); cout << j << " : " << x0 << " : "<<y0 << endl; } // // gr->SetMarkerSize(2.0); //gr->Draw("ALP"); delete MOO; cout << "Generated graph " << gr << " with name " << gr->GetName() << endl; return gr; }
//Make lepton interference graph TGraph* make_HZZ_LeptonInterferenceGraph(){ float x[leptonInterf_YR3_Size]; float y[leptonInterf_YR3_Size]; for (int a=0; a<leptonInterf_YR3_Size; a++){ x[a] = leptonInterf_YR3[a][0]; y[a] = leptonInterf_YR3[a][1]; } TGraph* tg = new TGraph(leptonInterf_YR3_Size, x, y); tg->SetName("tgHZZ_LeptonInterference"); tg->SetTitle("H#rightarrowZZ#rightarrow4l Lepton Interference Weight on 4e, 4#mu wrt. 2e2#mu"); return tg; }
void mySelector::Terminate() { // The Terminate() function is the last function to be called during // a query. It always runs on the client, it can be used to present // the results graphically or save the results to file. TString option = GetOption(); TString output = "gr_"; output += option; output += ".root"; TFile *hfile = new TFile(output,"RECREATE","FONLL CCbar cross section"); hfile->cd(); const Int_t npoint = eventnumber; Float_t x[npoint]; Float_t y[npoint]; Float_t ylow[npoint]; Float_t yup[npoint]; for(int i=0;i<npoint;i++) { x[i] = Pt[i]; y[i] = Central[i]; ylow[i] = Down[i]; yup[i] = Up[i]; } //TGraph *grFONLLD0 = new TGraph(npoint,Pt,Central); TDirectoryFile *ratioErr = new TDirectoryFile(option,"ratio error of scale pp500 to pp200 "); ratioErr->SetName(option); ratioErr->Add(hRatio); TGraph *grFONLLRatio = new TGraph(npoint,x,y); grFONLLRatio->SetName("grFONLLRatio"); TGraph *grFONLLRatio_u = new TGraph(npoint,x,yup); grFONLLRatio_u->SetName("grFONLLRatio_u"); TGraph *grFONLLRatio_d = new TGraph(npoint,x,ylow); grFONLLRatio_d->SetName("grFONLLRatio_d"); grFONLLRatio->Print(); ///grFONLLRatio->Write(); ratioErr->Add(grFONLLRatio); grFONLLRatio_u->Print(); //grFONLLRatio_u->Write(); ratioErr->Add(grFONLLRatio_u); grFONLLRatio_d->Print(); //grFONLLRatio_d->Write(); ratioErr->Add(grFONLLRatio_d); ratioErr->Write(); hfile->Print(); hfile->Close(); tNow.Set(); cout<<"----------End of job----------"<<endl; tNow.Print(); }
void createInputs(int n = 2) { for(UInt_t i = 0; i < (UInt_t)n; ++i ) { TFile *file = TFile::Open(TString::Format("input%d.root",i),"RECREATE"); TH1F * h = new TH1F("h1","",10,0,100); h->Fill(10.5); h->Fill(20.5); Int_t nbins[5]; Double_t xmin[5]; Double_t xmax[5]; for(UInt_t j = 0; j < 5; ++j) { nbins[j] = 10; xmin[j] = 0; xmax[j] = 10; } THnSparseF *sparse = new THnSparseF("sparse", "sparse", 5, nbins, xmin, xmax); Double_t coord[5] = {0.5, 1.5, 2.5, 3.5, 4.5}; sparse->Fill(coord); sparse->Write(); THStack *stack = new THStack("stack",""); h = new TH1F("hs_1","",10,0,100); h->Fill(10.5); h->Fill(20.5); h->SetDirectory(0); stack->Add(h); h = new TH1F("hs_2","",10,0,100); h->Fill(30.5); h->Fill(40.5); h->SetDirectory(0); stack->Add(h); stack->Write(); TGraph *gr = new TGraph(3); gr->SetName("exgraph"); gr->SetPoint(0,1,1); gr->SetPoint(1,2,2); gr->SetPoint(2,3,3); gr->Write(); TTree *tree = new TTree("tree","simplistic tree"); Int_t data = 0; tree->Branch("data",&data); for(Int_t l = 0; l < 2; ++l) { data = l; tree->Fill(); } file->Write(); delete file; } }
void KVCanvas::ProfileY(TH2* hh) { TObject* obj = 0; if ((obj = gROOT->FindObject(Form("%s_pfy", hh->GetName())))) obj->Delete(); TProfile* pfy = hh->ProfileY("_pfy", 1, -1, "i"); TGraphErrors* gr = gHistoManipulator->MakeGraphFrom(pfy); pfy->Delete(); TGraph* gg = gHistoManipulator->PermuteAxis(gr); gr->Delete(); gg->SetName(Form("%s_pfy", hh->GetName())); gg->SetLineColor(kBlack); gg->Draw("PEZ"); Modified(); Update(); }
TGraph *NCMatrix::plot(int xcol, int ycol) { TGraph *result = new TGraph; int nrows = getNRows(),j; checkRange(0, xcol); checkRange(0, ycol); result->SetName(Form("x%dy%d",xcol,ycol)); result->SetTitle(Form("x-axis col %d, y-axis col %d",xcol,ycol)); for(j = 0; j < nrows; j++) result->SetPoint(j, getElement(j, xcol), getElement(j, ycol)); return result; } // plotRow()
//! Read TGraph from file // ------------------------------------------------------------------------------------- TGraph* readTGraph(const TString &fileName, const TString &gName, const TString &newGName) { TFile file(fileName,"READ"); TGraph *g = 0; file.GetObject(gName,g); if( g ) { if( newGName.Length() ) { } g->SetName(newGName); } else { std::cerr << "ERROR in FileOps::readTGraph: TGraph with name '" << gName << "' does not exist in file '" << fileName << "'\n."; file.Close(); exit(-1); } file.Close(); return g; }
void TrPdf::FitLogLog(double min, double max) { TGraph* FluxLogLogTmp = new TGraph(GetGraph()->GetN()); FluxLogLogTmp->SetName("spectrumloglogtmp"); FluxLogLogTmp->SetTitle("spectrumloglogtmp"); for (int ii=0; ii<Graph->GetN(); ii++) { double a,b; GetGraph()->GetPoint(ii,a,b); FluxLogLogTmp->SetPoint(ii,log10(a),log10(b)); } TF1* LinFitTmp = new TF1("linfittmp","[0]+[1]*x+[2]*pow(x,2.)+[3]*pow(x,3.)+[4]*pow(x,4.)+[5]*pow(x,5.)",-2.,5.); FluxLogLogTmp->Fit(LinFitTmp,"EQR","",log10(min),log10(max)); LogLog = new TF1(Form("LogLog_%s",GetName().Data()), "pow(10.,[0]+[1]*log10(x)+[2]*pow(log10(x),2.)+[3]*pow(log10(x),3.)+[4]*pow(log10(x),4.)+[5]*pow(log10(x),5.))",1.e-2,1.e5); for (int i=0; i<6; i++) LogLog->SetParameter(i,LinFitTmp->GetParameter(i)); delete LinFitTmp; delete FluxLogLogTmp; }
void TestShaping(int max=4) { TArrayI adcs(10); TGraph* orig = new TGraph(adcs.fN); orig->SetName("Original"); orig->SetTitle("Original"); orig->SetMarkerStyle(25); orig->SetMarkerColor(1); orig->SetMarkerSize(2); orig->SetLineColor(1); for (Int_t i = 0; i < adcs.fN; i++) { adcs.fArray[i] = Int_t(gRandom->Uniform(0, 1023)); orig->SetPoint(i, i, adcs.fArray[i]); } TCanvas* c = new TCanvas("c", "c"); c->SetFillColor(0); c->SetTopMargin(.02); c->SetRightMargin(.02); TH1* h = new TH1F("frame","frame", adcs.fN+1, -2, adcs.fN); h->SetMinimum(0); h->SetMaximum(1300); h->SetStats(0); h->Draw(""); orig->Draw("pl same"); TLegend* l = new TLegend(adcs.fN*3./4, 1023, adcs.fN, 1300, "", ""); l->SetFillColor(0); l->SetBorderSize(1); l->AddEntry(orig, orig->GetTitle(), "lp"); for (int i = 1; i <= max; i++) { TGraph* g = makeGraph(adcs, i); g->Draw("pl same"); l->AddEntry(g, g->GetTitle(), "lp"); } l->Draw(); c->Modified(); c->Update(); c->cd(); }
TGraph* get_exclusion_line(TH2F *limit_ref) { float pointsX[200]; float pointsY[200]; int ixNew=0; int counter=0; int foundDiag=0; TH2F *fakehisto = flipth2f(limit_ref); get_Marias_exclusion_line(fakehisto,pointsY,pointsX,ixNew,counter,foundDiag);// x&y deliberately switched! if(counter>1) { pointsX[counter]=pointsX[counter-1]; pointsY[counter]=50; } const int newCounter=counter; Double_t newPointsX[newCounter+1]; Double_t newPointsY[newCounter+1]; float lastx=-100; float lasty=-100; for (int ix = 0; ix < counter+1; ++ix) { if(ix<(foundDiag-2)) continue; if(ix!=counter && pointsX[ix+1]==pointsX[ix]) continue; if(pointsX[ix]<PlottingSetup::mglustart) continue; if(lasty>-100&&pointsY[ix]<51) continue; // cout << pointsX[ix] << " , " << pointsY[ix] << endl; newPointsX[ixNew]=pointsX[ix]; newPointsY[ixNew]=pointsY[ix]; ixNew++; lastx=pointsX[ix]; lasty=pointsY[ix]; } string titleHisto="tester"; // sprintf(titleHisto,"graph_%s_%f",limit_ref->GetName(),refMult); // cout << "HERE " << titleHisto << endl; TGraph * gr = new TGraph(ixNew,newPointsX,newPointsY); gr->SetName(titleHisto.c_str()); gr->Draw("same"); return gr; }
TGraph * truncatedMean(TH1F* h,double max){ TGraph * gr = new TGraph(); gr->SetName(Form("cumul_mean_%s",h->GetName())); double past=-1; int g=0; const int iP=Nbin; int imax=h->FindBin(max); int iS = std::max(1,imax/iP); cout <<"calculating truncated mean for module "<<h->GetName()<<"..."<<endl; for (int ib=1;ib<=imax;ib+=iS){ double xmin=h->GetBinCenter(ib); // cout <<ib<<" "<<xmin<<"..."<<endl; double mean=GetMean(h,xmin); // cout<<mean<<endl; // if (mean!=past) {gr->SetPoint(g++,xmin,mean);} past=mean; } // gr->SetMarkerStyle(4); cout<<"done"<<endl; return gr;}
void drawTimeDifference (TDirectory* directory, TH1* refHisto, const char* fname=0) { TGraphErrors* graphX = (TGraphErrors*)directory->Get("x"); if ( graphX==0 ) return; TH1I* hFirst = (TH1I*)directory->Get("firstTime"); TH1I* hLast = (TH1I*)directory->Get("lastTime"); if ( hFirst==0 || hLast==0 ) return; std::string fullName("cDeltaT"); if ( fname ) fullName += fname; else fullName += directory->GetName(); TCanvas* c = new TCanvas(fullName.c_str(),fullName.c_str()); TH1* h = refHisto->Clone("DeltaT"); h->Reset(); h->SetTitle("DeltaT"); TGraph* graph = new TGraph(); graph->SetName("gDeltaT"); double xg,yg; for ( unsigned int i=1; i<=hFirst->GetNbinsX(); ++i ) { std::time_t t1 = hFirst->GetAt(i); std::time_t t2 = hLast->GetAt(i); TTimeStamp ts1(hFirst->GetAt(i)); std::cout << "Fit started at " << ts1.AsString() << std::endl; graphX->GetPoint(i-1,xg,yg); graph->SetPoint(i-1,xg,difftime(t2,t1)); } double xmin,xmax,ymin,ymax; graph->ComputeRange(xmin,ymin,xmax,ymax); h->SetMinimum(0.); h->SetMaximum((ymax+ymin)/2.+2.*(ymax-ymin)/2.); h->Draw(); graph->SetMarkerStyle(20); // graph->SetMarkerColor(2); // graph->SetLineColor(2); graph->Draw("P"); }
void drawEventDifference (TDirectory* directory, TH1* refHisto, const char* fname=0) { TGraphErrors* graphX = (TGraphErrors*)directory->Get("x"); if ( graphX==0 ) return; TH1I* hFirst = (TH1I*)directory->Get("firstEvent"); TH1I* hLast = (TH1I*)directory->Get("lastEvent"); if ( hFirst==0 || hLast==0 ) return; std::string fullName("cDeltaE"); if ( fname ) fullName += fname; else fullName += directory->GetName(); TCanvas* c = new TCanvas(fullName.c_str(),fullName.c_str()); TH1* h = refHisto->Clone("DeltaE"); h->Reset(); h->SetTitle("DeltaE"); TGraph* graph = new TGraph(); graph->SetName("gDeltaE"); double xg,yg; for ( unsigned int i=1; i<=hFirst->GetNbinsX(); ++i ) { int e1 = hFirst->GetAt(i); int e2 = hLast->GetAt(i); graphX->GetPoint(i-1,xg,yg); graph->SetPoint(i-1,xg,e2-e1); } double xmin,xmax,ymin,ymax; graph->ComputeRange(xmin,ymin,xmax,ymax); h->SetMinimum(0.); h->SetMaximum((ymax+ymin)/2.+2.*(ymax-ymin)/2.); h->Draw(); graph->SetMarkerStyle(20); // graph->SetMarkerColor(2); // graph->SetLineColor(2); graph->Draw("P"); }
void all(int channels=0, int categ=-1, int sample=2012 /*,bool doSfLepton=true*/){ double bwSigma[40]; int mass[40]; int id[40]; double xLow[40]; double xHigh[40]; int maxMassBin; float masses[1] = {125}; for(int i=0;i<1;++i) { mass[i] = masses[i]; id[i]=masses[i]; xLow[i] = 105.; // getFitEdge(masses[i],width,true); xHigh[i] = 140.; // getFitEdge(masses[i],width,false); //cout << "For mass = " << masses[i] << " width = " << width << "; => Fit Range = [" << xLow[i] << "," << xHigh[i] << "]" << endl; bwSigma[i] = 0.004; } maxMassBin = 1; // 29; // ----------------------- double massV[40],massE[40]; for(int i=0; i<maxMassBin;++i){ massV[i]=mass[i]; massE[i]=0; } double A1Val[40],A1Err[40]; double A2Val[40],A2Err[40]; double a1Val[40],a1Err[40]; double a2Val[40],a2Err[40]; double n1Val[40],n1Err[40]; double n2Val[40],n2Err[40]; double meanCBVal[40],meanCBErr[40]; double sigmaCBVal[40],sigmaCBErr[40]; double meanBWVal[40],meanBWErr[40]; double covQualVal[40]; double fitValues[10]; double fitErrors[10]; double covQual[1]; for(int i=0; i<maxMassBin;++i){ fitSignalShapeW(mass[i],id[i],channels,categ, sample,/* 10.,doSfLepton,*/xLow[i],xHigh[i],bwSigma[i], fitValues,fitErrors,covQual); cout << "a1 value,error: " << fitValues[0] << " , " << fitErrors[0] << endl; a1Val[i]=fitValues[0]; a1Err[i]=fitErrors[0]; cout << "a2 value,error: " << fitValues[1] << " , " << fitErrors[1] << endl; a2Val[i]=fitValues[1]; a2Err[i]=fitErrors[1]; cout << "n1 value,error: " << fitValues[4] << " , " << fitErrors[4] << endl; n1Val[i]=fitValues[4]; n1Err[i]=fitErrors[4]; cout << "n2 value,error: " << fitValues[5] << " , " << fitErrors[5] << endl; n2Val[i]=fitValues[5]; n2Err[i]=fitErrors[5]; cout << "meanCB value,error: " << fitValues[2] << " , " << fitErrors[2] << endl; meanCBVal[i]=fitValues[2]; meanCBErr[i]=fitErrors[2]; cout << "sigmaCB value,error: " << fitValues[6] << " , " << fitErrors[6] << endl; sigmaCBVal[i]=fitValues[6]; sigmaCBErr[i]=fitErrors[6]; cout << "meanBW value,error: " << fitValues[3] << " , " << fitErrors[3] << endl; meanBWVal[i]=fitValues[3]; meanBWErr[i]=fitErrors[3]; cout << "A1 value,error: " << fitValues[7] << " , " << fitErrors[7] << endl; A1Val[i]=fitValues[7]; A1Err[i]=fitErrors[7]; cout << "A2 value,error: " << fitValues[8] << " , " << fitErrors[8] << endl; A2Val[i]=fitValues[8]; A2Err[i]=fitErrors[8]; cout << "covQual of the fit: " << covQual[0] << endl; covQualVal[i] = covQual[0]; } stringstream namefile; namefile << "parameters_channel" << channels<< categ << ".root"; TFile *resultfile = TFile::Open(namefile.str().c_str(),"RECREATE"); TGraphErrors* gA1 = new TGraphErrors(maxMassBin,massV,a1Val,massE,a1Err); TGraphErrors* gA2 = new TGraphErrors(maxMassBin,massV,a2Val,massE,a2Err); TGraphErrors* gN1 = new TGraphErrors(maxMassBin,massV,n1Val,massE,n1Err); TGraphErrors* gN2 = new TGraphErrors(maxMassBin,massV,n2Val,massE,n2Err); TGraphErrors* gMeanCB = new TGraphErrors(maxMassBin,massV,meanCBVal,massE,meanCBErr); TGraphErrors* gSigmaCB = new TGraphErrors(maxMassBin,massV,sigmaCBVal,massE,sigmaCBErr); TGraphErrors* gMeanBW = new TGraphErrors(maxMassBin,massV,meanBWVal,massE,meanBWErr); TGraphErrors* gAA1 = new TGraphErrors(maxMassBin,massV,A1Val,massE,A1Err); TGraphErrors* gAA2 = new TGraphErrors(maxMassBin,massV,A2Val,massE,A2Err); TGraph* gCovQual = new TGraph(maxMassBin,massV,covQualVal); gA1->SetName("gA1"); gA1->SetMarkerStyle(20); gA1->SetMarkerSize(1); gA2->SetName("gA2"); gA2->SetMarkerStyle(20); gA2->SetMarkerSize(1); gN1->SetName("gN1"); gN1->SetMarkerStyle(20); gN1->SetMarkerSize(1); gN2->SetName("gN2"); gN2->SetMarkerStyle(20); gN2->SetMarkerSize(1); gMeanCB->SetName("gMeanCB"); gMeanCB->SetMarkerStyle(20); gMeanCB->SetMarkerSize(1); gSigmaCB->SetName("gSigmaCB"); gSigmaCB->SetMarkerStyle(20); gSigmaCB->SetMarkerSize(1); gMeanBW->SetName("gMeanBW"); gMeanBW->SetMarkerStyle(20); gMeanBW->SetMarkerSize(1); gAA1->SetName("gAA1"); gAA1->SetMarkerStyle(20); gAA1->SetMarkerSize(1); gAA2->SetName("gAA2"); gAA2->SetMarkerStyle(20); gAA2->SetMarkerSize(1); gCovQual->SetName("gCovQual"); gCovQual->SetMarkerStyle(20); gCovQual->SetMarkerSize(1); gA1->SetTitle(""); gA1->GetXaxis()->SetTitle("mass (GeV)"); gA1->GetYaxis()->SetTitle("CB a-parameter"); gA2->SetTitle(""); gA2->GetXaxis()->SetTitle("mass (GeV)"); gA2->GetYaxis()->SetTitle("CB a-parameter"); gN1->SetTitle(""); gN1->GetXaxis()->SetTitle("mass (GeV)"); gN1->GetYaxis()->SetTitle("CB n-parameter"); gN2->SetTitle(""); gN2->GetXaxis()->SetTitle("mass (GeV)"); gN2->GetYaxis()->SetTitle("CB n-parameter"); gMeanCB->SetTitle(""); gMeanCB->GetXaxis()->SetTitle("mass (GeV)"); gMeanCB->GetYaxis()->SetTitle("CB mean"); gSigmaCB->SetTitle(""); gSigmaCB->GetXaxis()->SetTitle("mass (GeV)"); gSigmaCB->GetYaxis()->SetTitle("CB sigma"); gMeanBW->SetTitle(""); gMeanBW->GetXaxis()->SetTitle("mass (GeV)"); gMeanBW->GetYaxis()->SetTitle("BW mean"); gAA1->SetTitle(""); gAA1->GetXaxis()->SetTitle("mass (GeV)"); gAA1->GetYaxis()->SetTitle("Chebyshev a1-parameter"); gAA2->SetTitle(""); gAA2->GetXaxis()->SetTitle("mass (GeV)"); gAA2->GetYaxis()->SetTitle("Chebyshev a2-parameter"); gCovQual->SetTitle(""); gCovQual->GetXaxis()->SetTitle("mass (GeV)"); gCovQual->GetYaxis()->SetTitle("cov. matrix qual."); resultfile->cd(); gA1->Fit("pol0"); gA1->Draw("Ap"); gA1->Write(); gA2->Fit("pol0"); gA2->Draw("Ap"); gA2->Write(); gN1->Fit("pol1"); gN1->Draw("Ap"); gN1->Write(); gN2->Fit("pol1"); gN2->Draw("Ap"); gN2->Write(); gMeanCB->Fit("pol1"); gMeanCB->Draw("Ap"); gMeanCB->Write(); gSigmaCB->Fit("pol1"); gSigmaCB->Draw("Ap"); gSigmaCB->Write(); gAA1->Fit("pol0"); gAA1->Draw("Ap"); gAA1->Write(); gAA2->Fit("pol0"); gAA2->Draw("Ap"); gAA2->Write(); gCovQual->Write(); resultfile->Close(); }
void proj_npe_1() { //=========Macro generated from canvas: c/ //========= (Wed Jul 15 16:16:05 2015) by ROOT version6.04/00 TCanvas *c = new TCanvas("c", "",0,45,600,500); c->SetHighLightColor(2); c->Range(-2655.754,-5.755,4350.289,51.795); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); Double_t _fx2[39] = { -1488.08, -1403.181, -1178.164, -1033.78, -849.3154, -838.8983, -788.1957, -701.2156, -654.0264, -163.6875, 1.142557, 54.07047, 256.5688, 531.8203, 632.5535, 750.8472, 835.9491, 859.9519, 970.3359, 1013.975, 1084.685, 1488.872, 1635.959, 1867.579, 1967.102, 2022.346, 2109.155, 2234.388, 2395.154, 2415.658, 2534.104, 2547.086, 2643.154, 2683.775, 2846.919, 3002.304, 3074.222, 3131.044, 3182.615}; Double_t _fy2[39] = { 2.55, 2.3, 2.55, 2.7, 2.4, 2.65, 2.75, 2.5, 2.4, 2.45, 42.05, 2.55, 2.6, 2.6, 2.85, 2.7, 2.55, 2.6, 2.6, 2.6, 2.55, 2.25, 2.65, 2.6, 2.55, 2.25, 2.55, 2.45, 2.65, 2.65, 2.65, 2.6, 2.6, 2.35, 2.55, 2.15, 2.45, 2.75, 2.3}; TGraph *graph = new TGraph(39,_fx2,_fy2); graph->SetName(""); graph->SetTitle("Event 1"); graph->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#0000ff"); graph->SetMarkerColor(ci); graph->SetMarkerStyle(20); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Event 1",100,-1955.149,3649.684); Graph_Graph2->SetMinimum(0); Graph_Graph2->SetMaximum(46.04); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph2->SetLineColor(ci); Graph_Graph2->GetXaxis()->SetTitle("time wrt trigger [cm]"); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelSize(0.035); Graph_Graph2->GetXaxis()->SetTitleSize(0.035); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetTitle("#PE"); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelSize(0.035); Graph_Graph2->GetYaxis()->SetTitleSize(0.035); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelSize(0.035); Graph_Graph2->GetZaxis()->SetTitleSize(0.035); Graph_Graph2->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph2); graph->Draw("ap"); TPaveText *pt = new TPaveText(0.4189298,0.94,0.5810702,0.995,"blNDC"); pt->SetName("title"); pt->SetBorderSize(0); pt->SetFillColor(0); pt->SetFillStyle(0); pt->SetTextFont(42); TText *AText = pt->AddText("Event 1"); pt->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }
void fit7_testbkg_withtail() { //=========Macro generated from canvas: c1/data fits //========= (Thu Mar 10 20:15:02 2016) by ROOT version6.06/00 TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); c1->Range(0,0,1,1); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.14); c1->SetRightMargin(0.05); c1->SetTopMargin(0.05); c1->SetBottomMargin(0.16); c1->SetFrameLineWidth(2); c1->SetFrameBorderMode(0); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3); pad2->Draw(); pad2->cd(); pad2->Range(3754.321,-26.4,6223.457,8.8); pad2->SetFillColor(0); pad2->SetBorderMode(0); pad2->SetBorderSize(2); pad2->SetTickx(1); pad2->SetTicky(1); pad2->SetLeftMargin(0.14); pad2->SetRightMargin(0.05); pad2->SetTopMargin(0); pad2->SetBottomMargin(0.5); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); TH1D *frame_49a73f0__1 = new TH1D("frame_49a73f0__1","",100,4100,6100); frame_49a73f0__1->SetBinContent(1,1.814401); frame_49a73f0__1->SetMinimum(-8.8); frame_49a73f0__1->SetMaximum(8.8); frame_49a73f0__1->SetEntries(1); frame_49a73f0__1->SetDirectory(0); frame_49a73f0__1->SetStats(0); frame_49a73f0__1->SetLineWidth(2); frame_49a73f0__1->SetMarkerStyle(20); frame_49a73f0__1->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_49a73f0__1->GetXaxis()->SetNdivisions(505); frame_49a73f0__1->GetXaxis()->SetLabelFont(132); frame_49a73f0__1->GetXaxis()->SetLabelOffset(0.01); frame_49a73f0__1->GetXaxis()->SetLabelSize(0.15); frame_49a73f0__1->GetXaxis()->SetTitleSize(0.2); frame_49a73f0__1->GetXaxis()->SetTitleOffset(1.1); frame_49a73f0__1->GetXaxis()->SetTitleFont(132); frame_49a73f0__1->GetYaxis()->SetTitle("Pull"); frame_49a73f0__1->GetYaxis()->CenterTitle(true); frame_49a73f0__1->GetYaxis()->SetNdivisions(505); frame_49a73f0__1->GetYaxis()->SetLabelFont(132); frame_49a73f0__1->GetYaxis()->SetLabelOffset(0.01); frame_49a73f0__1->GetYaxis()->SetLabelSize(0.15); frame_49a73f0__1->GetYaxis()->SetTitleSize(0.15); frame_49a73f0__1->GetYaxis()->SetTitleOffset(0.45); frame_49a73f0__1->GetYaxis()->SetTitleFont(132); frame_49a73f0__1->GetZaxis()->SetLabelFont(132); frame_49a73f0__1->GetZaxis()->SetLabelSize(0.06); frame_49a73f0__1->GetZaxis()->SetTitleSize(0.072); frame_49a73f0__1->GetZaxis()->SetTitleOffset(1.2); frame_49a73f0__1->GetZaxis()->SetTitleFont(132); frame_49a73f0__1->Draw("FUNC"); Double_t pull_Hist_curvetot_fx3001[5] = { 5950, 5970, 5990, 6010, 6030}; Double_t pull_Hist_curvetot_fy3001[5] = { -0.7070745, 0.407049, 0.6467117, -0.3394017, -0.6307982}; Double_t pull_Hist_curvetot_felx3001[5] = { 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fely3001[5] = { 1, 1, 1, 1, 1}; Double_t pull_Hist_curvetot_fehx3001[5] = { 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fehy3001[5] = { 1, 1, 1, 1, 1}; TGraphAsymmErrors *grae = new TGraphAsymmErrors(5,pull_Hist_curvetot_fx3001,pull_Hist_curvetot_fy3001,pull_Hist_curvetot_felx3001,pull_Hist_curvetot_fehx3001,pull_Hist_curvetot_fely3001,pull_Hist_curvetot_fehy3001); grae->SetName("pull_Hist_curvetot"); grae->SetTitle("Pull of Histogram of data_plot__Bs_LOKI_MASS_JpsiConstr and Projection of totalPdf"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_pull_Hist_curvetot3001 = new TH1F("Graph_pull_Hist_curvetot3001","Pull of Histogram of data_plot__Bs_LOKI_MASS_JpsiConstr and Projection of totalPdf",100,5942,6038); Graph_pull_Hist_curvetot3001->SetMinimum(-2.042453); Graph_pull_Hist_curvetot3001->SetMaximum(1.98209); Graph_pull_Hist_curvetot3001->SetDirectory(0); Graph_pull_Hist_curvetot3001->SetStats(0); Graph_pull_Hist_curvetot3001->SetLineWidth(2); Graph_pull_Hist_curvetot3001->SetMarkerStyle(20); Graph_pull_Hist_curvetot3001->GetXaxis()->SetNdivisions(505); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleOffset(1.2); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_pull_Hist_curvetot3001); grae->Draw("p"); TH1D *frame_49a73f0__2 = new TH1D("frame_49a73f0__2","",100,4100,6100); frame_49a73f0__2->SetBinContent(1,1.814401); frame_49a73f0__2->SetMinimum(-8.8); frame_49a73f0__2->SetMaximum(8.8); frame_49a73f0__2->SetEntries(1); frame_49a73f0__2->SetDirectory(0); frame_49a73f0__2->SetStats(0); frame_49a73f0__2->SetLineWidth(2); frame_49a73f0__2->SetMarkerStyle(20); frame_49a73f0__2->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_49a73f0__2->GetXaxis()->SetNdivisions(505); frame_49a73f0__2->GetXaxis()->SetLabelFont(132); frame_49a73f0__2->GetXaxis()->SetLabelOffset(0.01); frame_49a73f0__2->GetXaxis()->SetLabelSize(0.15); frame_49a73f0__2->GetXaxis()->SetTitleSize(0.2); frame_49a73f0__2->GetXaxis()->SetTitleOffset(1.1); frame_49a73f0__2->GetXaxis()->SetTitleFont(132); frame_49a73f0__2->GetYaxis()->SetTitle("Pull"); frame_49a73f0__2->GetYaxis()->CenterTitle(true); frame_49a73f0__2->GetYaxis()->SetNdivisions(505); frame_49a73f0__2->GetYaxis()->SetLabelFont(132); frame_49a73f0__2->GetYaxis()->SetLabelOffset(0.01); frame_49a73f0__2->GetYaxis()->SetLabelSize(0.15); frame_49a73f0__2->GetYaxis()->SetTitleSize(0.15); frame_49a73f0__2->GetYaxis()->SetTitleOffset(0.45); frame_49a73f0__2->GetYaxis()->SetTitleFont(132); frame_49a73f0__2->GetZaxis()->SetLabelFont(132); frame_49a73f0__2->GetZaxis()->SetLabelSize(0.06); frame_49a73f0__2->GetZaxis()->SetTitleSize(0.072); frame_49a73f0__2->GetZaxis()->SetTitleOffset(1.2); frame_49a73f0__2->GetZaxis()->SetTitleFont(132); frame_49a73f0__2->Draw("AXISSAME"); pad2->Modified(); c1->cd(); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.3,1,1); pad1->Draw(); pad1->cd(); pad1->Range(3754.321,0,6223.457,3.935074); pad1->SetFillColor(0); pad1->SetBorderMode(0); pad1->SetBorderSize(2); pad1->SetLogy(); pad1->SetTickx(1); pad1->SetTicky(1); pad1->SetLeftMargin(0.14); pad1->SetRightMargin(0.05); pad1->SetTopMargin(0.06); pad1->SetBottomMargin(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); TH1D *frame_4a4d3a0__3 = new TH1D("frame_4a4d3a0__3","A RooPlot of \"m(J/#psi #Lambda)\"",100,4100,6100); frame_4a4d3a0__3->SetBinContent(1,2612.806); frame_4a4d3a0__3->SetMinimum(1); frame_4a4d3a0__3->SetMaximum(5000); frame_4a4d3a0__3->SetEntries(1); frame_4a4d3a0__3->SetDirectory(0); frame_4a4d3a0__3->SetStats(0); frame_4a4d3a0__3->SetLineWidth(2); frame_4a4d3a0__3->SetMarkerStyle(20); frame_4a4d3a0__3->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_4a4d3a0__3->GetXaxis()->SetNdivisions(505); frame_4a4d3a0__3->GetXaxis()->SetLabelFont(132); frame_4a4d3a0__3->GetXaxis()->SetLabelOffset(0.01); frame_4a4d3a0__3->GetXaxis()->SetLabelSize(0.06); frame_4a4d3a0__3->GetXaxis()->SetTitleSize(0.072); frame_4a4d3a0__3->GetXaxis()->SetTitleOffset(0.95); frame_4a4d3a0__3->GetXaxis()->SetTitleFont(132); frame_4a4d3a0__3->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4a4d3a0__3->GetYaxis()->SetLabelFont(132); frame_4a4d3a0__3->GetYaxis()->SetLabelOffset(0.01); frame_4a4d3a0__3->GetYaxis()->SetLabelSize(0.06); frame_4a4d3a0__3->GetYaxis()->SetTitleSize(0.072); frame_4a4d3a0__3->GetYaxis()->SetTitleOffset(0.95); frame_4a4d3a0__3->GetYaxis()->SetTitleFont(132); frame_4a4d3a0__3->GetZaxis()->SetLabelFont(132); frame_4a4d3a0__3->GetZaxis()->SetLabelSize(0.06); frame_4a4d3a0__3->GetZaxis()->SetTitleSize(0.072); frame_4a4d3a0__3->GetZaxis()->SetTitleOffset(1.2); frame_4a4d3a0__3->GetZaxis()->SetTitleFont(132); frame_4a4d3a0__3->Draw("FUNC"); Double_t Hist_fx3002[100] = { 4110, 4130, 4150, 4170, 4190, 4210, 4230, 4250, 4270, 4290, 4310, 4330, 4350, 4370, 4390, 4410, 4430, 4450, 4470, 4490, 4510, 4530, 4550, 4570, 4590, 4610, 4630, 4650, 4670, 4690, 4710, 4730, 4750, 4770, 4790, 4810, 4830, 4850, 4870, 4890, 4910, 4930, 4950, 4970, 4990, 5010, 5030, 5050, 5070, 5090, 5110, 5130, 5150, 5170, 5190, 5210, 5230, 5250, 5270, 5290, 5310, 5330, 5350, 5370, 5390, 5410, 5430, 5450, 5470, 5490, 5510, 5530, 5550, 5570, 5590, 5610, 5630, 5650, 5670, 5690, 5710, 5730, 5750, 5770, 5790, 5810, 5830, 5850, 5870, 5890, 5910, 5930, 5950, 5970, 5990, 6010, 6030, 6050, 6070, 6090}; Double_t Hist_fy3002[100] = { 0, 0, 0, 0, 0, 25, 123, 153, 163, 161, 157, 176, 121, 130, 136, 136, 130, 106, 122, 105, 107, 104, 100, 107, 105, 92, 93, 88, 115, 88, 88, 108, 101, 116, 85, 109, 95, 68, 99, 102, 127, 137, 141, 166, 163, 184, 182, 166, 137, 112, 116, 87, 92, 82, 81, 118, 84, 82, 81, 83, 79, 62, 60, 30, 27, 40, 28, 31, 33, 24, 26, 36, 46, 69, 157, 1925, 2439, 191, 42, 24, 14, 16, 9, 11, 19, 9, 11, 12, 7, 12, 10, 7, 5, 7, 7, 4, 3, 0, 0, 0}; Double_t Hist_felx3002[100] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}; Double_t Hist_fely3002[100] = { 0, 0, 0, 0, 0, 5, 11.09054, 12.36932, 12.76715, 12.68858, 12.52996, 13.2665, 11, 11.40175, 11.6619, 11.6619, 11.40175, 10.29563, 11.04536, 10.24695, 10.34408, 10.19804, 10, 10.34408, 10.24695, 9.591663, 9.643651, 9.380832, 10.72381, 9.380832, 9.380832, 10.3923, 10.04988, 10.77033, 9.219544, 10.44031, 9.746794, 8.246211, 9.949874, 10.0995, 11.26943, 11.7047, 11.87434, 12.8841, 12.76715, 13.56466, 13.49074, 12.8841, 11.7047, 10.58301, 10.77033, 9.327379, 9.591663, 9.055385, 9, 10.86278, 9.165151, 9.055385, 9, 9.110434, 8.888194, 7.874008, 7.745967, 5.477226, 5.196152, 6.324555, 5.291503, 5.567764, 5.744563, 4.898979, 5.09902, 6, 6.78233, 8.306624, 12.52996, 43.87482, 49.38623, 13.82027, 6.480741, 4.898979, 3.741657, 4, 3, 3.316625, 4.358899, 3, 3.316625, 3.464102, 2.645751, 3.464102, 3.162278, 2.645751, 2.236068, 2.645751, 2.645751, 2, 1.732051, 0, 0, 0}; Double_t Hist_fehx3002[100] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}; Double_t Hist_fehy3002[100] = { 0, 0, 0, 0, 0, 5, 11.09054, 12.36932, 12.76715, 12.68858, 12.52996, 13.2665, 11, 11.40175, 11.6619, 11.6619, 11.40175, 10.29563, 11.04536, 10.24695, 10.34408, 10.19804, 10, 10.34408, 10.24695, 9.591663, 9.643651, 9.380832, 10.72381, 9.380832, 9.380832, 10.3923, 10.04988, 10.77033, 9.219544, 10.44031, 9.746794, 8.246211, 9.949874, 10.0995, 11.26943, 11.7047, 11.87434, 12.8841, 12.76715, 13.56466, 13.49074, 12.8841, 11.7047, 10.58301, 10.77033, 9.327379, 9.591663, 9.055385, 9, 10.86278, 9.165151, 9.055385, 9, 9.110434, 8.888194, 7.874008, 7.745967, 5.477226, 5.196152, 6.324555, 5.291503, 5.567764, 5.744563, 4.898979, 5.09902, 6, 6.78233, 8.306624, 12.52996, 43.87482, 49.38623, 13.82027, 6.480741, 4.898979, 3.741657, 4, 3, 3.316625, 4.358899, 3, 3.316625, 3.464102, 2.645751, 3.464102, 3.162278, 2.645751, 2.236068, 2.645751, 2.645751, 2, 1.732051, 0, 0, 0}; grae = new TGraphAsymmErrors(100,Hist_fx3002,Hist_fy3002,Hist_felx3002,Hist_fehx3002,Hist_fely3002,Hist_fehy3002); grae->SetName("Hist"); grae->SetTitle("Histogram of data_plot__Bs_LOKI_MASS_JpsiConstr"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_Hist3002 = new TH1F("Graph_Hist3002","Histogram of data_plot__Bs_LOKI_MASS_JpsiConstr",100,3900,6300); Graph_Hist3002->SetMinimum(2.737225); Graph_Hist3002->SetMaximum(2737.225); Graph_Hist3002->SetDirectory(0); Graph_Hist3002->SetStats(0); Graph_Hist3002->SetLineWidth(2); Graph_Hist3002->SetMarkerStyle(20); Graph_Hist3002->GetXaxis()->SetNdivisions(505); Graph_Hist3002->GetXaxis()->SetLabelFont(132); Graph_Hist3002->GetXaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetXaxis()->SetLabelSize(0.06); Graph_Hist3002->GetXaxis()->SetTitleSize(0.072); Graph_Hist3002->GetXaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetXaxis()->SetTitleFont(132); Graph_Hist3002->GetYaxis()->SetLabelFont(132); Graph_Hist3002->GetYaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetYaxis()->SetLabelSize(0.06); Graph_Hist3002->GetYaxis()->SetTitleSize(0.072); Graph_Hist3002->GetYaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetYaxis()->SetTitleFont(132); Graph_Hist3002->GetZaxis()->SetLabelFont(132); Graph_Hist3002->GetZaxis()->SetLabelSize(0.06); Graph_Hist3002->GetZaxis()->SetTitleSize(0.072); Graph_Hist3002->GetZaxis()->SetTitleOffset(1.2); Graph_Hist3002->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_Hist3002); grae->Draw("p"); Double_t curvetot_fx1[102] = { 4300, 4305, 4310, 4315, 4320, 4325, 4330, 4335, 4340, 4345, 4350, 4355, 4360, 4365, 4370, 4375, 4380, 4385, 4390, 4395, 4400, 4405, 4410, 4415, 4420, 4425, 4430, 4435, 4440, 4445, 4450, 4455, 4460, 4465, 4470, 4475, 4480, 4485, 4490, 4495, 4500, 4505, 4510, 4515, 4520, 4525, 4530, 4535, 4540, 4545, 4550, 4555, 4560, 4565, 4570, 4575, 4580, 4585, 4590, 4595, 4600, 4605, 4610, 4615, 4620, 4625, 4630, 4635, 4640, 4645, 4650, 4655, 4660, 4665, 4670, 4675, 4680, 4685, 4690, 4695, 4700, 4705, 4710, 4715, 4720, 4725, 4730, 4735, 4740, 4745, 4750, 4755, 4760, 4765, 4770, 4775, 4780, 4785, 4790, 4795, 4800, 4800}; Double_t curvetot_fy1[102] = { 143.298, 142.6376, 141.9788, 141.3214, 140.6656, 140.0112, 139.3584, 138.707, 138.0571, 137.4088, 136.7619, 136.1165, 135.4726, 134.8302, 134.1893, 133.5499, 132.912, 132.2756, 131.6407, 131.0072, 130.3753, 129.7449, 129.116, 128.4885, 127.8626, 127.2381, 126.6152, 125.9937, 125.3738, 124.7553, 124.1384, 123.5229, 122.9089, 122.2964, 121.6854, 121.076, 120.468, 119.8615, 119.2565, 118.653, 118.051, 117.4504, 116.8514, 116.2539, 115.6579, 115.0633, 114.4703, 113.8788, 113.2887, 112.7002, 112.1131, 111.5276, 110.9435, 110.361, 109.7799, 109.2003, 108.6222, 108.0457, 107.4706, 106.897, 106.3249, 105.7543, 105.1852, 104.6176, 104.0515, 103.4868, 102.9237, 102.3621, 101.802, 101.2433, 100.6862, 100.1306, 99.57642, 99.02377, 98.47262, 97.92296, 97.3748, 96.82813, 96.28296, 95.73929, 95.19711, 94.65642, 94.11724, 93.57954, 93.04335, 92.50865, 91.97544, 91.44373, 90.91352, 90.3848, 89.85758, 89.33185, 88.80762, 88.28489, 87.76365, 87.2439, 86.72566, 86.20891, 85.69365, 85.17989, 84.66762, 84.66762}; TGraph *graph = new TGraph(102,curvetot_fx1,curvetot_fy1); graph->SetName("curvetot"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_curvetot1 = new TH1F("Graph_curvetot1","Projection of totalPdf",102,4250,4850); Graph_curvetot1->SetMinimum(78.80459); Graph_curvetot1->SetMaximum(149.161); Graph_curvetot1->SetDirectory(0); Graph_curvetot1->SetStats(0); Graph_curvetot1->SetLineWidth(2); Graph_curvetot1->SetMarkerStyle(20); Graph_curvetot1->GetXaxis()->SetNdivisions(505); Graph_curvetot1->GetXaxis()->SetLabelFont(132); Graph_curvetot1->GetXaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetXaxis()->SetLabelSize(0.06); Graph_curvetot1->GetXaxis()->SetTitleSize(0.072); Graph_curvetot1->GetXaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetXaxis()->SetTitleFont(132); Graph_curvetot1->GetYaxis()->SetLabelFont(132); Graph_curvetot1->GetYaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetYaxis()->SetLabelSize(0.06); Graph_curvetot1->GetYaxis()->SetTitleSize(0.072); Graph_curvetot1->GetYaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetYaxis()->SetTitleFont(132); Graph_curvetot1->GetZaxis()->SetLabelFont(132); Graph_curvetot1->GetZaxis()->SetLabelSize(0.06); Graph_curvetot1->GetZaxis()->SetTitleSize(0.072); Graph_curvetot1->GetZaxis()->SetTitleOffset(1.2); Graph_curvetot1->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_curvetot1); graph->Draw("l"); Double_t curvetot_fx2[102] = { 5700, 5702.5, 5705, 5707.5, 5710, 5712.5, 5715, 5717.5, 5720, 5722.5, 5725, 5727.5, 5730, 5732.5, 5735, 5737.5, 5740, 5742.5, 5745, 5747.5, 5750, 5752.5, 5755, 5757.5, 5760, 5762.5, 5765, 5767.5, 5770, 5772.5, 5775, 5777.5, 5780, 5782.5, 5785, 5787.5, 5790, 5792.5, 5795, 5797.5, 5800, 5802.5, 5805, 5807.5, 5810, 5812.5, 5815, 5817.5, 5820, 5822.5, 5825, 5827.5, 5830, 5832.5, 5835, 5837.5, 5840, 5842.5, 5845, 5847.5, 5850, 5852.5, 5855, 5857.5, 5860, 5862.5, 5865, 5867.5, 5870, 5872.5, 5875, 5877.5, 5880, 5882.5, 5885, 5887.5, 5890, 5892.5, 5895, 5897.5, 5900, 5902.5, 5905, 5907.5, 5910, 5912.5, 5915, 5917.5, 5920, 5922.5, 5925, 5927.5, 5930, 5932.5, 5935, 5937.5, 5940, 5942.5, 5945, 5947.5, 5950, 5950}; Double_t curvetot_fy2[102] = { 16.82558, 16.70463, 16.58405, 16.46384, 16.34401, 16.22455, 16.10546, 15.98675, 15.86841, 15.75045, 15.63286, 15.51564, 15.3988, 15.28233, 15.16624, 15.05052, 14.93517, 14.8202, 14.7056, 14.59138, 14.47753, 14.36405, 14.25095, 14.13822, 14.02587, 13.91389, 13.80228, 13.69105, 13.58019, 13.46971, 13.3596, 13.24986, 13.1405, 13.03151, 12.92289, 12.81465, 12.70678, 12.59929, 12.49217, 12.38543, 12.27905, 12.17306, 12.06743, 11.96218, 11.85731, 11.75281, 11.64868, 11.54492, 11.44154, 11.33854, 11.23591, 11.13365, 11.03176, 10.93025, 10.82912, 10.72835, 10.62797, 10.52795, 10.42831, 10.32904, 10.23015, 10.13163, 10.03349, 9.935716, 9.838319, 9.741296, 9.644647, 9.548372, 9.45247, 9.356943, 9.26179, 9.16701, 9.072605, 8.978573, 8.884915, 8.791632, 8.698722, 8.606186, 8.514024, 8.422236, 8.330822, 8.239782, 8.149116, 8.058823, 7.968905, 7.879361, 7.79019, 7.701394, 7.612971, 7.524922, 7.437248, 7.349947, 7.26302, 7.176467, 7.090288, 7.004483, 6.919052, 6.833995, 6.749311, 6.665002, 6.581067, 6.581067}; graph = new TGraph(102,curvetot_fx2,curvetot_fy2); graph->SetName("curvetot"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_curvetot2 = new TH1F("Graph_curvetot2","Projection of totalPdf",102,5675,5975); Graph_curvetot2->SetMinimum(5.556615); Graph_curvetot2->SetMaximum(17.85003); Graph_curvetot2->SetDirectory(0); Graph_curvetot2->SetStats(0); Graph_curvetot2->SetLineWidth(2); Graph_curvetot2->SetMarkerStyle(20); Graph_curvetot2->GetXaxis()->SetNdivisions(505); Graph_curvetot2->GetXaxis()->SetLabelFont(132); Graph_curvetot2->GetXaxis()->SetLabelOffset(0.01); Graph_curvetot2->GetXaxis()->SetLabelSize(0.06); Graph_curvetot2->GetXaxis()->SetTitleSize(0.072); Graph_curvetot2->GetXaxis()->SetTitleOffset(0.95); Graph_curvetot2->GetXaxis()->SetTitleFont(132); Graph_curvetot2->GetYaxis()->SetLabelFont(132); Graph_curvetot2->GetYaxis()->SetLabelOffset(0.01); Graph_curvetot2->GetYaxis()->SetLabelSize(0.06); Graph_curvetot2->GetYaxis()->SetTitleSize(0.072); Graph_curvetot2->GetYaxis()->SetTitleOffset(0.95); Graph_curvetot2->GetYaxis()->SetTitleFont(132); Graph_curvetot2->GetZaxis()->SetLabelFont(132); Graph_curvetot2->GetZaxis()->SetLabelSize(0.06); Graph_curvetot2->GetZaxis()->SetTitleSize(0.072); Graph_curvetot2->GetZaxis()->SetTitleOffset(1.2); Graph_curvetot2->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_curvetot2); graph->Draw("l"); Double_t curvetot_fx3[102] = { 5950, 5950.9, 5951.8, 5952.7, 5953.6, 5954.5, 5955.4, 5956.3, 5957.2, 5958.1, 5959, 5959.9, 5960.8, 5961.7, 5962.6, 5963.5, 5964.4, 5965.3, 5966.2, 5967.1, 5968, 5968.9, 5969.8, 5970.7, 5971.6, 5972.5, 5973.4, 5974.3, 5975.2, 5976.1, 5977, 5977.9, 5978.8, 5979.7, 5980.6, 5981.5, 5982.4, 5983.3, 5984.2, 5985.1, 5986, 5986.9, 5987.8, 5988.7, 5989.6, 5990.5, 5991.4, 5992.3, 5993.2, 5994.1, 5995, 5995.9, 5996.8, 5997.7, 5998.6, 5999.5, 6000.4, 6001.3, 6002.2, 6003.1, 6004, 6004.9, 6005.8, 6006.7, 6007.6, 6008.5, 6009.4, 6010.3, 6011.2, 6012.1, 6013, 6013.9, 6014.8, 6015.7, 6016.6, 6017.5, 6018.4, 6019.3, 6020.2, 6021.1, 6022, 6022.9, 6023.8, 6024.7, 6025.6, 6026.5, 6027.4, 6028.3, 6029.2, 6030.1, 6031, 6031.9, 6032.8, 6033.7, 6034.6, 6035.5, 6036.4, 6037.3, 6038.2, 6039.1, 6040, 6040}; Double_t curvetot_fy3[102] = { 6.581067, 6.550942, 6.520865, 6.490837, 6.460857, 6.430925, 6.401042, 6.371208, 6.341422, 6.311685, 6.281996, 6.252355, 6.222763, 6.193219, 6.163724, 6.134277, 6.104879, 6.075529, 6.046228, 6.016975, 5.987771, 5.958615, 5.929507, 5.900448, 5.871437, 5.842475, 5.813562, 5.784697, 5.75588, 5.727112, 5.698392, 5.66972, 5.641098, 5.612523, 5.583997, 5.55552, 5.527091, 5.49871, 5.470378, 5.442094, 5.413859, 5.385672, 5.357534, 5.329444, 5.301403, 5.27341, 5.245466, 5.21757, 5.189722, 5.161923, 5.134173, 5.106471, 5.078817, 5.051212, 5.023655, 4.996147, 4.968687, 4.941276, 4.913913, 4.886598, 4.859333, 4.832115, 4.804946, 4.777825, 4.750753, 4.72373, 4.696755, 4.669828, 4.64295, 4.61612, 4.589339, 4.562606, 4.535921, 4.509285, 4.482698, 4.456159, 4.429668, 4.403226, 4.376833, 4.350487, 4.324191, 4.297942, 4.271743, 4.245591, 4.219488, 4.193434, 4.167428, 4.141471, 4.115562, 4.089701, 4.063889, 4.038125, 4.01241, 3.986744, 3.961125, 3.935556, 3.910034, 3.884561, 3.859137, 3.833761, 3.808434, 3.808434}; graph = new TGraph(102,curvetot_fx3,curvetot_fy3); graph->SetName("curvetot"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_curvetot3 = new TH1F("Graph_curvetot3","Projection of totalPdf",102,5941,6049); Graph_curvetot3->SetMinimum(3.53117); Graph_curvetot3->SetMaximum(6.85833); Graph_curvetot3->SetDirectory(0); Graph_curvetot3->SetStats(0); Graph_curvetot3->SetLineWidth(2); Graph_curvetot3->SetMarkerStyle(20); Graph_curvetot3->GetXaxis()->SetNdivisions(505); Graph_curvetot3->GetXaxis()->SetLabelFont(132); Graph_curvetot3->GetXaxis()->SetLabelOffset(0.01); Graph_curvetot3->GetXaxis()->SetLabelSize(0.06); Graph_curvetot3->GetXaxis()->SetTitleSize(0.072); Graph_curvetot3->GetXaxis()->SetTitleOffset(0.95); Graph_curvetot3->GetXaxis()->SetTitleFont(132); Graph_curvetot3->GetYaxis()->SetLabelFont(132); Graph_curvetot3->GetYaxis()->SetLabelOffset(0.01); Graph_curvetot3->GetYaxis()->SetLabelSize(0.06); Graph_curvetot3->GetYaxis()->SetTitleSize(0.072); Graph_curvetot3->GetYaxis()->SetTitleOffset(0.95); Graph_curvetot3->GetYaxis()->SetTitleFont(132); Graph_curvetot3->GetZaxis()->SetLabelFont(132); Graph_curvetot3->GetZaxis()->SetLabelSize(0.06); Graph_curvetot3->GetZaxis()->SetTitleSize(0.072); Graph_curvetot3->GetZaxis()->SetTitleOffset(1.2); Graph_curvetot3->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_curvetot3); graph->Draw("l"); Double_t bkg_fx4[102] = { 4300, 4305, 4310, 4315, 4320, 4325, 4330, 4335, 4340, 4345, 4350, 4355, 4360, 4365, 4370, 4375, 4380, 4385, 4390, 4395, 4400, 4405, 4410, 4415, 4420, 4425, 4430, 4435, 4440, 4445, 4450, 4455, 4460, 4465, 4470, 4475, 4480, 4485, 4490, 4495, 4500, 4505, 4510, 4515, 4520, 4525, 4530, 4535, 4540, 4545, 4550, 4555, 4560, 4565, 4570, 4575, 4580, 4585, 4590, 4595, 4600, 4605, 4610, 4615, 4620, 4625, 4630, 4635, 4640, 4645, 4650, 4655, 4660, 4665, 4670, 4675, 4680, 4685, 4690, 4695, 4700, 4705, 4710, 4715, 4720, 4725, 4730, 4735, 4740, 4745, 4750, 4755, 4760, 4765, 4770, 4775, 4780, 4785, 4790, 4795, 4800, 4800}; Double_t bkg_fy4[102] = { 143.298, 142.6376, 141.9788, 141.3214, 140.6656, 140.0112, 139.3584, 138.707, 138.0571, 137.4088, 136.7619, 136.1165, 135.4726, 134.8302, 134.1893, 133.5499, 132.912, 132.2756, 131.6407, 131.0072, 130.3753, 129.7449, 129.116, 128.4885, 127.8626, 127.2381, 126.6152, 125.9937, 125.3738, 124.7553, 124.1384, 123.5229, 122.9089, 122.2964, 121.6854, 121.076, 120.468, 119.8615, 119.2565, 118.653, 118.051, 117.4504, 116.8514, 116.2539, 115.6579, 115.0633, 114.4703, 113.8788, 113.2887, 112.7002, 112.1131, 111.5276, 110.9435, 110.361, 109.7799, 109.2003, 108.6222, 108.0457, 107.4706, 106.897, 106.3249, 105.7543, 105.1852, 104.6176, 104.0515, 103.4868, 102.9237, 102.3621, 101.802, 101.2433, 100.6862, 100.1306, 99.57642, 99.02377, 98.47262, 97.92296, 97.3748, 96.82813, 96.28296, 95.73929, 95.19711, 94.65642, 94.11724, 93.57954, 93.04335, 92.50865, 91.97544, 91.44373, 90.91352, 90.3848, 89.85758, 89.33185, 88.80762, 88.28489, 87.76365, 87.2439, 86.72566, 86.20891, 85.69365, 85.17989, 84.66762, 84.66762}; graph = new TGraph(102,bkg_fx4,bkg_fy4); graph->SetName("bkg"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); graph->SetLineColor(2); graph->SetLineStyle(2); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_bkg4 = new TH1F("Graph_bkg4","Projection of totalPdf",102,4250,4850); Graph_bkg4->SetMinimum(78.80459); Graph_bkg4->SetMaximum(149.161); Graph_bkg4->SetDirectory(0); Graph_bkg4->SetStats(0); Graph_bkg4->SetLineWidth(2); Graph_bkg4->SetMarkerStyle(20); Graph_bkg4->GetXaxis()->SetNdivisions(505); Graph_bkg4->GetXaxis()->SetLabelFont(132); Graph_bkg4->GetXaxis()->SetLabelOffset(0.01); Graph_bkg4->GetXaxis()->SetLabelSize(0.06); Graph_bkg4->GetXaxis()->SetTitleSize(0.072); Graph_bkg4->GetXaxis()->SetTitleOffset(0.95); Graph_bkg4->GetXaxis()->SetTitleFont(132); Graph_bkg4->GetYaxis()->SetLabelFont(132); Graph_bkg4->GetYaxis()->SetLabelOffset(0.01); Graph_bkg4->GetYaxis()->SetLabelSize(0.06); Graph_bkg4->GetYaxis()->SetTitleSize(0.072); Graph_bkg4->GetYaxis()->SetTitleOffset(0.95); Graph_bkg4->GetYaxis()->SetTitleFont(132); Graph_bkg4->GetZaxis()->SetLabelFont(132); Graph_bkg4->GetZaxis()->SetLabelSize(0.06); Graph_bkg4->GetZaxis()->SetTitleSize(0.072); Graph_bkg4->GetZaxis()->SetTitleOffset(1.2); Graph_bkg4->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_bkg4); graph->Draw("l"); Double_t bkg_fx5[102] = { 5700, 5702.5, 5705, 5707.5, 5710, 5712.5, 5715, 5717.5, 5720, 5722.5, 5725, 5727.5, 5730, 5732.5, 5735, 5737.5, 5740, 5742.5, 5745, 5747.5, 5750, 5752.5, 5755, 5757.5, 5760, 5762.5, 5765, 5767.5, 5770, 5772.5, 5775, 5777.5, 5780, 5782.5, 5785, 5787.5, 5790, 5792.5, 5795, 5797.5, 5800, 5802.5, 5805, 5807.5, 5810, 5812.5, 5815, 5817.5, 5820, 5822.5, 5825, 5827.5, 5830, 5832.5, 5835, 5837.5, 5840, 5842.5, 5845, 5847.5, 5850, 5852.5, 5855, 5857.5, 5860, 5862.5, 5865, 5867.5, 5870, 5872.5, 5875, 5877.5, 5880, 5882.5, 5885, 5887.5, 5890, 5892.5, 5895, 5897.5, 5900, 5902.5, 5905, 5907.5, 5910, 5912.5, 5915, 5917.5, 5920, 5922.5, 5925, 5927.5, 5930, 5932.5, 5935, 5937.5, 5940, 5942.5, 5945, 5947.5, 5950, 5950}; Double_t bkg_fy5[102] = { 16.82558, 16.70463, 16.58405, 16.46384, 16.34401, 16.22455, 16.10546, 15.98675, 15.86841, 15.75045, 15.63286, 15.51564, 15.3988, 15.28233, 15.16624, 15.05052, 14.93517, 14.8202, 14.7056, 14.59138, 14.47753, 14.36405, 14.25095, 14.13822, 14.02587, 13.91389, 13.80228, 13.69105, 13.58019, 13.46971, 13.3596, 13.24986, 13.1405, 13.03151, 12.92289, 12.81465, 12.70678, 12.59929, 12.49217, 12.38543, 12.27905, 12.17306, 12.06743, 11.96218, 11.85731, 11.75281, 11.64868, 11.54492, 11.44154, 11.33854, 11.23591, 11.13365, 11.03176, 10.93025, 10.82912, 10.72835, 10.62797, 10.52795, 10.42831, 10.32904, 10.23015, 10.13163, 10.03349, 9.935716, 9.838319, 9.741296, 9.644647, 9.548372, 9.45247, 9.356943, 9.26179, 9.16701, 9.072605, 8.978573, 8.884915, 8.791632, 8.698722, 8.606186, 8.514024, 8.422236, 8.330822, 8.239782, 8.149116, 8.058823, 7.968905, 7.879361, 7.79019, 7.701394, 7.612971, 7.524922, 7.437248, 7.349947, 7.26302, 7.176467, 7.090288, 7.004483, 6.919052, 6.833995, 6.749311, 6.665002, 6.581067, 6.581067}; graph = new TGraph(102,bkg_fx5,bkg_fy5); graph->SetName("bkg"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); graph->SetLineColor(2); graph->SetLineStyle(2); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_bkg5 = new TH1F("Graph_bkg5","Projection of totalPdf",102,5675,5975); Graph_bkg5->SetMinimum(5.556615); Graph_bkg5->SetMaximum(17.85003); Graph_bkg5->SetDirectory(0); Graph_bkg5->SetStats(0); Graph_bkg5->SetLineWidth(2); Graph_bkg5->SetMarkerStyle(20); Graph_bkg5->GetXaxis()->SetNdivisions(505); Graph_bkg5->GetXaxis()->SetLabelFont(132); Graph_bkg5->GetXaxis()->SetLabelOffset(0.01); Graph_bkg5->GetXaxis()->SetLabelSize(0.06); Graph_bkg5->GetXaxis()->SetTitleSize(0.072); Graph_bkg5->GetXaxis()->SetTitleOffset(0.95); Graph_bkg5->GetXaxis()->SetTitleFont(132); Graph_bkg5->GetYaxis()->SetLabelFont(132); Graph_bkg5->GetYaxis()->SetLabelOffset(0.01); Graph_bkg5->GetYaxis()->SetLabelSize(0.06); Graph_bkg5->GetYaxis()->SetTitleSize(0.072); Graph_bkg5->GetYaxis()->SetTitleOffset(0.95); Graph_bkg5->GetYaxis()->SetTitleFont(132); Graph_bkg5->GetZaxis()->SetLabelFont(132); Graph_bkg5->GetZaxis()->SetLabelSize(0.06); Graph_bkg5->GetZaxis()->SetTitleSize(0.072); Graph_bkg5->GetZaxis()->SetTitleOffset(1.2); Graph_bkg5->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_bkg5); graph->Draw("l"); Double_t bkg_fx6[102] = { 5950, 5950.9, 5951.8, 5952.7, 5953.6, 5954.5, 5955.4, 5956.3, 5957.2, 5958.1, 5959, 5959.9, 5960.8, 5961.7, 5962.6, 5963.5, 5964.4, 5965.3, 5966.2, 5967.1, 5968, 5968.9, 5969.8, 5970.7, 5971.6, 5972.5, 5973.4, 5974.3, 5975.2, 5976.1, 5977, 5977.9, 5978.8, 5979.7, 5980.6, 5981.5, 5982.4, 5983.3, 5984.2, 5985.1, 5986, 5986.9, 5987.8, 5988.7, 5989.6, 5990.5, 5991.4, 5992.3, 5993.2, 5994.1, 5995, 5995.9, 5996.8, 5997.7, 5998.6, 5999.5, 6000.4, 6001.3, 6002.2, 6003.1, 6004, 6004.9, 6005.8, 6006.7, 6007.6, 6008.5, 6009.4, 6010.3, 6011.2, 6012.1, 6013, 6013.9, 6014.8, 6015.7, 6016.6, 6017.5, 6018.4, 6019.3, 6020.2, 6021.1, 6022, 6022.9, 6023.8, 6024.7, 6025.6, 6026.5, 6027.4, 6028.3, 6029.2, 6030.1, 6031, 6031.9, 6032.8, 6033.7, 6034.6, 6035.5, 6036.4, 6037.3, 6038.2, 6039.1, 6040, 6040}; Double_t bkg_fy6[102] = { 6.581067, 6.550942, 6.520865, 6.490837, 6.460857, 6.430925, 6.401042, 6.371208, 6.341422, 6.311685, 6.281996, 6.252355, 6.222763, 6.193219, 6.163724, 6.134277, 6.104879, 6.075529, 6.046228, 6.016975, 5.987771, 5.958615, 5.929507, 5.900448, 5.871437, 5.842475, 5.813562, 5.784697, 5.75588, 5.727112, 5.698392, 5.66972, 5.641098, 5.612523, 5.583997, 5.55552, 5.527091, 5.49871, 5.470378, 5.442094, 5.413859, 5.385672, 5.357534, 5.329444, 5.301403, 5.27341, 5.245466, 5.21757, 5.189722, 5.161923, 5.134173, 5.106471, 5.078817, 5.051212, 5.023655, 4.996147, 4.968687, 4.941276, 4.913913, 4.886598, 4.859333, 4.832115, 4.804946, 4.777825, 4.750753, 4.72373, 4.696755, 4.669828, 4.64295, 4.61612, 4.589339, 4.562606, 4.535921, 4.509285, 4.482698, 4.456159, 4.429668, 4.403226, 4.376833, 4.350487, 4.324191, 4.297942, 4.271743, 4.245591, 4.219488, 4.193434, 4.167428, 4.141471, 4.115562, 4.089701, 4.063889, 4.038125, 4.01241, 3.986744, 3.961125, 3.935556, 3.910034, 3.884561, 3.859137, 3.833761, 3.808434, 3.808434}; graph = new TGraph(102,bkg_fx6,bkg_fy6); graph->SetName("bkg"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); graph->SetLineColor(2); graph->SetLineStyle(2); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_bkg6 = new TH1F("Graph_bkg6","Projection of totalPdf",102,5941,6049); Graph_bkg6->SetMinimum(3.53117); Graph_bkg6->SetMaximum(6.85833); Graph_bkg6->SetDirectory(0); Graph_bkg6->SetStats(0); Graph_bkg6->SetLineWidth(2); Graph_bkg6->SetMarkerStyle(20); Graph_bkg6->GetXaxis()->SetNdivisions(505); Graph_bkg6->GetXaxis()->SetLabelFont(132); Graph_bkg6->GetXaxis()->SetLabelOffset(0.01); Graph_bkg6->GetXaxis()->SetLabelSize(0.06); Graph_bkg6->GetXaxis()->SetTitleSize(0.072); Graph_bkg6->GetXaxis()->SetTitleOffset(0.95); Graph_bkg6->GetXaxis()->SetTitleFont(132); Graph_bkg6->GetYaxis()->SetLabelFont(132); Graph_bkg6->GetYaxis()->SetLabelOffset(0.01); Graph_bkg6->GetYaxis()->SetLabelSize(0.06); Graph_bkg6->GetYaxis()->SetTitleSize(0.072); Graph_bkg6->GetYaxis()->SetTitleOffset(0.95); Graph_bkg6->GetYaxis()->SetTitleFont(132); Graph_bkg6->GetZaxis()->SetLabelFont(132); Graph_bkg6->GetZaxis()->SetLabelSize(0.06); Graph_bkg6->GetZaxis()->SetTitleSize(0.072); Graph_bkg6->GetZaxis()->SetTitleOffset(1.2); Graph_bkg6->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_bkg6); graph->Draw("l"); TLegend *leg = new TLegend(0.2,0.02,0.4,0.42,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(132); leg->SetTextSize(0.06); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("curvetot","Total PDF","l"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("bkg","Background","l"); entry->SetLineColor(2); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); leg->Draw(); TH1D *frame_4a4d3a0__4 = new TH1D("frame_4a4d3a0__4","A RooPlot of \"m(J/#psi #Lambda)\"",100,4100,6100); frame_4a4d3a0__4->SetBinContent(1,2612.806); frame_4a4d3a0__4->SetMinimum(1); frame_4a4d3a0__4->SetMaximum(5000); frame_4a4d3a0__4->SetEntries(1); frame_4a4d3a0__4->SetDirectory(0); frame_4a4d3a0__4->SetStats(0); frame_4a4d3a0__4->SetLineWidth(2); frame_4a4d3a0__4->SetMarkerStyle(20); frame_4a4d3a0__4->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_4a4d3a0__4->GetXaxis()->SetNdivisions(505); frame_4a4d3a0__4->GetXaxis()->SetLabelFont(132); frame_4a4d3a0__4->GetXaxis()->SetLabelOffset(0.01); frame_4a4d3a0__4->GetXaxis()->SetLabelSize(0.06); frame_4a4d3a0__4->GetXaxis()->SetTitleSize(0.072); frame_4a4d3a0__4->GetXaxis()->SetTitleOffset(0.95); frame_4a4d3a0__4->GetXaxis()->SetTitleFont(132); frame_4a4d3a0__4->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4a4d3a0__4->GetYaxis()->SetLabelFont(132); frame_4a4d3a0__4->GetYaxis()->SetLabelOffset(0.01); frame_4a4d3a0__4->GetYaxis()->SetLabelSize(0.06); frame_4a4d3a0__4->GetYaxis()->SetTitleSize(0.072); frame_4a4d3a0__4->GetYaxis()->SetTitleOffset(0.95); frame_4a4d3a0__4->GetYaxis()->SetTitleFont(132); frame_4a4d3a0__4->GetZaxis()->SetLabelFont(132); frame_4a4d3a0__4->GetZaxis()->SetLabelSize(0.06); frame_4a4d3a0__4->GetZaxis()->SetTitleSize(0.072); frame_4a4d3a0__4->GetZaxis()->SetTitleOffset(1.2); frame_4a4d3a0__4->GetZaxis()->SetTitleFont(132); frame_4a4d3a0__4->Draw("AXISSAME"); pad1->Modified(); c1->cd(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }
void get_results(){ gROOT->SetStyle("Plain"); printf("\n"); printf(" ---------------------------------------------------------------------------\n"); printf(" Sensitivity vs. nSig and Sigma in Fit\n"); printf(" ---------------------------------------------------------------------------\n"); printf(" nSig / SigFit--> | 0.1 | 0.2 | 0.3 | 0.4 | W. Avg (val) \n"); printf(" ---------------------------------------------------------------------------\n"); Double_t p1x, p1y; Double_t p2x, p2y; Double_t ix, iy; TObjArray *a1 = new TObjArray(0); TGraph *graph0130 = new TGraph(5); graph0130->SetTitle("Sensitivity vs. Sig-fit"); graph0130->SetName("graph0130"); TGraph *graph1 = new TGraph(5); graph1->SetTitle("Sensitivity vs. Sig-fit"); graph1->SetName("graph1"); TGraph *graph0196 = new TGraph(5); graph0196->SetTitle("Sensitivity vs. Sig-fit"); graph0196->SetName("graph0196"); TCanvas *can1 = new TCanvas("can1", "varfits1", 1500, 900); can1->Divide(5,3); /*************************************************************************** nSig = 0.130 ****************************************************************************/ // =================== nsig=0.130, tSig=0.1 Sig-fit=0.1 ================== can1->cd(1); gPad->SetGrid(); TFile lhns("varsig0130_1.root"); TGraph *gs130_1 = (TGraph*)lhns.Get("DilErrvsdm"); gs130_1->SetTitle("nSig=0.130, tSig=0.1, Sig-fit=0.1"); gs130_1->SetName("gs130_1"); gs130_1->GetXaxis()->SetTitle("dm"); gs130_1->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs130_1->Draw("AP*"); gs130_1->GetPoint(16, p1x, p1y); gs130_1->GetPoint(17, p2x, p2y); Double_t vs130_1 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0130->SetPoint(0,0.1,vs130_1); a1.Add(gs130_1); // =================== nsig=0.130, tSig=0.1 Sig-fit=0.2 ================== can1->cd(2); gPad->SetGrid(); TFile lhns("varsig0130_2.root"); TGraph *gs130_2 = (TGraph*)lhns.Get("DilErrvsdm"); gs130_2->SetTitle("nSig=0.130, tSig=0.1, Sig-fit=0.2"); gs130_2->SetName("gs130_2"); gs130_2->GetXaxis()->SetTitle("dm"); gs130_2->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs130_2->Draw("AP*"); gs130_2->GetPoint(14, p1x, p1y); gs130_2->GetPoint(15, p2x, p2y); Double_t vs130_2 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0130->SetPoint(1,0.2,vs130_2); a1.Add(gs130_2); // =================== nsig=0.130, tSig=0.1 Sig-fit=0.3 ==================== can1->cd(3); gPad->SetGrid(); TFile lhns("varsig0130_3.root"); TGraph *gs130_3 = (TGraph*)lhns.Get("DilErrvsdm"); gs130_3->SetTitle("nSig=0.130, tSig=0.1, Sig-fit=0.3"); gs130_3->SetName("gs130_3"); gs130_3->GetXaxis()->SetTitle("dm"); gs130_3->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs130_3->Draw("AP*"); gs130_3->GetPoint(10, p1x, p1y); gs130_3->GetPoint(11, p2x, p2y); Double_t vs130_3 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0130->SetPoint(2,0.3,vs130_3); a1.Add(gs130_3); // =================== nsig=0.130, tSig=0.1 Sig-fit=0.4 ==================== can1->cd(4); gPad->SetGrid(); TFile lhns("varsig0130_4.root"); TGraph *gs130_4 = (TGraph*)lhns.Get("DilErrvsdm"); gs130_4->SetTitle("nSig=0.130, tSig=0.1, Sig-fit=0.4"); gs130_4->SetName("gs130_4"); gs130_4->GetXaxis()->SetTitle("dm"); gs130_4->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs130_4->Draw("AP*"); gs130_4->GetPoint(13, p1x, p1y); gs130_4->GetPoint(14, p2x, p2y); Double_t vs130_4 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0130->SetPoint(3,0.4,vs130_4); a1.Add(gs130_4); // =================== nsig=0.130, tSig=0.1 Sig-fit=Avg ===================== can1->cd(5); gPad->SetGrid(); TFile lhns("varsig0130_a.root"); TGraph *gs130_a = (TGraph*)lhns.Get("DilErrvsdm"); gs130_a->SetTitle("nSig=0.130, tSig=0.1, Sig-fit=Avg"); gs130_a->SetName("gs130_a"); gs130_a->GetXaxis()->SetTitle("dm"); gs130_a->GetYaxis()->SetTitle("95% CL"); TGraph *gs130_sf = (TGraph*)lhns.Get("SigFit"); gs130_sf->SetTitle("Sigma_Avg in Fit vs. dm , nSig=0.130"); gs130_sf->SetName("gs130_sf"); gs130_sf->GetXaxis()->SetTitle("dm"); gs130_sf->GetYaxis()->SetTitle("Sigma in Fit"); lhns.Close(); gs130_a->Draw("AP*"); gs130_a->GetPoint(12, p1x, p1y); gs130_a->GetPoint(13, p2x, p2y); Double_t vs130_a = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0130->SetPoint(4,0.270111,vs130_a); a1.Add(gs130_a); a1.Add(gs130_sf); printf(" 0.130 | %5.3f | %5.3f | %5.3f | %5.3f | %5.3f (0.270) \n",vs130_1,vs130_2,vs130_3,vs130_4,vs130_a); //----------- plot the sig-fit vs. dm; histogram sig-fit ----- TCanvas *c0130sf = new TCanvas("Sigfit_vs_dm_0130", "graph0130sf", 800, 400); c0130sf->Divide(2,1); c0130sf->cd(1); gPad->SetGrid(); gs130_sf->Draw("AP*"); c0130sf->cd(2); TH1F *hs0130_sf = new TH1F("hs0130_sf", "SigFit spread, nSig=0.130", 10, 0.26, 0.28); for (Int_t i=0.; i<20.; i++){ gs130_sf->GetPoint(i,ix,iy); //cout << i << ", "<< ix << ", "<< iy <<endl; hs0130_sf->Fill(iy); } gPad->SetGrid(); hs0130_sf->Draw(); a1.Add(hs0130_sf); a1.Add(c0130sf); //--------------- plot the sensitivity vs sig-fit ----------- TCanvas *c0130 = new TCanvas("Sens_vs_sigfit_0130", "graph0130", 400, 400); c0130->SetGrid(); graph0130->GetXaxis()->SetTitle("Sigma in fit"); graph0130->GetYaxis()->SetTitle("Sensitivity"); graph0130->Draw("AP*"); a1.Add(graph0130); a1.Add(c0130); /*************************************************************************** nSig = 0.163 **************************************************************************/ // ================== nsig=0.163, tSig=0.1 Sig-fit=0.1 ================== can1->cd(6); gPad->SetGrid(); TFile lhns("varsigma_1.root"); TGraph *gs1 = (TGraph*)lhns.Get("DilErrvsdm"); gs1->SetTitle("nSig=0.163, tSig=0.1, Sig-fit=0.1"); gs1->SetName("gs1"); gs1->GetXaxis()->SetTitle("dm"); gs1->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs1->Draw("AP*"); gs1->GetPoint(16, p1x, p1y); gs1->GetPoint(17, p2x, p2y); Double_t vs1 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph1->SetPoint(0,0.1,vs1); a1.Add(gs1); // ================== nsig=0.163, tSig=0.1 Sig-fit=0.2 ================== can1->cd(7); gPad->SetGrid(); TFile lhns("varsigma_2.root"); TGraph *gs2 = (TGraph*)lhns.Get("DilErrvsdm"); gs2->SetTitle("nSig=0.163, tSig=0.1, Sig-fit=0.2"); gs2->SetName("gs2"); gs2->GetXaxis()->SetTitle("dm"); gs2->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs2->Draw("AP*"); gs2->GetPoint(14, p1x, p1y); gs2->GetPoint(15, p2x, p2y); Double_t vs2 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph1->SetPoint(1,0.2,vs2); a1.Add(gs2); // ================== nsig=0.163, tSig=0.1 Sig-fit=0.3 ================== can1->cd(8); gPad->SetGrid(); TFile lhns("varsigma_3.root"); TGraph *gs3 = (TGraph*)lhns.Get("DilErrvsdm"); gs3->SetTitle("nSig=0.163, tSig=0.1, Sig-fit=0.3"); gs3->SetName("gs3"); gs3->GetXaxis()->SetTitle("dm"); gs3->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs3->Draw("AP*"); gs3->GetPoint(10, p1x, p1y); gs3->GetPoint(11, p2x, p2y); Double_t vs3 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph1->SetPoint(2,0.3,vs3); a1.Add(gs3); // ================== nsig=0.163, tSig=0.1 Sig-fit=0.4 ================== can1->cd(9); gPad->SetGrid(); TFile lhns("varsigma_4.root"); TGraph *gs4 = (TGraph*)lhns.Get("DilErrvsdm"); gs4->SetTitle("nSig=0.163, tSig=0.1, Sig-fit=0.4"); gs4->SetName("gs4"); gs4->GetXaxis()->SetTitle("dm"); gs4->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs4->Draw("AP*"); gs4->GetPoint(13, p1x, p1y); gs4->GetPoint(14, p2x, p2y); Double_t vs4 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph1->SetPoint(3,0.4,vs4); a1.Add(gs4); // ================== nsig=0.163, tSig=0.1 Sig-fit=Avg ================== can1->cd(10); gPad->SetGrid(); TFile lhns("varsigma_a.root"); TGraph *gsa = (TGraph*)lhns.Get("DilErrvsdm"); gsa->SetTitle("nSig=0.163, tSig=0.1, Sig-fit=Avg"); gsa->SetName("gsa"); gsa->GetXaxis()->SetTitle("dm"); gsa->GetYaxis()->SetTitle("95% CL"); TGraph *gs_sf = (TGraph*)lhns.Get("SigFit"); gs_sf->SetTitle("Sigma_Avg in Fit vs. dm , nSig=0.163"); gs_sf->SetName("gs_sf"); gs_sf->GetXaxis()->SetTitle("dm"); gs_sf->GetYaxis()->SetTitle("Sigma in Fit"); lhns.Close(); gsa->Draw("AP*"); gsa->GetPoint(11, p1x, p1y); gsa->GetPoint(12, p2x, p2y); Double_t vsa = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph1->SetPoint(4,0.313349,vsa); a1.Add(gsa); a1.Add(gs_sf); printf(" 0.163 | %5.3f | %5.3f | %5.3f | %5.3f | %5.3f (0.313) \n",vs1,vs2,vs3,vs4,vsa); //----------- plot the sig-fit vs. dm; histogram sig-fit ----- TCanvas *csf = new TCanvas("Sigfit_vs_dm_0163", "graphsf", 800, 400); csf->Divide(2,1); csf->cd(1); gPad->SetGrid(); gs_sf->Draw("AP*"); csf->cd(2); TH1F *hs_sf = new TH1F("hs_sf", "SigFit spread, nSig=0.163", 10, 0.3, 0.325); for (Int_t i=0.; i<20.; i++){ gs_sf->GetPoint(i,ix,iy); //cout << i << ", "<< ix << ", "<< iy <<endl; hs_sf->Fill(iy); } gPad->SetGrid(); hs_sf->Draw(); a1.Add(hs_sf); a1.Add(csf); //--------------- plot the sensitivity vs sig-fit ----------- TCanvas *can2 = new TCanvas("Sens_vs_sigfit_0163", "graph1", 400, 400); can2->SetGrid(); graph1->GetXaxis()->SetTitle("Sigma in fit"); graph1->GetYaxis()->SetTitle("Sensitivity"); graph1->Draw("AP*"); a1.Add(graph1); a1.Add(can2); /*************************************************************************** nSig = 0.196 **************************************************************************/ // ================== nsig=0.196, tSig=0.1 Sig-fit=0.1 ================== can1->cd(11); gPad->SetGrid(); TFile lhns("varsig0196_1.root"); TGraph *gs196_1 = (TGraph*)lhns.Get("DilErrvsdm"); gs196_1->SetTitle("nSig=0.196, tSig=0.1, Sig-fit=0.1"); gs196_1->SetName("gs196_1"); gs196_1->GetXaxis()->SetTitle("dm"); gs196_1->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs196_1->Draw("AP*"); gs196_1->GetPoint(16, p1x, p1y); gs196_1->GetPoint(17, p2x, p2y); Double_t vs196_1 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0196->SetPoint(0,0.1,vs196_1); a1.Add(gs196_1); // ================== nsig=0.196, tSig=0.1 Sig-fit=0.2 ==================== can1->cd(12); gPad->SetGrid(); TFile lhns("varsig0196_2.root"); TGraph *gs196_2 = (TGraph*)lhns.Get("DilErrvsdm"); gs196_2->SetTitle("nSig=0.196, tSig=0.1, Sig-fit=0.2"); gs196_2->SetName("gs196_2"); gs196_2->GetXaxis()->SetTitle("dm"); gs196_2->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs196_2->Draw("AP*"); gs196_2->GetPoint(14, p1x, p1y); gs196_2->GetPoint(15, p2x, p2y); Double_t vs196_2 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0196->SetPoint(1,0.2,vs196_2); a1.Add(gs196_2); // ================== nsig=0.196, tSig=0.1 Sig-fit=0.3 ================== can1->cd(13); gPad->SetGrid(); TFile lhns("varsig0196_3.root"); TGraph *gs196_3 = (TGraph*)lhns.Get("DilErrvsdm"); gs196_3->SetTitle("nSig=0.196, tSig=0.1, Sig-fit=0.3"); gs196_3->SetName("gs196_3"); gs196_3->GetXaxis()->SetTitle("dm"); gs196_3->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs196_3->Draw("AP*"); gs196_3->GetPoint(10, p1x, p1y); gs196_3->GetPoint(11, p2x, p2y); Double_t vs196_3 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0196->SetPoint(2,0.3,vs196_3); a1.Add(gs196_3); // ================== nsig=0.196, tSig=0.1 Sig-fit=0.4 ================== can1->cd(14); gPad->SetGrid(); TFile lhns("varsig0196_4.root"); TGraph *gs196_4 = (TGraph*)lhns.Get("DilErrvsdm"); gs196_4->SetTitle("nSig=0.196, tSig=0.1, Sig-fit=0.4"); gs196_4->SetName("gs196_4"); gs196_4->GetXaxis()->SetTitle("dm"); gs196_4->GetYaxis()->SetTitle("95% CL"); lhns.Close(); gs196_4->Draw("AP*"); gs196_4->GetPoint(13, p1x, p1y); gs196_4->GetPoint(14, p2x, p2y); Double_t vs196_4 = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0196->SetPoint(3,0.4,vs196_4); a1.Add(gs196_4); // ================== nsig=0.196, tSig=0.1 Sig-fit=Avg ================== can1->cd(15); gPad->SetGrid(); TFile lhns("varsig0196_a.root"); TGraph *gs196_a = (TGraph*)lhns.Get("DilErrvsdm"); gs196_a->SetTitle("nSig=0.196, tSig=0.1, Sig-fit=Avg"); gs196_a->SetName("gs196_a"); gs196_a->GetXaxis()->SetTitle("dm"); gs196_a->GetYaxis()->SetTitle("95% CL"); TGraph *gs196_sf = (TGraph*)lhns.Get("SigFit"); gs196_sf->SetTitle("Sigma(Avg) in Fit vs. dm (nSig=0.196)"); gs196_sf->SetName("gs196_sf"); gs196_sf->GetXaxis()->SetTitle("dm"); gs196_sf->GetYaxis()->SetTitle("Sigma in Fit"); lhns.Close(); gs196_a->Draw("AP*"); gs196_a->GetPoint(10, p1x, p1y); gs196_a->GetPoint(11, p2x, p2y); Double_t vs196_a = (((1-p1y)/(1-p2y))*p2x - p1x)/(((1-p1y)/(1-p2y))-1); graph0196->SetPoint(4,0.356301,vs196_a); a1.Add(gs196_a); a1.Add(gs196_sf); printf(" 0.196 | %5.3f | %5.3f | %5.3f | %5.3f | %5.3f (0.270) \n",vs196_1,vs196_2,vs196_3,vs196_4,vs196_a); //----------- plot the sig-fit vs. dm; histogram sig-fit ----- TCanvas *c0196sf = new TCanvas("Sigfit_vs_dm_0196", "graph0196sf", 800, 400); c0196sf->Divide(2,1); c0196sf->cd(1); gPad->SetGrid(); gs196_sf->Draw("AP*"); c0196sf->cd(2); TH1F *hs0196_sf = new TH1F("hs0196_sf", "SigFit spread, nSig=0.196", 10, 0.34, 0.37); for (Int_t i=0.; i<20.; i++){ gs196_sf->GetPoint(i,ix,iy); //cout << i << ", "<< ix << ", "<< iy <<endl; hs0196_sf->Fill(iy); } gPad->SetGrid(); hs0196_sf->Draw(); a1.Add(hs0196_sf); a1.Add(c0196sf); //--------------- plot the sensitivity vs sig-fit ----------- TCanvas *c0196 = new TCanvas("Sens_vs_sigfit_0196", "graph0196", 400, 400); c0196->SetGrid(); graph0196->GetXaxis()->SetTitle("Sigma in fit"); graph0196->GetYaxis()->SetTitle("Sensitivity"); graph0196->Draw("AP*"); a1.Add(graph0196); a1.Add(c0196); a1.Add(can1); //can1->Close(); /*************************************************************************** **************************************************************************/ printf(" ---------------------------------------------------------------------------\n"); printf("\n"); TCanvas *combined = new TCanvas("Sens_vs_dm_combined", "combined", 400, 400); combined->SetGrid(); graph0130->SetMarkerColor(4); graph0130->SetMarkerStyle(4); graph0130->Draw("AP"); graph1->SetMarkerColor(2); graph1->SetMarkerStyle(22); graph1->Draw("P"); graph0196->SetMarkerColor(8); graph0196->SetMarkerStyle(28); graph0196->Draw("P"); a1.Add(combined); TFile file1("get_results.root", "recreate"); a1.Write(); file1.Close(); }
/** The purpose of this function is to conveniently plot an event. Each event is plotted on a TCanvas. Divided into as many pads as there are panels. Each pad is a TMultiGraph with a TLegend, and shows the channels of the digitizer connected to the lines of that panel. The grouping into pads must not necessarily be according to panels, but in any other prefered way. @param a_channels - a vector of a vector of samples, containing all 32 channels @ param a_channelsToPadsAssociation - a map from std::string, which is the name of the panel (or group of channels) to be assigned to each pad to a vector if integers, which is the list of channels indices corresponding to indices of channels in the paramater a_channels to associate to a pad @param sEventTitle - a string containing the title of the event (for example, the time stamp) */ void RangePlotter::PlotRanges(Channels_t& a_channels, Range_t& a_channelsToPadsAssociation, std::string sEventTitle) { // printf("Plotting\n"); //m_pCanvas->Clear(); m_pCanvas->SetTitle(sEventTitle.c_str()); int iPadCounter = 0; if(0 == m_vpMultiGraph.size()) { MakePads(a_channelsToPadsAssociation.size()); for (auto& rangeIt: a_channelsToPadsAssociation) { TMultiGraph* pMg = new TMultiGraph(); m_vpMultiGraph.push_back(std::unique_ptr<TMultiGraph>(pMg)); // m_pCanvas->cd(iPadCounter + 1); ChangePad(iPadCounter); int i = 0; auto legend = new TLegend(0.8,0.8,1,1, "Channels"); m_vpLegends.push_back(std::unique_ptr<TLegend>(legend)); printf("printing panel %s\n", rangeIt.first.c_str()); for (auto& chanIt: rangeIt.second) { int iNumOfSamples = a_channels[chanIt].size(); TGraph* pGr = new TGraph(iNumOfSamples); std::vector<float> vTimeSeq = CommonUtils::GenerateTimeSequence(iNumOfSamples, m_fSamplingFreqGHz); for (int counter = 0; counter < iNumOfSamples; counter++) { pGr->SetPoint(counter, vTimeSeq[counter], TransformToVoltage(a_channels[chanIt][counter])); } m_vpGraph[chanIt] = pGr; pGr->SetLineColor(m_colors[i%(sizeof(m_colors)/sizeof(int))]); pGr->SetName((m_sInstanceName + std::string("Pan_") + rangeIt.first + std::string("chan_") + std::to_string(chanIt)).c_str()); std::string sGraphTitle = std::string("Channel ") + std::to_string(chanIt); pGr->SetTitle(sGraphTitle.c_str()); legend->AddEntry(pGr,std::to_string(chanIt).c_str(), "l"); pMg->Add(pGr); i++; } if(Configuration::Instance().ShowTriggerInWaveformsStep()) { int iNumOfSamples = a_channels[a_channels.size() - 1].size(); m_vpGraphPrecisionTrigger = new TGraph(iNumOfSamples); std::vector<float> vTimeSeq = CommonUtils::GenerateTimeSequence(iNumOfSamples, m_fSamplingFreqGHz); for (int counter = 0; counter < iNumOfSamples; counter++) { m_vpGraphPrecisionTrigger->SetPoint(counter, vTimeSeq[counter], TransformToVoltage(a_channels[a_channels.size() - 1][counter])); } m_vpGraphPrecisionTrigger->SetName((m_sInstanceName + std::string("Pan_") + rangeIt.first + "_Trig").c_str()); m_vpGraphPrecisionTrigger->SetTitle("Trigger"); legend->AddEntry(m_vpGraphPrecisionTrigger,"Trigger", "l"); pMg->Add(m_vpGraphPrecisionTrigger); } std::string sMultiGraphTitle = std::string("Panel ") + rangeIt.first; pMg->SetTitle(sMultiGraphTitle.c_str()); pMg->Draw("AL"); pMg->GetXaxis()->SetTitle("Time [nanoseconds]"); pMg->GetXaxis()->CenterTitle(); pMg->GetYaxis()->SetTitle("Voltage [volts]"); pMg->GetYaxis()->CenterTitle(); gPad->Modified(); pMg->SetMinimum(m_fMinVoltage); pMg->SetMaximum(m_fMaxVoltage); legend->Draw(); iPadCounter++; } m_pCanvas->Update(); } else { // printf("Plottin again\n"); for (auto& rangeIt: a_channelsToPadsAssociation) { printf("Panel %s\n", rangeIt.first.c_str()); m_pCanvas->cd(iPadCounter + 1); for (auto& chanIt: rangeIt.second) { // printf("Chanenl %d\n", chanIt); //TODO: num of samples is constant per run at least! m_vpGraph[chanIt]->SetLineWidth(1); int iNumOfSamples = a_channels[chanIt].size(); std::vector<float> vTimeSeq = CommonUtils::GenerateTimeSequence(iNumOfSamples, m_fSamplingFreqGHz); for (int counter = 0; counter < iNumOfSamples; counter++) { (m_vpGraph[chanIt]->GetY())[counter] = TransformToVoltage(a_channels[chanIt][counter]); } for (int counter = 0; counter < iNumOfSamples; counter++) { (m_vpGraphPrecisionTrigger->GetY())[counter] = TransformToVoltage(a_channels[a_channels.size() - 1][counter]); } gPad->Modified(); } m_vpMultiGraph[iPadCounter]->Draw("AC"); m_vpLegends[iPadCounter]->Draw(); iPadCounter++; } printf("Updating\n"); m_pCanvas->Update(); printf("After updating\n"); } printf("done\n"); }
void Final_av_Lambda_VarCoupling_40Percent() { //=========Macro generated from canvas: c/c //========= (Sat Feb 27 17:06:04 2016) by ROOT version6.04/06 TCanvas *c = new TCanvas("c", "c",0,0,800,700); c->SetHighLightColor(2); c->Range(-0.4813593,1.36281,3.148656,6.672724); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetLogx(); c->SetLogy(); c->SetTickx(1); c->SetTicky(1); c->SetLeftMargin(0.12); c->SetRightMargin(0.04); c->SetTopMargin(0.07); c->SetBottomMargin(0.12); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); TMultiGraph *multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle(""); Double_t Graph_fx1[12] = { 1, 10, 100, 400, 700, 1000, 1000, 700, 400, 100, 10, 1}; Double_t Graph_fy1[12] = { 881.525, 896.549, 871.907, 667.806, 471.744, 308.777, 382.832, 584.437, 826.374, 1079.16, 1110.85, 1092.23}; TGraph *graph = new TGraph(12,Graph_fx1,Graph_fy1); graph->SetName("Graph"); graph->SetTitle(""); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#ffcc00"); graph->SetFillColor(ci); ci = TColor::GetColor("#ff6666"); graph->SetLineColor(ci); graph->SetLineWidth(3); TH1F *Graph_Graph1 = new TH1F("Graph_Graph1","",100,0.9,1099.9); Graph_Graph1->SetMinimum(228.5697); Graph_Graph1->SetMaximum(1191.057); Graph_Graph1->SetDirectory(0); Graph_Graph1->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph1->SetLineColor(ci); Graph_Graph1->GetXaxis()->SetLabelFont(42); Graph_Graph1->GetXaxis()->SetLabelSize(0.035); Graph_Graph1->GetXaxis()->SetTitleSize(0.035); Graph_Graph1->GetXaxis()->SetTitleFont(42); Graph_Graph1->GetYaxis()->SetLabelFont(42); Graph_Graph1->GetYaxis()->SetLabelSize(0.035); Graph_Graph1->GetYaxis()->SetTitleSize(0.035); Graph_Graph1->GetYaxis()->SetTitleFont(42); Graph_Graph1->GetZaxis()->SetLabelFont(42); Graph_Graph1->GetZaxis()->SetLabelSize(0.035); Graph_Graph1->GetZaxis()->SetTitleSize(0.035); Graph_Graph1->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph1); multigraph->Add(graph,""); multigraph->Draw("af"); multigraph->GetXaxis()->SetTitle("M_{#chi} (GeV)"); multigraph->GetXaxis()->SetRange(0,96); multigraph->GetXaxis()->SetLabelFont(42); multigraph->GetXaxis()->SetTitleSize(0.05); multigraph->GetXaxis()->SetTitleOffset(1.1); multigraph->GetXaxis()->SetTitleFont(42); multigraph->GetYaxis()->SetTitle("#Lambda (GeV)"); multigraph->GetYaxis()->SetLabelFont(42); multigraph->GetYaxis()->SetTitleSize(0.05); multigraph->GetYaxis()->SetTitleOffset(1.05); multigraph->GetYaxis()->SetTitleFont(42); multigraph = new TMultiGraph(); multigraph->SetName(""); multigraph->SetTitle(""); Double_t Graph_fx2[6] = { 1, 10, 100, 400, 700, 1000}; Double_t Graph_fy2[6] = { 1092.23, 1110.85, 1079.16, 826.374, 584.437, 382.832}; graph = new TGraph(6,Graph_fx2,Graph_fy2); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#ff6666"); graph->SetLineColor(ci); TH1F *Graph_Graph2 = new TH1F("Graph_Graph2","Graph",100,0.9,1099.9); Graph_Graph2->SetMinimum(310.0302); Graph_Graph2->SetMaximum(1183.652); Graph_Graph2->SetDirectory(0); Graph_Graph2->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph2->SetLineColor(ci); Graph_Graph2->GetXaxis()->SetLabelFont(42); Graph_Graph2->GetXaxis()->SetLabelSize(0.035); Graph_Graph2->GetXaxis()->SetTitleSize(0.035); Graph_Graph2->GetXaxis()->SetTitleFont(42); Graph_Graph2->GetYaxis()->SetLabelFont(42); Graph_Graph2->GetYaxis()->SetLabelSize(0.035); Graph_Graph2->GetYaxis()->SetTitleSize(0.035); Graph_Graph2->GetYaxis()->SetTitleFont(42); Graph_Graph2->GetZaxis()->SetLabelFont(42); Graph_Graph2->GetZaxis()->SetLabelSize(0.035); Graph_Graph2->GetZaxis()->SetTitleSize(0.035); Graph_Graph2->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph2); multigraph->Add(graph,""); Double_t Graph_fx3[6] = { 1, 10, 100, 400, 700, 1000}; Double_t Graph_fy3[6] = { 980.038, 996.742, 968.943, 742.067, 524.44, 343.371}; graph = new TGraph(6,Graph_fx3,Graph_fy3); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#ff6666"); graph->SetLineColor(ci); graph->SetLineWidth(3); TH1F *Graph_Graph3 = new TH1F("Graph_Graph3","Graph",100,0.9,1099.9); Graph_Graph3->SetMinimum(278.0339); Graph_Graph3->SetMaximum(1062.079); Graph_Graph3->SetDirectory(0); Graph_Graph3->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph3->SetLineColor(ci); Graph_Graph3->GetXaxis()->SetLabelFont(42); Graph_Graph3->GetXaxis()->SetLabelSize(0.035); Graph_Graph3->GetXaxis()->SetTitleSize(0.035); Graph_Graph3->GetXaxis()->SetTitleFont(42); Graph_Graph3->GetYaxis()->SetLabelFont(42); Graph_Graph3->GetYaxis()->SetLabelSize(0.035); Graph_Graph3->GetYaxis()->SetTitleSize(0.035); Graph_Graph3->GetYaxis()->SetTitleFont(42); Graph_Graph3->GetZaxis()->SetLabelFont(42); Graph_Graph3->GetZaxis()->SetLabelSize(0.035); Graph_Graph3->GetZaxis()->SetTitleSize(0.035); Graph_Graph3->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph3); multigraph->Add(graph,""); Double_t Graph_fx4[6] = { 1, 10, 100, 400, 700, 1000}; Double_t Graph_fy4[6] = { 881.525, 896.549, 871.907, 667.806, 471.744, 308.777}; graph = new TGraph(6,Graph_fx4,Graph_fy4); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#ff6666"); graph->SetLineColor(ci); TH1F *Graph_Graph4 = new TH1F("Graph_Graph4","Graph",100,0.9,1099.9); Graph_Graph4->SetMinimum(249.9998); Graph_Graph4->SetMaximum(955.3262); Graph_Graph4->SetDirectory(0); Graph_Graph4->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph4->SetLineColor(ci); Graph_Graph4->GetXaxis()->SetLabelFont(42); Graph_Graph4->GetXaxis()->SetLabelSize(0.035); Graph_Graph4->GetXaxis()->SetTitleSize(0.035); Graph_Graph4->GetXaxis()->SetTitleFont(42); Graph_Graph4->GetYaxis()->SetLabelFont(42); Graph_Graph4->GetYaxis()->SetLabelSize(0.035); Graph_Graph4->GetYaxis()->SetTitleSize(0.035); Graph_Graph4->GetYaxis()->SetTitleFont(42); Graph_Graph4->GetZaxis()->SetLabelFont(42); Graph_Graph4->GetZaxis()->SetLabelSize(0.035); Graph_Graph4->GetZaxis()->SetTitleSize(0.035); Graph_Graph4->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph4); multigraph->Add(graph,""); Double_t Graph_fx5[6] = { 1, 10, 100, 400, 700, 1000}; Double_t Graph_fy5[6] = { 1028.6, 1012.32, 1016.7, 751.989, 524.44, 360.443}; graph = new TGraph(6,Graph_fx5,Graph_fy5); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); TH1F *Graph_Graph5 = new TH1F("Graph_Graph5","Graph",100,0.9,1099.9); Graph_Graph5->SetMinimum(293.6273); Graph_Graph5->SetMaximum(1095.416); Graph_Graph5->SetDirectory(0); Graph_Graph5->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph5->SetLineColor(ci); Graph_Graph5->GetXaxis()->SetLabelFont(42); Graph_Graph5->GetXaxis()->SetLabelSize(0.035); Graph_Graph5->GetXaxis()->SetTitleSize(0.035); Graph_Graph5->GetXaxis()->SetTitleFont(42); Graph_Graph5->GetYaxis()->SetLabelFont(42); Graph_Graph5->GetYaxis()->SetLabelSize(0.035); Graph_Graph5->GetYaxis()->SetTitleSize(0.035); Graph_Graph5->GetYaxis()->SetTitleFont(42); Graph_Graph5->GetZaxis()->SetLabelFont(42); Graph_Graph5->GetZaxis()->SetLabelSize(0.035); Graph_Graph5->GetZaxis()->SetTitleSize(0.035); Graph_Graph5->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph5); multigraph->Add(graph,""); Double_t Graph_fx6[35] = { 3.981, 4.365, 4.786, 5.248, 5.754, 6.31, 6.918, 7.586, 8.318, 9.12, 10, 10.965, 12.023, 13.183, 14.454, 15.849, 17.378, 19.055, 20.893, 22.909, 25.119, 31.623, 39.811, 50.119, 63.096, 79.433, 100, 125.893, 158.489, 199.526, 251.189, 316.228, 1000, 3162.278, 10000}; Double_t Graph_fy6[35] = { 19.76533, 32.58338, 47.96959, 63.10164, 79.00995, 95.55754, 111.9766, 129.0118, 146.2376, 163.5577, 179.3658, 194.9584, 209.5672, 223.2999, 236.0683, 247.7404, 258.366, 268.0662, 277.1383, 285.1146, 292.3901, 306.3527, 314.441, 317.1059, 314.8684, 308.9039, 300.2537, 289.8022, 278.2241, 266.1082, 253.7422, 241.4337, 184.6404, 139.2985, 104.656}; graph = new TGraph(35,Graph_fx6,Graph_fy6); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#6666ff"); graph->SetLineColor(ci); graph->SetLineStyle(6); graph->SetLineWidth(3); TH1F *Graph_Graph6 = new TH1F("Graph_Graph6","Graph",100,3.5829,10999.6); Graph_Graph6->SetMinimum(17.78879); Graph_Graph6->SetMaximum(346.84); Graph_Graph6->SetDirectory(0); Graph_Graph6->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph6->SetLineColor(ci); Graph_Graph6->GetXaxis()->SetLabelFont(42); Graph_Graph6->GetXaxis()->SetLabelSize(0.035); Graph_Graph6->GetXaxis()->SetTitleSize(0.035); Graph_Graph6->GetXaxis()->SetTitleFont(42); Graph_Graph6->GetYaxis()->SetLabelFont(42); Graph_Graph6->GetYaxis()->SetLabelSize(0.035); Graph_Graph6->GetYaxis()->SetTitleSize(0.035); Graph_Graph6->GetYaxis()->SetTitleFont(42); Graph_Graph6->GetZaxis()->SetLabelFont(42); Graph_Graph6->GetZaxis()->SetLabelSize(0.035); Graph_Graph6->GetZaxis()->SetTitleSize(0.035); Graph_Graph6->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph6); multigraph->Add(graph,""); Double_t Graph_fx7[33] = { 5.050109, 5.570498, 6.092375, 6.79836, 7.629504, 8.933253, 10.64203, 12.05014, 13.68495, 14.93901, 17.1131, 19.54765, 22.0792, 25.65551, 29.39341, 34.84152, 41.41884, 48.68491, 59.2071, 75.34994, 97.26741, 131.0246, 163.9459, 202.8261, 243.2248, 309.5828, 383.0166, 473.8718, 622.2993, 833.6, 1028.448, 1283.339, 2026.806}; Double_t Graph_fy7[33] = { 71.77067, 88.82209, 110.1401, 130.7052, 154.2557, 185.7482, 213.1504, 232.735, 248.5277, 258.1632, 268.4587, 280.1818, 286.5229, 293.3758, 296.7995, 299.6924, 299.6947, 297.0875, 293.2892, 285.6511, 275.8293, 262.4571, 252.7364, 243.3346, 234.001, 222.0121, 212.1495, 202.5032, 189.9106, 177.908, 168.9168, 159.7122, 142.9221}; graph = new TGraph(33,Graph_fx7,Graph_fy7); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#ff9900"); graph->SetLineColor(ci); graph->SetLineStyle(2); graph->SetLineWidth(3); TH1F *Graph_Graph7 = new TH1F("Graph_Graph7","Graph",100,4.545098,2228.982); Graph_Graph7->SetMinimum(48.97827); Graph_Graph7->SetMaximum(322.4871); Graph_Graph7->SetDirectory(0); Graph_Graph7->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph7->SetLineColor(ci); Graph_Graph7->GetXaxis()->SetLabelFont(42); Graph_Graph7->GetXaxis()->SetLabelSize(0.035); Graph_Graph7->GetXaxis()->SetTitleSize(0.035); Graph_Graph7->GetXaxis()->SetTitleFont(42); Graph_Graph7->GetYaxis()->SetLabelFont(42); Graph_Graph7->GetYaxis()->SetLabelSize(0.035); Graph_Graph7->GetYaxis()->SetTitleSize(0.035); Graph_Graph7->GetYaxis()->SetTitleFont(42); Graph_Graph7->GetZaxis()->SetLabelFont(42); Graph_Graph7->GetZaxis()->SetLabelSize(0.035); Graph_Graph7->GetZaxis()->SetTitleSize(0.035); Graph_Graph7->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph7); multigraph->Add(graph,""); Double_t Graph_fx8[90] = { 18.74425, 19.90368, 20.73627, 21.82644, 23.00752, 24.07546, 25.0827, 25.71454, 26.71212, 27.99356, 28.53122, 29.59491, 30.69819, 31.93543, 33.71249, 35.53626, 36.69926, 39.48566, 41.74415, 44.52103, 47.27444, 49.54151, 51.99283, 54.56543, 56.59926, 59.57426, 61.97591, 64.94736, 67.7638, 72.165, 77.52983, 78.67276, 79.25885, 79.50015, 79.8577, 79.98559, 80.10781, 80.93361, 82.97299, 85.0636, 87.3346, 89.6657, 93.68976, 97.60831, 101.0972, 103.4923, 107.3498, 111.0254, 114.4909, 118.2376, 120.3333, 131.3772, 140.9375, 145.9754, 148.1289, 150.9739, 154.3249, 158.6761, 165.3121, 170.7206, 172.2259, 173.4824, 174.2374, 175.2489, 175.7591, 179.6599, 186.3538, 196.4347, 207.6675, 217.3037, 228.0541, 241.4457, 256.7473, 271.0309, 292.4573, 319.2919, 352.6953, 387.3116, 421.6106, 459.6163, 505.4719, 563.2603, 635.9718, 692.2802, 745.897, 789.6904, 831.1771, 886.4295, 950.901, 983.4362}; Double_t Graph_fy8[90] = { 190.042, 192.3104, 192.9376, 195.179, 197.2136, 198.0799, 199.3876, 199.4802, 201.01, 204.4632, 204.529, 206.7971, 208.8441, 208.9712, 209.8662, 210.2649, 211.3333, 212.7612, 214.3898, 216.0449, 217.1898, 218.8107, 219.1693, 219.524, 220.873, 221.9988, 223.3628, 223.7069, 225.3419, 225.4478, 225.5616, 225.584, 239.8787, 256.2561, 271.2293, 293.7999, 304.8973, 307.0445, 308.5203, 309.6434, 310.7722, 310.8221, 310.5429, 310.2559, 309.9569, 309.996, 311.8566, 313.3588, 314.1336, 315.2763, 316.7668, 317.2607, 317.3559, 317.4016, 319.264, 319.2881, 319.6855, 319.7195, 318.6591, 318.3273, 317.9688, 309.2591, 300.7849, 289.5104, 286.1793, 286.2011, 285.5743, 285.6238, 285.3433, 284.0635, 283.1184, 281.2031, 278.656, 277.7288, 275.8579, 273.0541, 270.9095, 265.6796, 261.7535, 256.9895, 253.7797, 247.4406, 240.1473, 234.4071, 229.3303, 226.7081, 224.3734, 220.2731, 215.7486, 213.7682}; graph = new TGraph(90,Graph_fx8,Graph_fy8); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#cc33ff"); graph->SetLineColor(ci); graph->SetLineStyle(6); graph->SetLineWidth(3); TH1F *Graph_Graph8 = new TH1F("Graph_Graph8","Graph",100,16.86982,1079.905); Graph_Graph8->SetMinimum(177.0742); Graph_Graph8->SetMaximum(332.6873); Graph_Graph8->SetDirectory(0); Graph_Graph8->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph8->SetLineColor(ci); Graph_Graph8->GetXaxis()->SetLabelFont(42); Graph_Graph8->GetXaxis()->SetLabelSize(0.035); Graph_Graph8->GetXaxis()->SetTitleSize(0.035); Graph_Graph8->GetXaxis()->SetTitleFont(42); Graph_Graph8->GetYaxis()->SetLabelFont(42); Graph_Graph8->GetYaxis()->SetLabelSize(0.035); Graph_Graph8->GetYaxis()->SetTitleSize(0.035); Graph_Graph8->GetYaxis()->SetTitleFont(42); Graph_Graph8->GetZaxis()->SetLabelFont(42); Graph_Graph8->GetZaxis()->SetLabelSize(0.035); Graph_Graph8->GetZaxis()->SetTitleSize(0.035); Graph_Graph8->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph8); multigraph->Add(graph,""); Double_t Graph_fx9[5] = { 250, 500, 1000, 3000, 5000}; Double_t Graph_fy9[5] = { 597.2217, 587.5585, 450.4588, 245.3363, 177.6733}; graph = new TGraph(5,Graph_fx9,Graph_fy9); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#3399ff"); graph->SetLineColor(ci); graph->SetLineStyle(4); graph->SetLineWidth(3); TH1F *Graph_Graph9 = new TH1F("Graph_Graph9","Graph",100,225,5475); Graph_Graph9->SetMinimum(135.7185); Graph_Graph9->SetMaximum(639.1765); Graph_Graph9->SetDirectory(0); Graph_Graph9->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph9->SetLineColor(ci); Graph_Graph9->GetXaxis()->SetLabelFont(42); Graph_Graph9->GetXaxis()->SetLabelSize(0.035); Graph_Graph9->GetXaxis()->SetTitleSize(0.035); Graph_Graph9->GetXaxis()->SetTitleFont(42); Graph_Graph9->GetYaxis()->SetLabelFont(42); Graph_Graph9->GetYaxis()->SetLabelSize(0.035); Graph_Graph9->GetYaxis()->SetTitleSize(0.035); Graph_Graph9->GetYaxis()->SetTitleFont(42); Graph_Graph9->GetZaxis()->SetLabelFont(42); Graph_Graph9->GetZaxis()->SetLabelSize(0.035); Graph_Graph9->GetZaxis()->SetTitleSize(0.035); Graph_Graph9->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph9); multigraph->Add(graph,""); Double_t Graph_fx10[518] = { 6.04, 6.04, 6.04, 6.04, 6.05, 6.08, 6.11, 6.12, 6.12, 6.13, 6.16, 6.16, 6.16, 6.19, 6.2, 6.2, 6.2, 6.21, 6.24, 6.27, 6.28, 6.28, 6.28, 6.28, 6.28, 6.29, 6.34, 6.37, 6.37, 6.37, 6.37, 6.37, 6.38, 6.43, 6.45, 6.45, 6.45, 6.45, 6.45, 6.45, 6.46, 6.53, 6.54, 6.54, 6.54, 6.54, 6.54, 6.54, 6.62, 6.62, 6.62, 6.62, 6.62, 6.62, 6.64, 6.69, 6.71, 6.71, 6.71, 6.71, 6.71, 6.72, 6.78, 6.8, 6.8, 6.8, 6.8, 6.8, 6.81, 6.87, 6.89, 6.89, 6.89, 6.89, 6.89, 6.91, 6.94, 6.97, 6.98, 6.98, 7, 7.05, 7.08, 7.09, 7.15, 7.17, 7.19, 7.24, 7.27, 7.28, 7.34, 7.37, 7.37, 7.45, 7.46, 7.47, 7.55, 7.56, 7.57, 7.65, 7.66, 7.67, 7.76, 7.77, 7.77, 7.86, 7.88, 7.95, 7.99, 8.05, 8.1, 8.15, 8.19, 8.24, 8.27, 8.31, 8.38, 8.43, 8.48, 8.52, 8.58, 8.61, 8.65, 8.71, 8.75, 8.81, 8.84, 8.88, 8.93, 8.97, 9, 9.05, 9.12, 9.17, 9.24, 9.29, 9.36, 9.42, 9.49, 9.54, 9.62, 9.67, 9.74, 9.8, 9.87, 9.93, 10, 10.2, 10.3, 10.5, 10.6, 10.8, 10.9, 10.9, 11, 11.2, 11.2, 11.3, 11.5, 11.6, 11.8, 11.9, 12.1, 12.2, 12.4, 12.6, 12.7, 12.9, 13.1, 13.3, 13.5, 13.5, 13.6, 13.8, 14, 14.2, 14.4, 14.5, 14.5, 14.8, 15, 15.2, 15.3, 15.3, 15.6, 15.8, 15.9, 16, 16.2, 16.5, 16.6, 16.9, 17.2, 17.3, 17.6, 17.9, 18, 18.3, 18.6, 18.7, 19, 19.3, 19.4, 19.5, 19.8, 20.6, 21.4, 21.8, 22, 22.2, 22.6, 22.9, 23.2, 23.5, 23.8, 24.1, 24.5, 24.8, 25.1, 25.5, 25.8, 26.1, 26.5, 26.8, 27.2, 27.6, 28.1, 28.7, 29.1, 29.4, 29.8, 30.8, 31.7, 32.4, 32.9, 34.2, 35.3, 35.8, 36.4, 36.9, 37.4, 38.3, 38.9, 39.4, 40.4, 41, 41.6, 42.6, 43.2, 43.8, 44.4, 45, 45.6, 46.2, 46.8, 47.5, 48.1, 48.7, 49.4, 50.1, 50.7, 51.4, 52.1, 53.3, 54.8, 55.7, 56.4, 57.2, 57.9, 58.7, 59.5, 60.3, 61.1, 61.9, 62.7, 63.5, 64.4, 65.3, 66.3, 67.6, 68.8, 69.7, 70.7, 71.6, 72.8, 74.2, 75.5, 76.5, 77.5, 78.8, 80.3, 81.8, 82.8, 84, 85.1, 86.4, 88.2, 89.7, 90.9, 92.1, 93.6, 95.5, 97.1, 98.4, 100, 102, 104, 105, 108, 110, 112, 114, 115, 118, 120, 122, 124, 127, 130, 132, 134, 137, 139, 142, 145, 147, 150, 152, 155, 157, 161, 164, 167, 170, 173, 176, 179, 182, 187, 190, 194, 197, 200, 205, 208, 213, 216, 222, 225, 231, 234, 240, 244, 253, 262, 267, 272, 278, 283, 289, 295, 301, 307, 312, 317, 323, 329, 334, 341, 347, 353, 358, 367, 374, 381, 387, 395, 403, 411, 419, 427, 436, 445, 454, 463, 475, 485, 494, 504, 514, 528, 545, 564, 583, 603, 615, 628, 639, 649, 662, 675, 689, 701, 712, 726, 741, 756, 771, 786, 802, 818, 833, 846, 863, 878, 892, 910, 935, 964, 992, 1030, 1050, 1070, 1090, 1110, 1150, 1190, 1210, 1230, 1260, 1280, 1310, 1340, 1370, 1400, 1430, 1460, 1490, 1520, 1550, 1600, 1650, 1690, 1720, 1750, 1790, 1850, 1910, 1950, 1990, 2030, 2070, 2130, 2170, 2210, 2260, 2300, 2370, 2410, 2460, 2540, 2630, 2680, 2730, 2820, 2920, 3020, 3120, 3190, 3240, 3320, 3370, 3490, 3610, 3690, 3750, 3880, 4020, 4100, 4180, 4270, 4350, 4440, 4530, 4620, 4690, 4810, 4880, 5000, 5080, 5200, 5310, 5420, 5520, 5640, 5750, 5860, 5980, 6100, 6220, 6330, 6440, 6560, 6700, 6830, 7050, 7300, 7450, 7590, 7840, 8110, 8380, 8670, 8850, 8990, 9210, 9390, 9610}; Double_t Graph_fy10[518] = { 10.38676, 10.50231, 10.59957, 10.7015, 10.89364, 11.07546, 11.20647, 11.30821, 11.41342, 11.62109, 11.82995, 11.96215, 12.07818, 12.17911, 12.30743, 12.414, 12.52534, 12.76538, 12.97118, 13.12865, 13.25128, 13.37442, 13.49524, 13.62174, 13.74534, 13.99711, 14.24146, 14.40622, 14.54013, 14.67427, 14.8083, 14.94868, 15.22224, 15.47959, 15.6669, 15.80805, 15.95581, 16.10083, 16.2527, 16.40114, 16.65049, 17.00656, 17.18103, 17.34867, 17.50979, 17.663, 17.82315, 18.09534, 18.48112, 18.68225, 18.85134, 19.02836, 19.21403, 19.38419, 19.72512, 20.07365, 20.32073, 20.51337, 20.68111, 20.89181, 21.0759, 21.47197, 21.82747, 22.10836, 22.30316, 22.50687, 22.72023, 22.88709, 23.32871, 23.73763, 24.00677, 24.23435, 24.45738, 24.68282, 24.91041, 25.36578, 25.78503, 26.09729, 26.34398, 26.58842, 27.06598, 27.53896, 27.86668, 28.37133, 28.86478, 29.20029, 29.71859, 30.24769, 30.60227, 31.15273, 31.68307, 32.06927, 32.5362, 33.23597, 33.60661, 34.0793, 34.82676, 35.19988, 35.69491, 36.46783, 36.87798, 37.44003, 38.20997, 38.65276, 39.20006, 40.07932, 40.8414, 41.55343, 42.4036, 43.14178, 44.02907, 44.76045, 45.25133, 46.05417, 46.59723, 47.07559, 47.84267, 48.80958, 49.64402, 50.16063, 51.06094, 51.65136, 52.17979, 52.98822, 53.58735, 54.51024, 55.15295, 55.7454, 56.61769, 57.29215, 57.83828, 58.59123, 59.58957, 60.25911, 61.2608, 61.9507, 63.01658, 63.72388, 64.8542, 65.56339, 66.64773, 67.45883, 68.57788, 69.38042, 70.52167, 71.44279, 73.10832, 74.86664, 76.70132, 78.48531, 80.39639, 82.27539, 83.96915, 84.81317, 86.19446, 88.02168, 88.90821, 90.11315, 92.12023, 94.32802, 96.50886, 98.84577, 100.8332, 102.8086, 104.7116, 106.793, 108.8109, 110.7898, 112.9515, 115.1677, 117.0762, 118.1521, 119.1161, 120.7506, 122.937, 125.5722, 127.4196, 128.5312, 129.6638, 131.542, 134.0308, 136.1693, 137.3979, 138.4952, 140.691, 142.7079, 144.0108, 145.2215, 146.8251, 149.5702, 150.7827, 152.4733, 155.2857, 156.5944, 158.387, 161.2726, 162.6707, 164.4505, 167.5191, 168.8856, 170.7937, 172.6887, 174.1507, 175.4199, 177.3078, 182.9573, 187.7626, 189.8365, 190.4369, 191.0454, 193.294, 195.0114, 196.8028, 198.6746, 200.6337, 202.4317, 204.8624, 205.4538, 206.0518, 208.4005, 210.5569, 212.4997, 214.5452, 216.3183, 218.547, 220.4993, 222.5493, 224.7033, 226.9325, 229.2592, 231.2259, 233.3437, 236.0739, 236.692, 237.8515, 240.2765, 242.669, 242.8986, 243.7, 244.4396, 245.1237, 245.324, 246.1552, 246.9239, 247.738, 248.6028, 249.34, 250.183, 251.0113, 251.7779, 252.4054, 252.4402, 252.4741, 252.5072, 252.5394, 252.576, 252.6065, 251.8236, 251.565, 251.5977, 251.9175, 252.7618, 252.7922, 253.0667, 254.0334, 254.1442, 254.1704, 254.1995, 254.2243, 254.2519, 254.2788, 254.305, 254.3305, 254.3554, 254.3796, 254.4032, 254.4291, 254.4543, 254.2526, 253.4561, 253.3367, 253.3588, 252.5675, 252.295, 252.1031, 251.2675, 251.223, 250.3929, 250.0624, 249.8782, 249.0786, 249.0366, 248.174, 247.9263, 247.944, 247.6981, 246.9351, 246.8915, 246.9084, 246.0196, 245.5296, 244.7362, 244.6935, 243.8445, 243.6187, 242.4377, 241.8683, 241.295, 240.1783, 239.0772, 238.001, 237.4805, 236.957, 236.4553, 236.9969, 237.012, 234.4527, 232.994, 232.0529, 231.124, 230.6725, 229.7764, 228.8918, 227.5962, 226.7575, 226.3463, 225.53, 224.7235, 224.3345, 223.5489, 222.4, 221.6514, 220.9151, 220.5568, 219.4781, 218.4252, 218.4349, 217.4066, 216.4078, 215.7535, 214.7888, 214.4764, 213.537, 212.6227, 211.7229, 210.5545, 209.6973, 208.5851, 207.767, 206.7044, 205.9222, 204.9054, 204.1581, 202.7048, 200.6119, 199.4946, 198.6241, 197.7734, 196.9394, 195.9209, 195.126, 194.1531, 193.393, 192.6467, 192.2811, 191.5566, 190.8456, 190.4965, 189.8054, 189.1259, 188.7928, 187.9657, 186.9986, 186.3681, 185.748, 185.29, 184.688, 183.8008, 183.0782, 182.0883, 181.3984, 180.4531, 179.6626, 178.8891, 178.132, 176.4223, 175.5989, 174.7941, 174.0077, 173.2387, 171.644, 170.3208, 168.5686, 167.267, 165.4898, 164.7208, 163.9695, 163.8889, 163.1556, 162.5181, 161.6606, 160.976, 160.9779, 160.2332, 159.5059, 158.7245, 158.0995, 157.2843, 156.6211, 155.8431, 155.2095, 155.1483, 154.4668, 153.8004, 153.7418, 153.0319, 152.3957, 150.9962, 149.8166, 148.4291, 146.8649, 146.1595, 145.5618, 144.8424, 144.2273, 143.077, 141.5716, 140.9059, 140.2935, 139.6204, 138.999, 138.3208, 137.7278, 136.5779, 135.9239, 135.2852, 134.6612, 134.0513, 133.455, 132.8717, 131.7421, 130.3946, 129.6185, 129.1138, 128.6188, 127.8935, 126.9576, 125.6149, 124.9697, 124.5488, 123.9302, 123.3267, 122.1621, 121.6, 121.0507, 120.5136, 119.9882, 118.9705, 118.3154, 117.8359, 116.905, 115.7187, 115.1476, 114.5904, 113.7792, 112.4881, 111.6267, 110.4508, 109.8856, 109.4437, 108.7971, 108.3764, 107.6595, 106.4832, 106.0117, 105.4593, 104.657, 103.6329, 103.0581, 102.6571, 102.1086, 101.7257, 101.2013, 100.7625, 100.2622, 99.77413, 99.29779, 98.89833, 98.37802, 97.9966, 97.43805, 97.13459, 96.65859, 96.25151, 95.79658, 95.35219, 94.91791, 94.49337, 94.02686, 93.6217, 93.27425, 93.07861, 92.78892, 92.31587, 91.94598, 91.2278, 90.24254, 89.78968, 89.42747, 88.72436, 87.79184, 87.11485, 86.19591, 85.77034, 85.35504, 84.91885, 84.61402, 84.25532}; graph = new TGraph(518,Graph_fx10,Graph_fy10); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#66ccff"); graph->SetLineColor(ci); graph->SetLineStyle(5); graph->SetLineWidth(3); TH1F *Graph_Graph10 = new TH1F("Graph_Graph10","Graph",518,5.436,10570.4); Graph_Graph10->SetMinimum(9.348083); Graph_Graph10->SetMaximum(278.861); Graph_Graph10->SetDirectory(0); Graph_Graph10->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph10->SetLineColor(ci); Graph_Graph10->GetXaxis()->SetLabelFont(42); Graph_Graph10->GetXaxis()->SetLabelSize(0.035); Graph_Graph10->GetXaxis()->SetTitleSize(0.035); Graph_Graph10->GetXaxis()->SetTitleFont(42); Graph_Graph10->GetYaxis()->SetLabelFont(42); Graph_Graph10->GetYaxis()->SetLabelSize(0.035); Graph_Graph10->GetYaxis()->SetTitleSize(0.035); Graph_Graph10->GetYaxis()->SetTitleFont(42); Graph_Graph10->GetZaxis()->SetLabelFont(42); Graph_Graph10->GetZaxis()->SetLabelSize(0.035); Graph_Graph10->GetZaxis()->SetTitleSize(0.035); Graph_Graph10->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph10); multigraph->Add(graph,""); Double_t Graph_fx11[35] = { 3.98, 4.37, 4.79, 5.25, 5.75, 6.31, 6.92, 7.59, 8.32, 9.12, 10, 10.96, 12.02, 13.18, 14.45, 15.85, 17.38, 19.05, 20.89, 22.91, 25.12, 31.62, 39.81, 50.12, 63.1, 79.43, 100, 125.89, 158.49, 199.53, 251.19, 316.23, 1000, 3162.3, 10000}; Double_t Graph_fy11[35] = { 64.47703, 92.96188, 120.9916, 144.7661, 171.1873, 194.8983, 219.9867, 244.5213, 267.5613, 289.6608, 311.7509, 330.2783, 345.9273, 362.605, 376.5173, 387.5872, 398.0475, 406.9399, 414.3522, 421.5604, 426.3119, 433.1181, 435.0014, 429.503, 421.4079, 411.5566, 398.3919, 383.7713, 369.2768, 352.1727, 335.9504, 319.8066, 245.9105, 185.1913, 139.1868}; graph = new TGraph(35,Graph_fx11,Graph_fy11); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#66cc66"); graph->SetLineColor(ci); graph->SetLineStyle(2); graph->SetLineWidth(3); TH1F *Graph_Graph11 = new TH1F("Graph_Graph11","Graph",100,3.582,10999.6); Graph_Graph11->SetMinimum(27.4246); Graph_Graph11->SetMaximum(472.0538); Graph_Graph11->SetDirectory(0); Graph_Graph11->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph11->SetLineColor(ci); Graph_Graph11->GetXaxis()->SetLabelFont(42); Graph_Graph11->GetXaxis()->SetLabelSize(0.035); Graph_Graph11->GetXaxis()->SetTitleSize(0.035); Graph_Graph11->GetXaxis()->SetTitleFont(42); Graph_Graph11->GetYaxis()->SetLabelFont(42); Graph_Graph11->GetYaxis()->SetLabelSize(0.035); Graph_Graph11->GetYaxis()->SetTitleSize(0.035); Graph_Graph11->GetYaxis()->SetTitleFont(42); Graph_Graph11->GetZaxis()->SetLabelFont(42); Graph_Graph11->GetZaxis()->SetLabelSize(0.035); Graph_Graph11->GetZaxis()->SetTitleSize(0.035); Graph_Graph11->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph11); multigraph->Add(graph,""); Double_t Graph_fx12[35] = { 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 65, 70, 75, 80, 85, 90, 95, 100, 150, 200, 300, 400, 500}; Double_t Graph_fy12[35] = { 91.75045, 115.9467, 132.4599, 144.0692, 152.856, 159.9043, 165.4462, 172.653, 177.2831, 179.5654, 180.8904, 181.5836, 181.5776, 181.2419, 178.737, 176.8406, 175.2212, 173.4303, 171.2294, 169.3498, 167.5194, 165.3283, 163.1921, 161.2337, 159.198, 157.2876, 155.7156, 153.813, 152.3262, 150.9621, 138.5165, 129.9907, 118.4184, 110.7202, 104.9163}; graph = new TGraph(35,Graph_fx12,Graph_fy12); graph->SetName("Graph"); graph->SetTitle("Graph"); graph->SetFillColor(1); ci = TColor::GetColor("#333399"); graph->SetLineColor(ci); graph->SetLineStyle(2); graph->SetLineWidth(3); TH1F *Graph_Graph12 = new TH1F("Graph_Graph12","Graph",100,3.6,549.6); Graph_Graph12->SetMinimum(82.76714); Graph_Graph12->SetMaximum(190.5669); Graph_Graph12->SetDirectory(0); Graph_Graph12->SetStats(0); ci = TColor::GetColor("#000099"); Graph_Graph12->SetLineColor(ci); Graph_Graph12->GetXaxis()->SetLabelFont(42); Graph_Graph12->GetXaxis()->SetLabelSize(0.035); Graph_Graph12->GetXaxis()->SetTitleSize(0.035); Graph_Graph12->GetXaxis()->SetTitleFont(42); Graph_Graph12->GetYaxis()->SetLabelFont(42); Graph_Graph12->GetYaxis()->SetLabelSize(0.035); Graph_Graph12->GetYaxis()->SetTitleSize(0.035); Graph_Graph12->GetYaxis()->SetTitleFont(42); Graph_Graph12->GetZaxis()->SetLabelFont(42); Graph_Graph12->GetZaxis()->SetLabelSize(0.035); Graph_Graph12->GetZaxis()->SetTitleSize(0.035); Graph_Graph12->GetZaxis()->SetTitleFont(42); graph->SetHistogram(Graph_Graph12); multigraph->Add(graph,""); multigraph->Draw("L"); TLegend *leg = new TLegend(0.16,0.61,0.5,0.85,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextSize(0.03); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("NULL","Razor-0#mu 90% CL limit: AV EFT operator","h"); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","Expected limit, with uncertainty","lf"); ci = TColor::GetColor("#ffcc00"); entry->SetFillColor(ci); entry->SetFillStyle(1001); ci = TColor::GetColor("#ff6666"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","Observed limit","l"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); leg = new TLegend(0.67,0.61,0.92,0.9,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextSize(0.03); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); entry=leg->AddEntry("Graph","IceCube W^{+}W^{-}","l"); ci = TColor::GetColor("#3399ff"); entry->SetLineColor(ci); entry->SetLineStyle(4); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","COUPP 2012","l"); ci = TColor::GetColor("#6666ff"); entry->SetLineColor(ci); entry->SetLineStyle(6); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","SIMPLE 2012","l"); ci = TColor::GetColor("#ff9900"); entry->SetLineColor(ci); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","Super-K W^{+}W^{-}","l"); ci = TColor::GetColor("#cc33ff"); entry->SetLineColor(ci); entry->SetLineStyle(6); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","XENON 100","l"); ci = TColor::GetColor("#66ccff"); entry->SetLineColor(ci); entry->SetLineStyle(5); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","PICO","l"); ci = TColor::GetColor("#66cc66"); entry->SetLineColor(ci); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); entry=leg->AddEntry("Graph","PICASSO","l"); ci = TColor::GetColor("#333399"); entry->SetLineColor(ci); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(42); leg->Draw(); TLatex * tex = new TLatex(0.955,0.945,"18.8 fb^{-1} (8 TeV)"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(42); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.245,0.865,"CMS"); tex->SetNDC(); tex->SetTextAlign(31); tex->SetTextFont(61); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); TH1F *_copy__1 = new TH1F("_copy__1","",100,0.9,1049.95); _copy__1->SetMinimum(100); _copy__1->SetMaximum(2000000); _copy__1->SetDirectory(0); _copy__1->SetStats(0); ci = TColor::GetColor("#000099"); _copy__1->SetLineColor(ci); _copy__1->GetXaxis()->SetTitle("M_{#chi} (GeV)"); _copy__1->GetXaxis()->SetRange(0,96); _copy__1->GetXaxis()->SetLabelFont(42); _copy__1->GetXaxis()->SetTitleSize(0.05); _copy__1->GetXaxis()->SetTitleOffset(1.1); _copy__1->GetXaxis()->SetTitleFont(42); _copy__1->GetYaxis()->SetTitle("#Lambda (GeV)"); _copy__1->GetYaxis()->SetLabelFont(42); _copy__1->GetYaxis()->SetTitleSize(0.05); _copy__1->GetYaxis()->SetTitleOffset(1.05); _copy__1->GetYaxis()->SetTitleFont(42); _copy__1->GetZaxis()->SetLabelFont(42); _copy__1->GetZaxis()->SetLabelSize(0.035); _copy__1->GetZaxis()->SetTitleSize(0.035); _copy__1->GetZaxis()->SetTitleFont(42); _copy__1->Draw("sameaxis"); c->Modified(); c->cd(); c->SetSelected(c); }
void fit1() { //=========Macro generated from canvas: c1/data fits //========= (Wed Mar 9 00:43:22 2016) by ROOT version6.06/00 TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); c1->Range(0,0,1,1); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.14); c1->SetRightMargin(0.05); c1->SetTopMargin(0.05); c1->SetBottomMargin(0.16); c1->SetFrameLineWidth(2); c1->SetFrameBorderMode(0); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3); pad2->Draw(); pad2->cd(); pad2->Range(3754.321,-26.4,6223.457,8.8); pad2->SetFillColor(0); pad2->SetBorderMode(0); pad2->SetBorderSize(2); pad2->SetTickx(1); pad2->SetTicky(1); pad2->SetLeftMargin(0.14); pad2->SetRightMargin(0.05); pad2->SetTopMargin(0); pad2->SetBottomMargin(0.5); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); TH1D *frame_a63bf70__1 = new TH1D("frame_a63bf70__1","",100,4100,6100); frame_a63bf70__1->SetBinContent(1,269.9669); frame_a63bf70__1->SetMinimum(-8.8); frame_a63bf70__1->SetMaximum(8.8); frame_a63bf70__1->SetEntries(1); frame_a63bf70__1->SetDirectory(0); frame_a63bf70__1->SetStats(0); frame_a63bf70__1->SetLineWidth(2); frame_a63bf70__1->SetMarkerStyle(20); frame_a63bf70__1->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_a63bf70__1->GetXaxis()->SetNdivisions(505); frame_a63bf70__1->GetXaxis()->SetLabelFont(132); frame_a63bf70__1->GetXaxis()->SetLabelOffset(0.01); frame_a63bf70__1->GetXaxis()->SetLabelSize(0.15); frame_a63bf70__1->GetXaxis()->SetTitleSize(0.2); frame_a63bf70__1->GetXaxis()->SetTitleOffset(1.1); frame_a63bf70__1->GetXaxis()->SetTitleFont(132); frame_a63bf70__1->GetYaxis()->SetTitle("Pull"); frame_a63bf70__1->GetYaxis()->CenterTitle(true); frame_a63bf70__1->GetYaxis()->SetNdivisions(505); frame_a63bf70__1->GetYaxis()->SetLabelFont(132); frame_a63bf70__1->GetYaxis()->SetLabelOffset(0.01); frame_a63bf70__1->GetYaxis()->SetLabelSize(0.15); frame_a63bf70__1->GetYaxis()->SetTitleSize(0.15); frame_a63bf70__1->GetYaxis()->SetTitleOffset(0.45); frame_a63bf70__1->GetYaxis()->SetTitleFont(132); frame_a63bf70__1->GetZaxis()->SetLabelFont(132); frame_a63bf70__1->GetZaxis()->SetLabelSize(0.06); frame_a63bf70__1->GetZaxis()->SetTitleSize(0.072); frame_a63bf70__1->GetZaxis()->SetTitleOffset(1.2); frame_a63bf70__1->GetZaxis()->SetTitleFont(132); frame_a63bf70__1->Draw("FUNC"); Double_t pull_Hist_curvetot_fx3001[83] = { 4310, 4330, 4350, 4370, 4390, 4410, 4430, 4450, 4470, 4490, 4510, 4530, 4550, 4570, 4590, 4610, 4630, 4650, 4670, 4690, 4710, 4730, 4750, 4770, 4790, 4810, 4830, 4850, 4870, 4890, 4910, 4930, 4950, 4970, 4990, 5010, 5030, 5050, 5070, 5090, 5110, 5130, 5150, 5170, 5190, 5210, 5230, 5250, 5270, 5290, 5310, 5330, 5350, 5370, 5390, 5410, 5430, 5450, 5470, 5490, 5510, 5530, 5550, 5570, 5590, 5610, 5630, 5650, 5670, 5690, 5710, 5730, 5750, 5770, 5790, 5810, 5830, 5850, 5870, 5890, 5910, 5930, 5950}; Double_t pull_Hist_curvetot_fy3001[83] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 256.1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_felx3001[83] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fely3001[83] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fehx3001[83] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fehy3001[83] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; TGraphAsymmErrors *grae = new TGraphAsymmErrors(83,pull_Hist_curvetot_fx3001,pull_Hist_curvetot_fy3001,pull_Hist_curvetot_felx3001,pull_Hist_curvetot_fehx3001,pull_Hist_curvetot_fely3001,pull_Hist_curvetot_fehy3001); grae->SetName("pull_Hist_curvetot"); grae->SetTitle("Pull of Histogram of data_plot__sqrt(pow(J_psi_1S_TRUEP_E+Lambda0_TRUEP_E,2)-pow(J_psi_1S_TRUEP_X+Lambda0_TRUEP_X,2)-pow(J_psi_1S_TRUEP_Y+Lambda0_TRUEP_Y,2)-pow(J_psi_1S_TRUEP_Z+Lambda0_TRUEP_Z,2)) and Projection of totalPdf"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_pull_Hist_curvetot3001 = new TH1F("Graph_pull_Hist_curvetot3001","Pull of Histogram of data_plot__sqrt(pow(J_psi_1S_TRUEP_E+Lambda0_TRUEP_E,2)-pow(J_psi_1S_TRUEP_X+Lambda0_TRUEP_X,2)-pow(J_psi_1S_TRUEP_Y+Lambda0_TRUEP_Y,2)-pow(J_psi_1S_TRUEP_Z+Lambda0_TRUEP_Z,2)) and Projection of totalPdf",100,4146,6114); Graph_pull_Hist_curvetot3001->SetMinimum(0); Graph_pull_Hist_curvetot3001->SetMaximum(282.8224); Graph_pull_Hist_curvetot3001->SetDirectory(0); Graph_pull_Hist_curvetot3001->SetStats(0); Graph_pull_Hist_curvetot3001->SetLineWidth(2); Graph_pull_Hist_curvetot3001->SetMarkerStyle(20); Graph_pull_Hist_curvetot3001->GetXaxis()->SetNdivisions(505); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleOffset(1.2); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_pull_Hist_curvetot3001); grae->Draw("p"); TH1D *frame_a63bf70__2 = new TH1D("frame_a63bf70__2","",100,4100,6100); frame_a63bf70__2->SetBinContent(1,269.9669); frame_a63bf70__2->SetMinimum(-8.8); frame_a63bf70__2->SetMaximum(8.8); frame_a63bf70__2->SetEntries(1); frame_a63bf70__2->SetDirectory(0); frame_a63bf70__2->SetStats(0); frame_a63bf70__2->SetLineWidth(2); frame_a63bf70__2->SetMarkerStyle(20); frame_a63bf70__2->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_a63bf70__2->GetXaxis()->SetNdivisions(505); frame_a63bf70__2->GetXaxis()->SetLabelFont(132); frame_a63bf70__2->GetXaxis()->SetLabelOffset(0.01); frame_a63bf70__2->GetXaxis()->SetLabelSize(0.15); frame_a63bf70__2->GetXaxis()->SetTitleSize(0.2); frame_a63bf70__2->GetXaxis()->SetTitleOffset(1.1); frame_a63bf70__2->GetXaxis()->SetTitleFont(132); frame_a63bf70__2->GetYaxis()->SetTitle("Pull"); frame_a63bf70__2->GetYaxis()->CenterTitle(true); frame_a63bf70__2->GetYaxis()->SetNdivisions(505); frame_a63bf70__2->GetYaxis()->SetLabelFont(132); frame_a63bf70__2->GetYaxis()->SetLabelOffset(0.01); frame_a63bf70__2->GetYaxis()->SetLabelSize(0.15); frame_a63bf70__2->GetYaxis()->SetTitleSize(0.15); frame_a63bf70__2->GetYaxis()->SetTitleOffset(0.45); frame_a63bf70__2->GetYaxis()->SetTitleFont(132); frame_a63bf70__2->GetZaxis()->SetLabelFont(132); frame_a63bf70__2->GetZaxis()->SetLabelSize(0.06); frame_a63bf70__2->GetZaxis()->SetTitleSize(0.072); frame_a63bf70__2->GetZaxis()->SetTitleOffset(1.2); frame_a63bf70__2->GetZaxis()->SetTitleFont(132); frame_a63bf70__2->Draw("AXISSAME"); pad2->Modified(); c1->cd(); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.3,1,1); pad1->Draw(); pad1->cd(); pad1->Range(3754.321,0,6223.457,3.935074); pad1->SetFillColor(0); pad1->SetBorderMode(0); pad1->SetBorderSize(2); pad1->SetLogy(); pad1->SetTickx(1); pad1->SetTicky(1); pad1->SetLeftMargin(0.14); pad1->SetRightMargin(0.05); pad1->SetTopMargin(0.06); pad1->SetBottomMargin(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); TH1D *frame_4618880__3 = new TH1D("frame_4618880__3","A RooPlot of \"m(J/#psi #Lambda)\"",100,4100,6100); frame_4618880__3->SetBinContent(1,69141.57); frame_4618880__3->SetMinimum(1); frame_4618880__3->SetMaximum(5000); frame_4618880__3->SetEntries(1); frame_4618880__3->SetDirectory(0); frame_4618880__3->SetStats(0); frame_4618880__3->SetLineWidth(2); frame_4618880__3->SetMarkerStyle(20); frame_4618880__3->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_4618880__3->GetXaxis()->SetNdivisions(505); frame_4618880__3->GetXaxis()->SetLabelFont(132); frame_4618880__3->GetXaxis()->SetLabelOffset(0.01); frame_4618880__3->GetXaxis()->SetLabelSize(0.06); frame_4618880__3->GetXaxis()->SetTitleSize(0.072); frame_4618880__3->GetXaxis()->SetTitleOffset(0.95); frame_4618880__3->GetXaxis()->SetTitleFont(132); frame_4618880__3->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4618880__3->GetYaxis()->SetLabelFont(132); frame_4618880__3->GetYaxis()->SetLabelOffset(0.01); frame_4618880__3->GetYaxis()->SetLabelSize(0.06); frame_4618880__3->GetYaxis()->SetTitleSize(0.072); frame_4618880__3->GetYaxis()->SetTitleOffset(0.95); frame_4618880__3->GetYaxis()->SetTitleFont(132); frame_4618880__3->GetZaxis()->SetLabelFont(132); frame_4618880__3->GetZaxis()->SetLabelSize(0.06); frame_4618880__3->GetZaxis()->SetTitleSize(0.072); frame_4618880__3->GetZaxis()->SetTitleOffset(1.2); frame_4618880__3->GetZaxis()->SetTitleFont(132); frame_4618880__3->Draw("FUNC"); Double_t Hist_fx3002[100] = { 4110, 4130, 4150, 4170, 4190, 4210, 4230, 4250, 4270, 4290, 4310, 4330, 4350, 4370, 4390, 4410, 4430, 4450, 4470, 4490, 4510, 4530, 4550, 4570, 4590, 4610, 4630, 4650, 4670, 4690, 4710, 4730, 4750, 4770, 4790, 4810, 4830, 4850, 4870, 4890, 4910, 4930, 4950, 4970, 4990, 5010, 5030, 5050, 5070, 5090, 5110, 5130, 5150, 5170, 5190, 5210, 5230, 5250, 5270, 5290, 5310, 5330, 5350, 5370, 5390, 5410, 5430, 5450, 5470, 5490, 5510, 5530, 5550, 5570, 5590, 5610, 5630, 5650, 5670, 5690, 5710, 5730, 5750, 5770, 5790, 5810, 5830, 5850, 5870, 5890, 5910, 5930, 5950, 5970, 5990, 6010, 6030, 6050, 6070, 6090}; Double_t Hist_fy3002[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Hist_felx3002[100] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}; Double_t Hist_fely3002[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 256.1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Hist_fehx3002[100] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}; Double_t Hist_fehy3002[100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 256.1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; grae = new TGraphAsymmErrors(100,Hist_fx3002,Hist_fy3002,Hist_felx3002,Hist_fehx3002,Hist_fely3002,Hist_fehy3002); grae->SetName("Hist"); grae->SetTitle("Histogram of data_plot__sqrt(pow(J_psi_1S_TRUEP_E+Lambda0_TRUEP_E,2)-pow(J_psi_1S_TRUEP_X+Lambda0_TRUEP_X,2)-pow(J_psi_1S_TRUEP_Y+Lambda0_TRUEP_Y,2)-pow(J_psi_1S_TRUEP_Z+Lambda0_TRUEP_Z,2))"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_Hist3002 = new TH1F("Graph_Hist3002","Histogram of data_plot__sqrt(pow(J_psi_1S_TRUEP_E+Lambda0_TRUEP_E,2)-pow(J_psi_1S_TRUEP_X+Lambda0_TRUEP_X,2)-pow(J_psi_1S_TRUEP_Y+Lambda0_TRUEP_Y,2)-pow(J_psi_1S_TRUEP_Z+Lambda0_TRUEP_Z,2))",100,3900,6300); Graph_Hist3002->SetMinimum(72.43402); Graph_Hist3002->SetMaximum(72434.02); Graph_Hist3002->SetDirectory(0); Graph_Hist3002->SetStats(0); Graph_Hist3002->SetLineWidth(2); Graph_Hist3002->SetMarkerStyle(20); Graph_Hist3002->GetXaxis()->SetNdivisions(505); Graph_Hist3002->GetXaxis()->SetLabelFont(132); Graph_Hist3002->GetXaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetXaxis()->SetLabelSize(0.06); Graph_Hist3002->GetXaxis()->SetTitleSize(0.072); Graph_Hist3002->GetXaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetXaxis()->SetTitleFont(132); Graph_Hist3002->GetYaxis()->SetLabelFont(132); Graph_Hist3002->GetYaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetYaxis()->SetLabelSize(0.06); Graph_Hist3002->GetYaxis()->SetTitleSize(0.072); Graph_Hist3002->GetYaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetYaxis()->SetTitleFont(132); Graph_Hist3002->GetZaxis()->SetLabelFont(132); Graph_Hist3002->GetZaxis()->SetLabelSize(0.06); Graph_Hist3002->GetZaxis()->SetTitleSize(0.072); Graph_Hist3002->GetZaxis()->SetTitleOffset(1.2); Graph_Hist3002->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_Hist3002); grae->Draw("p"); Double_t curvetot_fx1[102] = { 4300, 4316.5, 4333, 4349.5, 4366, 4382.5, 4399, 4415.5, 4432, 4448.5, 4465, 4481.5, 4498, 4514.5, 4531, 4547.5, 4564, 4580.5, 4597, 4613.5, 4630, 4646.5, 4663, 4679.5, 4696, 4712.5, 4729, 4745.5, 4762, 4778.5, 4795, 4811.5, 4828, 4844.5, 4861, 4877.5, 4894, 4910.5, 4927, 4943.5, 4960, 4976.5, 4993, 5009.5, 5026, 5042.5, 5059, 5075.5, 5092, 5108.5, 5125, 5141.5, 5158, 5174.5, 5191, 5207.5, 5224, 5240.5, 5257, 5273.5, 5290, 5306.5, 5323, 5339.5, 5356, 5372.5, 5389, 5405.5, 5422, 5438.5, 5455, 5471.5, 5488, 5504.5, 5521, 5537.5, 5554, 5570.5, 5587, 5603.5, 5620, 5636.5, 5653, 5669.5, 5686, 5702.5, 5719, 5735.5, 5752, 5768.5, 5785, 5801.5, 5818, 5834.5, 5851, 5867.5, 5884, 5900.5, 5917, 5933.5, 5950, 5950}; Double_t curvetot_fy1[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; TGraph *graph = new TGraph(102,curvetot_fx1,curvetot_fy1); graph->SetName("curvetot"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_curvetot1 = new TH1F("Graph_curvetot1","Projection of totalPdf",102,4135,6115); Graph_curvetot1->SetMinimum(0.0011); Graph_curvetot1->SetMaximum(1.1); Graph_curvetot1->SetDirectory(0); Graph_curvetot1->SetStats(0); Graph_curvetot1->SetLineWidth(2); Graph_curvetot1->SetMarkerStyle(20); Graph_curvetot1->GetXaxis()->SetNdivisions(505); Graph_curvetot1->GetXaxis()->SetLabelFont(132); Graph_curvetot1->GetXaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetXaxis()->SetLabelSize(0.06); Graph_curvetot1->GetXaxis()->SetTitleSize(0.072); Graph_curvetot1->GetXaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetXaxis()->SetTitleFont(132); Graph_curvetot1->GetYaxis()->SetLabelFont(132); Graph_curvetot1->GetYaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetYaxis()->SetLabelSize(0.06); Graph_curvetot1->GetYaxis()->SetTitleSize(0.072); Graph_curvetot1->GetYaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetYaxis()->SetTitleFont(132); Graph_curvetot1->GetZaxis()->SetLabelFont(132); Graph_curvetot1->GetZaxis()->SetLabelSize(0.06); Graph_curvetot1->GetZaxis()->SetTitleSize(0.072); Graph_curvetot1->GetZaxis()->SetTitleOffset(1.2); Graph_curvetot1->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_curvetot1); graph->Draw("l"); Double_t CBLst1405_fx2[102] = { 4300, 4316.5, 4333, 4349.5, 4366, 4382.5, 4399, 4415.5, 4432, 4448.5, 4465, 4481.5, 4498, 4514.5, 4531, 4547.5, 4564, 4580.5, 4597, 4613.5, 4630, 4646.5, 4663, 4679.5, 4696, 4712.5, 4729, 4745.5, 4762, 4778.5, 4795, 4811.5, 4828, 4844.5, 4861, 4877.5, 4894, 4910.5, 4927, 4943.5, 4960, 4976.5, 4993, 5009.5, 5026, 5042.5, 5059, 5075.5, 5092, 5108.5, 5125, 5141.5, 5158, 5174.5, 5191, 5207.5, 5224, 5240.5, 5257, 5273.5, 5290, 5306.5, 5323, 5339.5, 5356, 5372.5, 5389, 5405.5, 5422, 5438.5, 5455, 5471.5, 5488, 5504.5, 5521, 5537.5, 5554, 5570.5, 5587, 5603.5, 5620, 5636.5, 5653, 5669.5, 5686, 5702.5, 5719, 5735.5, 5752, 5768.5, 5785, 5801.5, 5818, 5834.5, 5851, 5867.5, 5884, 5900.5, 5917, 5933.5, 5950, 5950}; Double_t CBLst1405_fy2[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; graph = new TGraph(102,CBLst1405_fx2,CBLst1405_fy2); graph->SetName("CBLst1405"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); graph->SetLineColor(2); graph->SetLineStyle(2); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_CBLst14052 = new TH1F("Graph_CBLst14052","Projection of totalPdf",102,4135,6115); Graph_CBLst14052->SetMinimum(0.0011); Graph_CBLst14052->SetMaximum(1.1); Graph_CBLst14052->SetDirectory(0); Graph_CBLst14052->SetStats(0); Graph_CBLst14052->SetLineWidth(2); Graph_CBLst14052->SetMarkerStyle(20); Graph_CBLst14052->GetXaxis()->SetNdivisions(505); Graph_CBLst14052->GetXaxis()->SetLabelFont(132); Graph_CBLst14052->GetXaxis()->SetLabelOffset(0.01); Graph_CBLst14052->GetXaxis()->SetLabelSize(0.06); Graph_CBLst14052->GetXaxis()->SetTitleSize(0.072); Graph_CBLst14052->GetXaxis()->SetTitleOffset(0.95); Graph_CBLst14052->GetXaxis()->SetTitleFont(132); Graph_CBLst14052->GetYaxis()->SetLabelFont(132); Graph_CBLst14052->GetYaxis()->SetLabelOffset(0.01); Graph_CBLst14052->GetYaxis()->SetLabelSize(0.06); Graph_CBLst14052->GetYaxis()->SetTitleSize(0.072); Graph_CBLst14052->GetYaxis()->SetTitleOffset(0.95); Graph_CBLst14052->GetYaxis()->SetTitleFont(132); Graph_CBLst14052->GetZaxis()->SetLabelFont(132); Graph_CBLst14052->GetZaxis()->SetLabelSize(0.06); Graph_CBLst14052->GetZaxis()->SetTitleSize(0.072); Graph_CBLst14052->GetZaxis()->SetTitleOffset(1.2); Graph_CBLst14052->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_CBLst14052); graph->Draw("l"); TLegend *leg = new TLegend(0.2,0.02,0.4,0.42,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(132); leg->SetTextSize(0.06); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("curvetot","Total PDF","l"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("CBLst1405","#Lambda*(1405), CB","l"); entry->SetLineColor(2); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); leg->Draw(); TH1D *frame_4618880__4 = new TH1D("frame_4618880__4","A RooPlot of \"m(J/#psi #Lambda)\"",100,4100,6100); frame_4618880__4->SetBinContent(1,69141.57); frame_4618880__4->SetMinimum(1); frame_4618880__4->SetMaximum(5000); frame_4618880__4->SetEntries(1); frame_4618880__4->SetDirectory(0); frame_4618880__4->SetStats(0); frame_4618880__4->SetLineWidth(2); frame_4618880__4->SetMarkerStyle(20); frame_4618880__4->GetXaxis()->SetTitle("m(J/#psi #Lambda) (MeV)"); frame_4618880__4->GetXaxis()->SetNdivisions(505); frame_4618880__4->GetXaxis()->SetLabelFont(132); frame_4618880__4->GetXaxis()->SetLabelOffset(0.01); frame_4618880__4->GetXaxis()->SetLabelSize(0.06); frame_4618880__4->GetXaxis()->SetTitleSize(0.072); frame_4618880__4->GetXaxis()->SetTitleOffset(0.95); frame_4618880__4->GetXaxis()->SetTitleFont(132); frame_4618880__4->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4618880__4->GetYaxis()->SetLabelFont(132); frame_4618880__4->GetYaxis()->SetLabelOffset(0.01); frame_4618880__4->GetYaxis()->SetLabelSize(0.06); frame_4618880__4->GetYaxis()->SetTitleSize(0.072); frame_4618880__4->GetYaxis()->SetTitleOffset(0.95); frame_4618880__4->GetYaxis()->SetTitleFont(132); frame_4618880__4->GetZaxis()->SetLabelFont(132); frame_4618880__4->GetZaxis()->SetLabelSize(0.06); frame_4618880__4->GetZaxis()->SetTitleSize(0.072); frame_4618880__4->GetZaxis()->SetTitleOffset(1.2); frame_4618880__4->GetZaxis()->SetTitleFont(132); frame_4618880__4->Draw("AXISSAME"); pad1->Modified(); c1->cd(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }
void fitWMLL3testbkg() { //=========Macro generated from canvas: c1/data fits //========= (Sat May 7 17:06:48 2016) by ROOT version6.06/02 TCanvas *c1 = new TCanvas("c1", "data fits",0,0,1200,800); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); c1->Range(0,0,1,1); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetTickx(1); c1->SetTicky(1); c1->SetLeftMargin(0.14); c1->SetRightMargin(0.05); c1->SetTopMargin(0.05); c1->SetBottomMargin(0.16); c1->SetFrameLineWidth(2); c1->SetFrameBorderMode(0); // ------------>Primitives in pad: pad2 TPad *pad2 = new TPad("pad2", "pad2",0,0,1,0.3); pad2->Draw(); pad2->cd(); pad2->Range(230.8642,-26.4,724.6914,8.8); pad2->SetFillColor(0); pad2->SetBorderMode(0); pad2->SetBorderSize(2); pad2->SetTickx(1); pad2->SetTicky(1); pad2->SetLeftMargin(0.14); pad2->SetRightMargin(0.05); pad2->SetTopMargin(0); pad2->SetBottomMargin(0.5); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); pad2->SetFrameLineWidth(2); pad2->SetFrameBorderMode(0); TH1D *frame_41aab90__1 = new TH1D("frame_41aab90__1","",100,300,700); frame_41aab90__1->SetBinContent(1,3.66042); frame_41aab90__1->SetMinimum(-8.8); frame_41aab90__1->SetMaximum(8.8); frame_41aab90__1->SetEntries(1); frame_41aab90__1->SetDirectory(0); frame_41aab90__1->SetStats(0); frame_41aab90__1->SetLineWidth(2); frame_41aab90__1->SetMarkerStyle(20); frame_41aab90__1->GetXaxis()->SetTitle("m(#pi p#rightarrow#pi) (MeV)"); frame_41aab90__1->GetXaxis()->SetNdivisions(505); frame_41aab90__1->GetXaxis()->SetLabelFont(132); frame_41aab90__1->GetXaxis()->SetLabelOffset(0.01); frame_41aab90__1->GetXaxis()->SetLabelSize(0.15); frame_41aab90__1->GetXaxis()->SetTitleSize(0.2); frame_41aab90__1->GetXaxis()->SetTitleOffset(1.1); frame_41aab90__1->GetXaxis()->SetTitleFont(132); frame_41aab90__1->GetYaxis()->SetTitle("Pull"); frame_41aab90__1->GetYaxis()->CenterTitle(true); frame_41aab90__1->GetYaxis()->SetNdivisions(505); frame_41aab90__1->GetYaxis()->SetLabelFont(132); frame_41aab90__1->GetYaxis()->SetLabelOffset(0.01); frame_41aab90__1->GetYaxis()->SetLabelSize(0.15); frame_41aab90__1->GetYaxis()->SetTitleSize(0.15); frame_41aab90__1->GetYaxis()->SetTitleOffset(0.45); frame_41aab90__1->GetYaxis()->SetTitleFont(132); frame_41aab90__1->GetZaxis()->SetLabelFont(132); frame_41aab90__1->GetZaxis()->SetLabelSize(0.06); frame_41aab90__1->GetZaxis()->SetTitleSize(0.072); frame_41aab90__1->GetZaxis()->SetTitleOffset(1.2); frame_41aab90__1->GetZaxis()->SetTitleFont(132); frame_41aab90__1->Draw("FUNC"); Double_t pull_Hist_curvetot_fx3001[35] = { 322, 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 366, 370, 374, 378, 382, 386, 390, 394, 398, 402, 406, 410, 414, 418, 422, 426, 430, 434, 438, 442, 446, 450, 454, 458}; Double_t pull_Hist_curvetot_fy3001[35] = { -4.216045, 1.419055, 1.630176, 1.736171, 1.401115, 1.177832, 0.6067655, 0.3684632, -0.07689024, 0.7649885, -0.8684489, -2.178691, -1.339307, -2.479915, -0.6142935, 0.5270919, -0.1014516, -2.629158, 0.2575233, -2.419091, 0.2616838, 1.094697, 0.4024459, 0.1552136, 1.74456, 0.3476207, -0.4683433, 2.237731, 0.864617, 1.152684, -0.4685249, -1.907669, -2.145193, 1.344497, -0.6773687}; Double_t pull_Hist_curvetot_felx3001[35] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fely3001[35] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; Double_t pull_Hist_curvetot_fehx3001[35] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t pull_Hist_curvetot_fehy3001[35] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; TGraphAsymmErrors *grae = new TGraphAsymmErrors(35,pull_Hist_curvetot_fx3001,pull_Hist_curvetot_fy3001,pull_Hist_curvetot_felx3001,pull_Hist_curvetot_fehx3001,pull_Hist_curvetot_fely3001,pull_Hist_curvetot_fehy3001); grae->SetName("pull_Hist_curvetot"); grae->SetTitle("Pull of Histogram of data_plot__R_WM and Projection of totalPdf"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_pull_Hist_curvetot3001 = new TH1F("Graph_pull_Hist_curvetot3001","Pull of Histogram of data_plot__R_WM and Projection of totalPdf",100,308.4,471.6); Graph_pull_Hist_curvetot3001->SetMinimum(-6.061422); Graph_pull_Hist_curvetot3001->SetMaximum(4.083108); Graph_pull_Hist_curvetot3001->SetDirectory(0); Graph_pull_Hist_curvetot3001->SetStats(0); Graph_pull_Hist_curvetot3001->SetLineWidth(2); Graph_pull_Hist_curvetot3001->SetMarkerStyle(20); Graph_pull_Hist_curvetot3001->GetXaxis()->SetNdivisions(505); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetXaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetXaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelOffset(0.01); Graph_pull_Hist_curvetot3001->GetYaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleOffset(0.95); Graph_pull_Hist_curvetot3001->GetYaxis()->SetTitleFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelFont(132); Graph_pull_Hist_curvetot3001->GetZaxis()->SetLabelSize(0.06); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleSize(0.072); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleOffset(1.2); Graph_pull_Hist_curvetot3001->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_pull_Hist_curvetot3001); grae->Draw("p"); TH1D *frame_41aab90__2 = new TH1D("frame_41aab90__2","",100,300,700); frame_41aab90__2->SetBinContent(1,3.66042); frame_41aab90__2->SetMinimum(-8.8); frame_41aab90__2->SetMaximum(8.8); frame_41aab90__2->SetEntries(1); frame_41aab90__2->SetDirectory(0); frame_41aab90__2->SetStats(0); frame_41aab90__2->SetLineWidth(2); frame_41aab90__2->SetMarkerStyle(20); frame_41aab90__2->GetXaxis()->SetTitle("m(#pi p#rightarrow#pi) (MeV)"); frame_41aab90__2->GetXaxis()->SetNdivisions(505); frame_41aab90__2->GetXaxis()->SetLabelFont(132); frame_41aab90__2->GetXaxis()->SetLabelOffset(0.01); frame_41aab90__2->GetXaxis()->SetLabelSize(0.15); frame_41aab90__2->GetXaxis()->SetTitleSize(0.2); frame_41aab90__2->GetXaxis()->SetTitleOffset(1.1); frame_41aab90__2->GetXaxis()->SetTitleFont(132); frame_41aab90__2->GetYaxis()->SetTitle("Pull"); frame_41aab90__2->GetYaxis()->CenterTitle(true); frame_41aab90__2->GetYaxis()->SetNdivisions(505); frame_41aab90__2->GetYaxis()->SetLabelFont(132); frame_41aab90__2->GetYaxis()->SetLabelOffset(0.01); frame_41aab90__2->GetYaxis()->SetLabelSize(0.15); frame_41aab90__2->GetYaxis()->SetTitleSize(0.15); frame_41aab90__2->GetYaxis()->SetTitleOffset(0.45); frame_41aab90__2->GetYaxis()->SetTitleFont(132); frame_41aab90__2->GetZaxis()->SetLabelFont(132); frame_41aab90__2->GetZaxis()->SetLabelSize(0.06); frame_41aab90__2->GetZaxis()->SetTitleSize(0.072); frame_41aab90__2->GetZaxis()->SetTitleOffset(1.2); frame_41aab90__2->GetZaxis()->SetTitleFont(132); frame_41aab90__2->Draw("AXISSAME"); pad2->Modified(); c1->cd(); // ------------>Primitives in pad: pad1 TPad *pad1 = new TPad("pad1", "pad1",0,0.3,1,1); pad1->Draw(); pad1->cd(); pad1->Range(230.8642,0,724.6914,299.2215); pad1->SetFillColor(0); pad1->SetBorderMode(0); pad1->SetBorderSize(2); pad1->SetTickx(1); pad1->SetTicky(1); pad1->SetLeftMargin(0.14); pad1->SetRightMargin(0.05); pad1->SetTopMargin(0.06); pad1->SetBottomMargin(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); pad1->SetFrameLineWidth(2); pad1->SetFrameBorderMode(0); TH1D *frame_4083450__3 = new TH1D("frame_4083450__3","A RooPlot of \"m(#pi p#rightarrow#pi)\"",100,300,700); frame_4083450__3->SetBinContent(1,281.2682); frame_4083450__3->SetMaximum(281.2682); frame_4083450__3->SetEntries(1); frame_4083450__3->SetDirectory(0); frame_4083450__3->SetStats(0); frame_4083450__3->SetLineWidth(2); frame_4083450__3->SetMarkerStyle(20); frame_4083450__3->GetXaxis()->SetTitle("m(#pi p#rightarrow#pi) (MeV)"); frame_4083450__3->GetXaxis()->SetNdivisions(505); frame_4083450__3->GetXaxis()->SetLabelFont(132); frame_4083450__3->GetXaxis()->SetLabelOffset(0.01); frame_4083450__3->GetXaxis()->SetLabelSize(0.06); frame_4083450__3->GetXaxis()->SetTitleSize(0.072); frame_4083450__3->GetXaxis()->SetTitleOffset(0.95); frame_4083450__3->GetXaxis()->SetTitleFont(132); frame_4083450__3->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4083450__3->GetYaxis()->SetLabelFont(132); frame_4083450__3->GetYaxis()->SetLabelOffset(0.01); frame_4083450__3->GetYaxis()->SetLabelSize(0.06); frame_4083450__3->GetYaxis()->SetTitleSize(0.072); frame_4083450__3->GetYaxis()->SetTitleOffset(0.95); frame_4083450__3->GetYaxis()->SetTitleFont(132); frame_4083450__3->GetZaxis()->SetLabelFont(132); frame_4083450__3->GetZaxis()->SetLabelSize(0.06); frame_4083450__3->GetZaxis()->SetTitleSize(0.072); frame_4083450__3->GetZaxis()->SetTitleOffset(1.2); frame_4083450__3->GetZaxis()->SetTitleFont(132); frame_4083450__3->Draw("FUNC"); Double_t Hist_fx3002[100] = { 302, 306, 310, 314, 318, 322, 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 366, 370, 374, 378, 382, 386, 390, 394, 398, 402, 406, 410, 414, 418, 422, 426, 430, 434, 438, 442, 446, 450, 454, 458, 462, 466, 470, 474, 478, 482, 486, 490, 494, 498, 502, 506, 510, 514, 518, 522, 526, 530, 534, 538, 542, 546, 550, 554, 558, 562, 566, 570, 574, 578, 582, 586, 590, 594, 598, 602, 606, 610, 614, 618, 622, 626, 630, 634, 638, 642, 646, 650, 654, 658, 662, 666, 670, 674, 678, 682, 686, 690, 694, 698}; Double_t Hist_fy3002[100] = { 0, 0, 0, 0, 0, 10, 54, 76, 95, 107, 118, 123, 130, 133, 150, 136, 126, 138, 128, 150, 165, 157, 128, 160, 128, 157, 166, 155, 150, 169, 149, 138, 172, 153, 157, 138, 124, 124, 169, 148, 137, 138, 130, 129, 126, 141, 150, 153, 164, 252, 181, 107, 119, 108, 95, 83, 80, 76, 74, 44, 66, 39, 31, 24, 20, 13, 11, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Hist_felx3002[100] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; Double_t Hist_fely3002[100] = { 0, 0, 0, 0, 0, 3.162278, 7.348469, 8.717798, 9.746794, 10.34408, 10.86278, 11.09054, 11.40175, 11.53256, 12.24745, 11.6619, 11.22497, 11.74734, 11.31371, 12.24745, 12.84523, 12.52996, 11.31371, 12.64911, 11.31371, 12.52996, 12.8841, 12.4499, 12.24745, 13, 12.20656, 11.74734, 13.11488, 12.36932, 12.52996, 11.74734, 11.13553, 11.13553, 13, 12.16553, 11.7047, 11.74734, 11.40175, 11.35782, 11.22497, 11.87434, 12.24745, 12.36932, 12.80625, 15.87451, 13.45362, 10.34408, 10.90871, 10.3923, 9.746794, 9.110434, 8.944272, 8.717798, 8.602325, 6.63325, 8.124038, 6.244998, 5.567764, 4.898979, 4.472136, 3.605551, 3.316625, 2.236068, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; Double_t Hist_fehx3002[100] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}; Double_t Hist_fehy3002[100] = { 0, 0, 0, 0, 0, 3.162278, 7.348469, 8.717798, 9.746794, 10.34408, 10.86278, 11.09054, 11.40175, 11.53256, 12.24745, 11.6619, 11.22497, 11.74734, 11.31371, 12.24745, 12.84523, 12.52996, 11.31371, 12.64911, 11.31371, 12.52996, 12.8841, 12.4499, 12.24745, 13, 12.20656, 11.74734, 13.11488, 12.36932, 12.52996, 11.74734, 11.13553, 11.13553, 13, 12.16553, 11.7047, 11.74734, 11.40175, 11.35782, 11.22497, 11.87434, 12.24745, 12.36932, 12.80625, 15.87451, 13.45362, 10.34408, 10.90871, 10.3923, 9.746794, 9.110434, 8.944272, 8.717798, 8.602325, 6.63325, 8.124038, 6.244998, 5.567764, 4.898979, 4.472136, 3.605551, 3.316625, 2.236068, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; grae = new TGraphAsymmErrors(100,Hist_fx3002,Hist_fy3002,Hist_felx3002,Hist_fehx3002,Hist_fely3002,Hist_fehy3002); grae->SetName("Hist"); grae->SetTitle("Histogram of data_plot__R_WM"); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(8); TH1F *Graph_Hist3002 = new TH1F("Graph_Hist3002","Histogram of data_plot__R_WM",100,260,740); Graph_Hist3002->SetMinimum(0); Graph_Hist3002->SetMaximum(294.662); Graph_Hist3002->SetDirectory(0); Graph_Hist3002->SetStats(0); Graph_Hist3002->SetLineWidth(2); Graph_Hist3002->SetMarkerStyle(20); Graph_Hist3002->GetXaxis()->SetNdivisions(505); Graph_Hist3002->GetXaxis()->SetLabelFont(132); Graph_Hist3002->GetXaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetXaxis()->SetLabelSize(0.06); Graph_Hist3002->GetXaxis()->SetTitleSize(0.072); Graph_Hist3002->GetXaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetXaxis()->SetTitleFont(132); Graph_Hist3002->GetYaxis()->SetLabelFont(132); Graph_Hist3002->GetYaxis()->SetLabelOffset(0.01); Graph_Hist3002->GetYaxis()->SetLabelSize(0.06); Graph_Hist3002->GetYaxis()->SetTitleSize(0.072); Graph_Hist3002->GetYaxis()->SetTitleOffset(0.95); Graph_Hist3002->GetYaxis()->SetTitleFont(132); Graph_Hist3002->GetZaxis()->SetLabelFont(132); Graph_Hist3002->GetZaxis()->SetLabelSize(0.06); Graph_Hist3002->GetZaxis()->SetTitleSize(0.072); Graph_Hist3002->GetZaxis()->SetTitleOffset(1.2); Graph_Hist3002->GetZaxis()->SetTitleFont(132); grae->SetHistogram(Graph_Hist3002); grae->Draw("p"); Double_t curvetot_fx1[102] = { 320, 321.4, 322.8, 324.2, 325.6, 327, 328.4, 329.8, 331.2, 332.6, 334, 335.4, 336.8, 338.2, 339.6, 341, 342.4, 343.8, 345.2, 346.6, 348, 349.4, 350.8, 352.2, 353.6, 355, 356.4, 357.8, 359.2, 360.6, 362, 363.4, 364.8, 366.2, 367.6, 369, 370.4, 371.8, 373.2, 374.6, 376, 377.4, 378.8, 380.2, 381.6, 383, 384.4, 385.8, 387.2, 388.6, 390, 391.4, 392.8, 394.2, 395.6, 397, 398.4, 399.8, 401.2, 402.6, 404, 405.4, 406.8, 408.2, 409.6, 411, 412.4, 413.8, 415.2, 416.6, 418, 419.4, 420.8, 422.2, 423.6, 425, 426.4, 427.8, 429.2, 430.6, 432, 433.4, 434.8, 436.2, 437.6, 439, 440.4, 441.8, 443.2, 444.6, 446, 447.4, 448.8, 450.2, 451.6, 453, 454.4, 455.8, 457.2, 458.6, 460, 460}; Double_t curvetot_fy1[102] = { 12.45669, 20.14825, 27.5777, 34.74921, 41.66694, 48.33508, 54.75779, 60.93926, 66.88365, 72.59514, 78.0779, 83.33611, 88.37393, 93.19555, 97.80514, 102.2069, 106.4049, 110.4034, 114.2066, 117.8187, 121.2437, 124.4859, 127.5495, 130.4386, 133.1574, 135.7101, 138.1008, 140.3338, 142.4132, 144.3431, 146.1278, 147.7714, 149.2781, 150.652, 151.8974, 153.0184, 154.0192, 154.904, 155.6769, 156.3421, 156.9038, 157.3662, 157.7333, 158.0095, 158.1989, 158.3056, 158.3338, 158.2878, 158.1716, 157.9895, 157.7455, 157.444, 157.089, 156.6848, 156.2355, 155.7453, 155.2183, 154.6588, 154.0709, 153.4588, 152.8266, 152.1786, 151.5188, 150.8516, 150.181, 149.5112, 148.8464, 148.1908, 147.5485, 146.9238, 146.3207, 145.7435, 145.1964, 144.6835, 144.2089, 143.777, 143.3917, 143.0574, 142.7781, 142.5582, 142.4016, 142.3126, 142.2955, 142.3542, 142.4931, 142.7163, 143.028, 143.4323, 143.9335, 144.5356, 145.2429, 146.0595, 146.9897, 148.0375, 149.2073, 150.503, 151.929, 153.4893, 155.1882, 157.0298, 159.0183, 159.0183}; TGraph *graph = new TGraph(102,curvetot_fx1,curvetot_fy1); graph->SetName("curvetot"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#0000ff"); graph->SetLineColor(ci); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_curvetot1 = new TH1F("Graph_curvetot1","Projection of totalPdf",102,306,474); Graph_curvetot1->SetMinimum(0); Graph_curvetot1->SetMaximum(173.6745); Graph_curvetot1->SetDirectory(0); Graph_curvetot1->SetStats(0); Graph_curvetot1->SetLineWidth(2); Graph_curvetot1->SetMarkerStyle(20); Graph_curvetot1->GetXaxis()->SetNdivisions(505); Graph_curvetot1->GetXaxis()->SetLabelFont(132); Graph_curvetot1->GetXaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetXaxis()->SetLabelSize(0.06); Graph_curvetot1->GetXaxis()->SetTitleSize(0.072); Graph_curvetot1->GetXaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetXaxis()->SetTitleFont(132); Graph_curvetot1->GetYaxis()->SetLabelFont(132); Graph_curvetot1->GetYaxis()->SetLabelOffset(0.01); Graph_curvetot1->GetYaxis()->SetLabelSize(0.06); Graph_curvetot1->GetYaxis()->SetTitleSize(0.072); Graph_curvetot1->GetYaxis()->SetTitleOffset(0.95); Graph_curvetot1->GetYaxis()->SetTitleFont(132); Graph_curvetot1->GetZaxis()->SetLabelFont(132); Graph_curvetot1->GetZaxis()->SetLabelSize(0.06); Graph_curvetot1->GetZaxis()->SetTitleSize(0.072); Graph_curvetot1->GetZaxis()->SetTitleOffset(1.2); Graph_curvetot1->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_curvetot1); graph->Draw("l"); Double_t bkg_fx2[102] = { 320, 321.4, 322.8, 324.2, 325.6, 327, 328.4, 329.8, 331.2, 332.6, 334, 335.4, 336.8, 338.2, 339.6, 341, 342.4, 343.8, 345.2, 346.6, 348, 349.4, 350.8, 352.2, 353.6, 355, 356.4, 357.8, 359.2, 360.6, 362, 363.4, 364.8, 366.2, 367.6, 369, 370.4, 371.8, 373.2, 374.6, 376, 377.4, 378.8, 380.2, 381.6, 383, 384.4, 385.8, 387.2, 388.6, 390, 391.4, 392.8, 394.2, 395.6, 397, 398.4, 399.8, 401.2, 402.6, 404, 405.4, 406.8, 408.2, 409.6, 411, 412.4, 413.8, 415.2, 416.6, 418, 419.4, 420.8, 422.2, 423.6, 425, 426.4, 427.8, 429.2, 430.6, 432, 433.4, 434.8, 436.2, 437.6, 439, 440.4, 441.8, 443.2, 444.6, 446, 447.4, 448.8, 450.2, 451.6, 453, 454.4, 455.8, 457.2, 458.6, 460, 460}; Double_t bkg_fy2[102] = { 12.45669, 20.14825, 27.5777, 34.74921, 41.66694, 48.33508, 54.75779, 60.93926, 66.88365, 72.59514, 78.0779, 83.33611, 88.37393, 93.19555, 97.80514, 102.2069, 106.4049, 110.4034, 114.2066, 117.8187, 121.2437, 124.4859, 127.5495, 130.4386, 133.1574, 135.7101, 138.1008, 140.3338, 142.4132, 144.3431, 146.1278, 147.7714, 149.2781, 150.652, 151.8974, 153.0184, 154.0192, 154.904, 155.6769, 156.3421, 156.9038, 157.3662, 157.7333, 158.0095, 158.1989, 158.3056, 158.3338, 158.2878, 158.1716, 157.9895, 157.7455, 157.444, 157.089, 156.6848, 156.2355, 155.7453, 155.2183, 154.6588, 154.0709, 153.4588, 152.8266, 152.1786, 151.5188, 150.8516, 150.181, 149.5112, 148.8464, 148.1908, 147.5485, 146.9238, 146.3207, 145.7435, 145.1964, 144.6835, 144.2089, 143.777, 143.3917, 143.0574, 142.7781, 142.5582, 142.4016, 142.3126, 142.2955, 142.3542, 142.4931, 142.7163, 143.028, 143.4323, 143.9335, 144.5356, 145.2429, 146.0595, 146.9897, 148.0375, 149.2073, 150.503, 151.929, 153.4893, 155.1882, 157.0298, 159.0183, 159.0183}; graph = new TGraph(102,bkg_fx2,bkg_fy2); graph->SetName("bkg"); graph->SetTitle("Projection of totalPdf"); graph->SetFillColor(1); graph->SetLineColor(2); graph->SetLineStyle(2); graph->SetLineWidth(3); graph->SetMarkerStyle(20); TH1F *Graph_bkg2 = new TH1F("Graph_bkg2","Projection of totalPdf",102,306,474); Graph_bkg2->SetMinimum(0); Graph_bkg2->SetMaximum(173.6745); Graph_bkg2->SetDirectory(0); Graph_bkg2->SetStats(0); Graph_bkg2->SetLineWidth(2); Graph_bkg2->SetMarkerStyle(20); Graph_bkg2->GetXaxis()->SetNdivisions(505); Graph_bkg2->GetXaxis()->SetLabelFont(132); Graph_bkg2->GetXaxis()->SetLabelOffset(0.01); Graph_bkg2->GetXaxis()->SetLabelSize(0.06); Graph_bkg2->GetXaxis()->SetTitleSize(0.072); Graph_bkg2->GetXaxis()->SetTitleOffset(0.95); Graph_bkg2->GetXaxis()->SetTitleFont(132); Graph_bkg2->GetYaxis()->SetLabelFont(132); Graph_bkg2->GetYaxis()->SetLabelOffset(0.01); Graph_bkg2->GetYaxis()->SetLabelSize(0.06); Graph_bkg2->GetYaxis()->SetTitleSize(0.072); Graph_bkg2->GetYaxis()->SetTitleOffset(0.95); Graph_bkg2->GetYaxis()->SetTitleFont(132); Graph_bkg2->GetZaxis()->SetLabelFont(132); Graph_bkg2->GetZaxis()->SetLabelSize(0.06); Graph_bkg2->GetZaxis()->SetTitleSize(0.072); Graph_bkg2->GetZaxis()->SetTitleOffset(1.2); Graph_bkg2->GetZaxis()->SetTitleFont(132); graph->SetHistogram(Graph_bkg2); graph->Draw("l"); TLegend *leg = new TLegend(0.75,0.02,1,0.42,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(132); leg->SetTextSize(0.06); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(2); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("curvetot","Total PDF","l"); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); entry=leg->AddEntry("bkg","Background","l"); entry->SetLineColor(2); entry->SetLineStyle(2); entry->SetLineWidth(3); entry->SetMarkerColor(1); entry->SetMarkerStyle(21); entry->SetMarkerSize(1); entry->SetTextFont(132); leg->Draw(); TH1D *frame_4083450__4 = new TH1D("frame_4083450__4","A RooPlot of \"m(#pi p#rightarrow#pi)\"",100,300,700); frame_4083450__4->SetBinContent(1,281.2682); frame_4083450__4->SetMaximum(281.2682); frame_4083450__4->SetEntries(1); frame_4083450__4->SetDirectory(0); frame_4083450__4->SetStats(0); frame_4083450__4->SetLineWidth(2); frame_4083450__4->SetMarkerStyle(20); frame_4083450__4->GetXaxis()->SetTitle("m(#pi p#rightarrow#pi) (MeV)"); frame_4083450__4->GetXaxis()->SetNdivisions(505); frame_4083450__4->GetXaxis()->SetLabelFont(132); frame_4083450__4->GetXaxis()->SetLabelOffset(0.01); frame_4083450__4->GetXaxis()->SetLabelSize(0.06); frame_4083450__4->GetXaxis()->SetTitleSize(0.072); frame_4083450__4->GetXaxis()->SetTitleOffset(0.95); frame_4083450__4->GetXaxis()->SetTitleFont(132); frame_4083450__4->GetYaxis()->SetTitle("Events/(5 MeV)"); frame_4083450__4->GetYaxis()->SetLabelFont(132); frame_4083450__4->GetYaxis()->SetLabelOffset(0.01); frame_4083450__4->GetYaxis()->SetLabelSize(0.06); frame_4083450__4->GetYaxis()->SetTitleSize(0.072); frame_4083450__4->GetYaxis()->SetTitleOffset(0.95); frame_4083450__4->GetYaxis()->SetTitleFont(132); frame_4083450__4->GetZaxis()->SetLabelFont(132); frame_4083450__4->GetZaxis()->SetLabelSize(0.06); frame_4083450__4->GetZaxis()->SetTitleSize(0.072); frame_4083450__4->GetZaxis()->SetTitleOffset(1.2); frame_4083450__4->GetZaxis()->SetTitleFont(132); frame_4083450__4->Draw("AXISSAME"); pad1->Modified(); c1->cd(); c1->Modified(); c1->cd(); c1->SetSelected(c1); }
void bToDRawYield() { gStyle->SetTextSize(0.05); gStyle->SetTextFont(42); gStyle->SetPadRightMargin(0.04); gStyle->SetPadLeftMargin(0.14); gStyle->SetPadTopMargin(0.1); gStyle->SetPadBottomMargin(0.14); gStyle->SetTitleX(.0f); gStyle->SetOptFit(1111); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); TCanvas* c4 = new TCanvas("c4","",800,600); c4->Divide(2,2); TCanvas* c2 = new TCanvas("c2","",400,600); c2->Divide(1,2); TCanvas* c1 = new TCanvas(); TCanvas* c15 = new TCanvas("c15","",810,1000); c15->Divide(3,5); TFile* fPbPb = new TFile("bFeedDownPbPb.hist.root"); TFile* fPbPbMB = new TFile("bFeedDownPbPbMB.hist.root"); TFile* fPbPbMC = new TFile("bFeedDownPbPbMC.hist.root"); TFile* fPbPbMBMC = new TFile("bFeedDownPbPbMBMC.hist.root"); TH3D* hDataPbPb = (TH3D*)fPbPb->Get("hData"); TH3D* hSidebandPbPb = (TH3D*)fPbPb->Get("hSideband"); TH3D* hDataPbPbMB = (TH3D*)fPbPbMB->Get("hData"); TH3D* hSidebandPbPbMB = (TH3D*)fPbPbMB->Get("hSideband"); TH3D* hPtMD0DcaPbPb = (TH3D*)fPbPb->Get("hPtMD0Dca"); TH3D* hPtMD0DcaPbPbMB = (TH3D*)fPbPbMB->Get("hPtMD0Dca"); TH3D* hMCPSignalPbPb = (TH3D*)fPbPbMC->Get("hMCPSignal"); TH3D* hMCNPSignalPbPb = (TH3D*)fPbPbMC->Get("hMCNPSignal"); TH3D* hMCPSignalPbPbMB = (TH3D*)fPbPbMBMC->Get("hMCPSignal"); TH3D* hMCNPSignalPbPbMB = (TH3D*)fPbPbMBMC->Get("hMCNPSignal"); TH3D* hPtMD0DcaMCPSignalPbPb = (TH3D*)fPbPbMC->Get("hPtMD0DcaMCPSignal"); TH3D* hPtMD0DcaMCPSwappedPbPb = (TH3D*)fPbPbMC->Get("hPtMD0DcaMCPSwapped"); TH3D* hPtMD0DcaMCPSignalPbPbMB =(TH3D*)fPbPbMBMC->Get("hPtMD0DcaMCPSignal"); TH3D* hPtMD0DcaMCPSwappedPbPbMB = (TH3D*)fPbPbMBMC->Get("hPtMD0DcaMCPSwapped"); TH3D* hData = (TH3D*)hDataPbPb->Clone("hData"); hData->Sumw2(); hData->Add(hDataPbPbMB); TH3D* hSideband = (TH3D*)hSidebandPbPb->Clone("hSideband"); hSideband->Sumw2(); hSideband->Add(hSidebandPbPbMB); TH3D* hPtMD0Dca = (TH3D*)hPtMD0DcaPbPb->Clone("hPtMD0Dca"); hPtMD0Dca->Sumw2(); hPtMD0Dca->Add(hPtMD0DcaPbPbMB); TH3D* hMCPSignal = (TH3D*)hMCPSignalPbPb->Clone("hMCPSignal"); hMCPSignal->Sumw2(); hMCPSignal->Add(hMCPSignalPbPbMB); TH3D* hMCNPSignal = (TH3D*)hMCNPSignalPbPb->Clone("hMCNPSignal"); hMCNPSignal->Sumw2(); hMCNPSignal->Add(hMCNPSignalPbPbMB); TH3D* hPtMD0DcaMCPSignal = (TH3D*)hPtMD0DcaMCPSignalPbPb->Clone("hPtMD0DcaMCPSignal"); hPtMD0DcaMCPSignal->Sumw2(); hPtMD0DcaMCPSignal->Add(hPtMD0DcaMCPSignalPbPbMB); TH3D* hPtMD0DcaMCPSwapped =(TH3D*)hPtMD0DcaMCPSwappedPbPb->Clone("hPtMD0DcaMCPSwapped"); hPtMD0DcaMCPSwapped->Sumw2(); hPtMD0DcaMCPSwapped->Add(hPtMD0DcaMCPSwappedPbPbMB); TLatex* texCms = new TLatex(0.18,0.93, "#scale[1.25]{CMS} Preliminary"); texCms->SetNDC(); texCms->SetTextAlign(12); texCms->SetTextSize(0.06); texCms->SetTextFont(42); TLatex* texCol = new TLatex(0.96,0.93, "PbPb #sqrt{s_{NN}} = 5.02 TeV"); texCol->SetNDC(); texCol->SetTextAlign(32); texCol->SetTextSize(0.06); texCol->SetTextFont(42); const int nPtBins = 14; float ptBins[nPtBins+1] = {2.,3.,4.,5.,6.,8.,10.,12.5,15.0,20.,25.,30.,40.,60.,100}; float pts[nPtBins]; float ptErrors[nPtBins]; float promptFraction[nPtBins]; float totalYield[nPtBins]; float totalYieldInvMassFit[nPtBins]; float totalYieldInvMassFitError[nPtBins]; float bToDYield[nPtBins]; float bToDYieldError[nPtBins]; float bToDYieldErrorDataOnly[nPtBins]; float promptDYield[nPtBins]; float promptDYieldError[nPtBins]; float promptDYieldErrorDataOnly[nPtBins]; const int nBinY = 14; Float_t binsY[nBinY+1]; float firstBinYWidth = 0.001; float binYWidthRatio = 1.27; binsY[0]=0; for(int i=1; i<=nBinY; i++) binsY[i] = binsY[i-1]+firstBinYWidth*pow(binYWidthRatio,i-1); cout<<"last y bin: "<<binsY[nBinY]<<endl; // for(int i=1; i<=nPtBins; i++) for(int i =7; i<=7; i++) { pts[i-1] = 0.5*(ptBins[i-1]+ptBins[i]); ptErrors[i-1] = 0.5*(ptBins[i]-ptBins[i-1]); float ptLow = ptBins[i-1]; float ptHigh = ptBins[i]; cout<<endl<<"======================================="<<endl; cout<<"pT range: "<<ptLow<<" "<<ptHigh<<endl; TLatex* texPtY = new TLatex(0.32,0.82,Form("%.1f < p_{T} < %.1f GeV/c |y| < 1.0",ptLow,ptHigh)); texPtY->SetNDC(); texPtY->SetTextFont(42); texPtY->SetTextSize(0.06); texPtY->SetLineWidth(2); TLatex* texPt = new TLatex(0.18,0.82,Form("%.1f < p_{T} < %.1f GeV/c",ptLow,ptHigh)); texPt->SetNDC(); texPt->SetTextFont(42); texPt->SetTextSize(0.06); texPt->SetLineWidth(2); TLatex* texY = new TLatex(0.18,0.74,Form("|y| < 1.0")); texY->SetNDC(); texY->SetTextFont(42); texY->SetTextSize(0.06); texY->SetLineWidth(2); c2->cd(1); hPtMD0Dca->GetZaxis()->SetRange(1,100); hPtMD0Dca->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); hPtMD0DcaMCPSignal->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); hPtMD0DcaMCPSwapped->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); TH1D* hMData = (TH1D*)hPtMD0Dca->Project3D("y")->Clone(Form("hM_%1.1f_%1.1f", ptLow, ptHigh)); TH1D* hMMCSignal = (TH1D*)hPtMD0DcaMCPSignal->Project3D("y"); TH1D* hMMCSwapped = (TH1D*)hPtMD0DcaMCPSwapped->Project3D("y"); setColorTitleLabel(hMData); setColorTitleLabel(hMMCSignal); setColorTitleLabel(hMMCSwapped); TF1* fMass = fitMass(hMData, hMMCSignal, hMMCSwapped); texCms->Draw(); texCol->Draw(); texPt->Draw(); texY->Draw(); TF1* fSignalAndSwapped = new TF1("fSignalAndSwapped","[0]*([3]*([5]*Gaus(x,[1],[2]*(1+[7]))/(sqrt(2*3.1415927)*[2]*(1+[7]))+(1-[5])*Gaus(x,[1],[6]*(1+[7]))/(sqrt(2*3.1415927)*[6]*(1+[7])))+(1-[3])*Gaus(x,[1],[4]*(1+[7]))/(sqrt(2*3.1415927)*[4]*(1+[7])))", 1.7, 2.0); fSignalAndSwapped->SetParameter(0,fMass->GetParameter(0)); fSignalAndSwapped->SetParameter(1,fMass->GetParameter(1)); fSignalAndSwapped->SetParameter(2,fMass->GetParameter(2)); fSignalAndSwapped->SetParameter(3,fMass->GetParameter(7)); fSignalAndSwapped->SetParameter(4,fMass->GetParameter(8)); fSignalAndSwapped->SetParameter(5,fMass->GetParameter(9)); fSignalAndSwapped->SetParameter(6,fMass->GetParameter(10)); fSignalAndSwapped->SetParameter(7,fMass->GetParameter(11)); TF1* background = new TF1("fBackground","[0]+[1]*x+[2]*x*x+[3]*x*x*x"); background->SetParameter(0,fMass->GetParameter(3)); background->SetParameter(1,fMass->GetParameter(4)); background->SetParameter(2,fMass->GetParameter(5)); background->SetParameter(3,fMass->GetParameter(6)); cout<<"MC signal width: "<<fMass->GetParameter(2)<<" "<<fMass->GetParameter(10)<<endl; cout<<"MC swapped width: "<<fMass->GetParameter(8)<<endl; float massD = 1.8649; float massSignal1 = massD-0.025; float massSignal2 = massD+0.025; float massSideBand1 = massD-0.1; float massSideBand2 = massD-0.075; float massSideBand3 = massD+0.075; float massSideBand4 = massD+0.1; float scaleSideBandBackground = background->Integral(massSignal1, massSignal2)/(background->Integral(massSideBand1, massSideBand2)+background->Integral(massSideBand3, massSideBand4)); cout<<"scaleSideBandBackground: "<<scaleSideBandBackground<<endl; totalYieldInvMassFit[i-1] = fMass->GetParameter(0)*fMass->GetParameter(7)/hMData->GetBinWidth(1); totalYieldInvMassFitError[i-1] = fMass->GetParError(0)*fMass->GetParameter(7)/hMData->GetBinWidth(1); cout<<"totalYieldInvMassFit: "<<totalYieldInvMassFit[i-1]<<" +- "<<totalYieldInvMassFitError[i-1]<<endl; float scaleSideBandMethodSignal = fSignalAndSwapped->GetParameter(0)*fSignalAndSwapped->GetParameter(3) / (fSignalAndSwapped->Integral(massSignal1, massSignal2)-fSignalAndSwapped->Integral(massSideBand1, massSideBand2)-fSignalAndSwapped->Integral(massSideBand3, massSideBand4)); cout<<"scaleSideBandMethodSignal: "<<scaleSideBandMethodSignal<<endl; TLatex* texScale = new TLatex(0.18,0.66,Form("side band bg scale: %1.3f", scaleSideBandBackground)); texScale->SetNDC(); texScale->SetTextFont(42); texScale->SetTextSize(0.06); texScale->SetLineWidth(2); texScale->Draw(); TLine* lineSignal1 = new TLine(massSignal1, 0, massSignal1, hMData->GetMaximum()*0.5); TLine* lineSignal2 = new TLine(massSignal2, 0, massSignal2, hMData->GetMaximum()*0.5); TLine* lineSideBand1 = new TLine(massSideBand1, 0, massSideBand1, hMData->GetMaximum()*0.5); TLine* lineSideBand2 = new TLine(massSideBand2, 0, massSideBand2, hMData->GetMaximum()*0.5); TLine* lineSideBand3 = new TLine(massSideBand3, 0, massSideBand3, hMData->GetMaximum()*0.5); TLine* lineSideBand4 = new TLine(massSideBand4, 0, massSideBand4, hMData->GetMaximum()*0.5); lineSignal1->Draw(); lineSignal2->Draw(); lineSideBand1->Draw(); lineSideBand2->Draw(); lineSideBand3->Draw(); lineSideBand4->Draw(); c2->cd(2); gPad->SetLogy(); hData->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); hSideband->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); hMCPSignal->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); hMCNPSignal->GetXaxis()->SetRangeUser(ptLow+0.001,ptHigh-0.001); TH1D* hD0DcaData0 = (TH1D*)hData->Project3D("y")->Clone("hD0DcaData0"); TH1D* hD0DcaSideband = (TH1D*)hSideband->Project3D("y")->Clone("hD0DcaSideband"); TH1D* hD0DcaMCPSignal0 = (TH1D*)hMCPSignal->Project3D("y")->Clone("hD0DcaMCPSignal0"); TH1D* hD0DcaMCNPSignal0 = (TH1D*)hMCNPSignal->Project3D("y")->Clone("hD0DcaMCNPSignal0"); float integralRawYieldMCP = hD0DcaMCPSignal0->Integral(); float integralRawYieldMCNP = hD0DcaMCNPSignal0->Integral(); cout<<"integralRawYieldMCP: "<<integralRawYieldMCP<<endl; cout<<"integralRawYieldMCNP: "<<integralRawYieldMCNP<<endl; hD0DcaMCPSignal = hD0DcaMCPSignal0; hD0DcaMCNPSignal = hD0DcaMCNPSignal0; divideBinWidth(hD0DcaData0); divideBinWidth(hD0DcaSideband); setColorTitleLabel(hD0DcaData0, 1); hD0DcaData0->GetXaxis()->SetRangeUser(0,0.07); hD0DcaData0->GetYaxis()->SetTitle("counts per cm"); TH1D* hD0DcaSideband0 = (TH1D*)hD0DcaSideband->Clone("hD0DcaSideband0"); hD0DcaSideband->Scale(scaleSideBandBackground); TH1D* hD0DcaDataSubSideBand = (TH1D*)hD0DcaData0->Clone("hD0DcaDataSubSideBand"); hD0DcaDataSubSideBand->Add(hD0DcaSideband,-1); hD0DcaDataSubSideBand->Scale(scaleSideBandMethodSignal); hD0DcaData0->SetMarkerSize(0.6); hD0DcaData0->Draw(); hD0DcaSideband->Draw("hsame"); hD0DcaSideband0->SetLineStyle(2); hD0DcaSideband0->Draw("hsame"); TLegend* leg1 = new TLegend(0.44,0.6,0.90,0.76,NULL,"brNDC"); leg1->SetBorderSize(0); leg1->SetTextSize(0.06); leg1->SetTextFont(42); leg1->SetFillStyle(0); leg1->AddEntry(hD0DcaData0,"D^{0} candidate","pl"); leg1->AddEntry(hD0DcaSideband,"side band","l"); leg1->AddEntry(hD0DcaSideband0,"side band unscaled","l"); leg1->Draw("same"); texCms->Draw(); texCol->Draw(); texPtY->Draw(); c2->SaveAs(Form("plots/PbPb_%.0f_%.0f_sideBand.pdf",ptLow,ptHigh)); c2->cd(1); hMMCSignal->Draw(); texCms->Draw(); texCol->Draw(); texPt->Draw(); texY->Draw(); c2->cd(2); gPad->SetLogy(0); hMMCSwapped->Draw(); texCms->Draw(); texCol->Draw(); texPt->Draw(); texY->Draw(); c2->SaveAs(Form("plots/PbPb_%.0f_%.0f_McInvMassFit.pdf",ptLow,ptHigh)); c15->cd(1); fitMass(hMData, hMMCSignal, hMMCSwapped); texPt->Draw(); texY->Draw(); TH1D* hD0DcaDataFit = new TH1D("hD0DcaDataFit", ";D^{0} DCA (cm);dN / d(D^{0} DCA) (cm^{-1})", nBinY, binsY); for(int j=1; j<=14; j++) { c15->cd(j+1); hPtMD0Dca->GetZaxis()->SetRange(j,j); float D0DcaLow = hPtMD0Dca->GetZaxis()->GetBinLowEdge(j); float D0DcaHigh = hPtMD0Dca->GetZaxis()->GetBinUpEdge(j); TH1D* hMData_D0Dca = (TH1D*)hPtMD0Dca->Project3D("y")->Clone(Form("hM_pt_%1.1f_%1.1f_D0Dca_%1.4f_%1.4f", ptLow, ptHigh, D0DcaLow, D0DcaHigh)); setColorTitleLabel(hMData_D0Dca); fMass = fitMass(hMData_D0Dca, hMMCSignal, hMMCSwapped); float yield = fMass->GetParameter(0)*fMass->GetParameter(7)/hMData_D0Dca->GetBinWidth(1); float yieldError = fMass->GetParError(0)*fMass->GetParameter(7)/hMData_D0Dca->GetBinWidth(1); hD0DcaDataFit->SetBinContent(j, yield); hD0DcaDataFit->SetBinError(j, yieldError); TLatex* texD0Dca = new TLatex(0.18,0.82,Form("D^{0} DCA: %1.4f - %1.4f",D0DcaLow,D0DcaHigh)); texD0Dca->SetNDC(); texD0Dca->SetTextFont(42); texD0Dca->SetTextSize(0.06); texD0Dca->SetLineWidth(2); texD0Dca->Draw(); TLatex* texYield = new TLatex(0.18,0.74,Form("D^{0} yield: %1.0f #pm %1.0f",yield,yieldError)); texYield->SetNDC(); texYield->SetTextFont(42); texYield->SetTextSize(0.06); texYield->SetLineWidth(2); texYield->Draw(); } c15->SaveAs(Form("plots/PbPb_%.0f_%.0f_invMassFit.pdf",ptLow,ptHigh)); divideBinWidth(hD0DcaDataFit); c4->cd(1); gPad->SetLogy(); normalize(hD0DcaMCPSignal); setColorTitleLabel(hD0DcaMCPSignal, 2); hD0DcaMCPSignal->GetXaxis()->SetRangeUser(0,0.07); normalize(hD0DcaMCNPSignal); setColorTitleLabel(hD0DcaMCNPSignal, 4); hD0DcaMCNPSignal->GetXaxis()->SetRangeUser(0,0.07); hD0DcaMCNPSignal->GetYaxis()->SetTitle("dN / d(D^{0} DCA) (cm^{-1})"); hD0DcaMCNPSignal->GetXaxis()->SetTitle("D^{0} DCA (cm)"); hD0DcaMCNPSignal->SetMaximum(hD0DcaMCPSignal->GetMaximum()*3.); hD0DcaMCNPSignal->Draw(""); hD0DcaMCPSignal->Draw("same"); TLegend* leg2 = new TLegend(0.54,0.72,0.90,0.88,NULL,"brNDC"); leg2->SetBorderSize(0); leg2->SetTextSize(0.06); leg2->SetTextFont(42); leg2->SetFillStyle(0); leg2->AddEntry(hD0DcaMCPSignal,"MC Prompt D^{0}","pl"); leg2->AddEntry(hD0DcaMCNPSignal,"MC Non-prompt D^{0}","pl"); leg2->Draw("same"); c4->cd(2); gPad->SetLogy(); TH1D* hD0DcaData = hD0DcaDataFit; if(pts[i-1]>20) hD0DcaData = hD0DcaDataSubSideBand; setColorTitleLabel(hD0DcaData, 1); double integralTotalYield = hD0DcaData->Integral(1,hD0DcaData->GetXaxis()->GetNbins(),"width"); cout<<"integralTotalYield: "<<integralTotalYield<<endl; TF1* fMix = new TF1("fMix",&funMix, 0., 0.5, 2); fMix->SetParameters(0.5*integralTotalYield,0.5*integralTotalYield); fMix->SetParLimits(0,0,2*integralTotalYield); fMix->SetParLimits(1,0,2*integralTotalYield); fMix->SetLineColor(2); fMix->SetFillColor(kRed-9); fMix->SetFillStyle(1001); float fitRangeL = 0; float fitRangeH = 0.08; hD0DcaData->GetXaxis()->SetRangeUser(0,0.07); hD0DcaData->Draw(); int fitStatus = 1; TFitResultPtr fitResult; double fitPrecision = 1.e-6; while(fitStatus) { TFitter::SetPrecision(fitPrecision); fMix->SetParameters(0.5*integralTotalYield,0.5*integralTotalYield); fMix->SetParError(0,0.1*integralTotalYield); fMix->SetParError(1,0.1*integralTotalYield); fitResult = hD0DcaData->Fit("fMix","E SNQ0", "", fitRangeL, fitRangeH); fitStatus = fitResult->Status(); cout<<"fit precision: "<<TFitter::GetPrecision()<<" status: "<<fitStatus<<endl; if(fitStatus) fitPrecision *= 10; } cout<<"============== do main fit ============"<<endl; fMix->SetParameters(integralTotalYield,0.9); fMix->SetParError(0,0.1*integralTotalYield); fMix->SetParError(1,0.1); fMix->SetNpx(10000); fitResult = hD0DcaData->Fit("fMix","E S0", "", fitRangeL, fitRangeH); hD0DcaData->GetFunction("fMix")->Draw("flsame"); fitStatus = fitResult->Status(); cout<<"fit precision: "<<TFitter::GetPrecision()<<" status: "<<fitStatus<<endl; TF1* fNP = new TF1("fNP",&funNonPrompt, 0., 0.5, 2); fNP->SetParameters(fMix->GetParameter(0),fMix->GetParameter(1)); fNP->SetRange(fitRangeL,fitRangeH); fNP->SetLineColor(4); fNP->SetFillStyle(1001); fNP->SetFillColor(kBlue-9); fNP->SetNpx(10000); fNP->Draw("same"); hD0DcaData->Draw("same"); promptDYield[i-1] = fMix->GetParameter(0); promptDYieldErrorDataOnly[i-1] = fMix->GetParError(0); bToDYield[i-1] = fMix->GetParameter(1); bToDYieldErrorDataOnly[i-1] = fMix->GetParError(1); totalYield[i-1] = promptDYield[i-1]+bToDYield[i-1]; promptFraction[i-1] = promptDYield[i-1]/totalYield[i-1]; cout<<"chi2 / NDF: "<<fitResult->Chi2()<<" / "<<fitResult->Ndf()<<endl; texCms->Draw(); texCol->Draw(); texPtY->Draw(); TLatex* texPrompt = new TLatex(0.4,0.73,Form("Prompt D^{0} yield : %.0f #pm %.0f",fMix->GetParameter(0),fMix->GetParError(0))); texPrompt->SetNDC(); texPrompt->SetTextFont(42); texPrompt->SetTextSize(0.06); texPrompt->SetLineWidth(2); texPrompt->Draw(); TLatex* texNonPrompt = new TLatex(0.4,0.65,Form("B to D^{0} yield : %.0f #pm %.0f",fMix->GetParameter(1),fMix->GetParError(1))); texNonPrompt->SetNDC(); texNonPrompt->SetTextFont(42); texNonPrompt->SetTextSize(0.06); texNonPrompt->SetLineWidth(2); texNonPrompt->Draw(); TLegend* leg4 = new TLegend(0.56,0.38,0.90,0.62); leg4->SetBorderSize(0); leg4->SetTextSize(0.06); leg4->SetTextFont(42); leg4->SetFillStyle(0); leg4->AddEntry(hD0DcaData,"Data","pl"); leg4->AddEntry(fMix,"Prompt D^{0}","f"); leg4->AddEntry(fNP,"B to D^{0}","f"); leg4->Draw("same"); //smear MC smaple with the error, to simulate the MC statistic error effect. c4->cd(3); hD0DcaMCPSignal = (TH1D*)hD0DcaMCPSignal0->Clone("hMCPSignal"); hD0DcaMCNPSignal = (TH1D*)hD0DcaMCNPSignal0->Clone("hMCNPSignal"); TH1D* hNPYield = new TH1D("hNPYield", ";hNPYield", 100, 0., 1.1*(fMix->GetParameter(0)+fMix->GetParameter(1))); TH1D* hPYield = new TH1D("hPYield", ";hPYield", 100, 0., 1.1*(fMix->GetParameter(0)+fMix->GetParameter(1))); setColorTitleLabel(hNPYield, 1); setColorTitleLabel(hPYield, 1); int nSmear = 1000; for(int j=0; j<nSmear; j++) { RandomSmear(hD0DcaMCPSignal0, hD0DcaMCPSignal); RandomSmear(hD0DcaMCNPSignal0, hD0DcaMCNPSignal); fMix->SetParameters(0.5*integralTotalYield,0.5*integralTotalYield); fMix->SetParError(0,0.1*integralTotalYield); fMix->SetParError(1,0.1*integralTotalYield); hD0DcaData->Fit("fMix","E QN0"); hPYield->Fill(fMix->GetParameter(0)); hNPYield->Fill(fMix->GetParameter(1)); } hPYield->GetXaxis()->SetTitle("prompt D^{0} yield"); hPYield->GetYaxis()->SetTitle("counts"); hPYield->GetYaxis()->SetRangeUser(0.5, 1.4*hPYield->GetMaximum()); hPYield->SetMarkerStyle(20); hPYield->SetStats(0); hPYield->Draw("e"); hPYield->Fit("gaus"); TLatex* texGaussMeanSigmaP = new TLatex(0.27,0.83,Form("#mu: %.0f #sigma: %.0f",hPYield->GetFunction("gaus")->GetParameter(1),hPYield->GetFunction("gaus")->GetParameter(2))); texGaussMeanSigmaP->SetNDC(); texGaussMeanSigmaP->SetTextFont(42); texGaussMeanSigmaP->SetTextSize(0.06); texGaussMeanSigmaP->SetLineWidth(2); texGaussMeanSigmaP->Draw(); float promptYieldErrorMc = hPYield->GetFunction("gaus")->GetParameter(2); promptDYieldError[i-1] = sqrt(pow(promptDYieldErrorDataOnly[i-1],2)+pow(promptYieldErrorMc,2)); c4->cd(4); hNPYield->GetXaxis()->SetTitle("B to D^{0} yield"); hNPYield->GetYaxis()->SetTitle("counts"); hNPYield->GetYaxis()->SetRangeUser(0.5, 1.4*hNPYield->GetMaximum()); hNPYield->SetMarkerStyle(20); hNPYield->SetStats(0); hNPYield->Draw("e"); hNPYield->Fit("gaus"); TLatex* texGaussMeanSigmaNP = new TLatex(0.27,0.83,Form("#mu: %.0f #sigma: %.0f",hNPYield->GetFunction("gaus")->GetParameter(1),hNPYield->GetFunction("gaus")->GetParameter(2))); texGaussMeanSigmaNP->SetNDC(); texGaussMeanSigmaNP->SetTextFont(42); texGaussMeanSigmaNP->SetTextSize(0.06); texGaussMeanSigmaNP->SetLineWidth(2); texGaussMeanSigmaNP->Draw(); float bToDYieldErrorMc = hNPYield->GetFunction("gaus")->GetParameter(2); bToDYieldError[i-1] = sqrt(pow(bToDYieldErrorDataOnly[i-1],2)+pow(bToDYieldErrorMc,2)); cout<<"prompt D yield: "<<promptDYield[i-1]<<" +- "<<promptDYieldError[i-1]<<" (+- "<<promptDYieldErrorDataOnly[i-1]<<" +- "<<promptYieldErrorMc<<" )"<<endl; cout<<"B to D yield: "<<bToDYield[i-1]<<" +- "<<bToDYieldError[i-1]<<" (+- "<<bToDYieldErrorDataOnly[i-1]<<" +- "<<bToDYieldErrorMc<<" )"<<endl; cout<<"total yield: "<<totalYield[i-1]<<endl; cout<<"prompt fraction: "<<promptFraction[i-1]<<endl; float promptMCScale = promptDYield[i-1]/integralRawYieldMCP; float nonPromptMCScale = bToDYield[i-1]/integralRawYieldMCNP; cout<<"promptMCScale: "<<promptMCScale<<endl; cout<<"nonPromptMCScale: "<<nonPromptMCScale<<endl; //restore original unsmeared histograms before saving plots delete hD0DcaMCPSignal; delete hD0DcaMCNPSignal; hD0DcaMCPSignal = hD0DcaMCPSignal0; hD0DcaMCNPSignal = hD0DcaMCNPSignal0; hD0DcaData->Fit("fMix","E QN0"); c4->SaveAs(Form("plots/PbPb_%.0f_%.0f_fit.pdf",ptLow,ptHigh)); c1->cd(); TH1D* hD0DcaDataOverFit = (TH1D*)hD0DcaData->Clone("hD0DcaDataOverFit"); hD0DcaDataOverFit->Divide(fMix); hD0DcaDataOverFit->GetYaxis()->SetTitle("data / fit"); hD0DcaDataOverFit->GetYaxis()->SetRangeUser(0,5); hD0DcaDataOverFit->GetXaxis()->SetRangeUser(0,0.07); setColorTitleLabel(hD0DcaDataOverFit, 1); hD0DcaDataOverFit->Draw("e"); TF1* fLine1 = new TF1("fLine1", "1", 0,1); fLine1->Draw("same"); hD0DcaDataOverFit->Draw("esame"); c1->SaveAs(Form("plots/dataOverFit_%.0f_%.0f_fit.pdf",ptLow,ptHigh)); delete hD0DcaMCPSignal; delete hD0DcaMCNPSignal; } // end for i ptbins c1->cd(); TH1D* hStupidJie = new TH1D("hStupidJie", "", 100, 0, 100); hStupidJie->GetYaxis()->SetRangeUser(0,1); hStupidJie->GetXaxis()->SetTitle("p_{T} (GeV/c)"); hStupidJie->GetYaxis()->SetTitle("prompt fraction"); hStupidJie->SetStats(0); hStupidJie->Draw(); TGraph* grFraction = new TGraph(nPtBins, pts, promptFraction); grFraction->SetName("grPromptFraction"); grFraction->SetMarkerStyle(20); grFraction->Draw("psame"); c1->SaveAs("promptFraction.pdf"); c1->SetLogy(); TH1D* hBtoDRawYield = new TH1D("hBtoDRawYield", ";p_{T} (GeV/c);dN/dp_{T} ((GeV/c)^{-1})", nPtBins, ptBins); for(int i=1; i<=nPtBins; i++) { if(bToDYield[i-1] <= 0) continue; hBtoDRawYield->SetBinContent(i, bToDYield[i-1]); hBtoDRawYield->SetBinError(i, bToDYieldError[i-1]); } divideBinWidth(hBtoDRawYield); setColorTitleLabel(hBtoDRawYield, 1); c1->SetBottomMargin(0.14); hBtoDRawYield->Draw("p"); c1->SaveAs("BtoD.pdf"); TH1D* hPromptDRawYield = new TH1D("hPromptDRawYield", ";p_{T} (GeV/c);dN/dp_{T} ((GeV/c)^{-1})", nPtBins, ptBins); for(int i=1; i<=nPtBins; i++) { if(promptDYield[i-1] <= 0) continue; hPromptDRawYield->SetBinContent(i, promptDYield[i-1]); hPromptDRawYield->SetBinError(i, promptDYieldError[i-1]); } divideBinWidth(hPromptDRawYield); setColorTitleLabel(hPromptDRawYield, 1); c1->SetBottomMargin(0.14); hPromptDRawYield->Draw("p"); c1->SaveAs("promptD.pdf"); TH1D* hTotalDYieldInvMassFit = new TH1D("hTotalDYieldInvMassFit", ";p_{T} (GeV/c);dN/dp_{T} ((GeV/c)^{-1})", nPtBins, ptBins); for(int i=1; i<=nPtBins; i++) { if(totalYieldInvMassFit[i-1] <= 0) continue; hTotalDYieldInvMassFit->SetBinContent(i, totalYieldInvMassFit[i-1]); hTotalDYieldInvMassFit->SetBinError(i, totalYieldInvMassFitError[i-1]); } divideBinWidth(hTotalDYieldInvMassFit); setColorTitleLabel(hTotalDYieldInvMassFit, 1); hTotalDYieldInvMassFit->Draw("p"); c1->SaveAs("totalDInvMassFit.pdf"); TFile* fOut = new TFile("bFeedDownResult.root", "recreate"); fOut->WriteTObject(grFraction); fOut->WriteTObject(hBtoDRawYield); fOut->WriteTObject(hPromptDRawYield); fOut->WriteTObject(hTotalDYieldInvMassFit); fOut->Write(); fOut->Close(); }