Exemple #1
0
double Continued_PDF::XPDF(const Flavour & flav,const bool & defmax) {
  if (flav.IsDiQuark()) {
    if (m_bunch==Flavour(kf_p_plus) && !flav.IsAnti()) {
      return XPDF(Flavour(kf_u));
    }
    if (m_bunch==Flavour(kf_p_plus).Bar() && flav.IsAnti()) {
      return XPDF(Flavour(kf_u).Bar());
    }
    return 0.;
  }
  if (m_x<m_xmin) return 0.;
  if (m_Q2>m_Q02) return p_pdf->GetXPDF(flav);
  double seapart(0.), valpart(0.);
  if (m_bunch==Flavour(kf_p_plus)) {
    if (flav==Flavour(kf_u) || flav==Flavour(kf_d)) {
      seapart = p_pdf->GetXPDF(flav.Bar())*(m_Q2/m_Q02); 
      valpart = p_pdf->GetXPDF(flav)-p_pdf->GetXPDF(flav.Bar());
    }
    else if (flav==Flavour(kf_gluon)) {
      seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); 
      valpart = 1./m_gnorm * pow(1.-m_x,m_geta) * pow(m_x,m_glambda) *
	m_Snorm * (1.-m_Q2/m_Q02);
      /*
	((p_pdf->GetXPDF(Flavour(kf_u))-p_pdf->GetXPDF(Flavour(kf_u).Bar()) +
	p_pdf->GetXPDF(Flavour(kf_d))-p_pdf->GetXPDF(Flavour(kf_d).Bar()))/  
	m_Vnorm) *
      */ 
    }
    else
      seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02);
  }
  else if (m_bunch==Flavour(kf_p_plus).Bar()) {
    if (flav==Flavour(kf_u).Bar() || flav==Flavour(kf_d).Bar()) {
      seapart = p_pdf->GetXPDF(flav.Bar())*(m_Q2/m_Q02); 
      valpart = p_pdf->GetXPDF(flav)-p_pdf->GetXPDF(flav.Bar());
    }
    else if (flav==Flavour(kf_gluon)) {
      seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02); 
      valpart = 
	(p_pdf->GetXPDF(Flavour(kf_u).Bar())-p_pdf->GetXPDF(Flavour(kf_u)) +
	 p_pdf->GetXPDF(Flavour(kf_d).Bar())-p_pdf->GetXPDF(Flavour(kf_d))) *  
	m_Snorm/m_Vnorm * (1.-m_Q2/m_Q02);
    }
    else
      seapart = p_pdf->GetXPDF(flav)*(m_Q2/m_Q02);
  }
  double total = seapart+valpart;
  if (defmax && total>m_xpdfmax[flav]) {
    m_xmaxpdf[flav] = m_x;
    m_xpdfmax[flav] = total;
  }
  return total;
}
Exemple #2
0
void Colour_Generator::FinalColours() {
  //   msg_Out()<<METHOD<<":\n";
  size_t flow(0),col(0);
  Particle * part;
  Flavour flav;
  for (size_t beam=0;beam<2;beam++) {
    size_t length(m_hadrons[1-beam]->Size());
    
    /*      msg_Out()<<"   Trips["<<beam<<"]:";
	    for (set<int>::iterator cit=m_col[beam][0].begin();
	    cit!=m_col[beam][0].end();cit++) msg_Out()<<" "<<(*cit);
	    msg_Out()<<"\n";
	    msg_Out()<<"   Antis["<<beam<<"]:";
	    for (set<int>::iterator cit=m_col[beam][1].begin();
	    cit!=m_col[beam][1].end();cit++) msg_Out()<<" "<<(*cit);
	    msg_Out()<<"\n";*/
    
    for (size_t i=length-2;i<length;i++) {
      part = m_hadrons[1-beam]->GetParticle(i);
      flav = part->Flav();
      if (flav.IsQuark() || flav.IsDiQuark()) {
	if ((flav.IsQuark()   && !flav.IsAnti()) ||
	    (flav.IsDiQuark() && flav.IsAnti()))    flow=0;
	if ((flav.IsQuark()   && flav.IsAnti()) ||
	    (flav.IsDiQuark() && !flav.IsAnti()))   flow=1;
	if (m_col[beam][flow].size()>0) {
	  col = (*m_col[beam][flow].begin());
	  part->SetFlow(flow+1,col);
	  m_col[beam][flow].erase(m_col[beam][flow].begin());
	}
	else {
	  part->SetFlow(flow+1,-1);
	  m_col[beam][1-flow].insert(part->GetFlow(flow+1));	  
	}
      }
      else if (flav.IsGluon()) {
	for (flow=0;flow<2;flow++) {
	  if (m_col[beam][flow].size()>0) {
	    col = (*m_col[beam][flow].begin());
	    part->SetFlow(flow+1,col);
	    m_col[beam][flow].erase(m_col[beam][flow].begin());
	  }
	  else {
	    part->SetFlow(flow+1,-1);
	    m_col[beam][1-flow].insert(part->GetFlow(flow+1));	  
	  }
	}
      }
      //       msg_Out()<<(*part)<<"\n";
    }
  }
}
Exemple #3
0
bool Decay_Channel::FlavourSort(const Flavour &fl1,const Flavour &fl2)
{
  // TODO: Get rid of this custom sorting, but then the hadron decay channel
  // files have to be changed as well (order mapping in MEs)
  kf_code kf1(fl1.Kfcode()), kf2(fl2.Kfcode());
  if (kf1>kf2) return true;
  if (kf1<kf2) return false;
  /*
      anti anti -> true
      anti part -> false
      part anti -> true
      anti anti -> true
      */
  return !(fl1.IsAnti()&&!fl2.IsAnti());
}
Exemple #4
0
bool Hadron_Remnant::DecomposeHadron() 
{
  bool success=true;
  double Eb(p_beam->Energy());
  for (Particle_List::iterator pit=m_extracted.begin();
       pit!=m_extracted.end();++pit) {
    if ((*pit)->Momentum()[0]>Eb || (*pit)->Momentum()[0]<0.0) {
      msg_Error()<<"Hadron_Remnant::DecomposeHadron(): "
			 <<"Constituent energy out of range. \n   E_"
			 <<(*pit)->Flav()<<" = "<<(*pit)->Momentum()[0]
			 <<"."<<std::endl;
      success=false;
    }
    for (size_t j=0;j<m_constit.size();++j) {
      if ((*pit)->Flav()==m_constit[j]) {
	//std::cout<<METHOD<<" "<<success<<":"<<(*pit)->Flav()
	//	 <<" ("<<ValenceQuark(*pit)<<")"<<std::endl;
	if (success && ValenceQuark(*pit)) {
	  p_start = new Color_Dipole(*pit,&m_companions);  
	  p_start->Begin(ANTI((*pit)->Flav().IsAnti()))->
	    SetFlav(Opposite((*pit)->Flav()));
	  return success;
	}
      }
    }
  }
  Flavour    flav = m_constit[(size_t)(ran->Get()*3.)];
  Particle * part = new Particle(-1,flav); 
  part->SetStatus(part_status::active);
  part->SetFinalMass(flav.Mass());
  part->SetFlow(COLOR((qri::type)(flav.IsAnti())),Flow::Counter());
  //std::cout<<METHOD<<":"<<flav<<std::endl
  //	   <<"  "<<(*part)<<std::endl;
  p_start = new Color_Dipole(part,&m_companions);  
  p_start->Begin(ANTI(flav.IsAnti()))->SetFlav(Opposite(flav));
  m_companions.push_back(part);
  return success;
}
Exemple #5
0
Hadron_Decay_Channel* Mixing_Handler::Select(Particle* decayer,
                                             const Hadron_Decay_Table& ot) const
{
  Flavour flav = decayer->Flav();
  string tag = flav.IsAnti() ? flav.Bar().IDName() : flav.IDName();
  if(m_model("Interference_"+tag,0.0)!=0.0) {
    double lifetime = DetermineMixingTime(decayer,false);
    bool anti_at_t0 = decayer->Flav().IsAnti();
    if(decayer->ProductionBlob()->Type()==btp::Hadron_Mixing) anti_at_t0 = !anti_at_t0;
    if(lifetime!=0.0) {
      Hadron_Decay_Table table(ot);
      double cos_term = cos(flav.DeltaM()/rpa->hBar()*lifetime);
      double sin_term = sin(flav.DeltaM()/rpa->hBar()*lifetime);
      double GX, GR, asymmetry, a;
      for(size_t i=0; i<table.size(); i++) {
        Hadron_Decay_Channel* hdc = table.at(i);
        if(hdc->CPAsymmetryS()==0.0 && hdc->CPAsymmetryC()==0.0) continue;
        if(flav.DeltaGamma()==0.0) {
          asymmetry = hdc->CPAsymmetryS()*sin_term - hdc->CPAsymmetryC()*cos_term;
        }
        else {
          Complex lambda = hdc->CPAsymmetryLambda();
          double l2 = sqr(abs(lambda));
          double dG = flav.DeltaGamma()/rpa->hBar();
          asymmetry = (2.0*lambda.imag()/(1.0+l2)*sin_term - (1.0-l2)/(1.0+l2)*cos_term)/
              (cosh(dG*lifetime/2.0) - 2.0*lambda.real()/(1.0+l2)*sinh(dG*lifetime/2.0));
        }
        GX = hdc->Width(); // partial width of this DC
        GR = table.TotalWidth()-GX; // partial width of other DCs
        if(asymmetry>0.0)
          a = -1.0*GR/2.0/GX/asymmetry+sqrt(sqr(GR)/4.0/sqr(GX)/sqr(asymmetry)+(GR+GX)/GX);
        else if(asymmetry<0.0)
          a = -1.0*GR/2.0/GX/asymmetry-sqrt(sqr(GR)/4.0/sqr(GX)/sqr(asymmetry)+(GR+GX)/GX);
        else
          a = 0.0;
        if(anti_at_t0) table.UpdateWidth(hdc, (1.0+a)*GX);
        else           table.UpdateWidth(hdc, (1.0-a)*GX);
      }
      return table.Select();
    }
  }
  return ot.Select();
}
Exemple #6
0
ATOOLS::Blob* Mixing_Handler::PerformMixing(Particle* decayer) const
{
  // explicit mixing in event record
  Flavour flav = decayer->Flav();
  string tag = flav.IsAnti() ? flav.Bar().IDName() : flav.IDName();
  if(m_model("Mixing_"+tag,0.0)!=0.0 && decayer->Info()!=char('M')) {
    double t = DetermineMixingTime(decayer,true)/rpa->hBar();
    if(t==0.0) return NULL;
    double factor = decayer->Flav().QOverP2();
    if(decayer->Flav().IsAnti()) factor = 1.0/factor;
    double dG = decayer->Flav().DeltaGamma()*t/4.0;
    double dm = decayer->Flav().DeltaM()*t/2.0;
    Complex i(0.0,1.0);
    double prob_not_mix = sqr(abs(exp(i*dm)*exp(dG)+exp(-i*dm)*exp(-dG)));
    double prob_mix = factor*sqr(abs(exp(i*dm)*exp(dG)-exp(-i*dm)*exp(-dG)));
    if(prob_mix > ran->Get()*(prob_mix+prob_not_mix)) {
      if(decayer->DecayBlob()) {
        decayer->DecayBlob()->RemoveOwnedParticles();
        delete decayer->DecayBlob();
      }
      decayer->SetStatus(part_status::decayed);
      decayer->SetInfo('m');
      Particle* mixed_part = new Particle(0, decayer->Flav().Bar(),
                                          decayer->Momentum(), 'M');
      mixed_part->SetFinalMass(decayer->FinalMass());
      mixed_part->SetStatus(part_status::active);
      mixed_part->SetTime(decayer->Time());
      Blob* mixingblob = new Blob();
      mixingblob->SetType(btp::Hadron_Mixing);
      mixingblob->SetId();
      mixingblob->SetStatus(blob_status::inactive);
      mixingblob->SetTypeSpec("HADRONS");
      mixingblob->AddToInParticles(decayer);
      mixingblob->AddToOutParticles(mixed_part);
      mixingblob->SetPosition(decayer->ProductionBlob()->Position());
      mixingblob->SetStatus(blob_status::needs_hadrondecays);
      return mixingblob;
    }
  }
  return NULL;
}