Skip to content
Snippets Groups Projects
Commit ce2b196c authored by Bertram Kopf's avatar Bertram Kopf
Browse files

few modificatione in TwoPolesApp

parent ea874a40
No related branches found
No related tags found
No related merge requests found
...@@ -189,7 +189,7 @@ TwoPoles::TwoPoles(double MassRes1, double Width1, double MassRes2, double Width ...@@ -189,7 +189,7 @@ TwoPoles::TwoPoles(double MassRes1, double Width1, double MassRes2, double Width
theTMatrixNonRel.evalMatrix(massIt); theTMatrixNonRel.evalMatrix(massIt);
complex<double> currentTmatrix=theTMatrixNonRel(0,0); complex<double> currentTmatrix=theTMatrixNonRel(0,0);
cout << "TMatrix:\t" << currentTmatrix << endl; // cout << "TMatrix:\t" << currentTmatrix << endl;
weight=norm(currentTmatrix); weight=norm(currentTmatrix);
_massShapeKmatrHist->Fill(massIt,weight); _massShapeKmatrHist->Fill(massIt,weight);
_argandKmatrHist->Fill(currentTmatrix.real(),currentTmatrix.imag()); _argandKmatrHist->Fill(currentTmatrix.real(),currentTmatrix.imag());
...@@ -197,7 +197,7 @@ TwoPoles::TwoPoles(double MassRes1, double Width1, double MassRes2, double Width ...@@ -197,7 +197,7 @@ TwoPoles::TwoPoles(double MassRes1, double Width1, double MassRes2, double Width
theTMatrixRel.evalMatrix(massIt); theTMatrixRel.evalMatrix(massIt);
complex<double> currentTmatrixRel=theTMatrixRel(0,0); complex<double> currentTmatrixRel=theTMatrixRel(0,0);
cout << "TMatrixRel:\t" << currentTmatrixRel << endl; // cout << "TMatrixRel:\t" << currentTmatrixRel << endl;
weight=norm(currentTmatrixRel); weight=norm(currentTmatrixRel);
_massShapeKmatrHistRel->Fill(massIt,weight); _massShapeKmatrHistRel->Fill(massIt,weight);
_argandKmatrHistRel->Fill(currentTmatrixRel.real(),currentTmatrixRel.imag()); _argandKmatrHistRel->Fill(currentTmatrixRel.real(),currentTmatrixRel.imag());
......
...@@ -36,22 +36,80 @@ ...@@ -36,22 +36,80 @@
int main(int __argc,char *__argv[]){ int main(int __argc,char *__argv[]){
ErrLogger::instance()->setLevel(log4cpp::Priority::DEBUG); ErrLogger::instance()->setLevel(log4cpp::Priority::DEBUG);
double mass1=1.35; if( __argc>1 && ( strcmp( __argv[1], "-help" ) == 0
double width1=0.3; || strcmp( __argv[1], "--help" ) == 0 ) ){
double mass2=1.5; Info << "\nThis is a test application for histogramming the mass shapes of two resonances obtained by the Breit-Wigner parameterization and by the T-matrix calculation\n"
double width2=0.1; << "The switches are:\n\n"
<< "-mass1 (mass of the resonance1;default 1.318)\n\n"
<< "-width1 (width1 of the resonance1;default 0.1)\n\n"
<< "-mass2 (mass of the resonance2;default 1.5)\n\n"
<< "-delta (delta=mass range for histograms;default 0.4)\n\n"
<< endmsg;
return 0;
}
std::string mass1Str="1.318";
// double mass1=1.2; std::string width1Str="0.1";
// double width1=0.1; std::string mass2Str="1.5";
std::string width2Str="0.1";
std::string deltaStr="0.1";
// double mass2=1.8; while ((optind < (__argc-1) ) && (__argv[optind][0]=='-')) {
// double width2=0.1; bool found=false;
std::string sw = __argv[optind];
if (sw=="-mass1"){
optind++;
mass1Str = __argv[optind];
found=true;
}
if (sw=="-width1"){
optind++;
width1Str = __argv[optind];
found=true;
}
if (sw=="-mass2"){
optind++;
mass2Str = __argv[optind];
found=true;
}
if (sw=="-width2"){
optind++;
width2Str = __argv[optind];
found=true;
}
if (sw=="-delta"){
optind++;
deltaStr = __argv[optind];
found=true;
}
if (!found){
Warning << "Unknown switch: "
<< __argv[optind] << endmsg;
optind++;
}
}
std::stringstream mass1StrStr(mass1Str);
double mass1=0.;
mass1StrStr >> mass1;
double delta=0.4; std::stringstream width1StrStr(width1Str);
double width1=0.;
width1StrStr >> width1;
std::stringstream mass2StrStr(mass2Str);
double mass2=0.;
mass2StrStr >> mass2;
std::stringstream width2StrStr(width2Str);
double width2=0.;
width2StrStr >> width2;
std::stringstream deltaStrStr(deltaStr);
double delta=0.;
deltaStrStr >> delta;
TwoPoles twoPoles(mass1, width1, mass2, width2, delta); TwoPoles twoPoles(mass1, width1, mass2, width2, delta);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment