18 #include <TCollection.h>
25 #include <TGeoElement.h>
27 #include <TParameter.h>
28 #include <TPaveText.h>
38 "PairAnalysis MetaData Container") {
46 : TNamed(name, title), fMetaList() {
68 TNamed* pSetup =
new TNamed(
"setup",
"undefined");
72 TNamed* pSystem =
new TNamed(
"system",
"Au+Au");
76 TNamed* pProduction =
new TNamed(
"production",
"SIS");
80 TParameter<Double_t>* pBeamEnergy =
81 new TParameter<Double_t>(
"beamenergy", 4.107);
83 pBeamEnergy->SetBit(TParameter<Double_t>::kFirst);
86 TParameter<Int_t>* pEvents =
new TParameter<Int_t>(
"events", 0);
87 pEvents->SetMergeMode(
'+');
90 TParameter<Bool_t>* pMC =
new TParameter<Bool_t>(
"mc", kTRUE);
91 pMC->SetBit(TParameter<Bool_t>::kIsConst);
95 TNamed* pTrainOp =
new TNamed(
"operator",
"undefined");
96 pTrainOp->SetTitle(gSystem->Getenv(
"USER"));
101 TParameter<Int_t>* pRootVers =
102 new TParameter<Int_t>(
"root", gROOT->GetVersionInt());
103 pRootVers->SetBit(TParameter<Int_t>::kIsConst);
106 gSystem->Setenv(
"CBMROOT_SVN_REVISION",
107 gSystem->GetFromPipe(
"svnversion $VMCWORKDIR"));
108 TString rev = gSystem->Getenv(
"CBMROOT_SVN_REVISION");
109 TParameter<Int_t>* pCbmRev =
new TParameter<Int_t>(
"cbmroot", 0);
110 pCbmRev->SetBit(TParameter<Int_t>::kIsConst);
111 pCbmRev->SetVal(rev.Atoi());
115 TParameter<Int_t>* pDate =
new TParameter<Int_t>(
"date", dat.GetDate());
116 pDate->SetBit(TParameter<Int_t>::kMin);
119 TParameter<Int_t>* pTime =
new TParameter<Int_t>(
"time", dat.GetTime());
120 pTime->SetBit(TParameter<Int_t>::kMin);
131 TString name(GetName());
132 if (name ==
"PairAnalysisMetaData") SetName(list.GetName());
135 while ((o = next())) {
139 list.SetOwner(kFALSE);
150 TParameter<Double_t>* par =
151 dynamic_cast<TParameter<Double_t>*
>(
fMetaList.FindObject(name));
159 TParameter<Int_t>* par =
160 dynamic_cast<TParameter<Int_t>*
>(
fMetaList.FindObject(name));
168 TNamed* par =
dynamic_cast<TNamed*
>(
fMetaList.FindObject(name));
176 TParameter<Int_t>* par =
177 dynamic_cast<TParameter<Int_t>*
>(
fMetaList.FindObject(name));
178 if (par) *val = par->GetVal();
185 TParameter<Double_t>* par =
186 dynamic_cast<TParameter<Double_t>*
>(
fMetaList.FindObject(name));
187 if (par) *val = par->GetVal();
202 TPaveText* pt =
new TPaveText(gPad->GetLeftMargin() + 0.05,
203 1. - gPad->GetTopMargin() + 0.01,
204 1. - gPad->GetRightMargin() - 0.05,
208 pt->SetTextAlign(kHAlignLeft + kVAlignCenter);
211 TString line =
"CBM";
215 TParameter<Bool_t>* parB =
216 dynamic_cast<TParameter<Bool_t>*
>(
fMetaList.FindObject(
"mc"));
217 if (opt.Contains(
"m") && parB && parB->GetVal()) {
218 tmp = Form(
" Simulation");
223 TNamed* par =
dynamic_cast<TNamed*
>(
fMetaList.FindObject(
"system"));
224 if (opt.Contains(
"s") && par) tmp = par->GetTitle();
225 if (!tmp.IsNull()) line +=
", " + tmp;
228 TParameter<Double_t>* parD =
229 dynamic_cast<TParameter<Double_t>*
>(
fMetaList.FindObject(
"beamenergy"));
230 if (opt.Contains(
"b") && parD) {
231 if (tmp.Contains(
"p"))
232 tmp = Form(
"#it{E}_{beam} = %.2f GeV", parD->GetVal());
234 tmp = Form(
"#it{E}_{beam} = %.2f #it{A}GeV", parD->GetVal());
235 if (!tmp.IsNull()) line +=
" " + tmp;
236 }
else if (opt.Contains(
"S") && parD) {
237 TString sys(par->GetTitle());
238 sys.ReplaceAll(
"+",
"");
239 sys.ReplaceAll(
"-",
"");
245 if (sys.EqualTo(
"pp")) {
252 TGeoElementTable g(0);
253 TString targ = (sys(sys.Length() - 2, sys.Length()));
254 TString proj = (sys(0, sys.Length() - 2));
255 proj.ReplaceAll(
"p",
"H");
257 g.FindElement(proj.Data())->A()
259 zProj = g.FindElement(proj.Data())->Z();
260 aTarg = g.FindElement(targ.Data())->A() + 0.05;
261 zTarg = g.FindElement(targ.Data())->Z();
286 tmp = Form(
"#sqrt{#it{s}_{NN}} = %.2f GeV", run.
GetNNSqrtS());
287 if (!tmp.IsNull()) line +=
" " + tmp;
291 TParameter<Int_t>* parI =
292 dynamic_cast<TParameter<Int_t>*
>(
fMetaList.FindObject(
"events"));
293 if (opt.Contains(
"n") && parD) {
295 tmp = Form(
"#it{N}_{evt} = %.1fM", parI->GetVal() / 1.e+6);
296 if (!tmp.IsNull()) line +=
", " + tmp;
299 pt->AddText(line.Data());
302 pt->SetLineColorAlpha(0, 0.0);
303 pt->SetFillColorAlpha(0, 0.0);
304 pt->SetFillStyle(kFEmpty);