BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
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//
27#include <stdlib.h>
30#include "EvtGenBase/EvtPDL.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
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
EvtNT3 body3Ntuple
Definition: EvtMBody3.cc:52
void noProbMax()
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtDecayBase * clone()
Definition: EvtMBody3.cc:61
void decay(EvtParticle *p)
Definition: EvtMBody3.cc:88
const char * setFileName(int i)
Definition: UserMBody3.cc:37
void getName(std::string &name)
Definition: EvtMBody3.cc:55
virtual ~EvtMBody3()
Definition: EvtMBody3.cc:53
void initProbMax()
end of ini
Definition: EvtMBody3.cc:82
void init()
Definition: EvtMBody3.cc:67
Definition: EvtNT3.hh:25
bool AR3(double costheta, double mass)
Definition: EvtNT3.cc:159
bool AR2(double costheta, double mass)
Definition: EvtNT3.cc:151
void setDTfile(const char *name)
Definition: EvtNT3.hh:35
void setMCfile(const char *name)
Definition: EvtNT3.hh:36
bool AR1(double costheta, double mass)
Definition: EvtNT3.cc:142
void init()
Definition: EvtNT3.cc:25
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:685
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double get(int i) const
Definition: EvtVector4R.hh:179
double d3mag() const
Definition: EvtVector4R.cc:186