BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtHAngSam3 Class Reference

#include <EvtHAngSam3.hh>

+ Inheritance diagram for EvtHAngSam3:

Public Member Functions

 EvtHAngSam3 ()
 
virtual ~EvtHAngSam3 ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
const char * setFileName ()
 
const char * setHpoint ()
 
- Public Member Functions inherited from EvtDecayIncoherent
void makeDecay (EvtParticle *p)
 
virtual ~EvtDecayIncoherent ()
 
void setDaughterSpinDensity (int daughter)
 
int isDaughterSpinDensitySet (int daughter)
 
- Public Member Functions inherited from EvtDecayBase
virtual void getName (std::string &name)=0
 
virtual void decay (EvtParticle *p)=0
 
virtual void makeDecay (EvtParticle *p)=0
 
virtual EvtDecayBaseclone ()=0
 
virtual void init ()
 
virtual void initProbMax ()
 
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 ()
 

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 ()
 
- Protected Attributes inherited from EvtDecayBase
bool _daugsDecayedByParentModel
 

Detailed Description

Definition at line 30 of file EvtHAngSam3.hh.

Constructor & Destructor Documentation

◆ EvtHAngSam3()

EvtHAngSam3::EvtHAngSam3 ( )
inline

Definition at line 34 of file EvtHAngSam3.hh.

34{}

Referenced by clone().

◆ ~EvtHAngSam3()

EvtHAngSam3::~EvtHAngSam3 ( )
virtual

Definition at line 57 of file EvtHAngSam3.cc.

57{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtHAngSam3::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 65 of file EvtHAngSam3.cc.

65 {
66
67 return new EvtHAngSam3;
68
69}

◆ decay()

void EvtHAngSam3::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 84 of file EvtHAngSam3.cc.

84 {
85
86 const char* fl=setFileName();
87 const char* hp=setHpoint();
88 int* dp;
89
90 TFile f(fl);
91 TH1F *hid = (TH1F*)f.Get(hp);
92 TAxis* xaxis = hid->GetXaxis();
93
94 double BLE =xaxis->GetBinLowEdge(1);
95 int BINS =xaxis->GetLast();
96 double yvalue[20000];
97 static double ymax=0.0;
98 int i;
99 double Ntotal=0,yc[20000];
100 static int icount=0;
101
102 if(icount==0){
103 for(i=1;i<BINS+1;i++){
104 yvalue[i]=hid->GetBinContent(i);
105 if(yvalue[i]>ymax) ymax=yvalue[i];
106 }
107 icount++;
108 ymax=ymax*1.2;
109 }
110
111loop:
113
114 EvtParticle *d1,*d2,*d3;
115 EvtVector4R pd1,pd2,pd3,pp,nor;
116 double costheta,cosphi;
117
118 d1 =p->getDaug(0);
119 d2 =p->getDaug(1);
120 pd1=d1->getP4();
121 pd2=d2->getP4();
122 pp =p->getP4();
123 double ppmag=pp.d3mag();
124 nor=pd1.cross(pd2);
125
126 if(ppmag<0.0001){costheta=nor.get(3)/nor.d3mag();} else
127 {costheta=nor.dot(pp)/nor.d3mag()/pp.d3mag();}
128
129 int xbin =hid->FindBin(costheta);
130 double xratio=(hid->GetBinContent(xbin))/ymax;
131
132 double rd1=EvtRandom::Flat(0.0, 1.0);
133 if(rd1>xratio) goto loop;
134 return ;
135}
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
const char * setFileName()
Definition: UserHAngSam3.cc:11
const char * setHpoint()
Definition: UserHAngSam3.cc:18
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)
static double Flat()
Definition: EvtRandom.cc:73
double dot(const EvtVector4R &v2) const
Definition: EvtVector4R.cc:199
double get(int i) const
Definition: EvtVector4R.hh:179
EvtVector4R cross(const EvtVector4R &v2)
Definition: EvtVector4R.cc:171
double d3mag() const
Definition: EvtVector4R.cc:186

◆ getName()

void EvtHAngSam3::getName ( std::string &  name)
virtual

Implements EvtDecayBase.

Definition at line 59 of file EvtHAngSam3.cc.

59 {
60
61 model_name="HAngSam3";
62
63}

◆ init()

void EvtHAngSam3::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 72 of file EvtHAngSam3.cc.

72 {
73
74 // check that there are 4 arguments: Invariant mass part. Index: i,j, histor. file name, Hid
75 checkNArg(0);
77}
EvtId getParentId()
Definition: EvtDecayBase.hh:60
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition: EvtPDL.hh:61

◆ initProbMax()

void EvtHAngSam3::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 78 of file EvtHAngSam3.cc.

78 {
79
80 noProbMax();
81
82}
void noProbMax()

◆ setFileName()

const char * EvtHAngSam3::setFileName ( )

Definition at line 11 of file UserHAngSam3.cc.

11 {
12 const char* filename;
13 filename="HAngSam3.root";
14//specify the root histor. name
15 return filename;
16}

Referenced by decay().

◆ setHpoint()

const char * EvtHAngSam3::setHpoint ( )

Definition at line 18 of file UserHAngSam3.cc.

18 {
19 const char* hpoint;
20 hpoint="costheta"; //specify the histor. id
21 return hpoint;
22}

Referenced by decay().


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