74 Double_t asym_diff_err,
75 Double_t asym_diff_width,
76 TString asym_diff_unit
103 return Form(
"%s,%e,%e,%e,%e,%e,%e",
fElementName.Data(),
fYield,
fYieldError,
fYieldWidth,
fAsymDiff,
fAsymDiffError,
fAsymDiffWidth);
110 Double_t asymmetry_ppm = 1
e-6;
112 if(type.Contains(
"yield")) {
132 else if(type.Contains(
"asymmetry")) {
148 else if(type.Contains(
"difference")) {
306 printf(
"AddElement at pos %d\n", pos);
321 TString get_name =
"";
323 while ( (obj = next()) )
326 get_name = an_element->
GetName();
327 if( get_name.Contains(name) ) {
329 std::cout <<
"System " << an_element->
GetName()
330 <<
" QwPromptSummary::GetElementByName address at" << an_element << std::endl;
347 out =
"======= BEGIN ======= \n";
359 out =
" ======== END of SUMMARY======== \n";
360 out +=
" ======== END ======== \n\n";
361 out +=
" Please contact Rakitha Beminiwattha for any queries and suggestions \n";
362 out +=
" rakithab@jlab.org \n";
371 TString filename =
"";
375 out =
"! This csv file is desinged for making plots easily.\n";
378 out +=
" in http://qweak.jlab.org/textsummaries/ for theirs units\n";
379 out +=
"!Please contact Jeong Han Lee via jhlee@jlab.org if one has comments or questions.\n";
390 Double_t yield_width,
393 Double_t asym_diff_err,
394 Double_t asym_diff_width,
395 TString asym_diff_unit
402 an_element->
FillData(yield, yield_err, yield_width, yield_unit, asym_diff, asym_diff_err, asym_diff_width, asym_diff_unit);
407 <<
"QwPromptSummary::FillDataInElement : No Element with the name "
419 Double_t yield_error,
420 Double_t yield_width,
434 <<
"QwPromptSummary::FillYieldToElement : No Element with the name "
445 Double_t asym_diff_err,
446 Double_t asym_diff_width,
447 TString asym_diff_unit
460 <<
"QwPromptSummary::FillYieldToElement : No Element with the name "
482 if(one_element and two_element ) {
490 Double_t error_diff = 0.0;
491 Double_t width_diff = 0.0;
495 Double_t a_err = 0.0;
496 Double_t b_err = 0.0;
497 Double_t a_wit = 0.0;
498 Double_t b_wit = 0.0;
500 if(type.Contains(
"yield")) {
501 a = one_element -> GetYield();
502 b = two_element -> GetYield();
503 a_err = one_element -> GetYieldError();
504 b_err = two_element -> GetYieldError();
505 a_wit = one_element -> GetYieldWidth();
506 b_wit = two_element -> GetYieldWidth();
509 error_diff = TMath::Sqrt(a_err*a_err + b_err*b_err);
510 width_diff = a_wit - b_wit;
512 an_element -> SetYield(diff);
513 an_element -> SetYieldError(error_diff);
514 an_element -> SetYieldWidth(width_diff);
517 else if (type.Contains(
"asymmetry")) {
518 a = one_element -> GetAsymmetry();
519 b = two_element -> GetAsymmetry();
520 a_err = one_element -> GetAsymmetryError();
521 b_err = two_element -> GetAsymmetryError();
522 a_wit = one_element -> GetAsymmetryWidth();
523 b_wit = two_element -> GetAsymmetryWidth();
526 error_diff = TMath::Sqrt(a_err*a_err + b_err*b_err);
527 width_diff = a_wit - b_wit;
529 an_element -> SetAsymmetry(diff);
530 an_element -> SetAsymmetryError(error_diff);
531 an_element -> SetAsymmetryWidth(width_diff);
538 <<
"QwPromptSummary::FillYieldToElement : No Element with the name "
539 << name1 +
"-" + name2
548 <<
"QwPromptSummary::FillDoubleDifference: No Elements with the name "
549 << name1 <<
" and " << name2
559 printf(
"-----------------------\n");
562 while ( (obj = next()) )
565 std::cout << an_element -> GetCSVSummary() << std::endl;
567 printf(
"-----------------------\n");
574 printf(
"-----------------------\n");
577 while ( (obj = next()) )
580 std::cout << an_element -> GetTextSummary() << std::endl;
582 printf(
"-----------------------\n");
void SetYieldWidth(const Double_t in)
void FillDoubleDifference(TString type, TString name1, TString name2)
void FillData(Double_t yield, Double_t yield_err, Double_t yield_width, TString yield_unit, Double_t asym_diff, Double_t asym_diff_err, Double_t asym_diff_width, TString asym_diff_unit)
virtual ~PromptSummaryElement()
void SetAsymmetryWidth(const Double_t in)
void FillYieldToElement(TString name, Double_t yield, Double_t yield_error, Double_t yield_width, TString yield_unit)
virtual ~QwPromptSummary()
void FillAsymDiffToElement(TString name, Double_t asym_diff, Double_t asym_diff_err, Double_t asym_diff_width, TString asym_diff_unit)
void AddElement(PromptSummaryElement *in)
void SetYield(const Double_t in)
void FillDataInElement(TString name, Double_t yield, Double_t yield_err, Double_t yield_width, TString yield_unit, Double_t asym_diff, Double_t asym_diff_err, Double_t asym_diff_width, TString asym_diff_unit)
void SetDifferenceWidth(const Double_t in)
void SetAsymmetryError(const Double_t in)
A logfile class, based on an identical class in the Hermes analyzer.
void SetAsymmetry(const Double_t in)
void SetDifferenceUnit(const TString in)
void Set(TString type, const Double_t a, const Double_t a_err, const Double_t a_width)
void SetYieldUnit(const TString in)
TString PrintTextSummaryHeader()
PromptSummaryElement * GetElementByName(TString name)
TString PrintTextSummaryTailer()
void SetAsymmetryUnit(const TString in)
void SetDifferenceError(const Double_t in)
void SetYieldError(const Double_t in)
void SetDifference(const Double_t in)