Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pawian
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PWA
Pawian
Commits
9566b239
Commit
9566b239
authored
8 years ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
some fixes in PhpFactorApp
parent
d2180832
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Examples/Tutorial/LineShapes/PhpFactor.cc
+5
-9
5 additions, 9 deletions
Examples/Tutorial/LineShapes/PhpFactor.cc
Scripts/extractPhpHistos.C
+190
-0
190 additions, 0 deletions
Scripts/extractPhpHistos.C
qft++Extension/PawianUtils.cc
+0
-4
0 additions, 4 deletions
qft++Extension/PawianUtils.cc
with
195 additions
and
13 deletions
Examples/Tutorial/LineShapes/PhpFactor.cc
+
5
−
9
View file @
9566b239
...
...
@@ -85,8 +85,6 @@ PhpFactor::PhpFactor(double mass1, double mass2, double massMax) :
_phpPenningtonImagHist
=
new
TH1F
(
"_phpPenningtonImagHist"
,
"#rho imag Pennington"
,
301
,
-
massMaxSqr
,
massMaxSqr
);
_phpPenningtonImagHist
->
GetYaxis
()
->
SetTitle
(
"i #rho"
);
_phpPenningtonImagHist
->
GetXaxis
()
->
SetTitle
(
"s[GeV^{2}/c^{4}]"
);
_phpDefaultRealHist
=
new
TH1F
(
"_phpDefaultRealHist"
,
"#rho real default"
,
301
,
-
massMaxSqr
,
massMaxSqr
);
_phpDefaultImagHist
=
new
TH1F
(
"_phpDefaultImagHist"
,
"#rho imag default"
,
301
,
-
massMaxSqr
,
massMaxSqr
);
_phpReidRealHist
=
new
TH1F
(
"_phpReidRealHist"
,
"#rho real Reid"
,
301
,
-
massMaxSqr
,
massMaxSqr
);
_phpReidRealHist
->
GetYaxis
()
->
SetTitle
(
"i #rho"
);
...
...
@@ -158,7 +156,7 @@ PhpFactor::PhpFactor(double mass1, double mass2, double massMax) :
_phpMPenningtonRealHist
->
Fill
(
massIt
,
currentPenningtonFac
.
real
());
_phpMPenningtonImagHist
->
Fill
(
massIt
,
currentPenningtonFac
.
imag
());
complex
<
double
>
currentReidFac
=
PawianQFT
::
phaseSpaceFacReid
(
massIt
,
_mass1
,
_mass2
);
complex
<
double
>
currentReidFac
=
i
*
PawianQFT
::
phaseSpaceFacReid
(
massIt
,
_mass1
,
_mass2
);
// if ( fabs(currentReidFac.real()) <1000. && fabs(currentReidFac.imag()) <1000.){
_phpMReidRealHist
->
Fill
(
massIt
,
currentReidFac
.
real
());
_phpMReidImagHist
->
Fill
(
massIt
,
currentReidFac
.
imag
());
...
...
@@ -178,7 +176,7 @@ PhpFactor::PhpFactor(double mass1, double mass2, double massMax) :
_phpPenningtonRealHist2
->
Fill
(
massRealIt
,
massImagIt
,
currentPenningtonFac
.
real
());
_phpPenningtonImagHist2
->
Fill
(
massRealIt
,
massImagIt
,
currentPenningtonFac
.
imag
());
complex
<
double
>
currentReidFac
=
PawianQFT
::
phaseSpaceFacReid
(
currentMass
,
_mass1
,
_mass2
);
complex
<
double
>
currentReidFac
=
i
*
PawianQFT
::
phaseSpaceFacReid
(
currentMass
,
_mass1
,
_mass2
);
_phpReidRealHist2
->
Fill
(
massRealIt
,
massImagIt
,
currentReidFac
.
real
());
_phpReidImagHist2
->
Fill
(
massRealIt
,
massImagIt
,
currentReidFac
.
imag
());
}
...
...
@@ -187,9 +185,9 @@ PhpFactor::PhpFactor(double mass1, double mass2, double massMax) :
stepSize
=
2.
*
massMaxSqr
/
301.
;
for
(
double
massSqrIt
=-
massMaxSqr
+
stepSize
/
2.
;
massSqrIt
<
massMaxSqr
;
massSqrIt
+=
stepSize
){
complex
<
double
>
currentFac
=
PawianQFT
::
phaseSpaceFacAsner
(
massSqrIt
,
_mass1
,
_mass2
);
std
::
cout
<<
"massSqrIt: "
<<
massSqrIt
<<
std
::
endl
;
std
::
cout
<<
"currentFac.real(): "
<<
currentFac
.
real
()
<<
std
::
endl
;
std
::
cout
<<
"currentFac.imag(): "
<<
currentFac
.
imag
()
<<
std
::
endl
;
//
std::cout << "massSqrIt: " << massSqrIt << std::endl;
//
std::cout << "currentFac.real(): " << currentFac.real() << std::endl;
//
std::cout << "currentFac.imag(): " << currentFac.imag() << std::endl;
if
(
currentFac
.
real
()
==
currentFac
.
real
()
&&
currentFac
.
imag
()
==
currentFac
.
imag
()){
_phpAsnerRealHist
->
Fill
(
massSqrIt
,
currentFac
.
real
());
_phpAsnerImagHist
->
Fill
(
massSqrIt
,
currentFac
.
imag
());
...
...
@@ -217,8 +215,6 @@ PhpFactor::PhpFactor(double mass1, double mass2, double massMax) :
}
complex
<
double
>
currentPenningtonFac
=
PawianQFT
::
phaseSpaceFacPennington
(
massSqrItCompl
,
_mass1
,
_mass2
);
std
::
cout
<<
"currentPenningtonFac.real(): "
<<
currentPenningtonFac
.
real
()
<<
std
::
endl
;
std
::
cout
<<
"currentPenningtonFac.imag(): "
<<
currentPenningtonFac
.
imag
()
<<
std
::
endl
;
if
(
currentPenningtonFac
.
real
()
==
currentPenningtonFac
.
real
()
&&
currentPenningtonFac
.
imag
()
==
currentPenningtonFac
.
imag
()
&&
fabs
(
currentPenningtonFac
.
real
())
>
1.e-3
){
_phpPenningtonRealHist
->
Fill
(
massSqrItCompl
.
real
(),
currentPenningtonFac
.
real
());
_phpPenningtonImagHist
->
Fill
(
massSqrItCompl
.
real
(),
currentPenningtonFac
.
imag
());
...
...
This diff is collapsed.
Click to expand it.
Scripts/extractPhpHistos.C
0 → 100644
+
190
−
0
View file @
9566b239
#include
<iostream>
#include
<sstream>
#include
"TFile.h"
#include
"TH1F.h"
#include
"TH2F.h"
#include
"TCanvas.h"
#include
"TMath.h"
#include
"TKey.h"
#include
"TLegend.h"
#include
<algorithm>
//void extractPhpComplexHistos(std::string rootFileName);
void
extractPhpHistos
(
std
::
string
rootFileName
=
"PhpFactor.root"
){
TFile
*
tFile
=
new
TFile
(
rootFileName
.
c_str
());
TCanvas
*
canvasRealS
=
new
TCanvas
(
"RealS"
,
"RealS"
,
20
,
20
,
900
,
900
);
canvasRealS
->
Divide
(
2
,
2
);
// TLegend *legend=new TLegend(0.6,0.65,0.88,0.85);
// legend->AddEntry("","real","lpe");
// legend->AddEntry("","imad","lpe");
TH1F
*
phpAsnerImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpAsnerImagHist"
);
phpAsnerImagHist
->
SetLineColor
(
kRed
);
phpAsnerImagHist
->
SetLineWidth
(
3
);
phpAsnerImagHist
->
SetMinimum
(
-
1
.
2
);
phpAsnerImagHist
->
SetStats
(
false
);
TH1F
*
phpAsnerRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpAsnerRealHist"
);
phpAsnerRealHist
->
SetLineColor
(
kBlue
);
phpAsnerRealHist
->
SetLineWidth
(
3
);
phpAsnerRealHist
->
SetStats
(
false
);
TH1F
*
phpPenningtonImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpPenningtonImagHist"
);
phpPenningtonImagHist
->
SetLineColor
(
kRed
);
phpPenningtonImagHist
->
SetLineWidth
(
3
);
phpPenningtonImagHist
->
SetMinimum
(
-
1
.
2
);
phpPenningtonImagHist
->
SetStats
(
false
);
TH1F
*
phpPenningtonRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpPenningtonRealHist"
);
phpPenningtonRealHist
->
SetLineColor
(
kBlue
);
phpPenningtonRealHist
->
SetLineWidth
(
3
);
phpPenningtonRealHist
->
SetStats
(
false
);
TH1F
*
phpDefaultComplImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpDefaultComplImagHist"
);
phpDefaultComplImagHist
->
SetLineColor
(
kRed
);
phpDefaultComplImagHist
->
SetLineWidth
(
3
);
phpDefaultComplImagHist
->
SetMaximum
(
4
.
0
);
phpDefaultComplImagHist
->
SetStats
(
false
);
phpDefaultComplImagHist
->
SetMinimum
(
-
1
.
2
);
TH1F
*
phpDefaultComplRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpDefaultComplRealHist"
);
phpDefaultComplRealHist
->
SetLineColor
(
kBlue
);
phpDefaultComplRealHist
->
SetLineWidth
(
3
);
phpDefaultComplRealHist
->
SetStats
(
false
);
TH1F
*
phpReidImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpReidImagHist"
);
phpReidImagHist
->
SetLineColor
(
kRed
);
phpReidImagHist
->
SetLineWidth
(
3
);
phpReidImagHist
->
SetMinimum
(
-
1
.
2
);
phpReidImagHist
->
SetStats
(
false
);
TH1F
*
phpReidRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpReidRealHist"
);
phpReidRealHist
->
SetLineColor
(
kBlue
);
phpReidRealHist
->
SetLineWidth
(
3
);
phpReidRealHist
->
SetStats
(
false
);
canvasRealS
->
cd
(
1
);
phpAsnerImagHist
->
Draw
();
phpAsnerRealHist
->
Draw
(
"same"
);
// legend->Draw();
canvasRealS
->
cd
(
2
);
phpPenningtonImagHist
->
Draw
();
phpPenningtonRealHist
->
Draw
(
"same"
);
canvasRealS
->
cd
(
3
);
phpDefaultComplImagHist
->
Draw
();
phpDefaultComplRealHist
->
Draw
(
"same"
);
canvasRealS
->
cd
(
4
);
phpReidImagHist
->
Draw
();
phpReidRealHist
->
Draw
(
"same"
);
TCanvas
*
canvasRealM
=
new
TCanvas
(
"RealM"
,
"RealM"
,
20
,
20
,
900
,
900
);
canvasRealM
->
Divide
(
2
,
2
);
TH1F
*
phpMAsnerImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMAsnerImagHist"
);
phpMAsnerImagHist
->
SetLineColor
(
kRed
);
phpMAsnerImagHist
->
SetLineWidth
(
3
);
phpMAsnerImagHist
->
SetMinimum
(
-
1
.
2
);
phpMAsnerImagHist
->
SetStats
(
false
);
TH1F
*
phpMAsnerRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMAsnerRealHist"
);
phpMAsnerRealHist
->
SetLineColor
(
kBlue
);
phpMAsnerRealHist
->
SetLineWidth
(
3
);
phpMAsnerRealHist
->
SetStats
(
false
);
TH1F
*
phpMPenningtonImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMPenningtonImagHist"
);
phpMPenningtonImagHist
->
SetLineColor
(
kRed
);
phpMPenningtonImagHist
->
SetLineWidth
(
3
);
phpMPenningtonImagHist
->
SetMinimum
(
-
1
.
2
);
phpMPenningtonImagHist
->
SetStats
(
false
);
TH1F
*
phpMPenningtonRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMPenningtonRealHist"
);
phpMPenningtonRealHist
->
SetLineColor
(
kBlue
);
phpMPenningtonRealHist
->
SetLineWidth
(
3
);
phpMPenningtonRealHist
->
SetStats
(
false
);
TH1F
*
phpMDefaultComplImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMDefaultComplImagHist"
);
phpMDefaultComplImagHist
->
SetLineColor
(
kRed
);
phpMDefaultComplImagHist
->
SetLineWidth
(
3
);
phpMDefaultComplImagHist
->
SetMaximum
(
2
.
0
);
phpMDefaultComplImagHist
->
SetStats
(
false
);
phpMDefaultComplImagHist
->
SetMinimum
(
-
1
.
2
);
TH1F
*
phpMDefaultComplRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMDefaultComplRealHist"
);
phpMDefaultComplRealHist
->
SetLineColor
(
kBlue
);
phpMDefaultComplRealHist
->
SetLineWidth
(
3
);
phpMDefaultComplRealHist
->
SetStats
(
false
);
TH1F
*
phpMReidImagHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMReidImagHist"
);
phpMReidImagHist
->
SetLineColor
(
kRed
);
phpMReidImagHist
->
SetLineWidth
(
3
);
phpMReidImagHist
->
SetMaximum
(
1
.
2
);
phpMReidImagHist
->
SetMinimum
(
-
1
.
2
);
phpMReidImagHist
->
SetStats
(
false
);
TH1F
*
phpMReidRealHist
=
(
TH1F
*
)
tFile
->
Get
(
"_phpMReidRealHist"
);
phpMReidRealHist
->
SetLineColor
(
kBlue
);
phpMReidRealHist
->
SetLineWidth
(
3
);
phpMReidRealHist
->
SetStats
(
false
);
canvasRealM
->
cd
(
1
);
phpMAsnerImagHist
->
Draw
();
phpMAsnerRealHist
->
Draw
(
"same"
);
canvasRealM
->
cd
(
2
);
phpMPenningtonImagHist
->
Draw
();
phpMPenningtonRealHist
->
Draw
(
"same"
);
canvasRealM
->
cd
(
3
);
phpMDefaultComplImagHist
->
Draw
();
phpMDefaultComplRealHist
->
Draw
(
"same"
);
canvasRealM
->
cd
(
4
);
phpMReidImagHist
->
Draw
();
phpMReidRealHist
->
Draw
(
"same"
);
TCanvas
*
canvasComplexS
=
new
TCanvas
(
"ComplexS"
,
"ComplexS"
,
20
,
20
,
900
,
900
);
canvasComplexS
->
Divide
(
2
,
3
);
TH2F
*
phpPenningtonRealHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpPenningtonRealHist2"
);
phpPenningtonRealHist2
->
SetStats
(
false
);
TH2F
*
phpPenningtonImagHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpPenningtonImagHist2"
);
phpPenningtonImagHist2
->
SetStats
(
false
);
TH2F
*
phpReidRealHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpReidRealHist2"
);
phpReidRealHist2
->
SetStats
(
false
);
TH2F
*
phpReidImagHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpReidImagHist2"
);
phpReidImagHist2
->
SetStats
(
false
);
TH2F
*
phpDefaultComplRealHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpDefaultComplRealHist2"
);
phpDefaultComplRealHist2
->
SetStats
(
false
);
TH2F
*
phpDefaultComplRealAbove1Hist2
=
(
TH2F
*
)
phpDefaultComplRealHist2
->
Clone
();
phpDefaultComplRealAbove1Hist2
->
GetXaxis
()
->
SetRangeUser
(
0
.
2
,
3
.
0
);
TH2F
*
phpDefaultComplImagHist2
=
(
TH2F
*
)
tFile
->
Get
(
"_phpDefaultComplImagHist2"
);
phpDefaultComplImagHist2
->
GetXaxis
()
->
SetRangeUser
(
0
.
2
,
3
.
0
);
phpDefaultComplImagHist2
->
SetStats
(
false
);
canvasComplexS
->
cd
(
1
);
phpPenningtonRealHist2
->
Draw
(
"colz"
);
canvasComplexS
->
cd
(
2
);
phpPenningtonImagHist2
->
Draw
(
"colz"
);
canvasComplexS
->
cd
(
3
);
phpDefaultComplRealAbove1Hist2
->
Draw
(
"colz"
);
canvasComplexS
->
cd
(
4
);
phpDefaultComplImagHist2
->
Draw
(
"colz"
);
canvasComplexS
->
cd
(
5
);
phpReidRealHist2
->
Draw
(
"colz"
);
canvasComplexS
->
cd
(
6
);
phpReidImagHist2
->
Draw
(
"colz"
);
}
This diff is collapsed.
Click to expand it.
qft++Extension/PawianUtils.cc
+
0
−
4
View file @
9566b239
...
...
@@ -44,7 +44,6 @@ complex<double> PawianQFT::phaseSpaceFacAsner(double s, double massDec1, double
complex
<
double
>
i
(
0.
,
1.
);
double
rho_i
=
rhoiAsner
(
s
,
massDec1
,
massDec2
);
std
::
cout
<<
"s: "
<<
s
<<
" rho_i: "
<<
rho_i
<<
std
::
endl
;
complex
<
double
>
irhoComplex
(
-
rho_i
/
PawianConstants
::
pi
,
0.
);
if
(
s
<
0
||
s
>
(
massDec1
+
massDec2
)
*
(
massDec1
+
massDec2
)){
double
multTerm
=
fabs
((
1.
+
rho_i
)
/
(
1.
-
rho_i
));
...
...
@@ -73,7 +72,6 @@ complex<double> PawianQFT::phaseSpaceFacPennington(complex<double> s, double mas
complex
<
double
>
i
(
0.
,
1.
);
complex
<
double
>
sqrrho_a
=
complex
<
double
>
(
1.
,
0.
)
-
(
massDec1
+
massDec2
)
*
(
massDec1
+
massDec2
)
/
s
;
complex
<
double
>
rho_a
=
sqrt
(
sqrrho_a
);
// std::cout << "s: " << s << " rho_a Pennington: " << rho_a << " sqrrho_a: " << sqrrho_a << std::endl;
complex
<
double
>
result
=-
rho_a
/
PawianConstants
::
pi
*
log
((
rho_a
+
1.
)
/
(
rho_a
-
1.
));
return
result
;
}
...
...
@@ -101,7 +99,6 @@ complex<double> PawianQFT::ChewMandelstamReid(complex<double> s, double massDec1
if
(
norm
(
m1_2_m_m2_2
)
>
1.e-15
)
term34
+=
log
(
massDec1
/
massDec2
)
*
m1_2_p_m2_2
/
(
2.
*
m1_2_m_m2_2
);
else
term34
+=
complex
<
double
>
(
0.5
,
0.
);
// complex<double> result=-2./PawianConstants::pi*(term2-term1-term34);
complex
<
double
>
result
=-
2.
/
PawianConstants
::
pi
*
(
term2
-
term1
-
term34
);
return
result
;
}
...
...
@@ -121,7 +118,6 @@ complex<double> PawianQFT::phaseSpaceFacReid(double mass, double massDec1, doubl
complex
<
double
>
PawianQFT
::
phaseSpaceFacPenningtonsqrts
(
complex
<
double
>
sqrts
,
double
massDec1
,
double
massDec2
){
complex
<
double
>
s
=
sqrts
*
sqrts
;
complex
<
double
>
result
=
PawianQFT
::
phaseSpaceFacPennington
(
s
,
massDec1
,
massDec2
);
//if( sqrts.real() > (massDec1+massDec2) ) result=complex<double>(0., result.imag());
return
result
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment