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


C++ TMarker::SetNDC方法代码示例

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


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

示例1: DrawLabel

void DrawLabel(TString txt, double x, double y, int mstyle, int col, double msize) {
  TMarker *m = new TMarker(x,y,mstyle);
  m->SetNDC();
  m->SetMarkerSize(msize); m->SetMarkerColor(col);
  TLine *l = new TLine();
  l->SetLineWidth(2); l->SetLineColor(col);
  m->Draw();
  tex->SetTextSize(0.04);
  tex->SetTextAlign(12); tex->SetTextColor(col);
  tex->DrawLatex(x+0.025,y,txt);
  tex->SetTextColor(kBlack);
}
开发者ID:affablelochan,项目名称:2013codev2,代码行数:12,代码来源:DrawJES.C

示例2: myMarkerText

void myMarkerText(Double_t x,Double_t y,Int_t color,Int_t mstyle, const char *text,Float_t msize)
{
  Double_t tsize=0.06;
  TMarker *marker = new TMarker(x-(0.4*tsize),y,8);
  marker->SetMarkerColor(color);  marker->SetNDC();
  marker->SetMarkerStyle(mstyle);
  marker->SetMarkerSize(msize);
  marker->Draw();

  TLatex l; l.SetTextAlign(12); //l.SetTextSize(tsize);
  l.SetNDC();
  l.DrawLatex(x,y,text);
}
开发者ID:lawrenceleejr,项目名称:ZeroLeptonAnalysis,代码行数:13,代码来源:AtlasUtils.C

示例3: myMarkerText

void myMarkerText(Double_t x,Double_t y,Int_t color,Int_t mstyle,char *text) 
{
  //  printf("**myMarker: text= %s\ m ",text);

  Double_t tsize=0.06;
  TMarker *marker = new TMarker(x-(0.4*tsize),y,8);
  marker->SetMarkerColor(color);  marker->SetNDC();
  marker->SetMarkerStyle(mstyle);
  marker->SetMarkerSize(2.0);
  marker->Draw();

  TLatex l; l.SetTextAlign(12); //l.SetTextSize(tsize); 
  l.SetNDC();
  l.DrawLatex(x,y,text);
}
开发者ID:tongbaojia,项目名称:MakePlot,代码行数:15,代码来源:AtlasLabels.C

示例4: EventDisplayForBaby


//.........这里部分代码省略.........
                if(els_sigid_->at(i)!=1) continue;
                if(els_pt_->at(i)<20) continue; 
                lepPt   =els_pt_->at(i);
                lepEta  =els_eta_->at(i);
                lepPhi  =els_phi_->at(i); 
            }
        }
        if(nmus_==1)  
        {
            for(int i=0; i<(int)mus_pt_->size(); i++) 
            {
                if(mus_miniso_->at(i)>0.2) continue;
                if(mus_sigid_->at(i)!=1) continue;
                if(mus_pt_->at(i)<20) continue;
                lepPt   =mus_pt_->at(i);
                lepEta  =mus_eta_->at(i);
                lepPhi  =mus_phi_->at(i); 
            }
        }



        myText(xalign+0.01,0.96,Form("H_{T} = %.0f GeV",ht_),1,0.04);
        myText(xalign+0.01,0.91,Form("M_{J} = %.0f GeV",mj_),1,0.04);
        myText(xalign+0.01,0.86,Form("#slash{E}_{T} = %.0f GeV",met_),1,0.04);
        myText(xalign+0.01,0.81,Form("m_{T} = %.0f GeV",mt_),1,0.04);
        myText(xalign+0.01,0.76,Form("reco %s p_{T} = %.0f GeV", nmus_==1?"#mu":"e", lepPt), kBlack, 0.04); 
        nextline=0.76;
        TMarker recolep = TMarker(lepEta, lepPhi, 27);
        recolep.SetMarkerSize(4);
        recolep.SetMarkerColor(kRed);
        genpart.push_back(recolep);
        TMarker mumark = TMarker(xalign,nextline,27);
        mumark.SetNDC();
        mumark.SetX(xalign);
        mumark.SetY(nextline+0.01);
        mumark.SetMarkerSize(2);
        mumark.SetMarkerColor(kRed);
        genpart.push_back(mumark);
        myText(xalign+0.01,0.71,Form("-- large-R jets --"),1,0.04); 
        myText(xalign+0.01,0.67,Form("(pT, eta, phi, mass)"),1,0.03); 
        nextline=0.635;
        for(int ifj = 0; ifj< (int)fjets_pt_->size(); ifj++)
        {
            myText(xalign+0.01,nextline,Form("%3.0f, %2.1f, %2.1f, %3.0f",
                   fjets_pt_->at(ifj),fjets_eta_->at(ifj),fjets_phi_->at(ifj),fjets_m_->at(ifj)),1,0.03); 
            nextline=nextline-0.035;
        } 
        nextline=nextline-0.015;
        myText(xalign+0.01,nextline,Form("-- AK4 jets --"),1,0.04); 
        nextline=nextline-0.04;
        myText(xalign+0.01,nextline,Form("(pT, eta, phi)"),1,0.03); 
        nextline=nextline-0.035;
        for(int ij = 0; ij< (int)jets_pt_->size(); ij++)
        {            
            if(jets_islep_->at(ij)==1) continue;
            myText(xalign+0.01,nextline,Form("%3.0f, %2.1f, %2.1f",
                   jets_pt_->at(ij),jets_eta_->at(ij),jets_phi_->at(ij)),1,0.03); 
            nextline=nextline-0.035;
        }
        
        if(truth) myText(xalign,0.68,"Gen  p_{T} [GeV]",1,0.04);



        
开发者ID:jaehyeok,项目名称:MJ,代码行数:63,代码来源:EventDisplay.C


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