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
abbba54d
Commit
abbba54d
authored
12 years ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
introduced new class AbsDecayList
parent
2d452f3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PwaUtils/AbsDecayList.cc
+87
-0
87 additions, 0 deletions
PwaUtils/AbsDecayList.cc
PwaUtils/AbsDecayList.hh
+36
-0
36 additions, 0 deletions
PwaUtils/AbsDecayList.hh
with
123 additions
and
0 deletions
PwaUtils/AbsDecayList.cc
0 → 100644
+
87
−
0
View file @
abbba54d
// AbsDecayList class definition file. -*- C++ -*-
// Copyright 2012 Bertram Kopf
#include
<getopt.h>
#include
<fstream>
#include
<iostream>
#include
<boost/algorithm/string.hpp>
#include
"PwaUtils/AbsDecayList.hh"
#include
"PwaUtils/AbsDecay.hh"
#include
"qft++/relativistic-quantum-mechanics/Utils.hh"
#include
"ErrLogger/ErrLogger.hh"
#include
"Particle/Particle.hh"
AbsDecayList
::
AbsDecayList
(){
}
AbsDecayList
::~
AbsDecayList
(){
}
void
AbsDecayList
::
addDecay
(
boost
::
shared_ptr
<
AbsDecay
>
theIsoDec
){
// const std::string key = theIsoDec->motherPart()->name();
// std::map<const std::string, boost::shared_ptr<AbsDecay> >::iterator it;
// it=_absDecList.find(key);
// if (it != _absDecList.end()){
_absDecList
.
push_back
(
theIsoDec
);
// }
// else{
// Warning << "decay of the particle " << key << " already exists\n"
// << "new decay cannot be added!!!" << endmsg;
// }
}
boost
::
shared_ptr
<
AbsDecay
>
AbsDecayList
::
decay
(
Particle
*
mother
){
boost
::
shared_ptr
<
AbsDecay
>
result
;
const
std
::
string
key
=
mother
->
name
();
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>::
iterator
it
;
for
(
it
=
_absDecList
.
begin
();
it
!=
_absDecList
.
end
();
++
it
){
if
(
key
==
(
*
it
)
->
motherPart
()
->
name
()){
result
=
(
*
it
);
break
;
}
}
return
result
;
}
boost
::
shared_ptr
<
AbsDecay
>
AbsDecayList
::
decay
(
const
std
::
string
&
name
){
boost
::
shared_ptr
<
AbsDecay
>
result
;
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>::
iterator
it
;
for
(
it
=
_absDecList
.
begin
();
it
!=
_absDecList
.
end
();
++
it
){
if
(
name
==
(
*
it
)
->
name
()){
result
=
(
*
it
);
break
;
}
}
return
result
;
}
void
AbsDecayList
::
replaceSuffix
(
const
std
::
string
&
oldPart
,
const
std
::
string
&
newPart
){
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>::
iterator
it
;
for
(
it
=
_absDecList
.
begin
();
it
!=
_absDecList
.
end
();
++
it
){
std
::
string
theSuffix
=
(
*
it
)
->
fitParSuffix
();
boost
::
replace_all
(
theSuffix
,
oldPart
,
newPart
);
(
*
it
)
->
setFitParSuffix
(
theSuffix
);
}
}
void
AbsDecayList
::
replaceMassKey
(
const
std
::
string
&
oldPart
,
const
std
::
string
&
newPart
){
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>::
iterator
it
;
for
(
it
=
_absDecList
.
begin
();
it
!=
_absDecList
.
end
();
++
it
){
if
(
oldPart
==
(
*
it
)
->
massParKey
()){
(
*
it
)
->
setMassParKey
(
newPart
);
}
}
}
This diff is collapsed.
Click to expand it.
PwaUtils/AbsDecayList.hh
0 → 100644
+
36
−
0
View file @
abbba54d
// AbsDecayList class definition file. -*- C++ -*-
// Copyright 2012 Bertram Kopf
#pragma once
#include
<iostream>
#include
<vector>
#include
<complex>
#include
<map>
#include
<vector>
#include
<string>
#include
<sstream>
#include
<boost/shared_ptr.hpp>
#include
"PwaUtils/DataUtils.hh"
class
Particle
;
class
AbsDecay
;
class
AbsDecayList
{
public:
AbsDecayList
();
~
AbsDecayList
();
void
addDecay
(
boost
::
shared_ptr
<
AbsDecay
>
theIsoDec
);
boost
::
shared_ptr
<
AbsDecay
>
decay
(
Particle
*
mother
);
boost
::
shared_ptr
<
AbsDecay
>
decay
(
const
std
::
string
&
name
);
void
replaceSuffix
(
const
std
::
string
&
oldPart
,
const
std
::
string
&
newPart
);
void
replaceMassKey
(
const
std
::
string
&
oldPart
,
const
std
::
string
&
newPart
);
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>&
getList
()
{
return
_absDecList
;}
protected
:
std
::
vector
<
boost
::
shared_ptr
<
AbsDecay
>
>
_absDecList
;
};
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