BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtFSPick Class Reference

#include <EvtFSPick.hh>

Public Member Functions

 EvtFSPick (EvtParticle *par)
 
virtual ~EvtFSPick ()
 
void FSPick (EvtParticle *par)
 
std::vector< EvtParticle * > getFS ()
 
void setFinalStatePar (std::vector< std::string > vnames)
 
std::vector< EvtVector4RgetP4 ()
 
std::vector< EvtVector4RgetP4Lab ()
 
int getIndex (EvtId eid)
 
 EvtFSPick (EvtParticle *par)
 
virtual ~EvtFSPick ()
 
void FSPick (EvtParticle *par)
 
std::vector< EvtParticle * > getFS ()
 
void setFinalStatePar (std::vector< std::string > vnames)
 
std::vector< EvtVector4RgetP4 ()
 
std::vector< EvtVector4RgetP4Lab ()
 
int getIndex (EvtId eid)
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtFSPick() [1/2]

EvtFSPick::EvtFSPick ( EvtParticle par)
inline

Definition at line 44 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.hh.

44 {
45 root_par = par;
46 _EvtFS.clear();
47 _vnames.clear();
48 _vId.clear();
49 _fsid.clear();
50 FSPick(root_par);
51}

◆ ~EvtFSPick() [1/2]

virtual EvtFSPick::~EvtFSPick ( )
inlinevirtual

◆ EvtFSPick() [2/2]

EvtFSPick::EvtFSPick ( EvtParticle par)
inline

Definition at line 44 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.hh.

44 {
45 root_par = par;
46 _EvtFS.clear();
47 _vnames.clear();
48 _vId.clear();
49 _fsid.clear();
50 FSPick(root_par);
51}

◆ ~EvtFSPick() [2/2]

virtual EvtFSPick::~EvtFSPick ( )
inlinevirtual

Member Function Documentation

◆ FSPick() [1/2]

void EvtFSPick::FSPick ( EvtParticle par)

Definition at line 25 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.cc.

25 {
26
27 int ndaug = par->getNDaug();
28 EvtId eid=par->getId();
29 if(ndaug < 2 && EvtPDL::getStdHep(eid) != -22){
30 _EvtFS.push_back(par);
31 _fsid.push_back(eid);
32 // std::cout<<"I get FS "<<EvtPDL::getStdHep(eid)<<std::endl;
33 } else {
34
35 int ND=0;
36 EvtParticle *theD;
37 for(int i=0;i<ndaug;i++){
38 EvtParticle *theDaug = par->getDaug(i);
39 FSPick(theDaug);
40 }
41 }
42}

Referenced by EvtFSPick(), and FSPick().

◆ FSPick() [2/2]

void EvtFSPick::FSPick ( EvtParticle par)

◆ getFS() [1/2]

std::vector< EvtParticle * > EvtFSPick::getFS ( )
inline

Definition at line 57 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.hh.

57{return _EvtFS;}

◆ getFS() [2/2]

std::vector< EvtParticle * > EvtFSPick::getFS ( )
inline

Definition at line 57 of file BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.hh.

57{return _EvtFS;}

◆ getIndex() [1/2]

int EvtFSPick::getIndex ( EvtId  eid)

Definition at line 85 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.cc.

85 {
86 for(int i=0;i<_vId.size();i++){
87 EvtId pid = _fsid[i];
88 if( eid == pid ){
89 EvtId did = EvtPDL::getId("d");
90 _fsid[i] = did;
91 return i;
92 }
93 }
94 std::cout<<"EvtFSPick::Cannot find the particle "
95 <<EvtPDL::getStdHep(eid)
96 <<" in the generated final state"<<std::endl;
97 abort();
98}
static EvtId getId(const std::string &name)

Referenced by getP4(), and getP4Lab().

◆ getIndex() [2/2]

int EvtFSPick::getIndex ( EvtId  eid)

◆ getP4() [1/2]

std::vector< EvtVector4R > EvtFSPick::getP4 ( )

Definition at line 61 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.cc.

61 {
62 EvtVector4R ptep;
63 int nfs = _vnames.size();
64 std::vector <EvtVector4R> vp4;
65 for(int i=0;i<nfs;i++) {
66 int xid = getIndex(_vId[i]);
67 ptep= _EvtFS[xid]->getP4();
68 vp4.push_back(ptep);
69 }
70 return vp4;
71}

◆ getP4() [2/2]

std::vector< EvtVector4R > EvtFSPick::getP4 ( )

◆ getP4Lab() [1/2]

std::vector< EvtVector4R > EvtFSPick::getP4Lab ( )

Definition at line 73 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.cc.

73 {
74 EvtVector4R ptep;
75 int nfs = _vnames.size();
76 std::vector <EvtVector4R> vp4;
77 for(int i=0;i<nfs;i++) {
78 int xid = getIndex(_vId[i]);
79 ptep= _EvtFS[xid]->getP4Lab();
80 vp4.push_back(ptep);
81 }
82 return vp4;
83}

◆ getP4Lab() [2/2]

std::vector< EvtVector4R > EvtFSPick::getP4Lab ( )

◆ setFinalStatePar() [1/2]

void EvtFSPick::setFinalStatePar ( std::vector< std::string >  vnames)

Definition at line 45 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtFSPick.cc.

45 {
46 if(vnames.size()!= _EvtFS.size())
47 {std::cout<<"EvtFSPick::The number in final state is inconsistent"<<std::endl;abort();}
48 for (int i=0;i<vnames.size();i++){
49
50 _vnames.push_back(vnames[i]);
51 EvtId eid = EvtPDL::getId(std::string(vnames[i]));
52 _vId.push_back(eid);
53
54 // std::cout<<"FS= "<<EvtPDL::getStdHep(_vId[i])<<std::endl;
55 }
56
57}

◆ setFinalStatePar() [2/2]

void EvtFSPick::setFinalStatePar ( std::vector< std::string >  vnames)

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