BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtIntervalDecayAmp< T > Class Template Referenceabstract

#include <EvtIntervalDecayAmp.hh>

+ Inheritance diagram for EvtIntervalDecayAmp< T >:

Public Member Functions

 EvtIntervalDecayAmp ()
 
 EvtIntervalDecayAmp (const EvtIntervalDecayAmp< T > &other)
 
virtual ~EvtIntervalDecayAmp ()
 
virtual void init ()
 
virtual void initProbMax ()
 
virtual void decay (EvtParticle *p)
 
virtual EvtAmpFactory< T > * createFactory (const EvtMultiChannelParser &parser)=0
 
virtual std::vector< EvtVector4RinitDaughters (const T &p) const =0
 
const T & x () const
 
EvtComplex amplNonCP (const T &x)
 
EvtPdfSum< T > * getPC ()
 
- Public Member Functions inherited from EvtDecayAmp
void makeDecay (EvtParticle *p)
 
void setWeight (double weight)
 
void vertex (const EvtComplex &amp)
 
void vertex (int i1, const EvtComplex &amp)
 
void vertex (int i1, int i2, const EvtComplex &amp)
 
void vertex (int i1, int i2, int i3, const EvtComplex &amp)
 
void vertex (int *i1, const EvtComplex &amp)
 
virtual ~EvtDecayAmp ()
 
- Public Member Functions inherited from EvtDecayBase
virtual void getName (std::string &name)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual std::string commandName ()
 
virtual void command (std::string cmd)
 
double getProbMax (double prob)
 
double resetProbMax (double prob)
 
 EvtDecayBase ()
 
virtual ~EvtDecayBase ()
 
virtual bool matchingDecay (const EvtDecayBase &other) const
 
EvtId getParentId ()
 
double getBranchingFraction ()
 
void disableCheckQ ()
 
void checkQ ()
 
int getNDaug ()
 
EvtIdgetDaugs ()
 
EvtId getDaug (int i)
 
int getNArg ()
 
int getPHOTOS ()
 
void setPHOTOS ()
 
void setVerbose ()
 
void setSummary ()
 
double * getArgs ()
 
std::string * getArgsStr ()
 
double getArg (int j)
 
std::string getArgStr (int j)
 
std::string getModelName ()
 
int getDSum ()
 
int summary ()
 
int verbose ()
 
void saveDecayInfo (EvtId ipar, int ndaug, EvtId *daug, int narg, std::vector< std::string > &args, std::string name, double brfr)
 
void printSummary ()
 
void setProbMax (double prbmx)
 
void noProbMax ()
 
void checkNArg (int a1, int a2=-1, int a3=-1, int a4=-1)
 
void checkNDaug (int d1, int d2=-1)
 
void checkSpinParent (EvtSpinType::spintype sp)
 
void checkSpinDaughter (int d1, EvtSpinType::spintype sp)
 
virtual int nRealDaughters ()
 

Protected Attributes

double _probMax
 
int _nScan
 
_x
 
EvtAmpFactory< T > * _fact
 
- Protected Attributes inherited from EvtDecayAmp
EvtAmp _amp2
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Additional Inherited Members

- Static Public Member Functions inherited from EvtDecayBase
static void findMasses (EvtParticle *p, int ndaugs, EvtId daugs[10], double masses[10])
 
static void findMass (EvtParticle *p)
 
static double findMaxMass (EvtParticle *p)
 
- Protected Member Functions inherited from EvtDecayBase
bool daugsDecayedByParentModel ()
 

Detailed Description

template<class T>
class EvtIntervalDecayAmp< T >

Definition at line 39 of file EvtIntervalDecayAmp.hh.

Constructor & Destructor Documentation

◆ EvtIntervalDecayAmp() [1/2]

template<class T >
EvtIntervalDecayAmp< T >::EvtIntervalDecayAmp ( )
inline

Definition at line 43 of file EvtIntervalDecayAmp.hh.

◆ EvtIntervalDecayAmp() [2/2]

template<class T >
EvtIntervalDecayAmp< T >::EvtIntervalDecayAmp ( const EvtIntervalDecayAmp< T > & other)
inline

Definition at line 47 of file EvtIntervalDecayAmp.hh.

48 : _probMax(other._probMax), _nScan(other._nScan),
50 {}
#define COPY_PTR(X)
Definition EvtMacros.hh:15
Index other(Index i, Index j)

◆ ~EvtIntervalDecayAmp()

template<class T >
virtual EvtIntervalDecayAmp< T >::~EvtIntervalDecayAmp ( )
inlinevirtual

Definition at line 52 of file EvtIntervalDecayAmp.hh.

53 {
54 delete _fact;
55 }

Member Function Documentation

◆ amplNonCP()

template<class T >
EvtComplex EvtIntervalDecayAmp< T >::amplNonCP ( const T & x)
inline

Definition at line 170 of file EvtIntervalDecayAmp.hh.

170{return _fact->getAmp()->evaluate(x);}

Referenced by EvtBtoKD3P::decay(), and EvtIntervalDecayAmp< T >::decay().

◆ createFactory()

template<class T >
virtual EvtAmpFactory< T > * EvtIntervalDecayAmp< T >::createFactory ( const EvtMultiChannelParser & parser)
pure virtual

Implemented in EvtPto3P.

Referenced by EvtIntervalDecayAmp< T >::init().

◆ decay()

template<class T >
virtual void EvtIntervalDecayAmp< T >::decay ( EvtParticle * p)
inlinevirtual

Implements EvtDecayBase.

Definition at line 108 of file EvtIntervalDecayAmp.hh.

