EvtDecayTag Class Reference

#include <EvtDecayTag.hh>

List of all members.

Public Member Functions

 EvtDecayTag (EvtParticle *par)
virtual ~EvtDecayTag ()
void makeTag (EvtParticle *par)
int TagIndex (EvtId pid)
int getModeTag ()
int getMultTag ()
int getHdrdBase (int index)

Private Attributes

std::vector< int > _nmode
std::vector< int > _multiplicity
EvtParticleroot_par


Detailed Description

Definition at line 39 of file EvtDecayTag.hh.


Constructor & Destructor Documentation

EvtDecayTag::EvtDecayTag ( EvtParticle par  )  [inline]

Definition at line 45 of file EvtDecayTag.hh.

References _multiplicity, _nmode, genRecEmupikp::i, makeTag(), and root_par.

00045                              {
00046   root_par = par;
00047  _nmode.clear();
00048  _multiplicity.clear();
00049  for(int i=0;i<10;i++){_multiplicity.push_back(0);}
00050  makeTag(root_par);
00051 }

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

Definition at line 54 of file EvtDecayTag.hh.

00054 {}


Member Function Documentation

int EvtDecayTag::getHdrdBase ( int  index  ) 

Definition at line 153 of file EvtDecayTag.cc.

00153                                      {
00154   int ten = 10;
00155   int base;
00156   if( index ==0 || index>=100 && index <1000) { return index;}
00157   else {
00158     base = index*ten;
00159     getHdrdBase(base);
00160   }
00161 }

int EvtDecayTag::getModeTag (  ) 

Definition at line 102 of file EvtDecayTag.cc.

References _nmode, EvtParticle::getIntFlag(), and root_par.

Referenced by EvtDecay::callBesEvtGen(), and EvtDecay::callEvtGen().

00102                            {
00103   //get ConExc 74110 mode selected index
00104   std::vector<int> intFlag = root_par->getIntFlag();
00105   if(intFlag.size()>0){
00106     if(intFlag[0]==74110) return intFlag[1];
00107   }
00108 
00112   double seg0,seg1,seg2;
00113 
00114   int three   = 1000;
00115   int six     = 1000000;
00116   int themode = 1000000000;
00117   //---debugging
00118   // for(int im=0;im<_nmode.size();im++){std::cout<<"_nmode["<<im<<"]"<<_nmode[im]<<endl;;}
00119 
00120   if(_nmode.size()==1) {themode += _nmode[0]*six; return themode;}
00121   else if(_nmode.size() == 2){
00122     seg0 = _nmode[0]*six;
00123     seg1 = _nmode[1]*three;
00124     themode += seg0 + seg1;
00125     return themode;
00126   }
00127   else if(_nmode.size() >= 3){
00128     seg0 = _nmode[0]*six;
00129     seg1 = _nmode[1]*three;
00130     seg2 = _nmode[2];
00131     themode += seg0 + seg1 + seg2;
00132     return themode;
00133   }
00134 }

int EvtDecayTag::getMultTag (  ) 

Definition at line 136 of file EvtDecayTag.cc.

References _multiplicity, and genRecEmupikp::i.

Referenced by EvtDecay::callBesEvtGen(), and EvtDecay::callEvtGen().

00136                            {
00141   int thetag = 0;
00142   for(int i=1; i<9; i++){
00143     if (_multiplicity[i] >9) return 0; 
00144   }
00145   for(int i=0; i<9; i++){
00146     int ndx = 8-i;
00147     int dig = pow(10,ndx);
00148     thetag += dig*_multiplicity[i];
00149   }
00150   return thetag;
00151 }

void EvtDecayTag::makeTag ( EvtParticle par  ) 

Definition at line 29 of file EvtDecayTag.cc.

References _multiplicity, _nmode, EvtParticle::getChannel(), EvtParticle::getDaug(), EvtParticle::getId(), EvtParticle::getNDaug(), EvtPDL::getStdHep(), genRecEmupikp::i, root_par, and TagIndex().

Referenced by EvtDecayTag().

00029                                          {
00030 
00031   int ndaug = par->getNDaug();
00032   if(ndaug < 2){
00033     EvtId id = par->getId();
00034     int theTag = TagIndex(id);
00035     _multiplicity[theTag]++;
00036   } else {
00037   //--
00038     if(par == root_par) {
00039      int theMode = root_par->getChannel();
00040      _nmode.push_back(theMode);
00041     }
00042   //--
00043     int ND=0;
00044     EvtParticle *theD;
00045     for(int i=0;i<ndaug;i++){
00046       EvtParticle *theDaug = par->getDaug(i);
00047       if(par == root_par && theDaug->getNDaug()!=0){
00048         int theMode = theDaug->getChannel();
00049         _nmode.push_back(theMode);
00050         ND++;
00051         theD = theDaug;
00052       }
00053 
00054       int id = EvtPDL::getStdHep(theDaug->getId());
00055       if (id == 310) _multiplicity[6]++; //Ks
00056       if (id ==3122) _multiplicity[7]++; // Lambda or Lambdabar 
00057       makeTag(theDaug);    
00058     }
00059     //-- for root particle decays into only one unstable particle, the flag1 further tag the third decay
00060       if(ND ==1){
00061         int NDD= theD->getNDaug();
00062         for(int i=0;i<NDD;i++){
00063           EvtParticle *theDD=theD->getDaug(i);
00064           if(theDD->getNDaug() !=0 ){
00065             int ndd = theDD->getChannel();
00066             _nmode.push_back(ndd);
00067             break;
00068           }
00069         }
00070       }
00071       //-------------------
00072   }
00073 
00074 }

int EvtDecayTag::TagIndex ( EvtId  pid  ) 

Definition at line 76 of file EvtDecayTag.cc.

References EvtPDL::getStdHep(), and pid.

Referenced by makeTag().

00076                                   {
00089  int id = EvtPDL::getStdHep(pid);
00090  int absid=fabs(id);
00091  if( absid == 22 )     {return 0;}  //photon
00092  else if(absid == 11 ) {return 1;} // electron
00093  else if(absid ==  13) {return 2;} // muon
00094  else if(absid == 211) {return 3;} // pion
00095  else if(absid == 321) {return 4;} // Kaon
00096  else if(absid ==2212) {return 5;} // pronton / anti-proton
00097  else if(absid == 310) {return 6;} // Ks
00098  else if(absid ==3122) {return 7;} // Lambda / Lambdabar
00099  else                  {return 8;}
00100 }


Member Data Documentation

std::vector<int> EvtDecayTag::_multiplicity [private]

Definition at line 64 of file EvtDecayTag.hh.

Referenced by EvtDecayTag(), getMultTag(), and makeTag().

std::vector<int> EvtDecayTag::_nmode [private]

Definition at line 64 of file EvtDecayTag.hh.

Referenced by EvtDecayTag(), getModeTag(), and makeTag().

EvtParticle* EvtDecayTag::root_par [private]

Definition at line 65 of file EvtDecayTag.hh.

Referenced by EvtDecayTag(), getModeTag(), and makeTag().


Generated on Tue Nov 29 23:18:58 2016 for BOSS_7.0.2 by  doxygen 1.4.7