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

#include <EvtSecondary.hh>

Public Member Functions

 EvtSecondary ()
 
 ~EvtSecondary ()
 
void init ()
 
int getStdHepIndex (int i)
 
int getD1 (int i)
 
int getD2 (int i)
 
int getD3 (int i)
 
int getNPart ()
 
void createSecondary (int stdhepindex, EvtParticle *prnt)
 

Friends

std::ostream & operator<< (std::ostream &s, const EvtSecondary &secondary)
 

Detailed Description

Definition at line 30 of file EvtSecondary.hh.

Constructor & Destructor Documentation

◆ EvtSecondary()

EvtSecondary::EvtSecondary ( )
inline

Definition at line 34 of file EvtSecondary.hh.

34{}

◆ ~EvtSecondary()

EvtSecondary::~EvtSecondary ( )
inline

Definition at line 35 of file EvtSecondary.hh.

35{}

Member Function Documentation

◆ createSecondary()

void EvtSecondary::createSecondary ( int  stdhepindex,
EvtParticle prnt 
)

Definition at line 40 of file EvtSecondary.cc.

40 {
41
42 _stdhepindex[_npart]=stdhepindex;
43 if (prnt->getNDaug()==0){
44 _id1[_npart]=0;
45 _id2[_npart]=0;
46 _id3[_npart]=0;
47 _npart++;
48 return;
49 }
50 if (prnt->getNDaug()==1){
51 _id1[_npart]=EvtPDL::getStdHep(prnt->getDaug(0)->getId());
52 _id2[_npart]=0;
53 _id3[_npart]=0;
54 _npart++;
55 return;
56 }
57 if (prnt->getNDaug()==2){
58 _id1[_npart]=EvtPDL::getStdHep(prnt->getDaug(0)->getId());
59 _id2[_npart]=EvtPDL::getStdHep(prnt->getDaug(1)->getId());
60 _id3[_npart]=0;
61 _npart++;
62 return;
63 }
64 if (prnt->getNDaug()==3){
65 _id1[_npart]=EvtPDL::getStdHep(prnt->getDaug(0)->getId());
66 _id2[_npart]=EvtPDL::getStdHep(prnt->getDaug(1)->getId());
67 _id3[_npart]=EvtPDL::getStdHep(prnt->getDaug(2)->getId());
68 _npart++;
69 return;
70 }
71
72 report(ERROR,"EvtGen") <<
73 "More than 3 decay products in a secondary particle!"<<endl;
74
75
76}
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
static int getStdHep(EvtId id)
Definition: EvtPDL.hh:56
EvtId getId() const
Definition: EvtParticle.cc:113
int getNDaug() const
Definition: EvtParticle.cc:125
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85

Referenced by EvtParticle::makeStdHep().

◆ getD1()

int EvtSecondary::getD1 ( int  i)
inline

Definition at line 40 of file EvtSecondary.hh.

40{return _id1[i];}

◆ getD2()

int EvtSecondary::getD2 ( int  i)
inline

Definition at line 41 of file EvtSecondary.hh.

41{return _id2[i];}

◆ getD3()

int EvtSecondary::getD3 ( int  i)
inline

Definition at line 42 of file EvtSecondary.hh.

42{return _id3[i];}

◆ getNPart()

int EvtSecondary::getNPart ( )

Definition at line 36 of file EvtSecondary.cc.

36 {
37 return _npart;
38}

◆ getStdHepIndex()

int EvtSecondary::getStdHepIndex ( int  i)
inline

Definition at line 39 of file EvtSecondary.hh.

39{return _stdhepindex[i];}

◆ init()

void EvtSecondary::init ( )

Definition at line 32 of file EvtSecondary.cc.

32 {
33 _npart=0;
34}

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  s,
const EvtSecondary secondary 
)
friend

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