BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtMBody3.cc
Go to the documentation of this file.
1
2//--------------------------------------------------------------------------
3//
4// Environment:
5// This software is part of models developed at BES collaboration
6// based on the EvtGen framework. If you use all or part
7// of it, please give an appropriate acknowledgement.
8//
9// Copyright Information: See EvtGen/BesCopyright
10// Copyright (A) 2006 Ping Rong-Gang @IHEP
11//
12// Module: EvtBody3.cc //Modified Body3 model
13//
14// usage:
15// Users need to provide the MC and data file in NTuple style. The decays are described as
16// A-> x1 + x2 + x3
17//angular distribution: costheta1, costheta2 ,costheta3
18// mass distribution: m12, m13, and m23, here, m12 ==> mass of x1 and x2, etc.
19// these variables are defined as double type, the tree name is mc and data, repectively
20// Modification history:
21//
22// Ping R.-G. Aug., 2010 Module created
23//
24//------------------------------------------------------------------------
25//
26#include "EvtGenBase/EvtPatches.hh"
27#include <stdlib.h>
28#include "EvtGenBase/EvtParticle.hh"
29#include "EvtGenBase/EvtGenKine.hh"
30#include "EvtGenBase/EvtPDL.hh"
31#include "EvtGenBase/EvtVector4C.hh"
32#include "EvtGenBase/EvtVector4R.hh"
33#include "EvtGenBase/EvtTensor4C.hh"
34#include "EvtGenBase/EvtDiracParticle.hh"
35#include "EvtGenBase/EvtScalarParticle.hh"
36#include "EvtGenBase/EvtVectorParticle.hh"
37#include "EvtGenBase/EvtTensorParticle.hh"
38#include "EvtGenBase/EvtPhotonParticle.hh"
39#include "EvtGenBase/EvtNeutrinoParticle.hh"
40#include "EvtGenBase/EvtStringParticle.hh"
41#include "EvtGenBase/EvtRaritaSchwingerParticle.hh"
42#include "EvtGenBase/EvtHighSpinParticle.hh"
43#include "EvtGenBase/EvtReport.hh"
44#include "EvtGenBase/EvtHelSys.hh"
45#include "EvtGenModels/EvtMBody3.hh"
46#include "EvtGenBase/EvtRandom.hh"
47#include <string>
48#include "TFile.h"
49
50using std::endl;
51
54
55void EvtMBody3::getName(std::string& model_name){
56
57 model_name="MBody3";
58
59}
60
62
63 return new EvtMBody3;
64
65}
66
67void EvtMBody3::init(){
68
69 // check that there are 4 arguments: Invariant mass part. Index: i,j, histor. file name, Hid
70 checkNArg(0);
71
72 const char* datafile;
73 const char* mcfile;
74 datafile=setFileName(1);
75 mcfile =setFileName(2);
76 body3Ntuple.setMCfile(mcfile);
77 body3Ntuple.setDTfile(datafile);
79 std::cout<<"End to initiate the MBody3 model"<<std::endl;
80 } ///end of ini
81
83
84 noProbMax();
85
86}
87
89
90loop:
92
93 EvtVector4R pd1,pd2,pd3,ps;
94 double m12,m13,m23,costheta1,costheta2,costheta3;
95
96 pd1 =p->getDaug(0)->getP4Lab();
97 pd2 =p->getDaug(1)->getP4Lab();
98 pd3 =p->getDaug(2)->getP4Lab();
99 ps =p->getP4();
100
101 m12=(pd1 + pd2).mass();
102 m13=(pd1 + pd3).mass();
103 m23=(pd2 + pd3).mass();
104
105 costheta1=pd1.get(3)/pd1.d3mag();
106 costheta2=pd2.get(3)/pd2.d3mag();
107 costheta3=pd3.get(3)/pd3.d3mag();
108 /*
109 bool ac=body3Ntuple.AR123(costheta1,costheta2,costheta3,
110 m23, m13, m12);
111 */
112 bool b1=body3Ntuple.AR1(costheta1,m23);
113 bool b2=body3Ntuple.AR2(costheta2,m13);
114 bool b3=body3Ntuple.AR3(costheta3,m12);
115
116 if(!(b1 && b2 && b3)) goto loop;
117
118 // if(!(ac)) goto loop;
119 // std::cout<<"I find an envent." <<std::endl;
120 return ;
121}
122
123
double mass
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
bool AR3(double costheta, double mass)
bool AR2(double costheta, double mass)
bool AR1(double costheta, double mass)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)