本文整理汇总了C++中TMarker::SetY方法的典型用法代码示例。如果您正苦于以下问题:C++ TMarker::SetY方法的具体用法?C++ TMarker::SetY怎么用?C++ TMarker::SetY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMarker
的用法示例。
在下文中一共展示了TMarker::SetY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TMarker
vector<TObject *> * mark_overflows(TH1F * histogram) {
Double_t maximum_value = histogram->GetMaximum();
Double_t minimum_value = histogram->GetMinimum();
vector<TObject *> * overflow_markers = new vector<TObject *>();
Float_t * bins = histogram->GetArray();
Int_t number_of_bins = histogram->GetNbinsX();
// note that the bins array has the following structure:
// bins[0] is the underflow bin
// bins[1] through bins[number_of_bins] are the actual bins
// bins[number_of_bins + 1] is the overflow bin
for(int j = 1; j <= number_of_bins; j++) {
if (bins[j] > maximum_value || bins[j] < minimum_value) {
Double_t x1 = histogram->GetXaxis()->GetBinLowEdge(j);
Double_t x2 = histogram->GetXaxis()->GetBinUpEdge(j);
TMarker * m = new TMarker();
m->SetX((x2 + x1) / 2.0);
m->SetMarkerColor(kRed);
m->SetMarkerSize(MARKER_SIZE * 2);
if(bins[j] > maximum_value) {
m->SetY(maximum_value - MARKER_Y_SHIFT);
m->SetMarkerStyle(22); // up arrow
} else {
m->SetY(minimum_value + MARKER_Y_SHIFT);
m->SetMarkerStyle(23); // down arrow
}
overflow_markers->push_back(m);
}
}
return overflow_markers;
}
示例2: EventDisplayForBaby
//.........这里部分代码省略.........
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);
if(truth) myText(xalign,0.68,"Gen p_{T} [GeV]",1,0.04);