本文整理汇总了C++中Flavour::RootName方法的典型用法代码示例。如果您正苦于以下问题:C++ Flavour::RootName方法的具体用法?C++ Flavour::RootName怎么用?C++ Flavour::RootName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flavour
的用法示例。
在下文中一共展示了Flavour::RootName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitialiseAnalysis
void InitialiseAnalysis()
{
#ifdef USING__ROOT
map<string, string> tags=Read_Write_Base::GlobalTags();
string filepiece;
map<string, string>::const_iterator it=tags.find("TAG_FILE_PIECE");
if(it!=tags.end())
filepiece="."+it->second;
Hadron_Decay_Table* table=hadrons->DecayMap()->FindDecay(mother_flav);
for(int i(0);i<table->size();++i) {
Hadron_Decay_Channel* hdc=table->at(i);
string fname = hdc->FileName();
rootfiles[hdc]=
new TFile(("Analysis/"+fname.erase(fname.length()-4)+filepiece+".root").c_str(),"RECREATE");
TH1D* hist;
int currenthist=0;
int noutp(hdc->NOut());
for(int i=0; i<noutp; i++) {
Flavour flav = hdc->GetDecayProduct(i);
string name = "costheta_"+flav.IDName()+"_"+ToString(i);
string xtitle = "cos(#Theta) of "+flav.RootName();
string ytitle = "#frac{1}{#Gamma} #frac{d#Gamma}{dcos(#Theta)}";
hist = makeTH1D(name, "", 50, -1.0, 1.0, xtitle, ytitle);
ThetaHists[hdc].push_back(hist);
currenthist++;
}
currenthist=0;
for(int i=0; i<noutp; i++) {
Flavour flav = hdc->GetDecayProduct(i);
string name = "E_"+flav.IDName()+"_"+ToString(i);
string xtitle = "E of "+flav.RootName()+" [GeV]";
string ytitle = "#frac{1}{#Gamma} #frac{d#Gamma}{dE} [GeV^{-1}]";
double M = mother_flav.HadMass();
double othermass = 0.0;
for(int k=0; k<noutp; k++) {
if(k!=i) othermass+=hdc->GetDecayProduct(k).HadMass();
}
double Emin = 0.9*flav.HadMass();
double Emax = 1.1/2.0/M*(sqr(M)+sqr(flav.HadMass())-othermass);
hist = makeTH1D(name, "", 50, Emin, Emax, xtitle, ytitle);
EnergyHists[hdc].push_back(hist);
currenthist++;
}
currenthist=0;
for(int i=0; i<noutp; i++) {
if(noutp<3) break;
for(int j=i+1; j<noutp; j++) {
Flavour flav1 = hdc->GetDecayProduct(i);
Flavour flav2 = hdc->GetDecayProduct(j);
string name = "q2_"+flav1.IDName()+"_"+flav2.IDName()+"_"+ToString(i)+ToString(j);
string xtitle = "Inv. Mass q^{2}=(p_{"+flav1.RootName()+"}+p_{"
+flav2.RootName()+"})^{2} [GeV^{2}]";
string ytitle = "#frac{1}{#Gamma} #frac{d#Gamma}{dq^{2}} [GeV^{-2}]";
double othermass = 0.0;
for(int k=0; k<noutp; k++) {
if(k==i || k==j) continue;
othermass+=hdc->GetDecayProduct(k).HadMass();
}
double q2min = 0.0;
double q2max = 1.1*sqr(hdc->GetDecaying().HadMass()-othermass);
hist = makeTH1D(name.c_str(), "", 50, q2min, q2max, xtitle, ytitle);
TwoInvMassHists[hdc].push_back(hist);
currenthist++;
}
}
currenthist=0;
for(int i=0; i<noutp; i++) {
if(noutp<4) break;
for(int j=i+1; j<noutp; j++) {
for(int k=j+1; k<noutp; k++) {
Flavour flav1 = hdc->GetDecayProduct(i);
Flavour flav2 = hdc->GetDecayProduct(j);
Flavour flav3 = hdc->GetDecayProduct(k);
string name = "q2_"+flav1.IDName()+"_"+flav2.IDName()+"_"+flav3.IDName()
+"_"+ToString(i)+ToString(j)+ToString(k);
string xtitle = "Inv. Mass q^{2}=(p_{"+flav1.RootName()+
"}+p_{"+flav2.RootName()+"}+p_{"+flav3.RootName()+"})^{2} [GeV^{2}]";
string ytitle = "#frac{1}{#Gamma} #frac{d#Gamma}{dq^{2}} [GeV^{-2}]";
double othermass = 0.0;
for(int l=0; l<noutp; l++) {
if(l==i || l==j || l==k) continue;
othermass+=hdc->GetDecayProduct(k).HadMass();
}
double q2min = 0.0;
double q2max = 1.1*sqr(hdc->GetDecaying().HadMass());
hist = makeTH1D(name.c_str(), "", 50, q2min, q2max, xtitle, ytitle);
ThreeInvMassHists[hdc].push_back(hist);
currenthist++;
}
}
}
}
#endif
}