EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
src
EvtGenBase
EvtDecayIncoherent.cpp
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#include "
EvtGenBase/EvtDecayIncoherent.hh
"
22
23
#include "
EvtGenBase/EvtDecayBase.hh
"
24
#include "
EvtGenBase/EvtPDL.hh
"
25
#include "
EvtGenBase/EvtParticle.hh
"
26
#include "
EvtGenBase/EvtRadCorr.hh
"
27
#include "
EvtGenBase/EvtReport.hh
"
28
29
void
EvtDecayIncoherent::makeDecay
(
EvtParticle
* p,
bool
recursive )
30
{
31
//initialize this the hard way..
32
//Lange June 26, 2000
33
for
(
size_t
i = 0; i < static_cast<unsigned int>(
MAX_DAUG
); i++ ) {
34
m_spinDensitySet
[i] = 0;
35
}
36
37
m_daugsDecayedByParentModel
=
false
;
38
39
decay
( p );
40
p->
setDecayProb
( 1.0 );
41
42
EvtSpinDensity
rho;
43
44
rho.
setDiag
( p->
getSpinStates
() );
45
46
p->
setSpinDensityBackward
( rho );
47
48
if
( (
getFSR
() ||
EvtRadCorr::alwaysRadCorr
() ) &&
49
!
EvtRadCorr::neverRadCorr
() ) {
50
EvtRadCorr::doRadCorr
( p );
51
}
52
53
if
( !recursive )
54
return
;
55
56
//Now decay the daughters.
57
58
if
( !
daugsDecayedByParentModel
() ) {
59
for
(
size_t
i = 0; i < p->
getNDaug
(); i++ ) {
60
//Need to set the spin density of the daughters to be
61
//diagonal.
62
rho.
setDiag
( p->
getDaug
( i )->
getSpinStates
() );
63
//if (p->getDaug(i)->getNDaug()==0){
64
//only do this if the user has not already set the
65
//spin density matrix herself.
66
//Lange June 26, 2000
67
if
(
isDaughterSpinDensitySet
( i ) == 0 ) {
68
p->
getDaug
( i )->
setSpinDensityForward
( rho );
69
}
else
{
70
//EvtGenReport(EVTGEN_INFO,"EvtGen") << "spinDensitymatrix already set!!!\n";
71
EvtSpinDensity
temp = p->
getDaug
( i )->
getSpinDensityForward
();
72
// EvtGenReport(EVTGEN_INFO,"EvtGen") <<temp<<endl;
73
}
74
//Now decay the daughter. Really!
75
p->
getDaug
( i )->
decay
();
76
}
77
}
78
}
EvtDecayBase.hh
EvtDecayIncoherent.hh
EvtPDL.hh
EvtParticle.hh
MAX_DAUG
const int MAX_DAUG
Definition
EvtParticle.hh:41
EvtRadCorr.hh
EvtReport.hh
EvtDecayBase::getFSR
bool getFSR() const
Definition
EvtDecayBase.hh:68
EvtDecayBase::decay
virtual void decay(EvtParticle *p)=0
EvtDecayBase::daugsDecayedByParentModel
bool daugsDecayedByParentModel() const
Definition
EvtDecayBase.hh:111
EvtDecayBase::m_daugsDecayedByParentModel
bool m_daugsDecayedByParentModel
Definition
EvtDecayBase.hh:110
EvtDecayIncoherent::makeDecay
void makeDecay(EvtParticle *p, bool recursive=true) override
Definition
EvtDecayIncoherent.cpp:29
EvtDecayIncoherent::isDaughterSpinDensitySet
int isDaughterSpinDensitySet(int daughter)
Definition
EvtDecayIncoherent.hh:43
EvtDecayIncoherent::m_spinDensitySet
int m_spinDensitySet[MAX_DAUG]
Definition
EvtDecayIncoherent.hh:49
EvtParticle
Definition
EvtParticle.hh:45
EvtParticle::setSpinDensityBackward
void setSpinDensityBackward(const EvtSpinDensity &rho)
Definition
EvtParticle.hh:373
EvtParticle::setSpinDensityForward
void setSpinDensityForward(const EvtSpinDensity &rho)
Definition
EvtParticle.hh:341
EvtParticle::setDecayProb
void setDecayProb(double p)
Definition
EvtParticle.cpp:1271
EvtParticle::decay
void decay()
Definition
EvtParticle.cpp:438
EvtParticle::getSpinStates
int getSpinStates() const
Definition
EvtParticle.cpp:139
EvtParticle::getDaug
EvtParticle * getDaug(const int i)
Definition
EvtParticle.hh:173
EvtParticle::getNDaug
size_t getNDaug() const
Definition
EvtParticle.cpp:154
EvtParticle::getSpinDensityForward
EvtSpinDensity getSpinDensityForward()
Definition
EvtParticle.hh:368
EvtRadCorr::alwaysRadCorr
static bool alwaysRadCorr()
Definition
EvtRadCorr.cpp:57
EvtRadCorr::neverRadCorr
static bool neverRadCorr()
Definition
EvtRadCorr.cpp:61
EvtRadCorr::doRadCorr
static void doRadCorr(EvtParticle *p)
Definition
EvtRadCorr.cpp:43
EvtSpinDensity
Definition
EvtSpinDensity.hh:28
EvtSpinDensity::setDiag
void setDiag(int n)
Definition
EvtSpinDensity.cpp:118
Generated by
1.16.1