BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFlatQ2.cc
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Environment:
4
// This software is part of the EvtGen package developed jointly
5
// for the BaBar and CLEO collaborations. If you use all or part
6
// of it, please give an appropriate acknowledgement.
7
//
8
// Copyright Information: See EvtGen/COPYRIGHT
9
// Copyright (C) 1998 Caltech, UCSB
10
//
11
// Module: EvtFlatQ2.cc
12
//
13
// Description: B->Xu l nu with flat q2 distribution
14
//
15
// Modification history:
16
//
17
// David Cote, U. de Montreal, 11/02/2003 Module created
18
//
19
//------------------------------------------------------------------------
20
//
21
#include "
EvtFlatQ2.hh
"
22
#include "
../EvtGenBase/EvtPatches.hh
"
23
24
#include "
../EvtGenBase/EvtDiracSpinor.hh
"
25
#include "
../EvtGenBase/EvtGenKine.hh
"
26
#include "
../EvtGenBase/EvtPDL.hh
"
27
#include "
../EvtGenBase/EvtParticle.hh
"
28
#include "
../EvtGenBase/EvtReport.hh
"
29
#include "
../EvtGenBase/EvtTensor4C.hh
"
30
#include "
../EvtGenBase/EvtVector4C.hh
"
31
#include <fstream>
32
#include <stdio.h>
33
#include <stdlib.h>
34
#include <string>
35
using
std::fstream;
36
37
EvtFlatQ2::~EvtFlatQ2
() {}
38
39
void
EvtFlatQ2::getName
( std::string& model_name ) { model_name =
"FLATQ2"
; }
40
41
EvtDecayBase
*
EvtFlatQ2::clone
() {
return
new
EvtFlatQ2
; }
42
43
void
EvtFlatQ2::initProbMax
() {
setProbMax
( 100 ); }
44
45
void
EvtFlatQ2::init
() {
46
47
// check that there are 0 arguments
48
checkNArg
( 0 );
49
checkNDaug
( 3 );
50
51
// We expect B->X l nu events
52
checkSpinParent
(
EvtSpinType::SCALAR
);
53
checkSpinDaughter
( 1,
EvtSpinType::DIRAC
);
54
checkSpinDaughter
( 2,
EvtSpinType::NEUTRINO
);
55
}
56
57
void
EvtFlatQ2::decay
(
EvtParticle
* p ) {
58
59
p->
initializePhaseSpace
(
getNDaug
(),
getDaugs
() );
60
61
EvtVector4R
p4Xu = p->
getDaug
( 0 )->
getP4
();
62
double
pXu_x2 = p4Xu.
get
( 1 ) * p4Xu.
get
( 1 );
63
double
pXu_y2 = p4Xu.
get
( 2 ) * p4Xu.
get
( 2 );
64
double
pXu_z2 = p4Xu.
get
( 3 ) * p4Xu.
get
( 3 );
65
double
pXu = sqrt( pXu_x2 + pXu_y2 + pXu_z2 );
66
double
prob = 1 / pXu;
67
68
if
( pXu > 0.01 )
setProb
( prob );
69
70
return
;
71
}
EvtDiracSpinor.hh
EvtFlatQ2.hh
EvtGenKine.hh
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
EvtReport.hh
EvtTensor4C.hh
EvtVector4C.hh
EvtDecayBase::checkSpinDaughter
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
Definition
EvtDecayBase.cc:492
EvtDecayBase::checkSpinParent
void checkSpinParent(EvtSpinType::spintype sp)
Definition
EvtDecayBase.cc:479
EvtDecayBase::EvtDecayBase
EvtDecayBase()
Definition
EvtDecayBase.cc:205
EvtDecayBase::setProbMax
void setProbMax(double prbmx)
Definition
EvtDecayBase.cc:261
EvtDecayBase::getNDaug
int getNDaug()
Definition
EvtDecayBase.hh:67
EvtDecayBase::checkNDaug
void checkNDaug(int d1, int d2=-1)
Definition
EvtDecayBase.cc:465
EvtDecayBase::getDaugs
EvtId * getDaugs()
Definition
EvtDecayBase.hh:68
EvtDecayBase::checkNArg
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition
EvtDecayBase.cc:449
EvtDecayProb::setProb
void setProb(double prob)
Definition
EvtDecayProb.hh:40
EvtFlatQ2::getName
void getName(std::string &name)
Definition
EvtFlatQ2.cc:39
EvtFlatQ2::decay
void decay(EvtParticle *p)
Definition
EvtFlatQ2.cc:57
EvtFlatQ2::initProbMax
void initProbMax()
Definition
EvtFlatQ2.cc:43
EvtFlatQ2::init
void init()
Definition
EvtFlatQ2.cc:45
EvtFlatQ2::clone
EvtDecayBase * clone()
Definition
EvtFlatQ2.cc:41
EvtFlatQ2::~EvtFlatQ2
virtual ~EvtFlatQ2()
Definition
EvtFlatQ2.cc:37
EvtFlatQ2::EvtFlatQ2
EvtFlatQ2()
Definition
EvtFlatQ2.hh:31
EvtParticle
Definition
EvtParticle.hh:42
EvtParticle::getP4
const EvtVector4R & getP4() const
Definition
EvtParticle.cc:108
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition
EvtParticle.cc:80
EvtParticle::initializePhaseSpace
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition
EvtParticle.cc:1042
EvtSpinType::NEUTRINO
@ NEUTRINO
Definition
EvtSpinType.hh:36
EvtSpinType::SCALAR
@ SCALAR
Definition
EvtSpinType.hh:31
EvtSpinType::DIRAC
@ DIRAC
Definition
EvtSpinType.hh:34
EvtVector4R
Definition
EvtVector4R.hh:29
EvtVector4R::get
double get(int i) const
Definition
EvtVector4R.hh:171
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenModels
EvtFlatQ2.cc
Generated by
1.16.1