BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtMassH1 Class Reference

#include <EvtMassH1.hh>

+ Inheritance diagram for EvtMassH1:

Public Member Functions

 EvtMassH1 ()
 
virtual ~EvtMassH1 ()
 
void getName (std::string &name)
 
EvtDecayBaseclone ()
 
void initProbMax ()
 
void init ()
 
void decay (EvtParticle *p)
 
const char * setFileName ()
 
const char * setHpoint ()
 
int * setDaugPair ()
 
- 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 EvtMassH1.hh.

Constructor & Destructor Documentation

◆ EvtMassH1()

EvtMassH1::EvtMassH1 ( )
inline

Definition at line 34 of file EvtMassH1.hh.

34{}

Referenced by clone().

◆ ~EvtMassH1()

EvtMassH1::~EvtMassH1 ( )
virtual

Definition at line 57 of file EvtMassH1.cc.

57{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtMassH1::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 65 of file EvtMassH1.cc.

65 {
66
67 return new EvtMassH1;
68
69}

◆ decay()

void EvtMassH1::decay ( EvtParticle p)
virtual

Implements EvtDecayBase.

Definition at line 84 of file EvtMassH1.cc.

84 {
85
86 const char* fl=setFileName();
87 const char* hp=setHpoint();
88 int* dp;
89 dp=setDaugPair();
90 int d1=dp[0];
91 int d2=dp[1];
92
93 TFile f(fl);
94 TH1F *hid = (TH1F*)f.Get(hp);
95 TAxis* xaxis = hid->GetXaxis();
96
97 double BLE =xaxis->GetBinLowEdge(1);
98 int BINS =xaxis->GetLast();
99// double yvalue[BINS+2],ymax=0.0;
100 double yvalue[20000],ymax=0.0;
101 int i;
102// double Ntotal=0,yc[BINS+2];
103 double Ntotal=0,yc[20000];
104
105 for(i=1;i<BINS+1;i++){
106 yvalue[i]=hid->GetBinContent(i);
107 if(yvalue[i]>ymax) ymax=yvalue[i];
108 }
109
110
111loop:
113
114 EvtParticle *v,*s1;
115 EvtVector4R pv,ps;
116 double ppr;
117
118 v =p->getDaug(d1);
119 s1=p->getDaug(d2);
120 pv=v->getP4Lab();
121 ps=s1->getP4Lab();
122 ppr=(pv+ps).mass();
123
124 int xbin =hid->FindBin(ppr);
125 double xratio=(hid->GetBinContent(xbin))/ymax;
126
127 double rd1=EvtRandom::Flat(0.0, 1.0);
128 if(rd1>xratio) goto loop;
129 return ;
130}
double mass
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
int * setDaugPair()
Definition: UserMassH1.cc:24
const char * setFileName()
Definition: UserMassH1.cc:11
const char * setHpoint()
Definition: UserMassH1.cc:18
EvtVector4R getP4Lab()
Definition: EvtParticle.cc:683
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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 59 of file EvtMassH1.cc.

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

◆ init()

void EvtMassH1::init ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 72 of file EvtMassH1.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 EvtMassH1::initProbMax ( )
virtual

Reimplemented from EvtDecayBase.

Definition at line 78 of file EvtMassH1.cc.

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

◆ setDaugPair()

int * EvtMassH1::setDaugPair ( )

Definition at line 24 of file UserMassH1.cc.

24 {
25 static int DP[2];
26 DP[0]=0; // 0,1,2,... indexes for daughter particles
27 DP[1]=1;
28 return DP;
29}

Referenced by decay().

◆ setFileName()

const char * EvtMassH1::setFileName ( )

Definition at line 11 of file UserMassH1.cc.

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

Referenced by decay().

◆ setHpoint()

const char * EvtMassH1::setHpoint ( )

Definition at line 18 of file UserMassH1.cc.

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

Referenced by decay().


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