BOSS 8.0.0
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//
26#include "EvtMBody3.hh"
46#include "TFile.h"
47#include <stdlib.h>
48#include <string>
49
50using std::endl;
51
54
55void EvtMBody3::getName( std::string& model_name ) { model_name = "MBody3"; }
56
58
60
61 // check that there are 4 arguments: Invariant mass part. Index: i,j, histor. file name, Hid
62 checkNArg( 0 );
63
64 const char* datafile;
65 const char* mcfile;
66 datafile = setFileName( 1 );
67 mcfile = setFileName( 2 );
68 body3Ntuple.setMCfile( mcfile );
69 body3Ntuple.setDTfile( datafile );
70 body3Ntuple.init();
71 std::cout << "End to initiate the MBody3 model" << std::endl;
72} /// end of ini
73
75
77
78loop:
80
81 EvtVector4R pd1, pd2, pd3, ps;
82 double m12, m13, m23, costheta1, costheta2, costheta3;
83
84 pd1 = p->getDaug( 0 )->getP4Lab();
85 pd2 = p->getDaug( 1 )->getP4Lab();
86 pd3 = p->getDaug( 2 )->getP4Lab();
87 ps = p->getP4();
88
89 m12 = ( pd1 + pd2 ).mass();
90 m13 = ( pd1 + pd3 ).mass();
91 m23 = ( pd2 + pd3 ).mass();
92
93 costheta1 = pd1.get( 3 ) / pd1.d3mag();
94 costheta2 = pd2.get( 3 ) / pd2.d3mag();
95 costheta3 = pd3.get( 3 ) / pd3.d3mag();
96 /*
97 bool ac=body3Ntuple.AR123(costheta1,costheta2,costheta3,
98 m23, m13, m12);
99 */
100 bool b1 = body3Ntuple.AR1( costheta1, m23 );
101 bool b2 = body3Ntuple.AR2( costheta2, m13 );
102 bool b3 = body3Ntuple.AR3( costheta3, m12 );
103
104 if ( !( b1 && b2 && b3 ) ) goto loop;
105
106 // if(!(ac)) goto loop;
107 // std::cout<<"I find an envent." <<std::endl;
108 return;
109}
double mass
EvtNT3 body3Ntuple
Definition EvtMBody3.cc:52
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
EvtDecayBase * clone()
Definition EvtMBody3.cc:57
void decay(EvtParticle *p)
Definition EvtMBody3.cc:76
const char * setFileName(int i)
Definition UserMBody3.cc:36
void getName(std::string &name)
Definition EvtMBody3.cc:55
virtual ~EvtMBody3()
Definition EvtMBody3.cc:53
void initProbMax()
end of ini
Definition EvtMBody3.cc:74
void init()
Definition EvtMBody3.cc:59
EvtVector4R getP4Lab()
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
double get(int i) const
double d3mag() const