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

Constructor & Destructor Documentation

◆ EvtSecondary()

EvtSecondary::EvtSecondary ( )
inline

Definition at line 32 of file EvtSecondary.hh.

32{}

Referenced by operator<<.

◆ ~EvtSecondary()

EvtSecondary::~EvtSecondary ( )
inline

Definition at line 33 of file EvtSecondary.hh.

33{}

Member Function Documentation

◆ createSecondary()

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

Definition at line 34 of file EvtSecondary.cc.

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

Referenced by EvtParticle::makeStdHep().

◆ getD1()

int EvtSecondary::getD1 ( int i)
inline

Definition at line 38 of file EvtSecondary.hh.

38{ return _id1[i]; }

◆ getD2()

int EvtSecondary::getD2 ( int i)
inline

Definition at line 39 of file EvtSecondary.hh.

39{ return _id2[i]; }

◆ getD3()

int EvtSecondary::getD3 ( int i)
inline

Definition at line 40 of file EvtSecondary.hh.

40{ return _id3[i]; }

◆ getNPart()

int EvtSecondary::getNPart ( )

Definition at line 32 of file EvtSecondary.cc.

32{ return _npart; }

◆ getStdHepIndex()

int EvtSecondary::getStdHepIndex ( int i)
inline

Definition at line 37 of file EvtSecondary.hh.

37{ return _stdhepindex[i]; }

◆ init()

void EvtSecondary::init ( )

Definition at line 30 of file EvtSecondary.cc.

30{ _npart = 0; }

◆ operator<<

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

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