109 {
110 // Set things up in most general way
111
112 static EvtId B0=EvtPDL::getId("B0");
113 static EvtId B0B=EvtPDL::getId("anti-B0");
114 double t;
115 EvtId other_b;
116 EvtComplex ampl(0.,0.);
117
118 // Sample using pole-compensator pdf
119
120 EvtPdfSum<T>* pc = getPC();
121 _x = pc->randomPoint();
122
123 if(_fact->isCPModel()) {
124
125 EvtCPUtil::OtherB(p,t,other_b);
126 EvtComplex A = _fact->getAmp()->evaluate(_x);
127 EvtComplex Abar = _fact->getAmpConj()->evaluate(_x);
128 double dm = _fact->dm();
129
130 if (other_b==B0B) ampl=A*cos(dm*t/(2*EvtConst::c))+Abar*sin(dm*t/(2*EvtConst::c));
131 if (other_b==B0) ampl=A*cos(dm*t/(2*EvtConst::c))-Abar*sin(dm*t/(2*EvtConst::c));
132 }
133 else {
134
135 ampl = amplNonCP(_x);
136 }
137
138 // Pole-compensate
139
140 double comp = sqrt(pc->evaluate(_x));
141 assert(comp > 0);
142 vertex(ampl/comp);
143
144 // Now generate random angles, rotate and setup
145 // the daughters
146
147 std::vector<EvtVector4R> v = initDaughters(_x);
148
149 int N = p->getNDaug();
150 if(v.size() != N) {
151
152 report(INFO,"EvtGen") << "Number of daughters " << N << std::endl;
153 report(INFO,"EvtGen") << "Momentum vector size " << v.size() << std::endl;
154 assert(0);
155 }
156
157 int i;
158 for(i=0;i<N;i++){
159
160 p->getDaug(i)->init(getDaugs()[i],v[i]);
161 }
162 }
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ INFO
Definition EvtReport.hh:52
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
TTree * t
Definition binning.cxx:23
static void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition EvtCPUtil.cc:229
static const double c
Definition EvtConst.hh:32
void vertex(const EvtComplex &amp)
EvtId * getDaugs()
Definition EvtId.hh:27
EvtPdfSum< T > * getPC()
EvtComplex amplNonCP(const T &x)
virtual std::vector< EvtVector4R > initDaughters(const T &p) const =0
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:287
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
int getNDaug() const
EvtParticle * getDaug(int i)
virtual T randomPoint()
Definition EvtPdfSum.hh:118
double evaluate(const T &p) const
Definition EvtPdf.hh:65

◆ getPC()

template<class T >
EvtPdfSum< T > * EvtIntervalDecayAmp< T >::getPC ( )
inline

Definition at line 171 of file EvtIntervalDecayAmp.hh.

171{return _fact->getPC();}

Referenced by EvtBtoKD3P::decay(), and EvtIntervalDecayAmp< T >::decay().

◆ init()

template<class T >
virtual void EvtIntervalDecayAmp< T >::init ( )
inlinevirtual

Reimplemented from EvtDecayBase.

Definition at line 60 of file EvtIntervalDecayAmp.hh.

61 {
62 // Collect model parameters and parse them
63
64 vector<std::string> args;
65 int i;
66 for(i=0;i<getNArg();i++) args.push_back(getArgStr(i));
68 parser.parse(args);
69
70 // Create factory and interval
71
72 if(VERBOSE) report(INFO,"EvtGen") << "Create factory and interval" << std::endl;
73 _fact = createFactory(parser);
74
75
76 // Maximum PDF value over the Dalitz plot can be specified, or a scan
77 // can be performed.
78
79 _probMax = parser.pdfMax();
80 _nScan = parser.nScan();
81 if(VERBOSE) report(INFO,"EvtGen") << "Pdf maximum " << _probMax << std::endl;
82 if(VERBOSE) report(INFO,"EvtGen") << "Scan number " << _nScan << std::endl;
83 }
#define VERBOSE
std::string getArgStr(int j)
virtual EvtAmpFactory< T > * createFactory(const EvtMultiChannelParser &parser)=0
void parse(const char *file, const char *model)

◆ initDaughters()

template<class T >
virtual std::vector< EvtVector4R > EvtIntervalDecayAmp< T >::initDaughters ( const T & p) const
pure virtual

Implemented in EvtPto3P.

Referenced by EvtIntervalDecayAmp< T >::decay().

◆ initProbMax()

template<class T >
virtual void EvtIntervalDecayAmp< T >::initProbMax ( )
inlinevirtual

Reimplemented from EvtDecayBase.

Definition at line 86 of file EvtIntervalDecayAmp.hh.

87 {
88 if(0 == _nScan) {
89
91 else assert(0);
92 }
93 else {
94
95 double factor = 1.2; // increase maximum probability by 20%
96 EvtAmpPdf<T> pdf(*_fact->getAmp());
97 EvtPdfSum<T>* pc = _fact->getPC();
98 EvtPdfDiv<T> pdfdiv(pdf,*pc);
99 printf("Sampling %d points to find maximum\n",_nScan);
100 EvtPdfMax<T> x = pdfdiv.findMax(*pc,_nScan);
101 _probMax = factor * x.value();
102 printf("Found maximum %f\n",x.value());
103 printf("Increase to %f\n",_probMax);
105 }
106 }
void setProbMax(double prbmx)
double value() const
Definition EvtPdfMax.hh:39

◆ x()

template<class T >
const T & EvtIntervalDecayAmp< T >::x ( ) const
inline

Member Data Documentation

◆ _fact

◆ _nScan

template<class T >
int EvtIntervalDecayAmp< T >::_nScan
protected

◆ _probMax

template<class T >
double EvtIntervalDecayAmp< T >::_probMax
protected

◆ _x

template<class T >
T EvtIntervalDecayAmp< T >::_x
protected

The documentation for this class was generated from the following file: