EvtFSPick Class Reference

#include <EvtFSPick.hh>

List of all members.

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)

Private Attributes

std::vector< EvtParticle * > _EvtFS
EvtParticleroot_par
std::vector< std::string_vnames
std::vector< EvtId_vId
std::vector< EvtId_fsid


Detailed Description

Definition at line 38 of file EvtFSPick.hh.


Constructor & Destructor Documentation

EvtFSPick::EvtFSPick ( EvtParticle par  )  [inline]

Definition at line 44 of file EvtFSPick.hh.

References _EvtFS, _fsid, _vId, _vnames, FSPick(), and root_par.

00044                            {
00045   root_par = par;
00046  _EvtFS.clear();
00047  _vnames.clear();
00048  _vId.clear();
00049  _fsid.clear();
00050  FSPick(root_par);
00051 }

virtual EvtFSPick::~EvtFSPick (  )  [inline, virtual]

Definition at line 54 of file EvtFSPick.hh.

00054 {}


Member Function Documentation

void EvtFSPick::FSPick ( EvtParticle par  ) 

Definition at line 25 of file EvtFSPick.cc.

References _EvtFS, _fsid, EvtParticle::getDaug(), EvtParticle::getId(), EvtParticle::getNDaug(), EvtPDL::getStdHep(), and genRecEmupikp::i.

Referenced by EvtFSPick().

00025                                       {
00026 
00027   int ndaug = par->getNDaug();
00028   EvtId eid=par->getId();
00029   if(ndaug < 2 && EvtPDL::getStdHep(eid) != -22){
00030     _EvtFS.push_back(par);
00031     _fsid.push_back(eid);
00032     // std::cout<<"I get FS "<<EvtPDL::getStdHep(eid)<<std::endl;
00033   } else {
00034   
00035     int ND=0;
00036     EvtParticle *theD;
00037     for(int i=0;i<ndaug;i++){
00038       EvtParticle *theDaug = par->getDaug(i);
00039       FSPick(theDaug);    
00040     }
00041   }
00042 }

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

Definition at line 57 of file EvtFSPick.hh.

References _EvtFS.

00057 {return _EvtFS;}

int EvtFSPick::getIndex ( EvtId  eid  ) 

Definition at line 85 of file EvtFSPick.cc.

References _fsid, _vId, EvtPDL::getId(), EvtPDL::getStdHep(), genRecEmupikp::i, and pid.

Referenced by getP4(), and getP4Lab().

00085                                 {
00086   for(int i=0;i<_vId.size();i++){
00087     EvtId pid = _fsid[i];
00088     if( eid == pid ){
00089       EvtId did = EvtPDL::getId("d");
00090       _fsid[i] = did;
00091       return i;
00092     } 
00093   }
00094     std::cout<<"EvtFSPick::Cannot find the particle "
00095              <<EvtPDL::getStdHep(eid) 
00096              <<" in the generated final state"<<std::endl;
00097     abort();
00098 }

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

Definition at line 61 of file EvtFSPick.cc.

References _EvtFS, _vId, _vnames, getIndex(), and genRecEmupikp::i.

00061                                          {
00062   EvtVector4R ptep;
00063   int nfs = _vnames.size();
00064   std::vector <EvtVector4R> vp4; 
00065   for(int i=0;i<nfs;i++) {
00066     int xid = getIndex(_vId[i]);
00067     ptep= _EvtFS[xid]->getP4();
00068     vp4.push_back(ptep);
00069   }
00070   return vp4;
00071 } 

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

Definition at line 73 of file EvtFSPick.cc.

References _EvtFS, _vId, _vnames, getIndex(), and genRecEmupikp::i.

00073                                             {
00074   EvtVector4R ptep;
00075   int nfs = _vnames.size();
00076   std::vector <EvtVector4R> vp4; 
00077   for(int i=0;i<nfs;i++) {
00078     int xid = getIndex(_vId[i]);
00079     ptep= _EvtFS[xid]->getP4Lab();
00080     vp4.push_back(ptep);
00081   }
00082   return vp4;
00083 } 

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

Definition at line 45 of file EvtFSPick.cc.

References _EvtFS, _vId, _vnames, EvtPDL::getId(), genRecEmupikp::i, and deljobs::string.

00045                                                             {
00046   if(vnames.size()!= _EvtFS.size())
00047     {std::cout<<"EvtFSPick::The number in final state is inconsistent"<<std::endl;abort();}
00048   for (int i=0;i<vnames.size();i++){
00049 
00050     _vnames.push_back(vnames[i]);
00051     EvtId eid = EvtPDL::getId(std::string(vnames[i]));
00052     _vId.push_back(eid);
00053 
00054     //   std::cout<<"FS= "<<EvtPDL::getStdHep(_vId[i])<<std::endl;
00055   }
00056  
00057 }


Member Data Documentation

std::vector<EvtParticle*> EvtFSPick::_EvtFS [private]

Definition at line 65 of file EvtFSPick.hh.

Referenced by EvtFSPick(), FSPick(), getFS(), getP4(), getP4Lab(), and setFinalStatePar().

std::vector<EvtId> EvtFSPick::_fsid [private]

Definition at line 68 of file EvtFSPick.hh.

Referenced by EvtFSPick(), FSPick(), and getIndex().

std::vector<EvtId> EvtFSPick::_vId [private]

Definition at line 68 of file EvtFSPick.hh.

Referenced by EvtFSPick(), getIndex(), getP4(), getP4Lab(), and setFinalStatePar().

std::vector<std::string> EvtFSPick::_vnames [private]

Definition at line 67 of file EvtFSPick.hh.

Referenced by EvtFSPick(), getP4(), getP4Lab(), and setFinalStatePar().

EvtParticle* EvtFSPick::root_par [private]

Definition at line 66 of file EvtFSPick.hh.

Referenced by EvtFSPick().


Generated on Tue Nov 29 23:19:00 2016 for BOSS_7.0.2 by  doxygen 1.4.7