BOSS 8.0.0
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 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 29 of file EvtHAngSam3.hh.

Constructor & Destructor Documentation

◆ EvtHAngSam3()

EvtHAngSam3::EvtHAngSam3 ( )
inline

Definition at line 32 of file EvtHAngSam3.hh.

32{}

Referenced by clone().

◆ ~EvtHAngSam3()

EvtHAngSam3::~EvtHAngSam3 ( )
virtual

Definition at line 56 of file EvtHAngSam3.cc.

56{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtHAngSam3::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 60 of file EvtHAngSam3.cc.

60{ return new EvtHAngSam3; }

◆ decay()

void EvtHAngSam3::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 70 of file EvtHAngSam3.cc.

70 {
71
72 const char* fl = setFileName();
73 const char* hp = setHpoint();
74 int* dp;
75
76 TFile f( fl );
77 TH1F* hid = (TH1F*)f.Get( hp );
78 TAxis* xaxis = hid->GetXaxis();
79
80 double BLE = xaxis->GetBinLowEdge( 1 );
81 int BINS = xaxis->GetLast();
82 double yvalue[20000];
83 static double ymax = 0.0;
84 int i;
85 double Ntotal = 0, yc[20000];
86 static int icount = 0;
87
88 if ( icount == 0 )
89 {
90 for ( i = 1; i < BINS + 1; i++ )
91 {
92 yvalue[i] = hid->GetBinContent( i );
93 if ( yvalue[i] > ymax ) ymax = yvalue[i];
94 }
95 icount++;
96 ymax = ymax * 1.2;
97 }
98
99loop:
101
102 EvtParticle *d1, *d2, *d3;
103 EvtVector4R pd1, pd2, pd3, pp, nor;
104 double costheta, cosphi;
105
106 d1 = p->getDaug( 0 );
107 d2 = p->getDaug( 1 );
108 pd1 = d1->getP4();
109 pd2 = d2->getP4();
110 pp = p->getP4();
111 double ppmag = pp.d3mag();
112 nor = pd1.cross( pd2 );
113
114 if ( ppmag < 0.0001 ) { costheta = nor.get( 3 ) / nor.d3mag(); }
115 else { costheta = nor.dot( pp ) / nor.d3mag() / pp.d3mag(); }
116
117 int xbin = hid->FindBin( costheta );
118 double xratio = ( hid->GetBinContent( xbin ) ) / ymax;
119
120 double rd1 = EvtRandom::Flat( 0.0, 1.0 );
121 if ( rd1 > xratio ) goto loop;
122 return;
123}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
EvtId * getDaugs()
const char * setFileName()
const char * setHpoint()
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static double Flat()
Definition EvtRandom.cc:69
double dot(const EvtVector4R &v2) const
double get(int i) const
EvtVector4R cross(const EvtVector4R &v2)
double d3mag() const

◆ getName()

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

Implements EvtDecayBase.

Definition at line 58 of file EvtHAngSam3.cc.

58{ model_name = "HAngSam3"; }

◆ init()

void EvtHAngSam3::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 62 of file EvtHAngSam3.cc.

62 {
63
64 // check that there are 4 arguments: Invariant mass part. Index: i,j, histor. file name, Hid
65 checkNArg( 0 );
67}
EvtId getParentId()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtSpinType::spintype getSpinType(EvtId i)
Definition EvtPDL.hh:66

◆ initProbMax()

void EvtHAngSam3::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 68 of file EvtHAngSam3.cc.

68{ 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: