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
12c6c0ca
Commit
12c6c0ca
authored
10 years ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
fixed doScaling mode in singleChannelApp
parent
d8a25bee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Examples/Tutorial/LineShapes/BarrierFactorApp.cc
+25
-18
25 additions, 18 deletions
Examples/Tutorial/LineShapes/BarrierFactorApp.cc
PwaApps/singleChannelApp.cc
+7
-5
7 additions, 5 deletions
PwaApps/singleChannelApp.cc
with
32 additions
and
23 deletions
Examples/Tutorial/LineShapes/BarrierFactorApp.cc
+
25
−
18
View file @
12c6c0ca
...
@@ -207,7 +207,7 @@ int main(int argc, char *argv[])
...
@@ -207,7 +207,7 @@ int main(int argc, char *argv[])
allCanvas
->
cd
(
5
);
allCanvas
->
cd
(
5
);
qValCanvas
->
DrawClonePad
();
qValCanvas
->
DrawClonePad
();
complex
<
double
>
q0Dec
=
breakupMomQ
(
resonanceMass
,
decayParticle1Mass
,
decayParticle2Mass
).
real
();
// Barrier factors for decay
// Barrier factors for decay
TCanvas
*
decOnlyCanvas
=
new
TCanvas
(
"decOnlyCanvas"
,
"decOnlyCanvas"
,
800
,
600
);
TCanvas
*
decOnlyCanvas
=
new
TCanvas
(
"decOnlyCanvas"
,
"decOnlyCanvas"
,
800
,
600
);
...
@@ -223,8 +223,10 @@ int main(int argc, char *argv[])
...
@@ -223,8 +223,10 @@ int main(int argc, char *argv[])
dHist
->
SetLineWidth
(
2
);
dHist
->
SetLineWidth
(
2
);
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
double
q
=
breakupMomQ
(
dHist
->
GetBinCenter
(
i
),
decayParticle1Mass
,
decayParticle2Mass
).
real
();
complex
<
double
>
q
=
breakupMomQ
(
dHist
->
GetBinCenter
(
i
),
decayParticle1Mass
,
decayParticle2Mass
).
real
();
std
::
complex
<
double
>
value
=
BarrierFactor
::
BlattWeisskopf
(
l
,
q
,
qRdec
);
// std::complex<double> value = BarrierFactor::BlattWeisskopf(l, q, qRdec);
std
::
complex
<
double
>
value
=
BarrierFactor
::
BlattWeisskopfRatio
(
l
,
q
,
q0Dec
,
qRdec
);
// std::cout << "BarrierFactor::BlattWeisskopf(l, q, qRdec) = " << BarrierFactor::BlattWeisskopf(l, q, qRdec) << "\t BarrierFactor::BlattWeisskopfRatio(l, q, q0Dec, qRdec) = " << BarrierFactor::BlattWeisskopfRatio(l, q, q0Dec, qRdec) << std::endl;
dHist
->
SetBinContent
(
i
,
std
::
abs
(
value
));
dHist
->
SetBinContent
(
i
,
std
::
abs
(
value
));
}
}
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
dHist
->
GetNbinsX
()));
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
dHist
->
GetNbinsX
()));
...
@@ -252,8 +254,8 @@ int main(int argc, char *argv[])
...
@@ -252,8 +254,8 @@ int main(int argc, char *argv[])
dHist
->
SetLineWidth
(
2
);
dHist
->
SetLineWidth
(
2
);
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
double
q
=
breakupMomQ
(
motherMass
,
recoilMass
,
dHist
->
GetBinCenter
(
i
)).
real
();
std
::
complex
<
double
>
q
=
breakupMomQ
(
motherMass
,
recoilMass
,
dHist
->
GetBinCenter
(
i
)).
real
();
double
qNorm
=
breakupMomQ
(
motherMass
,
recoilMass
,
decayParticle1Mass
+
decayParticle2Mass
).
real
();
std
::
complex
<
double
>
qNorm
=
breakupMomQ
(
motherMass
,
recoilMass
,
decayParticle1Mass
+
decayParticle2Mass
).
real
();
std
::
complex
<
double
>
value
=
BarrierFactor
::
BlattWeisskopf
(
l
,
q
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
l
,
qNorm
,
qRprod
);
std
::
complex
<
double
>
value
=
BarrierFactor
::
BlattWeisskopf
(
l
,
q
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
l
,
qNorm
,
qRprod
);
dHist
->
SetBinContent
(
i
,
std
::
abs
(
value
.
real
()));
dHist
->
SetBinContent
(
i
,
std
::
abs
(
value
.
real
()));
}
}
...
@@ -287,20 +289,22 @@ int main(int argc, char *argv[])
...
@@ -287,20 +289,22 @@ int main(int argc, char *argv[])
combinedHistVec
.
push_back
(
dHist
);
combinedHistVec
.
push_back
(
dHist
);
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
for
(
int
i
=
1
;
i
<=
dHist
->
GetNbinsX
();
i
++
){
double
qDec
=
breakupMomQ
(
dHist
->
GetBinCenter
(
i
),
decayParticle1Mass
,
decayParticle2Mass
).
real
();
complex
<
double
>
qDec
=
breakupMomQ
(
dHist
->
GetBinCenter
(
i
),
decayParticle1Mass
,
decayParticle2Mass
).
real
();
double
qProd
=
breakupMomQ
(
motherMass
,
recoilMass
,
dHist
->
GetBinCenter
(
i
)).
real
();
complex
<
double
>
qProd
=
breakupMomQ
(
motherMass
,
recoilMass
,
dHist
->
GetBinCenter
(
i
)).
real
();
double
qNorm
=
breakupMomQ
(
motherMass
,
recoilMass
,
decayParticle1Mass
+
decayParticle2Mass
).
real
();
complex
<
double
>
qNorm
=
breakupMomQ
(
motherMass
,
recoilMass
,
decayParticle1Mass
+
decayParticle2Mass
).
real
();
std
::
complex
<
double
>
valueDec
=
BarrierFactor
::
BlattWeisskopf
(
ld
,
qDec
,
qRdec
);
std
::
complex
<
double
>
valueDec
=
BarrierFactor
::
BlattWeisskopf
Ratio
(
ld
,
qDec
,
q0Dec
,
qRdec
);
std
::
complex
<
double
>
valueProd
=
BarrierFactor
::
BlattWeisskopf
(
lp
,
qProd
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
lp
,
qNorm
,
qRprod
);
std
::
complex
<
double
>
valueProd
=
BarrierFactor
::
BlattWeisskopf
(
lp
,
qProd
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
lp
,
qNorm
,
qRprod
);
dHist
->
SetBinContent
(
i
,
std
::
abs
(
valueDec
.
real
()
*
valueProd
.
real
()));
// std::cout << "valueDec: " << valueDec << "\tvalueProd: " << valueProd << "\t(valueDec* valueProd).real(): " << (valueDec*valueProd).real() << std::endl;
// dHist->SetBinContent(i, std::abs(valueDec.real() * valueProd.real()));
dHist
->
SetBinContent
(
i
,
(
valueDec
*
valueProd
).
real
());
}
}
if
(
normMass
>
0
){
//
if(normMass > 0){
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
dHist
->
FindBin
(
normMass
)));
//
dHist->Scale(1./dHist->GetBinContent(dHist->FindBin(normMass)));
}
//
}
else
{
//
else{
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
250
));
//
dHist->Scale(1./dHist->GetBinContent(250));
}
//
}
double
currentMax
=
dHist
->
GetMaximum
();
double
currentMax
=
dHist
->
GetMaximum
();
if
(
currentMax
>
maxValCombined
)
maxValCombined
=
currentMax
;
if
(
currentMax
>
maxValCombined
)
maxValCombined
=
currentMax
;
...
@@ -344,14 +348,17 @@ int main(int argc, char *argv[])
...
@@ -344,14 +348,17 @@ int main(int argc, char *argv[])
std
::
complex
<
double
>
valueProd
=
BarrierFactor
::
BlattWeisskopf
(
lp
,
qProd
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
lp
,
qNorm
,
qRprod
);
std
::
complex
<
double
>
valueProd
=
BarrierFactor
::
BlattWeisskopf
(
lp
,
qProd
,
qRprod
)
/
BarrierFactor
::
BlattWeisskopf
(
lp
,
qNorm
,
qRprod
);
std
::
complex
<
double
>
breitWigner
=
BreitWignerFunction
::
BlattWRel
(
ld
,
dHist
->
GetBinCenter
(
i
),
resonanceMass
,
std
::
complex
<
double
>
breitWigner
=
BreitWignerFunction
::
BlattWRel
(
ld
,
dHist
->
GetBinCenter
(
i
),
resonanceMass
,
resonanceWidth
,
decayParticle1Mass
,
decayParticle2Mass
,
qRdec
);
resonanceWidth
,
decayParticle1Mass
,
decayParticle2Mass
,
qRdec
);
dHist
->
SetBinContent
(
i
,
std
::
norm
(
breitWigner
*
valueProd
));
dHist
->
SetBinContent
(
i
,
std
::
norm
(
breitWigner
*
valueProd
));
}
}
if
(
normMass
>
0
){
if
(
normMass
>
0
){
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
dHist
->
FindBin
(
normMass
)));
double
bcont
=
dHist
->
GetBinContent
(
dHist
->
FindBin
(
normMass
));
if
(
bcont
>
0.
)
dHist
->
Scale
(
1.
/
bcont
);
}
}
else
{
else
{
dHist
->
Scale
(
1.
/
dHist
->
GetBinContent
(
dHist
->
FindBin
(
resonanceMass
)));
double
bcont
=
dHist
->
GetBinContent
(
dHist
->
FindBin
(
resonanceMass
));
if
(
bcont
>
0.
)
dHist
->
Scale
(
1.
/
bcont
);
}
}
double
currentMax
=
dHist
->
GetMaximum
();
double
currentMax
=
dHist
->
GetMaximum
();
if
(
currentMax
>
maxValRes
)
maxValRes
=
currentMax
;
if
(
currentMax
>
maxValRes
)
maxValRes
=
currentMax
;
...
...
This diff is collapsed.
Click to expand it.
PwaApps/singleChannelApp.cc
+
7
−
5
View file @
12c6c0ca
...
@@ -139,12 +139,14 @@ int main(int __argc,char *__argv[]){
...
@@ -139,12 +139,14 @@ int main(int __argc,char *__argv[]){
}
}
// Fix params for all channels
// Fix params for all channels
std
::
vector
<
std
::
string
>
fixedParams
;
if
(
GlobalEnv
::
instance
()
->
parser
()
->
doScaling
())
theAppBase
.
fixAllReleaseScaleParams
(
upar
);
std
::
vector
<
std
::
string
>
fixedChannelParams
=
GlobalEnv
::
instance
()
->
parser
()
->
fixedParams
();
else
{
fixedParams
.
insert
(
fixedParams
.
end
(),
fixedChannelParams
.
begin
(),
fixedChannelParams
.
end
());
std
::
vector
<
std
::
string
>
fixedParams
;
std
::
vector
<
std
::
string
>
fixedChannelParams
=
GlobalEnv
::
instance
()
->
parser
()
->
fixedParams
();
fixedParams
.
insert
(
fixedParams
.
end
(),
fixedChannelParams
.
begin
(),
fixedChannelParams
.
end
());
theAppBase
.
fixParams
(
upar
,
fixedParams
);
}
theAppBase
.
fixParams
(
upar
,
fixedParams
);
const
unsigned
int
noOfFreeFitParams
=
upar
->
VariableParameters
();
const
unsigned
int
noOfFreeFitParams
=
upar
->
VariableParameters
();
// Disable output buffering
// Disable output buffering
...
...
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