BOSS 8.0.0
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 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 EvtMassH1.hh.

Constructor & Destructor Documentation

◆ EvtMassH1()

EvtMassH1::EvtMassH1 ( )
inline

Definition at line 32 of file EvtMassH1.hh.

32{}

Referenced by clone().

◆ ~EvtMassH1()

EvtMassH1::~EvtMassH1 ( )
virtual

Definition at line 56 of file EvtMassH1.cc.

56{}

Member Function Documentation

◆ clone()

EvtDecayBase * EvtMassH1::clone ( )
virtual

Implements EvtDecayBase.

Definition at line 60 of file EvtMassH1.cc.

60{ return new EvtMassH1; }

◆ decay()

void EvtMassH1::decay ( EvtParticle * p)
virtual

Implements EvtDecayBase.

Definition at line 70 of file EvtMassH1.cc.

70 {
71
72 const char* fl = setFileName();
73 const char* hp = setHpoint();
74 int* dp;
75 dp = setDaugPair();
76 int d1 = dp[0];
77 int d2 = dp[1];
78
79 TFile f( fl );
80 TH1F* hid = (TH1F*)f.Get( hp );
81 TAxis* xaxis = hid->GetXaxis();
82
83 double BLE = xaxis->GetBinLowEdge( 1 );
84 int BINS = xaxis->GetLast();
85 // double yvalue[BINS+2],ymax=0.0;
86 double yvalue[20000], ymax = 0.0;
87 int i;
88 // double Ntotal=0,yc[BINS+2];
89 double Ntotal = 0, yc[20000];
90
91 for ( i = 1; i < BINS + 1; i++ )
92 {
93 yvalue[i] = hid->GetBinContent( i );
94 if ( yvalue[i] > ymax ) ymax = yvalue[i];
95 }
96
97loop:
99
100 EvtParticle *v, *s1;
101 EvtVector4R pv, ps;
102 double ppr;
103
104 v = p->getDaug( d1 );
105 s1 = p->getDaug( d2 );
106 pv = v->getP4Lab();
107 ps = s1->getP4Lab();
108 ppr = ( pv + ps ).mass();
109
110 int xbin = hid->FindBin( ppr );
111 double xratio = ( hid->GetBinContent( xbin ) ) / ymax;
112
113 double rd1 = EvtRandom::Flat( 0.0, 1.0 );
114 if ( rd1 > xratio ) goto loop;
115 return;
116}
double mass
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
**********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()
int * setDaugPair()
Definition UserMassH1.cc:24
const char * setFileName()
Definition UserMassH1.cc:11
const char * setHpoint()
Definition UserMassH1.cc:18
EvtVector4R getP4Lab()
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

◆ getName()

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

Implements EvtDecayBase.

Definition at line 58 of file EvtMassH1.cc.

58{ model_name = "MassH1"; }

◆ init()

void EvtMassH1::init ( )
virtual

Reimplemented from EvtDecayBase.

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

Reimplemented from EvtDecayBase.

Definition at line 68 of file EvtMassH1.cc.

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