当前位置: 首页>>代码示例>>C++>>正文


C++ TH1D类代码示例

本文整理汇总了C++中TH1D的典型用法代码示例。如果您正苦于以下问题:C++ TH1D类的具体用法?C++ TH1D怎么用?C++ TH1D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TH1D类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MeasureSmearing

void MeasureSmearing(TTree *Full, TTree *Fast,TString tag="",bool useElectrons=false) {
  //TChain *Full = loadList("/home/amott/HggApp/Hgg_53X/Caltech/Reduced/GluGluToHToGG_M-125_8TeV-powheg-pythia6_Summer12_DR53X-PU_S10_STAR53_V7A-v1.list","HggReduce");
  //TChain *Fast = loadList("/home/amott/HggApp/Hgg_53X/Caltech/Reduced/SMS-TChiHH_2b2g_2J_mChargino-130to500_mLSP-1to370_TuneZ2star_8TeV-madgraph-tauola__Summer12-START53_V19_FSIM-v1.list","HggReduce");
  
  Full->SetBranchStatus("*",0);
  if(useElectrons) Full->SetBranchStatus("Electrons.*",1);
  else Full->SetBranchStatus("Photons.*",1);

  Fast->SetBranchStatus("*",0);
  if(useElectrons) Fast->SetBranchStatus("Electrons.*",1);
  else Fast->SetBranchStatus("Photons.*",1);


  TString var = "Photons.correctedEnergy/Photons.genMatch.energy-1";
  if(useElectrons) var = "Electrons.correctedEnergy/Electrons.genMatch.energy-1";

  TString epVar = "Electrons.EOverP";
//   TString var_pho1 = "(pho1_pt*cosh(pho1_eta)-pho1_energyGen)/pho1_energyGen";
//   TString var_pho2 = "(pho2_pt*cosh(pho2_eta)-pho2_energyGen)/pho2_energyGen";

  TString FSIM_SCALE = "( (abs(Photons.SC.eta)<1.56)*1 + (abs(Photons.SC.eta)>=1.56 && abs(Photons.SC.eta)<2)*( (Photons.SC.r9>0.94)*1.0276 + (Photons.SC.r9<=0.94)*1.0195) + (abs(Photons.SC.eta)>=2. && abs(Photons.SC.eta)<2.5)*( (Photons.SC.r9>0.94)*1.0216 + (Photons.SC.r9<=0.94)*1.0330) )*";

  const int nCats=8;

   TString cats[nCats] = {
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)<1 && Photons.SC.r9>0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=1 && abs(Photons.SC.eta)<1.4442 && Photons.SC.r9>0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=1.56 && abs(Photons.SC.eta)<2 && Photons.SC.r9>0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=2 && abs(Photons.SC.eta)<2.5 && Photons.SC.r9>0.94",

     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)<1 && Photons.SC.r9<0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=1 && abs(Photons.SC.eta)<1.4442 && Photons.SC.r9<0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=1.56 && abs(Photons.SC.eta)<2 && Photons.SC.r9<0.94",
     "Photons.genMatch.index!=-1 && Photons.correctedEnergy/cosh(Photons.eta)>25 && abs(Photons.SC.eta)>=2 && abs(Photons.SC.eta)<2.5 && Photons.SC.r9<0.94",
   };

   if(useElectrons) {
     FSIM_SCALE.ReplaceAll("Photons","Electrons");
     for(int i=0;i<nCats;i++) {
       cats[i].ReplaceAll("Photons","Electrons");
       std::cout << cats[i] << std::endl;
     }
   }

//   TString cats_pho1[nCats] = {
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=0.00 && abs(pho1_eta)<1.000 && pho1_r9 > 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=1.00 && abs(pho1_eta)<1.442 && pho1_r9 > 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=1.56 && abs(pho1_eta)<2.000 && pho1_r9 > 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=2.00 && abs(pho1_eta)<2.500 && pho1_r9 > 0.94",

//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=0.00 && abs(pho1_eta)<1.000 && pho1_r9 <= 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=1.00 && abs(pho1_eta)<1.442 && pho1_r9 <= 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=1.56 && abs(pho1_eta)<2.000 && pho1_r9 <= 0.94",
//     "pho1_genMatch==1 && pho1_pt>25 && abs(pho1_eta)>=2.00 && abs(pho1_eta)<2.500 && pho1_r9 <= 0.94",
//   };

//   TString cats_pho2[nCats] = {
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=0.00 && abs(pho2_eta)<1.000 && pho2_r9 > 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=1.00 && abs(pho2_eta)<1.442 && pho2_r9 > 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=1.56 && abs(pho2_eta)<2.000 && pho2_r9 > 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=2.00 && abs(pho2_eta)<2.500 && pho2_r9 > 0.94",

//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=0.00 && abs(pho2_eta)<1.000 && pho2_r9 <= 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=1.00 && abs(pho2_eta)<1.442 && pho2_r9 <= 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=1.56 && abs(pho2_eta)<2.000 && pho2_r9 <= 0.94",
//     "pho2_genMatch==1 && pho2_pt>25 && abs(pho2_eta)>=2.00 && abs(pho2_eta)<2.500 && pho2_r9 <= 0.94",
//   };

  TString catNames[nCats] = {
    "EBLow_Gold",
    "EBHigh_Gold",
    "EELow_Gold",
    "EEHigh_Gold",
    "EBLow_Bad",
    "EBHigh_Bad",
    "EELow_Bad",
    "EEHigh_Bad",
  };

  TCanvas cv;
  TH1D pt_full("pt_full","",80,0,400);
  pt_full.SetXTitle("p_{T} [GeV]");
  pt_full.SetYTitle("Events / 5 GeV");

  //Full->Project("pt_full","Photons.energy/cosh(Photons.eta)","Photons.genMatch.index != -1");

  TH1D pt_fast("pt_fast","",80,0,400);
  pt_fast.SetXTitle("p_{T} [GeV]");
  pt_fast.SetYTitle("Events / 5 GeV");

  //Fast->Project("pt_fast","Photons.energy/cosh(Photons.eta)","Photons.genMatch.index != -1");

  TH1D* ratio = (TH1D*)pt_fast.Clone("pt_ratio");
  ratio->Divide(&pt_full);



  TH1D h("h","",100,-0.2,0.2);
  TH1D h_p2("h_p2","",100,-0.2,0.2);
  h.SetXTitle("(E_{reco}-E_{MC})/E_{MC}");
//.........这里部分代码省略.........
开发者ID:CaltechHggApp,项目名称:HggApp,代码行数:101,代码来源:MeasureSmearing_Reduced.C

示例2: savePlots2

void savePlots2(const std::string& canvasName, TH1D& dataPlot, TH1D& fitPlot,
		TH1D& signalPlot, TH1D& bkgPlot) {
  TCanvas c(canvasName.c_str(), canvasName.c_str()) ;
  TPad mainPad("mainPad", "mainPad", 0., 0.2, 1., 1.) ;
  mainPad.Draw() ;
  TPad pullPad("pullPad", "pullPad", 0., 0., 1., 0.2) ;
  pullPad.Draw() ;

  mainPad.cd() ;
  dataPlot.SetStats(true) ;
  //dataPlot.SetOptStat(111111111);
  dataPlot.SetLineWidth(2) ;
  dataPlot.Draw() ;
  fitPlot.SetLineWidth(2) ;
  fitPlot.SetLineColor(kBlue) ;
  fitPlot.Draw("same") ;
  signalPlot.SetLineWidth(2) ;
  signalPlot.SetLineColor(kGreen) ;
  signalPlot.Draw("same") ;
  bkgPlot.SetLineColor(kRed) ;
  bkgPlot.SetLineWidth(2) ;
  bkgPlot.Draw("same") ;

  TLegend leg(0.6, 0.7, 0.9, 0.9) ;
  leg.AddEntry(&dataPlot, "Data") ;
  leg.AddEntry(&fitPlot, "Fit") ;
  leg.AddEntry(&signalPlot, "Signal") ;
  leg.AddEntry(&bkgPlot, "Background") ;
  leg.SetFillStyle(0) ;
  leg.SetBorderSize(0) ;
  leg.Draw() ;

  pullPad.cd() ;
  pullPad.SetGridy() ;
  TH1D* h_residuals(NULL), *h_pulls(NULL), *h_pullDistribution(NULL) ;
  FitterTools::makePullPlot(dataPlot, fitPlot, h_residuals, h_pulls, h_pullDistribution) ;
  h_pulls->Draw() ;

  c.Write() ;

  h_pulls->Write() ;
  delete h_pulls ;
  h_residuals->Write() ;
  delete h_residuals ;
  h_pullDistribution->Write() ;
  delete h_pullDistribution ;

  dataPlot.Write() ;
  fitPlot.Write() ;
}
开发者ID:MannyMoo,项目名称:baryon-lifetimes-run-I,代码行数:50,代码来源:Lambda_C_Mass_Fitter.C

示例3: TCanvas

