CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
UsermDIY.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of models developed at BES collaboration
5// based on the EvtGen framework. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/BesCopyright
9// Copyright (A) 2006 Ping Rong-Gang
10//
11// Module: Modified DIY model, see EvtDeay.cc
12//
13// Description: Routine to sample the decays using the amplitude specified by users
14// This model allow use to specify the intermediate states
15//
16// Modification history:
17//
18// Ping R.-G. 4-25, 2010 Module created
19//
20//------------------------------------------------------------------------
21#ifndef EVTDECAY_H
22#define EVTDECAY_H
23
24#include "EvtDecay.h"
30#include "EvtGen.hh"
33
34#include <stdlib.h>
35#include <string.h>
36using std::cout;
37using std::endl;
38
39double EvtDecay::CalAmpsMDIY(EvtParticle* part ){
40//---- read out the momentum for each particle, then using them to calculate the amplitude squared, for example:
41/*********** using the following decay cards ****************
42Decay J/psi
431 gamma eta_c PHSP;
44Enddecay
45
46Decay eta_c
471 phi phi PHSP;
48Enddecay
49
50Decay phi
511 K+ K- PHSP;
52Enddecay
53
54End
55*////////
56//----------------------------------
57 EvtVector4R pjsi,petac,pphi1,pphi2,pkp1,pkp2;
58 pjsi = part->getP4();
59 petac= part->getDaug(1)->getP4(); //etac momentum
60 pphi1= part->getDaug(1)->getDaug(0)->getP4(); //phi1 momentum
61 pphi2= part->getDaug(1)->getDaug(1)->getP4(); //phi2 momentum
62
63 pkp1 = part->getDaug(1)->getDaug(0)->getDaug(0)->getP4(); //K+ from phi1
64 pkp2 = part->getDaug(1)->getDaug(1)->getDaug(0)->getP4(); //K+ from phi2
65
66 EvtHelSys angles0(pjsi,petac);
67 double theta0 = angles0.getHelAng(1);
68 double phi0 = angles0.getHelAng(2);
69
70 EvtHelSys angles2(pphi1,pkp1);
71 double theta2 = angles2.getHelAng(1);
72 double phi2 = angles2.getHelAng(2);
73
74 EvtHelSys angles3(pphi2,pkp2);
75 double theta3 = angles3.getHelAng(1);
76 double phi3 = angles3.getHelAng(2);
77
78 double amps=(3+cos(2*theta0)) * sin(theta2)*sin(theta2) * sin(theta3)*sin(theta3) * sin(phi2+phi3)*sin(phi2+phi3);
79
80
81///////////======== don't touch follows =======================
82 if(amps <=0){
83 report(INFO,"EvtGen") << "Amplitude square of modified DIY should be positive, but found to be equal "<<amps<<endl;
84 abort();
85 } else {
86 return amps;
87 }
88}
89
90
91#endif
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Double_t phi2
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ INFO
Definition: EvtReport.hh:52
@ theta2
Definition: TrkKalDeriv.h:24
double getHelAng(int i)
Definition: EvtHelSys.cc:54
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85