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
b1e3698c
Commit
b1e3698c
authored
13 years ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
Psi2STo2K2PiGam: added pure production fit 2. try
parent
6a345b3a
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/Psi2STo2K2PiGam/HypProdLh.cc
+145
-0
145 additions, 0 deletions
Examples/Psi2STo2K2PiGam/HypProdLh.cc
Examples/Psi2STo2K2PiGam/HypProdLh.hh
+64
-0
64 additions, 0 deletions
Examples/Psi2STo2K2PiGam/HypProdLh.hh
with
209 additions
and
0 deletions
Examples/Psi2STo2K2PiGam/HypProdLh.cc
0 → 100644
+
145
−
0
View file @
b1e3698c
#include
<getopt.h>
#include
<fstream>
#include
"Examples/Psi2STo2K2PiGam/HypProdLh.hh"
#include
"Examples/Psi2STo2K2PiGam/Psi2STo2K2PiGamEvtList.hh"
#include
"ErrLogger/ErrLogger.hh"
HypProdLh
::
HypProdLh
(
boost
::
shared_ptr
<
const
Psi2STo2K2PiGamEvtList
>
theEvtList
)
:
AbsPsi2STo2K2PiGamLh
(
theEvtList
)
,
_nFitParams
(
0
)
{
setUp
();
}
HypProdLh
::
HypProdLh
(
boost
::
shared_ptr
<
AbsPsi2STo2K2PiGamLh
>
theLhPtr
)
:
AbsPsi2STo2K2PiGamLh
(
theLhPtr
->
getEventList
())
,
_nFitParams
(
0
)
{
setUp
();
}
HypProdLh
::~
HypProdLh
()
{;
}
complex
<
double
>
HypProdLh
::
chi0DecAmps
(
const
param2K2PiGam
&
theParamVal
,
Psi2STo2K2PiGamData
::
Psi2STo2K2PiGamEvtData
*
theData
){
complex
<
double
>
result
(
1.
,
0.
);
return
result
;
}
void
HypProdLh
::
setMnUsrParams
(
MnUserParameters
&
upar
,
param2K2PiGam
&
startVal
,
param2K2PiGam
&
errVal
){
_fitParams2K2PiGam
.
setMnUsrParamsFlatteMass
(
upar
,
startVal
,
errVal
,
paramEnum2K2PiGam
::
name
(
paramEnum2K2PiGam
::
phaseSpace
));
std
::
vector
<
unsigned
int
>::
const_iterator
itAmps
;
for
(
itAmps
=
_ampVec
.
begin
();
itAmps
!=
_ampVec
.
end
();
++
itAmps
){
_fitParams2K2PiGam
.
setMnUsrParamsDec
(
upar
,
startVal
,
errVal
,
(
*
itAmps
));
}
}
int
HypProdLh
::
setFitParamVal
(
param2K2PiGam
&
theParamVal
,
const
std
::
vector
<
double
>&
par
){
if
(
par
.
size
()
!=
nFitParams
()
)
{
Alert
<<
"size of parameters wrong!!! par.size()="
<<
par
.
size
()
<<
"
\t
it should be"
<<
nFitParams
()
<<
endmsg
;
exit
(
1
);
}
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>::
const_iterator
itJPCLS
;
int
counter
=
0
;
counter
=
_fitParams2K2PiGam
.
setFitParamFlatteMass
(
theParamVal
,
par
,
counter
,
paramEnum2K2PiGam
::
name
(
paramEnum2K2PiGam
::
phaseSpace
));
std
::
vector
<
unsigned
int
>::
const_iterator
itAmps
;
for
(
itAmps
=
_ampVec
.
begin
();
itAmps
!=
_ampVec
.
end
();
++
itAmps
){
counter
=
_fitParams2K2PiGam
.
setFitParamValDec
(
theParamVal
,
par
,
counter
,
(
*
itAmps
));
}
return
counter
;
}
unsigned
int
HypProdLh
::
nFitParams
(){
return
_nFitParams
;
}
void
HypProdLh
::
print
(
std
::
ostream
&
os
)
const
{
os
<<
"HypProdLh::print
\n
"
;
}
void
HypProdLh
::
printCurrentFitResult
(
param2K2PiGam
&
theParamVal
){
DebugMsg
<<
"phaseSpace: "
<<
theParamVal
.
phaseSpace
<<
endmsg
;
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>::
const_iterator
itJPCLS
;
std
::
vector
<
unsigned
int
>::
const_iterator
itAmps
;
for
(
itAmps
=
_ampVec
.
begin
();
itAmps
!=
_ampVec
.
end
();
++
itAmps
){
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>
JPCLSs
=
_fitParams2K2PiGam
.
jpclsVec
(
*
itAmps
);
for
(
itJPCLS
=
JPCLSs
.
begin
();
itJPCLS
!=
JPCLSs
.
end
();
++
itJPCLS
){
DebugMsg
<<
(
*
itJPCLS
)
->
name
()
<<
paramEnum2K2PiGam
::
name
(
*
itAmps
)
<<
endmsg
;
std
::
map
<
boost
::
shared_ptr
<
const
JPCLS
>
,
pair
<
double
,
double
>
,
pawian
::
Collection
::
SharedPtrLess
>
currentMap
=
_fitParams2K2PiGam
.
ampMap
(
theParamVal
,
*
itAmps
);
std
::
pair
<
double
,
double
>
tmpParam
=
currentMap
[(
*
itJPCLS
)];
DebugMsg
<<
"
\t
mag:"
<<
tmpParam
.
first
<<
"
\t
phi:"
<<
tmpParam
.
second
<<
endmsg
;
}
}
}
void
HypProdLh
::
dumpCurrentResult
(
std
::
ostream
&
os
,
param2K2PiGam
&
theParamVal
,
std
::
string
&
suffix
){
if
(
suffix
.
compare
(
"Val"
)
!=
0
&&
suffix
.
compare
(
"Err"
)
!=
0
){
Warning
<<
"suffix "
<<
suffix
<<
" not supported!!! Use Val or Err"
<<
endmsg
;
return
;
}
std
::
string
tmpStringPs
=
"phaseSpace"
+
suffix
;
os
<<
tmpStringPs
<<
"
\t
"
<<
theParamVal
.
phaseSpace
<<
"
\t
"
<<
0.
<<
std
::
endl
;
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>::
const_iterator
itJPCLS
;
std
::
vector
<
unsigned
int
>::
const_iterator
itAmps
;
for
(
itAmps
=
_ampVec
.
begin
();
itAmps
!=
_ampVec
.
end
();
++
itAmps
){
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>
JPCLSs
=
_fitParams2K2PiGam
.
jpclsVec
(
*
itAmps
);
for
(
itJPCLS
=
JPCLSs
.
begin
();
itJPCLS
!=
JPCLSs
.
end
();
++
itJPCLS
){
std
::
map
<
boost
::
shared_ptr
<
const
JPCLS
>
,
pair
<
double
,
double
>
,
pawian
::
Collection
::
SharedPtrLess
>
currentMap
=
_fitParams2K2PiGam
.
ampMap
(
theParamVal
,
*
itAmps
);
std
::
pair
<
double
,
double
>
tmpParam
=
currentMap
[(
*
itJPCLS
)];
std
::
string
tmpStringDec
=
(
*
itJPCLS
)
->
name
()
+
paramEnum2K2PiGam
::
name
(
*
itAmps
)
+
suffix
;
os
<<
tmpStringDec
<<
"
\t
"
<<
tmpParam
.
first
<<
"
\t
"
<<
tmpParam
.
second
<<
std
::
endl
;
}
}
}
void
HypProdLh
::
setUp
(){
_ampVec
.
push_back
(
paramEnum2K2PiGam
::
ChiGam
);
std
::
vector
<
unsigned
int
>::
iterator
ampIt
;
for
(
ampIt
=
_ampVec
.
begin
();
ampIt
!=
_ampVec
.
end
();
++
ampIt
){
std
::
vector
<
boost
::
shared_ptr
<
const
JPCLS
>
>
JPCLSs
=
_fitParams2K2PiGam
.
jpclsVec
(
*
ampIt
);
_nFitParams
+=
2
*
JPCLSs
.
size
();
}
_nFitParams
+=
1
;
//phase space
}
This diff is collapsed.
Click to expand it.
Examples/Psi2STo2K2PiGam/HypProdLh.hh
0 → 100644
+
64
−
0
View file @
b1e3698c
#ifndef _HypProdLh_H
#define _HypProdLh_H
#include
<iostream>
#include
<fstream>
#include
<string>
#include
<vector>
#include
<complex>
//#include <map>
#include
<cassert>
#include
<boost/shared_ptr.hpp>
#include
"TROOT.h"
// #include <TSystem.h>
#include
"qft++/topincludes/relativistic-quantum-mechanics.hh"
#include
"Examples/Psi2STo2K2PiGam/AbsPsi2STo2K2PiGamLh.hh"
#include
"Examples/Psi2STo2K2PiGam/Psi2STo2K2PiGamData.hh"
#include
"PwaUtils/DataUtils.hh"
#include
"Minuit2/MnUserParameters.h"
class
HypProdLh
:
public
AbsPsi2STo2K2PiGamLh
{
public:
// create/copy/destroy:
///Constructor
HypProdLh
(
boost
::
shared_ptr
<
const
Psi2STo2K2PiGamEvtList
>
);
HypProdLh
(
boost
::
shared_ptr
<
AbsPsi2STo2K2PiGamLh
>
);
/** Destructor */
virtual
~
HypProdLh
();
virtual
AbsPsi2STo2K2PiGamLh
*
clone_
()
const
{
return
new
HypProdLh
(
_Psi2STo2K2PiGamEvtListPtr
);
}
// Getters:
virtual
void
setMnUsrParams
(
MnUserParameters
&
upar
,
param2K2PiGam
&
startVal
,
param2K2PiGam
&
errVal
);
virtual
int
setFitParamVal
(
param2K2PiGam
&
theParamVal
,
const
std
::
vector
<
double
>&
par
);
virtual
unsigned
int
nFitParams
();
virtual
void
print
(
std
::
ostream
&
os
)
const
;
virtual
void
printCurrentFitResult
(
param2K2PiGam
&
theParamVal
);
virtual
void
dumpCurrentResult
(
std
::
ostream
&
os
,
param2K2PiGam
&
theParamVal
,
std
::
string
&
suffix
);
protected
:
virtual
complex
<
double
>
chi0DecAmps
(
const
param2K2PiGam
&
theParamVal
,
Psi2STo2K2PiGamData
::
Psi2STo2K2PiGamEvtData
*
theData
);
private
:
unsigned
int
_nFitParams
;
std
::
vector
<
unsigned
int
>
_ampVec
;
void
setUp
();
};
#endif
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