// *************************************** //
// this is a function that takes a set of  //
// histograms and draws them on a canvas   //
// in a stack, returning the canvas.       //
// It also plots the signal as a dashed    //
// line and the data with a ratio at the   //
// the bottom of data/allBackgrounds       //
// *************************************** //
TCanvas* drawPlots::plotAll(std::vector<TH1D*> histos, std::vector<std::string> names, std::string axisName, TH1D* signal, TH1D* data, TH1D* errDown, TH1D* errUp, bool isSignalRegion, bool doLogAxis){
         
   const unsigned int MAINPLOT_WIDTH  = 800;
   const unsigned int MAINPLOT_HEIGHT = 500;
   const unsigned int RATIOPLOT_HEIGHT = 125;
   const unsigned int OFFSET = 10;
   
  //LUKE: Title offset and title size are proportional in 
  //root, so you have to change them together, 
  //this makes me a sad panda 
   const double RATIOPLOT_YAXIS_TITLE_OFFSET = 0.4;
   const double RATIOPLOT_YAXIS_TITLE_SIZE   = 0.14;
   const double RATIOPLOT_YAXIS_TICK_LENGTH  = 0.01;
   const double RATIOPLOT_YAXIS_LABEL_SIZE   = 0.15;
  
   const double RATIOPLOT_XAXIS_TITLE_OFFSET = 0.9;
   const double RATIOPLOT_XAXIS_TITLE_SIZE   = 0.2;
   const double RATIOPLOT_XAXIS_TICK_LENGTH  = 0.05;
   const double RATIOPLOT_XAXIS_LABEL_SIZE   = 0.2;
   
   const double CANVAS_HEIGHT = MAINPLOT_HEIGHT+RATIOPLOT_HEIGHT+OFFSET;
   
   TCanvas* canvas = new TCanvas("canvas","canvas",0,0,MAINPLOT_WIDTH,CANVAS_HEIGHT);
   
   canvas->SetMargin(0.,0.,0.,0.);
   canvas->Clear();
   canvas->cd();
   
   // create main pad
   const double mainPad_ylow  = (CANVAS_HEIGHT - MAINPLOT_HEIGHT)/CANVAS_HEIGHT;
   const double mainPad_yhigh = 1.;
  
   const double pad_margin_left = 0.15;
   const double pad_margin_right  = 0.05;
   
   double main_y_max = -99;
   double main_y_min = -99;
   double main_x_max = -99;
   double main_x_min = -99;
   for(int a=0; a<histos.size(); a++){
     if(histos[a]){
       if(histos[a]->GetEntries()> 0.){
	 GetAxisLimits(histos[a], main_x_min, main_x_max, main_y_min, main_y_max);
       }
     }
   }
   
   if(data){
     int maxBinData = data->GetMaximumBin();
     double dataYmax = data->GetBinContent(maxBinData);
     if(dataYmax > main_y_max) main_y_max = dataYmax;
   }

   // create main pad
   TPad* mainPad = new TPad("main","main",0.,mainPad_ylow,1.,mainPad_yhigh);
   mainPad->SetMargin(pad_margin_left,pad_margin_right,0.,.05); // left, right, bottom, top
   mainPad->Draw();
   mainPad->cd();

   SetAtlasStyle();

   if(doLogAxis)mainPad->SetLogy();

   // clone signal or data because one should exist for each plot
   TH1D* allBackgrounds;
   bool gotSomething=false;
   if(signal)
     allBackgrounds = (TH1D*)signal->Clone("all_backgrounds");
   else if(data)
     allBackgrounds = (TH1D*)data->Clone("all_backgrounds");
   else{
     for(int b=0; b<histos.size(); b++){
       if(histos[b] && !gotSomething){
	 allBackgrounds = (TH1D*)histos[b]->Clone("all_backgrounds");
	 gotSomething=true;
       }
     }  
   }

   // set all bins to zero so that you can add all histograms to it
   for(int i=0; i<=allBackgrounds->GetNbinsX()+1; i++)
      allBackgrounds->SetBinContent(i,0);
   
   THStack* Stack = new THStack();
   std::string title = std::string(";") + axisName + ";Events";
   Stack->SetTitle(title.c_str());
   
   for(int b=0; b<histos.size(); b++){
     if(histos[b]){
       if(histos[b]->GetEntries() > 0.){
	 histos[b]->SetLineColor(1);
	 histos[b]->SetFillColor(tools::setColor(names[b]));
//.........这里部分代码省略.........
开发者ID:clare-b,项目名称:VLQ,代码行数:101,代码来源:drawPlots.cpp

示例4: CalcEfficHadrons

TEfficiency* CalcEfficHadrons(const char* fileName, Bool_t makeDraw=kFALSE)
{
	// open the input file
	TFile *file = new TFile(fileName);
	
	// ********************************************
	// parameters to check before running the macro
	// ********************************************

	const Int_t NHISTS = 4; // Check the number of histograms for different particle species
	const Int_t NOUTPUTS = 3;
	const Int_t NHISTOUT[NOUTPUTS] = {1,1,1};
	const Int_t IHISTOUT[NOUTPUTS][NHISTS] = {{0,-1,-1,-1},{1,-1,-1,-1},{2,-1,-1,-1}};
	const Float_t CUT_RES = 0.02;
	
	Int_t style[NOUTPUTS] = {20,21,22};
	Int_t color[NOUTPUTS] = {1,2,4};
		
	const Int_t fgNumOfPtBins = 111; // Check the number of eta bins in the histograms
	const Int_t fgNumOfEtaBins = 16; // Check the number of E bins in the histograms
	const Int_t fgNumOfRBins = 45;
	
	Double_t fgPtAxis[117]= {0.0,0.01,0.02,0.03,0.04, 0.05, 0.06,0.07,0.08,0.09, 0.10,0.11, .12,0.13, .14,0.15, .16,0.17, .18,0.19,
		0.2, .22, .24, .26, .28, 0.30, 0.32, .34, .36, .38, 0.40, .42, .44, .46, .48,
		0.5, .52, .54, .56, .58, 0.60, 0.62, .64, .66, .68, 0.70, .72, .74, .76, .78,
		.80, .82, .84, .86, .88, 0.90, 0.92, .94, .96, .98, 1.00,1.05, 1.1,1.15, 1.2,
		1.25, 1.3,1.35,1.40,1.45, 1.50, 1.55, 1.6,1.65, 1.7, 1.75, 1.8,1.85, 1.9,1.95,
		2.0, 2.2, 2.4, 2.6, 2.8, 3.00, 3.20, 3.4, 3.6, 3.8, 4.00, 4.2, 4.4, 4.6, 4.8,
		5.0, 5.5, 6.0, 6.5, 7.0, 7.50, 8.00, 8.5, 9.0, 9.5, 10.0,12.0,14.0,16.0,18.0,
		20.0,25.0,30.0,35.0,40.0, 45.0, 50.0}; 
	
	// declare histograms and graphs
	TH2F *histNum[NHISTS];
	TH2F *histDen[NHISTS];
	TGraphErrors *graph[NOUTPUTS];
	TH1D* projYNum;
	TEfficiency *effic[NOUTPUTS];
	char efficName[50];
	
	// retrieve the input list of histogram. Check the TList name in the input file.
	TList *list = (TList*) file->Get("out1");
	
	// retrieve the histograms in the list. Check the name of the histograms
	histNum[0] = (TH2F*)list->FindObject("fHistPionRec_ResPt_EmcalMC");
	histNum[1] = (TH2F*)list->FindObject("fHistKaonRec_ResPt_EmcalMC");
	histNum[2] = (TH2F*)list->FindObject("fHistProtonRec_ResPt_EmcalMC");
	histNum[3] = (TH2F*)list->FindObject("fHistMuonRec_ResPt_EmcalMC");
	
	// retrieve the histograms in the list. Check the name of the histograms
	histDen[0] = (TH2F*)list->FindObject("fHistPionAcc_EtaPt_EmcalMC");
	histDen[1] = (TH2F*)list->FindObject("fHistKaonAcc_EtaPt_EmcalMC");
	histDen[2] = (TH2F*)list->FindObject("fHistProtonAcc_EtaPt_EmcalMC");
	histDen[3] = (TH2F*)list->FindObject("fHistMuonAcc_EtaPt_EmcalMC");
	
	// ********************************************

	Float_t x[fgNumOfPtBins]={0}, ex[fgNumOfPtBins]={0};
	Float_t y[fgNumOfPtBins]={0}, ey[fgNumOfPtBins]={0};
	Float_t num=0, den=0;
	//Int_t num=0, den=0;
	Float_t Res=0;
	
	// loop over different desired outputs
	for (int iOut=0; iOut<NOUTPUTS; iOut++)
	{
		sprintf(efficName,"effic_%d",iOut);
		effic[iOut] = new TEfficiency(efficName,efficName,fgNumOfPtBins,fgPtAxis);

		// loop over E bins
		for (int ix=0; ix<fgNumOfPtBins; ix++)
		{
			// initialize ET variables for a new particle species
			x[ix]=histNum[0]->GetXaxis()->GetBinCenter(ix+1);
			y[ix]=0;
			ex[ix]=0;
			ey[ix]=0;
			num = 0;
			den = 0;
			
			// loop over eta bins
			for (int iy=0; iy<fgNumOfEtaBins; iy++)
			{
				for (int iHist=0; iHist<NHISTOUT[iOut]; iHist++)
				{
					den += histDen[IHISTOUT[iOut][iHist]]->GetBinContent(ix+1,iy+1); // sum over all E bins in order to get total ET
				}
			}
			
			// loop over residual bins
			for (int iHist=0; iHist<NHISTOUT[iOut]; iHist++)
			{
				projYNum = histNum[IHISTOUT[iOut][iHist]]->ProjectionY();
				for (int iy=0; iy<fgNumOfRBins; iy++)
				{
					Res = projYNum->GetBinCenter(iy+1);
					if (Res<CUT_RES)
						num += histNum[IHISTOUT[iOut][iHist]]->GetBinContent(ix+1,iy+1); // sum over all E bins in order to get total ET
				}
			}
			
//.........这里部分代码省略.........
开发者ID:ktf,项目名称:AliPhysics,代码行数:101,代码来源:CalcEfficHadrons.C

示例5: fitDVariable

void fitDVariable(TString variable="DsvpvDistance/DsvpvDisErr",TString variableplot="d_{xy}/#sigma(d_{xy})", TString inputdata="/data/wangj/MC2015/Dntuple/pp/ntD_pp_Dzero_kpi/ntD_EvtBase_20160203_Dfinder_20160201_pp_Pythia8_prompt_D0_dPt0tkPt0p5_pthatweight.root", TString inputmc="/data/wangj/MC2015/Dntuple/pp/ntD_pp_Dzero_kpi/ntD_EvtBase_20160203_Dfinder_20160201_pp_Pythia8_prompt_D0_dPt0tkPt0p5_pthatweight.root", TString trgselection="1",  TString cut="Dpt>20&&Dy>-1.&&Dy<1.&&Dtrk1highPurity&&Dtrk2highPurity&&Dtrk1Pt>2.0&&Dtrk2Pt>2.0&&(DsvpvDistance/DsvpvDisErr)>3&&(DlxyBS/DlxyBSErr)>1.5&&Dchi2cl>0.05&&Dalpha<0.12&&Dtrk1PtErr/Dtrk1Pt<0.1&&Dtrk2PtErr/Dtrk2Pt<0.1&&abs(Dtrk1Eta)<2.0&&abs(Dtrk2Eta)<2.0&&Dtrk1Algo>3&&Dtrk1Algo<8&&(Dtrk1PixelHit+Dtrk1StripHit)>=11", TString selmcgen="((GisSignal==1||GisSignal==2)&&(Gy>-1&&Gy<1))", int isMC=1, Double_t luminosity=26., int doweight=0, TString collsyst="PbPb", TString outputfile="mytest.root")
{
  collisionsystem=collsyst;
  seldata = Form("%s&&%s",trgselection.Data(),cut.Data());
  selmc = Form("%s",cut.Data());

  gStyle->SetTextSize(0.05);
  gStyle->SetTextFont(42);
  gStyle->SetPadRightMargin(0.043);
  gStyle->SetPadLeftMargin(0.18);
  gStyle->SetPadTopMargin(0.1);
  gStyle->SetPadBottomMargin(0.145);
  gStyle->SetTitleX(.0f);

  void clean0 (TH1D* h);
  TF1* fit (TString variable, TString variableplot, TTree* nt, TTree* ntMC, double ptmin, double ptmax, int isMC);

  if(!doweight) weight="1";
  TFile* inf = new TFile(inputdata.Data());
  TFile* infMC = new TFile(inputmc.Data());

  TTree* nt = (TTree*) inf->Get("ntDkpi");
  TTree* HltTree= (TTree*) inf->Get("ntHlt");
  HltTree->AddFriend(nt);
  nt->AddFriend(HltTree);
  TTree* ntHid = (TTree*) inf->Get("ntHi");
  nt->AddFriend(ntHid);
  
  TTree* ntMC = (TTree*)infMC->Get("ntDkpi");
  TTree* ntGen = (TTree*)infMC->Get("ntGen");
  TTree* ntHi = (TTree*)infMC->Get("ntHi");
  
  ntGen->AddFriend(ntMC);
  ntGen->AddFriend(ntHi);
  ntMC->AddFriend(ntGen);
  ntMC->AddFriend(ntHi);
  ntHi->AddFriend(ntMC);
  
  TH1D* hPt = new TH1D("hPt","",nBins,ptBins);
  TH1D* hPtRecoTruth = new TH1D("hPtRecoTruth","",nBins,ptBins);
  TH1D* hPtMC = new TH1D("hPtMC","",nBins,ptBins);
  TH1D* hPtGen = new TH1D("hPtGen","",nBins,ptBins);

  TH1D* hMean = new TH1D("hMean","",nBins,ptBins);                       
  TH1D* hSigmaGaus1 = new TH1D("hSigmaGaus1","",nBins,ptBins); 
  TH1D* hSigmaGaus2 = new TH1D("hSigmaGaus2","",nBins,ptBins); 
  TH1D* hRelMagnGaus1Gaus2 = new TH1D("hRelMagnGaus1Gaus2","",nBins,ptBins); 
  
  for(int i=0;i<nBins;i++)
    {
      TF1* f = fit(variable,variableplot,nt,ntMC,ptBins[i],ptBins[i+1],isMC);
      double yield = f->Integral(minhisto,maxhisto)/binwidthmass;
      double yieldErr = f->Integral(minhisto,maxhisto)/binwidthmass*f->GetParError(0)/f->GetParameter(0);
      hPt->SetBinContent(i+1,yield/(ptBins[i+1]-ptBins[i]));
      hPt->SetBinError(i+1,yieldErr/(ptBins[i+1]-ptBins[i]));
      hMean->SetBinContent(i+1,f->GetParameter(1));
      hMean->SetBinError(i+1,f->GetParError(1));
      hSigmaGaus1->SetBinContent(i+1,f->GetParameter(2));
      hSigmaGaus1->SetBinError(i+1,f->GetParError(2));
      hSigmaGaus2->SetBinContent(i+1,f->GetParameter(5));
      hSigmaGaus2->SetBinError(i+1,f->GetParError(5));
      hRelMagnGaus1Gaus2->SetBinContent(i+1,f->GetParameter(4));
      hRelMagnGaus1Gaus2->SetBinError(i+1,f->GetParError(4));
    }  

  ntMC->Project("hPtMC",variable.Data(),TCut(weight)*(TCut(selmc.Data())&&"(Dgen==23333)"));
  divideBinWidth(hPtMC);
  ntMC->Project("hPtRecoTruth",variable.Data(),TCut(selmc.Data())&&"(Dgen==23333)");
  divideBinWidth(hPtRecoTruth);
  ntGen->Project("hPtGen","Gpt",TCut(weight)*(TCut(selmcgen.Data())));
  divideBinWidth(hPtGen);

  TCanvas* cPt =  new TCanvas("cPt","",600,600);
  cPt->SetLogy();
  hPt->SetXTitle(Form("D^{0} %s",variable.Data()));
  hPt->SetYTitle("Uncorrected dN(D^{0})/dp_{T}");
  hPt->Sumw2();
  hPt->Draw();
  if(isMC)
    {
      hPtMC->Draw("same hist");
      TLegend* legPt = myLegend(0.55,0.80,0.90,0.94);
      legPt->AddEntry(hPt,"Signal extraction","pl");
      legPt->AddEntry(hPtMC,"Matched reco","lf");
      legPt->Draw("same");  
    }
  hPtMC->Sumw2();
  TH1D* hEff = (TH1D*)hPtMC->Clone("hEff");
  hEff->SetTitle(Form(";D^{0} %s",variable.Data()));
  hEff->Sumw2();
  hEff->Divide(hPtGen);
  TCanvas* cEff = new TCanvas("cEff","",600,600);
  hEff->Draw();
  
  TH1D* hPtCor = (TH1D*)hPt->Clone("hPtCor");
  hPtCor->SetTitle(Form(";D^{0} %s;Corrected dN(D^{0})/dp_{T}",variable.Data()));
  hPtCor->Divide(hEff);
  TCanvas* cPtCor=  new TCanvas("cCorResult","",600,600);
  cPtCor->SetLogy();
  hPtCor->Draw();
//.........这里部分代码省略.........
开发者ID:jiansunpurdue,项目名称:DntupleRunII,代码行数:101,代码来源:fitDVariable.C

示例6: combinedFit

void combinedFit() {

  TH1D * hB = new TH1D("hB","histo B",100,0,100);
  TH1D * hSB = new TH1D("hSB","histo S+B",100, 0,100);

  TF1 * fB = new TF1("fB","expo",0,100);
  fB->SetParameters(1,-0.05);
  hB->FillRandom("fB");

  TF1 * fS = new TF1("fS","gaus",0,100);
  fS->SetParameters(1,30,5);

  hSB->FillRandom("fB",2000);
  hSB->FillRandom("fS",1000);

  // perform now global fit

  TF1 * fSB = new TF1("fSB","expo + gaus(2)",0,100);

  ROOT::Math::WrappedMultiTF1 wfB(*fB,1);
  ROOT::Math::WrappedMultiTF1 wfSB(*fSB,1);

  ROOT::Fit::DataOptions opt;
  ROOT::Fit::DataRange rangeB;
  // set the data range
  rangeB.SetRange(10,90);
  ROOT::Fit::BinData dataB(opt,rangeB);
  ROOT::Fit::FillData(dataB, hB);

  ROOT::Fit::DataRange rangeSB;
  rangeSB.SetRange(10,50);
  ROOT::Fit::BinData dataSB(opt,rangeSB);
  ROOT::Fit::FillData(dataSB, hSB);

  ROOT::Fit::Chi2Function chi2_B(dataB, wfB);
  ROOT::Fit::Chi2Function chi2_SB(dataSB, wfSB);

  GlobalChi2 globalChi2(chi2_B, chi2_SB);

  ROOT::Fit::Fitter fitter;

  const int Npar = 6;
  double par0[Npar] = { 5,5,-0.1,100, 30,10};

  // create before the parameter settings in order to fix or set range on them
  fitter.Config().SetParamsSettings(6,par0);
  // fix 5-th parameter
  fitter.Config().ParSettings(4).Fix();
  // set limits on the third and 4-th parameter
  fitter.Config().ParSettings(2).SetLimits(-10,-1.E-4);
  fitter.Config().ParSettings(3).SetLimits(0,10000);
  fitter.Config().ParSettings(3).SetStepSize(5);

  fitter.Config().MinimizerOptions().SetPrintLevel(0);
  fitter.Config().SetMinimizer("Minuit2","Migrad");

  // fit FCN function directly
  // (specify optionally data size and flag to indicate that is a chi2 fit)
  fitter.FitFCN(6,globalChi2,0,dataB.Size()+dataSB.Size(),true);
  ROOT::Fit::FitResult result = fitter.Result();
  result.Print(std::cout);

  TCanvas * c1 = new TCanvas("Simfit","Simultaneous fit of two histograms",
                             10,10,700,700);
  c1->Divide(1,2);
  c1->cd(1);
  gStyle->SetOptFit(1111);

  fB->SetFitResult( result, iparB);
  fB->SetRange(rangeB().first, rangeB().second);
  fB->SetLineColor(kBlue);
  hB->GetListOfFunctions()->Add(fB);
  hB->Draw();

  c1->cd(2);
  fSB->SetFitResult( result, iparSB);
  fSB->SetRange(rangeSB().first, rangeSB().second);
  fSB->SetLineColor(kRed);
  hSB->GetListOfFunctions()->Add(fSB);
  hSB->Draw();


}
开发者ID:digideskio,项目名称:root,代码行数:83,代码来源:combinedFit.C

示例7: plotAngularResolution

void plotAngularResolution(){


   TChain *resChain = new TChain("angResTree");

   char resName[500];
   char fName[200];

   //   int sec1[17] = {04, 04, 04, 04, 04, 04, 10, 10, 12, 12, 12, 14, 14, 14, 16, 16, 17};
   //   int sec2[17] = {51, 51, 57, 57, 57, 58, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59};
   int temp = -1;
   //   int sec1[25] = {24, 30, 30, 25, 25, 25, 26, 26, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 28, 29, 30, 30, 31};

   //   int sec1[17]={36, 36, 36, 36, 36, 33, 34, 34, 35, 36, 35, 36, 36, 37, 37, 37, 37};
   int sec1[3]= {19,21,21};

   for (int run=331;run<355;++run){ // 331-355 145-161 151-154

     temp = run - 151;
     //     cout << sec1[temp] << endl;
     //     sprintf(fName,"VPOL_10kVSeavey_2015_11_05_time_19_47_53");//  VPOL_10kVSeavey_2015_11_06_time_10_42_48
     // sprintf(fName,"VPOL_10kVSeavey_2015_11_06_time_10_42_48");
     // sprintf(fName,"LDBHPOL_10kVSeavey_2015_11_19_time_15_30_45");
     //     sprintf(fName,"VPOL_10kVSeavey_2015_11_19_time_11_49_04");
     sprintf(fName,"HPOL_seavey_pulses_2015_11_25");
     
          sprintf(resName,"/unix/anita3/treesForLinda/generateAngularResolutionTree_run%d-%dPlots.root",run,run);
     //     sprintf(resName,"/unix/anita3/strutt/antennaPositionCalibPlots/ldbPulses/%s/generateAngularResolutionTreeVPOLPlots_%d_2015-11-09_14-36-%02d.root",fName,run, sec2[temp]);
     //     sprintf(resName,"/unix/anita3/strutt/antennaPositionCalibPlots/newFittingOrder/newLindaNumbers_4steps_%s/generateAngularResolutionTreeVPOLPlots_%d_2015-11-23_12-42-%02d.root",fName,run, sec1[temp]);
     //sprintf(resName,"/unix/anita3/strutt/antennaPositionCalibPlots/ldbPulses/%s/generateAngularResolutionTreeHPolLDBPlots_%d_2015-11-25_12-25-%02d.root",fName,run, sec1[temp]);

     cout << resName << endl;
     resChain->Add(resName);
     
  }


   TH1D *hPhi = new TH1D("hPhi", "", 400, -2, 2);
   TH1D *hTheta = new TH1D("hTheta", "", 400, -2, 2);

   resChain->Draw("deltaPhiDeg >> hPhi", "", "off");
   resChain->Draw("deltaThetaDeg >> hTheta", "", "off");
   

   gStyle->SetOptStat(0);
   gStyle->SetOptFit(1);
   TCanvas *c1 = new TCanvas("c1");
   hPhi->SetTitle("#phi_{expected}-#phi_{zoom};#delta #phi (degrees);Events per bin");
   hPhi->Draw("");
   hPhi->Fit("gaus", "", "", -1, 1);
   c1->Print(Form("AngularResolution_phi_4steps_%s.png", fName));
   c1->Print(Form("AngularResolution_phi_4steps_%s.pdf", fName));


   hTheta->SetTitle("#theta_{expected}-#theta_{zoom};#delta #theta (degrees);Events per bin");
   hTheta->Draw("");
   hTheta->Fit("gaus");
   c1->Print(Form("AngularResolution_theta_4steps_%s.png", fName));
   c1->Print(Form("AngularResolution_theta_4steps_%s.pdf", fName));



}
开发者ID:strutt,项目名称:antennaPositionCalib,代码行数:63,代码来源:plotAngularResolution.C

示例8: sqrtMethodSameSign

void sqrtMethodSameSign(int ptBin, double ptCutLo, double ptCutHi, int massBin, double mCutLo, double mCutHi, int etaBin, double etaCutLo, double etaCutHi){
	
	//OPTIONS AND CUTS------------
	bool useBlueBeam = true;
	bool useYellowBeam = true;
	bool randomizeSpin = false;
	
	double PI = 3.14159265359;
	
	cout << "\n";
	if (useBlueBeam && useYellowBeam){cout << "using both beams-----" << endl;}
	if (useBlueBeam && !useYellowBeam){cout << "using blue beam------" << endl;}
	if (!useBlueBeam && useYellowBeam){cout << "using yellow beam----" << endl;}
	cout << "\n";
	if (randomizeSpin){cout << "randomizing spin-----" << endl;}
	
	
	
	//PION PAIR CUTS:
	/*
	 double ptCutLo = 4;
	 double ptCutHi = 10;
	 double mCutLo = .4;
	 double mCutHi = 1;
	 double etaCutLo = -1.4;
	 double etaCutHi = 1.4;
	 //*/
	//double phiCutLo = -.5;
	//double phiCutHi = .5;
	
	//----------------------------	
	
	
	//LOAD LIBS
	cout << "\n";
	gROOT->Macro("StRoot/LoadLibs.C");
	gSystem->Load("sameSignPair");
	cout << " loading of sameSignPair library done" << endl;

	
	
	//SET UP INPUT FILE	
	TFile* infile = new TFile("/star/u/klandry/ucladisk/2012IFF/schedOut_samesign_4_14/allSameSign_4_14.root");
	
	
	
	//SET UP TREE TO RECEIVE INPUT
	sameSignPair* pair1 = new sameSignPair();
	TTree* pairTree = infile->Get("sameSignTree");
	pairTree->SetBranchAddress("sameSignPair", &pair1);
	
	
	//SET UP HISTOGRAMS
	
	//event variable histograms
	TH1D* hInvarM    = new TH1D("invarM","invarM",80,0,2);
	TH1D* hEtaTot	   = new TH1D("etaTot","etaTot",60,-1.5,1.5);
	TH1D* hPhiR      = new TH1D("hPhiR","hPhiR",60,-4,4);
	TH1D* hPhiS      = new TH1D("hPhiS","hPhiS",60,-4,4);
	TH1D* hPhiSR     = new TH1D("hPhiSR","hPhiSR",60,-4,4);
	TH1D* hTheta     = new TH1D("hTheta","hTheta",30,-0.85,4);
	TH1D* hCosTheta  = new TH1D("hCosTheta","hCosTheta",80,-1,1);
	TH1D* hZ         = new TH1D("hZ","hZ",80,0,1);
	TH1D* hPtot      = new TH1D("hPtot","hPtot",80,0,20);
	TH1D* hPtTOT     = new TH1D("hPt","hPt",80,0,15);
	
	//histos for asym analysis	
	double histMin = -PI;
	double histMax =  PI;
	const int binNumber = 16;
	
	TH1D * hNumberUp   = new TH1D("hNumberUp","hNumberUp",binNumber,histMin,histMax);
	TH1D * hNumberDown = new TH1D("hNumberDown","hNumberDown",binNumber,histMin,histMax);
	
	TH1D * hDiff  = new TH1D("hNumberSum","hNumberSum",binNumber,histMin,histMax);
	TH1D * hAut = new TH1D("Aut","Aut",binNumber,histMin,histMax);
	
	
	//BEAM POLARIZATION
	
	ifstream polFile;
	polFile.open("/star/u/klandry/ucladisk/2012IFF/BeamPolarization2012.txt");
	
	
	map<int, double> polarizationOfFill_Y;
	map<int, double> polErrOfFill_Y;
	
	map<int, double> polarizationOfFill_B;
	map<int, double> polErrOfFill_B;
	
	
	
	int    fill;
	int    beamE;
	int    startT;
	string plusminus;
	
	double pAvrgBlue;
	double pErrAvrgBlue;
	
//.........这里部分代码省略.........
开发者ID:keithdlandry,项目名称:2012IFF,代码行数:101,代码来源:sqrtMethodSameSign.C

示例9: draw_from_trees

void draw_from_trees(TString var, TCut other_cuts,
		     TString weights, TString title, int nbinsx, 
		     double xlow, double xup,
		     TString options="plotSig:plotLog:plotData",
		     double cut_low=-1, double cut_high=-1,
		     TString plot_title="default")
{

  bool plotSig = options.Contains("plotSig") && (!options.Contains("!plotSig"));
  bool plotLog = options.Contains("plotLog") && (!options.Contains("!plotLog"));
  bool plotData = options.Contains("plotData") && (!options.Contains("!plotData"));
  bool plotT1tttt = options.Contains("T1tttt") && (!options.Contains("!T1tttt"));

  // Book histograms
  TH1D * httbar = new TH1D("ttbar" , title, nbinsx, xlow, xup);
  TH1D * hqcd = new TH1D("qcd" , title, nbinsx, xlow, xup);
  TH1D * hznn = new TH1D("znn" , title, nbinsx, xlow, xup);
  TH1D * hwjets = new TH1D("wjets" , title, nbinsx, xlow, xup);
  TH1D * hother = new TH1D("other" , title, nbinsx, xlow, xup);
  TH1D * hmc_exp = new TH1D("mc_exp" , title, nbinsx, xlow, xup);
  TH1D * hsingle_top = new TH1D("single_top" , title, nbinsx, xlow, xup);  
  TH1D * ht1bbbb_1500_100 = new TH1D("t1bbbb_1500_100" , title, nbinsx, xlow, xup);
  TH1D * ht1bbbb_1000_900 = new TH1D("t1bbbb_1000_900" , title, nbinsx, xlow, xup);
  TH1D * ht1tttt_1500_100 = new TH1D("t1tttt_1500_100" , title, nbinsx, xlow, xup);
  TH1D * ht1tttt_1200_800 = new TH1D("t1tttt_1200_800" , title, nbinsx, xlow, xup);

  // Format cuts
  TCut cut(other_cuts);
  cout << "Filling histograms for " << var.Data() << endl;
  ttbar_ch->Project("ttbar",var,cut*weights);
  qcd_ch->Project("qcd",var,cut*weights);
  znn_ch->Project("znn",var,cut*weights);
  wjets_ch->Project("wjets",var,cut*weights);
  other_ch->Project("other",var,cut*weights);
  single_top_ch->Project("single_top",var,cut*weights);
  t1bbbb_1500_100_ch->Project("t1bbbb_1500_100",var,cut*weights);
  t1bbbb_1000_900_ch->Project("t1bbbb_1000_900",var,cut*weights);
  t1tttt_1500_100_ch->Project("t1tttt_1500_100",var,cut*weights);
  t1tttt_1200_800_ch->Project("t1tttt_1200_800",var,cut*weights);

  TH1D * hSMSLargeSplitting;
  TH1D * hSMSCompressed;

  if (plotT1tttt) {
    hSMSLargeSplitting=ht1tttt_1500_100;
    hSMSCompressed=ht1tttt_1200_800;
  } else {
    hSMSLargeSplitting=ht1bbbb_1500_100;
    hSMSCompressed=ht1bbbb_1000_900;
  }

  bool addOverflow(true);
  Double_t e_overflow(0.), i_overflow(0.);
  if (addOverflow) {
    i_overflow=httbar->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    httbar->SetBinContent(nbinsx, i_overflow);
    httbar->SetBinError(nbinsx, e_overflow);
    i_overflow=hqcd->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hqcd->SetBinContent(nbinsx, i_overflow);
    hqcd->SetBinError(nbinsx, e_overflow);
    i_overflow=hznn->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hznn->SetBinContent(nbinsx, i_overflow);
    hznn->SetBinError(nbinsx, e_overflow);
    i_overflow=hwjets->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hwjets->SetBinContent(nbinsx, i_overflow);
    hwjets->SetBinError(nbinsx, e_overflow);
    i_overflow=hsingle_top->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hsingle_top->SetBinContent(nbinsx, i_overflow);
    hsingle_top->SetBinError(nbinsx, e_overflow);
    i_overflow=hother->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hother->SetBinContent(nbinsx, i_overflow);
    hother->SetBinError(nbinsx, e_overflow);
    i_overflow=hSMSLargeSplitting->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hSMSLargeSplitting->SetBinContent(nbinsx, i_overflow);
    hSMSLargeSplitting->SetBinError(nbinsx, e_overflow);
    i_overflow=hSMSCompressed->IntegralAndError(nbinsx,nbinsx+1,e_overflow);
    hSMSCompressed->SetBinContent(nbinsx, i_overflow);
    hSMSCompressed->SetBinError(nbinsx, e_overflow);
  }

  
  // Add up MC histograms
  hmc_exp->Add(httbar);
  hmc_exp->Add(hqcd);
  hmc_exp->Add(hznn);
  hmc_exp->Add(hwjets);
  hmc_exp->Add(hsingle_top);
  hmc_exp->Add(hother);

  double binwidth = (xup - xlow) / nbinsx;
  TString ytitle = Form("Events / %.3f", binwidth);
  hmc_exp->GetXaxis()->SetTitle(httbar->GetXaxis()->GetTitle());
  hmc_exp->GetYaxis()->SetTitle(ytitle);
  cout << "... DONE: add all backgrounds to mc_exp." << endl;
  
  Double_t ttbar_e(0.), qcd_e(0.), znn_e(0.), wjets_e(0.), other_e(0.), single_top_e(0.), bg_tot_e(0.), t1bbbb_1500_100_e(0.);
  double ttbar_n(httbar->IntegralAndError(0,nbinsx+1, ttbar_e));
  double qcd_n(hqcd->IntegralAndError(0,nbinsx+1, qcd_e));
  double znn_n(hznn->IntegralAndError(0,nbinsx+1, znn_e));
  double wjets_n(hwjets->IntegralAndError(0,nbinsx+1, wjets_e));
//.........这里部分代码省略.........
开发者ID:ald77,项目名称:csa14,代码行数:101,代码来源:draw_from_trees.cpp

示例10: SF_e


//.........这里部分代码省略.........
		    "Pt25to28",
		    "Pt28to31",
		    "Pt31to34",
		    "Pt34to37",
		    "Pt37to40",
		    "Pt40to45",
		    "Pt45to50",
		    "Pt50to60",
		    "Pt60to70",
		    "Pt70to100",
		    "PtGt100"};

	int nPtBins = 16; if(what == "IdIso") nPtBins = 7;
	float * ptBins = new float[nPtBins+1];
	TString * PtBins = new TString[nPtBins];

	if(what == "IdIso"){
		for(int i=0; i<nPtBins; ++i){
			ptBins[i] = ptBins_def[i];
			PtBins[i] = PtBins_def [i];
		}
		ptBins[nPtBins] = ptBins_def[nPtBins];
	} else {
		for(int i=0; i<nPtBins; ++i){
			ptBins[i] = ptBinsTrig_def[i];
			PtBins[i] = PtBinsTrig_def[i];
		}
		ptBins[nPtBins] = ptBinsTrig_def[nPtBins];
	}


  //	create eta histogram with eta ranges associated to their names (eg. endcap, barrel)   ***** //

	TH1D * etaBinsH = new TH1D("etaBinsH", "etaBinsH", nEtaBins, etaBins);
  etaBinsH->Draw();
  etaBinsH->GetXaxis()->Set(nEtaBins, etaBins);
  for (int i=0; i<nEtaBins; i++){ etaBinsH->GetXaxis()->SetBinLabel(i+1, EtaBins[i]);}
  etaBinsH->Draw();


	//	create pt histogram_s with pt ranges associated to their names (eg. Pt10to13, ..)   ***** //

	TH1D * ptBinsH =  new TH1D("ptBinsH", "ptBinsH", nPtBins, ptBins);
  ptBinsH->Draw();
  ptBinsH->GetXaxis()->Set(nPtBins, ptBins);
  for (int i=0; i<nPtBins; i++){ ptBinsH->GetXaxis()->SetBinLabel(i+1, PtBins[i]);}
  ptBinsH->Draw();

  float ptBins_edges[nPtBins+1];

	for (int i=0; i<nPtBins; i++) { ptBins_edges[i]=ptBinsH->GetBinLowEdge(i+1); }
	ptBins_edges[nPtBins]= ptBinsH->GetBinLowEdge(nPtBins+1); 

  
	// define if in the fit of failing probes
  // the FSR component will be used in the 
  // signal function 
  bool fitWithFSR[nPtBins];

  for (int i=0; i<nPtBins; i++)  fitWithFSR[i] = false;

  if(what == "IdIso"){
   	fitWithFSR[2]=true;
    fitWithFSR[3]=true;
  } 
开发者ID:MaVour,项目名称:DesyTauAnalysesRun2_25ns,代码行数:66,代码来源:SF_e.C

示例11: phroc2ps

//----------------------------------------------------------------------
void phroc2ps( )
{
  using namespace std;

  gROOT->Time();

  // set styles:

  gStyle->SetTextFont(62); // 62 = Helvetica bold LaTeX
  gStyle->SetTextAlign(11);

  gStyle->SetTickLength( -0.02, "x" ); // tick marks outside
  gStyle->SetTickLength( -0.02, "y" );
  gStyle->SetTickLength( -0.02, "z" );

  gStyle->SetLabelOffset( 0.022, "x" );
  gStyle->SetLabelOffset( 0.022, "y" );
  gStyle->SetLabelOffset( 0.022, "z" );
  gStyle->SetLabelFont( 62, "X" );
  gStyle->SetLabelFont( 62, "Y" );
  gStyle->SetLabelFont( 62, "Z" );

  gStyle->SetTitleOffset( 1.3, "x" );
  gStyle->SetTitleOffset( 2.0, "y" );
  gStyle->SetTitleOffset( 1.9, "z" );
  gStyle->SetTitleFont( 62, "X" );
  gStyle->SetTitleFont( 62, "Y" );
  gStyle->SetTitleFont( 62, "Z" );

  gStyle->SetTitleBorderSize(0); // no frame around global title
  gStyle->SetTitleX( 0.20 ); // global title
  gStyle->SetTitleY( 0.98 ); // global title
  gStyle->SetTitleAlign(13); // 13 = left top align

  gStyle->SetLineWidth(1);// frames
  gStyle->SetHistLineColor(4); // 4=blau
  gStyle->SetHistLineWidth(3);
  gStyle->SetHistFillColor(5); // 5 = gelb
  //  gStyle->SetHistFillStyle(4050); // 4050 = half transparent
  gStyle->SetHistFillStyle(1001); // 1001 = solid

  gStyle->SetFrameLineWidth(2);

  // statistics box:

  gStyle->SetOptStat(11);
  gStyle->SetStatFormat( "8.6g" ); // more digits, default is 6.4g
  gStyle->SetStatFont(42); // 42 = Helvetica normal
  //  gStyle->SetStatFont(62); // 62 = Helvetica bold
  gStyle->SetStatBorderSize(1); // no 'shadow'

  gStyle->SetStatX(0.80); // cvsq
  gStyle->SetStatY(0.90);

  gStyle->SetPalette(1); // rainbow colors

  gStyle->SetHistMinimumZero(); // no zero suppression

  gStyle->SetOptDate();

  gROOT->ForceStyle();

  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  // book new histos:

  TH1D* hnpt = new TH1D( "hnpt", "data points;data points;pixels", 512, 0.5, 512.5 );
  TH1D* hiter = new TH1D( "hiter", "fit iterations;fit iterations;pixels", 100, 0, 1000 );
  TH1D* hchisq = new TH1D( "hchisq", "chisq/ndof;chisq/ndof;pixels", 100, 0, 10 );

  TH1D* hmax = new TH1D( "hmax", "Amax;Amax [ADC];pixels", 256, 0, 256 );

  TH1D* hoff = new TH1D( "hoff", "Weibull PH at 0;Weibull PH at 0 [ADC];pixels", 250, 0, 250 );
  TH1D* htop = new TH1D( "htop", "top PH;maximum PH [ADC];pixels", 256, -0.5, 255.5 );

  TH1D* hinf = new TH1D( "hinf", "inflection point;point of maximum gain [large Vcal DACs];pixels", 200, 0, 100 );
  TH1D* hslp = new TH1D( "hslp", "max slope;Weibull max slope [ADC/DAC];pixels", 500, 0, 5 );
  TH1D* hrat = new TH1D( "hrat", "large/small;large/small Vcal;pixels", 100, 6, 8 );

  TProfile2D* h10 = new TProfile2D( "h10", "Weibull PH at 0 map;col;row;Weibull PH at 0 [ADC]", 52, -0.5, 51.5, 80, -0.5, 79.5, -100, 250 );
  TProfile2D* h11 = new TProfile2D( "h11", "top PH map;col;row;maximum PH [ADC]", 52, -0.5, 51.5, 80, -0.5, 79.5, 0, 300 );
  TProfile2D* h12 = new TProfile2D( "h12", "inflection point map;col;row;Weibull inflection point [large Vcal DAC]", 52, -0.5, 51.5, 80, -0.5, 79.5, 0, 250 );
  TProfile2D* h13 = new TProfile2D( "h13", "maximum gain map;col;row;Weibull maximum gain [ADC/large Vcal DAC]", 52, -0.5, 51.5, 80, -0.5, 79.5, 0, 50 );
  TProfile2D* h14 = new TProfile2D( "h14", "ratio map;col;row;large/small Vcal", 52, -0.5, 51.5, 80, -0.5, 79.5, 0, 20 );
  TProfile2D* h15 = new TProfile2D( "h15", "chisq map;col;row;mpfit chisq", 52, -0.5, 51.5, 80, -0.5, 79.5, 0, 99 );

  // open output file:

  ofstream gainfile( "phroc.dat" );

  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

  cout << "pwd: ";
  gDirectory->pwd();

  cout << "gDir " << gDirectory->GetName() << endl;

  gDirectory->ls();

  cout << "keys " << gDirectory->GetNkeys() << endl;
//.........这里部分代码省略.........
开发者ID:clseitz,项目名称:Psi46testDesy,代码行数:101,代码来源:phroc2ps.C

示例12: plot_BGEst_trigger

void plot_BGEst_trigger(string cutname="delphi", string histname="MHT"){

  ///////////////////////////////////////////////////////////////////////////////////////////
  ////Some cosmetic work for official documents. 
  //gROOT->LoadMacro("tdrstyle.C");
  //setTDRStyle();
  //gROOT->LoadMacro("CMS_lumi_v2.C");
  gStyle->SetOptStat(0);  ///to avoid the stat. on the plots 
  gStyle->SetPalette(1) ; // for better color output

  char tempname[200];
  char tempname2[200];
  int W = 600;
  int H = 600;
  int H_ref = 600;
  int W_ref = 800;
  float T = 0.08*H_ref;
  float B = 0.12*H_ref;
  float L = 0.12*W_ref;
  float R = 0.04*W_ref;

  TCanvas* canvas = new TCanvas("name","name",10,10,W,H);
  canvas->SetFillColor(0);
  canvas->SetBorderMode(0);
  canvas->SetFrameFillStyle(0);
  canvas->SetFrameBorderMode(0);
  canvas->SetLeftMargin( L/W );
  canvas->SetRightMargin( R/W );
  canvas->SetTopMargin( T/H );
  canvas->SetBottomMargin( B/H );
  canvas->SetTickx(0);
  canvas->SetTicky(0);
  
   canvas->Divide(1, 2);
  //
  // Define pads
  //
  TPad * canvas_up = (TPad*) canvas->GetListOfPrimitives()->FindObject("canvas_1");
  TPad * canvas_dw = (TPad*) canvas->GetListOfPrimitives()->FindObject("canvas_2");
  
   // set pad size
  canvas_up->SetPad(0., .25, 0.97, 1.);

  canvas_dw->SetPad(0., 0.07, 0.97, 0.25);
  canvas_up->SetFrameFillColor(0);
  canvas_up->SetFillColor(0);
  canvas_dw->SetFillColor(0);
  canvas_dw->SetFrameFillColor(0);
  canvas_dw->SetBottomMargin(0.3);

  // set top margin 0 for bottom figure
  canvas_dw->SetTopMargin(0);
  
  Float_t legendX1 = .20; //.50;
  Float_t legendX2 = .90; //.70;
  Float_t legendY1 = .70; //.65;
  Float_t legendY2 = .90;
  TLegend* catLeg1 = new TLegend(legendX1,legendY1,legendX2,legendY2);
  catLeg1->SetTextSize(0.032);
  catLeg1->SetTextFont(42);
  catLeg1->SetFillColor(0);
  catLeg1->SetLineColor(0);
  catLeg1->SetBorderSize(0);

  TFile *file_NoTrig = new TFile("InputRootFiles/HadTauEstimation_data_SingleMuon_v14c_.root","R");
  TFile *file_Mu15 = new TFile("InputRootFiles/HadTauEstimation_data_SingleMuon_v14c_HLT_Mu15_IsoVVVL_PFHT350_PFMET70_v_.root","R"); 
  TFile *file_Mu50   = new TFile("InputRootFiles/HadTauEstimation_data_SingleMuon_v14c_HLT_Mu50_v_.root","R");
  TFile *file_Mu15ORMu50 = new TFile("InputRootFiles/HadTauEstimation_data_SingleMuon_v14c_HLT_Mu50_v_OR_HLT_Mu15_IsoVVVL_PFHT350_PFMET70_v_.root","R"); 
  
    
  sprintf(tempname,"allEvents/%s/%s_%s_allEvents",cutname.c_str(),histname.c_str(),cutname.c_str());
  TH1D * NoTrigHist = (TH1D*)file_NoTrig->Get(tempname)->Clone();
  NoTrigHist->SetLineColor(41);
  NoTrigHist->SetLineWidth(2);
  TH1D * Mu15Hist = (TH1D*)file_Mu15->Get(tempname)->Clone();
  Mu15Hist->SetLineColor(1);
  Mu15Hist->SetLineWidth(2);
  TH1D * Mu50Hist = (TH1D*)file_Mu50->Get(tempname)->Clone();
  Mu50Hist->SetLineColor(2);
  Mu50Hist->SetLineWidth(2);
  TH1D * Mu15ORMu50Hist = (TH1D*)file_Mu15ORMu50->Get(tempname)->Clone();
  Mu15ORMu50Hist->SetLineColor(4);
  Mu15ORMu50Hist->SetLineWidth(2);
  
  NoTrigHist->SetMaximum(10.);
  if(histname=="MHT"){
	  NoTrigHist->SetMaximum(10.);
	  NoTrigHist->GetXaxis()->SetRangeUser(0.0,1000.);
  }
  if(histname=="HT"){
	  NoTrigHist->SetMaximum(10.);
	  NoTrigHist->GetXaxis()->SetRangeUser(0.0,1500.);
  }
  if(histname=="NJet"){
	  NoTrigHist->SetMaximum(10.);
	  NoTrigHist->GetXaxis()->SetRangeUser(3.0,10.);
  }
  if(histname=="NBtag"){
	  NoTrigHist->SetMaximum(15.);
	  NoTrigHist->GetXaxis()->SetRangeUser(0.0,4.);
//.........这里部分代码省略.........
开发者ID:hatakeyamak,项目名称:RA2-RA2b-2015,代码行数:101,代码来源:plot_BGEst_trigger.C

示例13: BfinderAna

int BfinderAna(
		TString infile="/data/twang/BfinderRun2/DoubleMu/BfinderData_pp_20151130/finder_pp_merged.root", 
		TString outfile="test.root", 
		Bool_t REAL=false, 
		Bool_t isPbPb=false, 
		Int_t startEntries=0, 
		Int_t endEntries=-1,  
		Bool_t skim=true, 
		Bool_t gskim=true, 
		Bool_t checkMatching=true, 
		Bool_t iseos=false, 
		Bool_t SkimHLTtree=true)
{
	if(istest)
	{
//		infile="/data/HeavyFlavourRun2/BfinderRun2/MC/crab_BfinderMC_pp_BJpsiMM_5p02TeV_TuneCUETP8M1_20160613_bPt0jpsiPt0tkPt0p5_Bp.root";
		infile="/data/HeavyFlavourRun2/BfinderRun2/MC/crab_BfinderMC_PbPb_Pythia8_BJpsiMM_ptJpsi_0_inf_Hydjet_MB_20160613_bPt5jpsiPt0tkPt0p8_Bp.root";
		outfile="test.root";
		REAL=false;
		isPbPb=false;
		skim=false;
		checkMatching=true;
		iseos=false;
	}

	cout<<endl;
	if(REAL) cout<<"--- Processing - REAL DATA";
	else cout<<"--- Processing - MC";
	if(isPbPb) cout<<" - PbPb";
	else cout<<" - pp";
	cout<<endl;

	TString ifname;
	if(iseos) ifname = Form("root://eoscms.cern.ch//eos/cms%s",infile.Data());
	else ifname = infile;
	TFile* f = TFile::Open(ifname);
	TTree* root = (TTree*)f->Get("Bfinder/root");
	TTree* hltroot = (TTree*)f->Get("hltanalysis/HltTree");
	TTree* skimroot = (TTree*)f->Get("skimanalysis/HltTree");
	TTree* hiroot = (TTree*)f->Get("hiEvtAnalyzer/HiTree");

	EvtInfoBranches     *EvtInfo = new EvtInfoBranches;
	VtxInfoBranches     *VtxInfo = new VtxInfoBranches;
	MuonInfoBranches    *MuonInfo = new MuonInfoBranches;
	TrackInfoBranches   *TrackInfo = new TrackInfoBranches;
	BInfoBranches       *BInfo = new BInfoBranches;
	GenInfoBranches     *GenInfo = new GenInfoBranches;

	setHltBranch(hltroot);
	setHiTreeBranch(hiroot);

	EvtInfo->setbranchadd(root);
	VtxInfo->setbranchadd(root);
	MuonInfo->setbranchadd(root);
	TrackInfo->setbranchadd(root);
	BInfo->setbranchadd(root);
	GenInfo->setbranchadd(root);

	Long64_t nentries = root->GetEntries();
	if(endEntries>nentries || endEntries == -1) endEntries = nentries;
	TFile *outf = TFile::Open(Form("%s", outfile.Data()),"recreate");

	cout<<"--- Check the number of events for four trees"<<endl;
	cout<<root->GetEntries()<<" "<<hltroot->GetEntries()<<" "<<hiroot->GetEntries();
	cout<<" "<<skimroot->GetEntries()<<endl;
	cout<<endl;

	//
	double min = 4.6;
	double max = 6.0;
	int nbin = (max-min)*50;
	TH1D* Bmass = new TH1D("Bmass","Bmass", nbin, min, max);
	TH1D* Bmass_nosig = new TH1D("Bmass_nosig","Bmass_nosig", nbin, min, max);
	TH1D* BmassBpPi = new TH1D("BmassBpPi","BmassBpPi", nbin, min, max);
	TH1D* BmassBpXPi = new TH1D("BmassBpXPi","BmassBpXPi", nbin, min, max);
	TH1D* BmassBpK = new TH1D("BmassBpK","BmassBpK", nbin, min, max);
	TH1D* BmassB0K = new TH1D("BmassB0K","BmassB0K", nbin, min, max);
	TH1D* BmassBpK_tkmatch = new TH1D("BmassBpK_tkmatch","BmassBpK_tkmatch", nbin, min, max);
	TH1D* BmassB0K_tkmatch = new TH1D("BmassB0K_tkmatch","BmassB0K_tkmatch", nbin, min, max);
	TH1D* BmassBpK_tknotmatch = new TH1D("BmassBpK_tknotmatch","BmassBpK_tknotmatch", nbin, min, max);
	TH1D* BmassB0K_tknotmatch = new TH1D("BmassB0K_tknotmatch","BmassB0K_tknotmatch", nbin, min, max);
	Bmass->SetMinimum(0);
	Bmass_nosig->SetMinimum(0); 
	BmassBpPi->SetMinimum(0); 
	BmassBpXPi->SetMinimum(0);
	BmassBpK->SetMinimum(0);
	BmassB0K->SetMinimum(0);
	BmassBpK_tkmatch->SetMinimum(0);
	BmassB0K_tkmatch->SetMinimum(0);
	BmassBpK_tknotmatch->SetMinimum(0);
	BmassB0K_tknotmatch->SetMinimum(0);

	std::map<int,int> BtypeCountBpK;
	std::map<int,int> BtypeCountB0K;
	cout<<"--- Processing events"<<endl;
	for(Int_t i=startEntries;i<endEntries;i++)
	{
		root->GetEntry(i);
		hltroot->GetEntry(i);
		skimroot->GetEntry(i);
//.........这里部分代码省略.........
开发者ID:boundino,项目名称:BntupleRunII,代码行数:101,代码来源:BfinderAna.C

示例14: minuitFit

void minuitFit()
{
  
  gStyle->SetOptFit(1111);
  gStyle->SetOptStat(0);

  Bool_t makePDF = checkMakePDF();
  
  char name[1000];
  sprintf(name,"/Users/zach/Research/pythia/ptHatTemplate/outputs/currentB.root");
  TFile *fB = new TFile(name,"READ");
  sprintf(name,"/Users/zach/Research/pythia/ptHatTemplate/outputs/currentC.root");
  TFile *fC = new TFile(name,"READ");
  sprintf(name,"/Users/zach/Research/rootFiles/run12NPEhPhi/currentData.root");
  TFile *fD = new TFile(name,"READ");
  if (fB->IsOpen()==kFALSE || fC->IsOpen()==kFALSE)
    { std::cout << "!!!!!! Either B,C, or Data File not found !!!!!!" << std::endl
		<< "Looking for currentB.root, currentC.root, and currentData.root" << std::endl;
      exit(1); }
  
  // Set constants and projection bins (from header file anaConst, analysis constants)
  
  Float_t lowpt[numPtBins],highpt[numPtBins];
  for(Int_t c=0; c< numPtBins; c++){
    lowpt[c] = anaConst::lpt[c];
    highpt[c] = anaConst::hpt[c];
  }
  Float_t hptCut=anaConst::hptCut;
  Double_t p00[numPtBins],p01[numPtBins],p20[numPtBins],p21[numPtBins];
  Double_t e00[numPtBins],e01[numPtBins],e20[numPtBins],e21[numPtBins];
  Double_t pC0[numPtBins],pC1[numPtBins],eC0[numPtBins],eC1[numPtBins];
  Double_t Rb0[numPtBins],Rb2[numPtBins],RbC[numPtBins],pT[numPtBins];
  Double_t eb0[numPtBins],eb2[numPtBins],ebC[numPtBins],dx[numPtBins];
  Double_t ptOFF1[numPtBins],ptOFF2[numPtBins];
  Int_t plotCount0 = 0, plotCount2 = 0, plotCount = 0;
  
  // Make Canvases
  TCanvas* deltaPhi  = new TCanvas("deltaPhi","Pythia Delta Phi",150,0,1150,1000);
  TCanvas* deltaPhi2  = new TCanvas("deltaPhi2","Pythia Delta Phi",150,0,1150,1000);
  TCanvas* fitResult0 = new TCanvas("fitResult0","RB Extraction HT0",150,0,1150,1000);
  TCanvas* fitResult2 = new TCanvas("fitResult2","RB Extraction HT2",150,0,1150,1000);
  TCanvas* fitResultC = new TCanvas("fitResultC","RB Extraction Combined Trigs",150,0,1150,1000);
  deltaPhi  ->Divide(3,3);
  deltaPhi2 ->Divide(3,3);
  fitResult0->Divide(3,4);
  fitResult2->Divide(3,4);
  fitResultC->Divide(3,4);

  // Get and Draw histos
  TPaveText* lbl[numPtBins];
  TPaveText* stat[3][numPtBins];
  char statLabel[100];
  char textLabel[100];
  Int_t plotbin;
  Float_t norm0,norm2,normB,normC;

  // Get ptbin independent hists
  histoNorms = (TH1F*)fD->Get("histoNorms");
  bPtNorms   = (TH1F*)fB->Get("ptNorm");
  cPtNorms   = (TH1F*)fC->Get("ptNorm");
  
  for(Int_t ptbin=0; ptbin<numPtBins; ptbin++)
    {
      norm0 = histoNorms->GetBinContent(histoNorms->GetBin(1,ptbin+1));
      norm2 = histoNorms->GetBinContent(histoNorms->GetBin(3,ptbin+1));
      normB = bPtNorms->GetBinContent(bPtNorms->GetBin(ptbin+1));
      normC = cPtNorms->GetBinContent(cPtNorms->GetBin(ptbin+1));

      if(norm0 == 0)
	{
	  cout << ptbin << " For this bin, some norm0 = 0" << endl;
	  continue;
	}
      if( norm2 == 0 )
	{
	  cout << ptbin << " For this bin, some norm2 = 0" << endl;
	  continue;
	}
      if( normB == 0 )
	{
	  cout << ptbin << " For this bin, some normB = 0" << endl;
	  continue;
	}
      if(normC == 0)
	{
	  cout << ptbin << " For this bin, some normC = 0" << endl;
	  continue;
	}
      plotbin = ptbin;
      // Init necessary plotting tools
      lbl[ptbin] = new TPaveText(.15,.15,.35,.23,Form("NB NDC%i",ptbin));
      sprintf(textLabel,"%.1f < P_{T,e} < %.1f",lowpt[ptbin],highpt[ptbin]);
      lbl[ptbin]->AddText(textLabel);
      lbl[ptbin]->SetFillColor(kWhite);

      projB[ptbin] = (TH1D*)fB->Get(Form("delPhi_%i",ptbin));
      projC[ptbin] = (TH1D*)fC->Get(Form("delPhi_%i",ptbin));
      projData0[ptbin]= (TH1D*)fD->Get(Form("NPEhDelPhi_0_%i",ptbin));
      projData2[ptbin]= (TH1D*)fD->Get(Form("NPEhDelPhi_2_%i",ptbin));
      // Do any rebinning
//.........这里部分代码省略.........
开发者ID:zaglamir,项目名称:ptHatOffline,代码行数:101,代码来源:minuitFit.C

示例15: ProduceDatacards_em

void ProduceDatacards_em(int nBins = 35,
			 float xmin = 0,
			 float xmax = 350,
			 bool pileUp = false) {

  double lumi = 2092;
  double normSS = 1.06;
    
  // sample names
  TString sampleNames[20] = {
    "MuEG_2015D", // data
    "DYJetsToLL_M-50_MG", // isZTT (ZTT)
    "DYJetsToLL_M-50_MG", // !isZTT (ZLL)
    "WJetsToLNu_MG", 
    "TTPowHeg",  
    "ST_t-channel_top_4f_leptonDecays",  
    "ST_t-channel_antitop_4f_leptonDecays",
    "ST_tW_antitop_5f_inclusiveDecays",
    "ST_tW_top_5f_inclusiveDecays",
    "VVTo2L2Nu",
    "WWToLNuQQ",
    "WZTo2L2Q",
    "WZTo1L1Nu2Q",
    "WZTo1L3Nu",
    "WZJets",
    "ZZTo4L",
    "ZZTo2L2Q",
    "",
    "",
    ""};

  double xsec[20] = {1, // data (0)
		     6025.2, // DY (1)
		     6025.2, // DY (2)
		     61526.7, // WJets (3)
		     831.76, // TT (4)
		     136.95, // ST_t-channel_top (5)
		     80.95,  // ST_t-channel_antitop (6)
		     35.6, // ST_tW_antitop (7)
		     35.6, // ST_tW_top_5f (8)
		     11.95,  // VV (9)
		     49.997, // WWToLNuQQ (10)
		     5.595, // WZTo2L2Q (11)
		     10.71, // WZTo1L1Nu2Q (12)
		     3.05, // WZTo1L3Nu (13)
		     5.26, // WZJets (3L1Nu) (14)
		     1.212, // ZZTo4L (15)
		     3.22, // ZZTo2L2Q (16)
		     0, //
		     0, //
		     0}; // 
  
  TString cuts[20];
  TString cutsSS[20];
  for (int i=0; i<20; ++i) {
    cuts[i] = "mcweight*(os>0.5)";
    cutsSS[i] = "mcweight*(os<0.5)";
  }

  cuts[0] = "os>0.5";
  cuts[1] = "mcweight*(os>0.5&&isZTT)";
  cuts[2] = "mcweight*(os>0.5&&!isZTT)";

  cutsSS[0] = "os<0.5";
  cutsSS[1] = "mcweight*(os<0.5&&isZTT)";
  cutsSS[2] = "mcweight*(os<0.5&&!isZTT)";
  
  if (pileUp) {
    for (int i=1; i<20; ++i) {
      cuts[i] = "puweight*" + cuts[i];
      cutsSS[i] = "puweight*" + cutsSS[i];
    }
  }

  TH1D * hist[20];
  TH1D * histSS[20];

  for (int i=0; i<17; ++i) {
    std::cout << sampleNames[i] << std::endl;
    TFile * file = new TFile(sampleNames[i]+".root");
    TH1D * histWeightsH = (TH1D*)file->Get("histWeightsH");
    TTree * tree = (TTree*)file->Get("TauCheck");
    double norm = xsec[i]*lumi/histWeightsH->GetSumOfWeights();
    TString histName = sampleNames[i] + "_mvis";
    TString histNameSS = sampleNames[i] + "_mvis_os";
    hist[i] = new TH1D(histName,"",nBins,xmin,xmax);
    histSS[i] = new TH1D(histNameSS,"",nBins,xmin,xmax);
    hist[i]->Sumw2();
    histSS[i]->Sumw2();
    tree->Draw("m_vis>>"+histName,cuts[i]);
    tree->Draw("m_vis>>"+histNameSS,cutsSS[i]);
    if (i>0) {
      for (int iB=1; iB<=nBins; ++iB) {
	double x = hist[i]->GetBinContent(iB);
	double e = hist[i]->GetBinError(iB);
    	hist[i]->SetBinContent(iB,norm*x);
    	hist[i]->SetBinError(iB,norm*e);
	double xSS = histSS[i]->GetBinContent(iB);
	double eSS = histSS[i]->GetBinError(iB);
    	histSS[i]->SetBinContent(iB,norm*xSS);
//.........这里部分代码省略.........
开发者ID:MaVour,项目名称:DesyTauAnalysesRun2_25ns,代码行数:101,代码来源:ProduceDatacards_em.C


注:本文中的TH1D类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。