示例#1
0
Particle::Particle(const std::string& name)
  : pdg_code_(ParticleInfo::Instance().getPDGCode(name)),
    name_(name),
    mass_(ParticleInfo::Instance().getMassGeV(pdg_code_)),
    charge_(ParticleInfo::Instance().getCharge(pdg_code_)),
    momentum_(mass_, ThreeVector())
{}
示例#2
0
Particle::Particle(const int pdg_code)
  : pdg_code_(pdg_code),
    name_(ParticleInfo::Instance().getName(pdg_code)),
    mass_(ParticleInfo::Instance().getMassGeV(pdg_code)),
    charge_(ParticleInfo::Instance().getCharge(pdg_code)),
    momentum_(mass_, ThreeVector())
{}
示例#3
0
Particle::Particle(const std::string& name, const double px, const double py, const double pz)
  : pdg_code_(ParticleInfo::Instance().getPDGCode(name)),
    name_(name),
    mass_(ParticleInfo::Instance().getMassGeV(pdg_code_)),
    charge_(ParticleInfo::Instance().getCharge(pdg_code_)),
    momentum_(mass_, ThreeVector())
{
  ThreeVector mom(px, py, pz);
  this->setThreeMomentum(mom);
}
示例#4
0
//------------------------------------------------------------------------------
double DiagramTwoLoop::value_base_IRreg(const LabelMap<Momentum, ThreeVector>& mom, const LabelMap<Vertex, KernelBase*>& kernels, LinearPowerSpectrumBase* PL) const
{
   // no IR regulation necessary if there are no poles away from q = 0
   if (_IRpoles.empty()) return value_base(mom, kernels, PL);

   // To regulate the diagram in the IR, we map each region with
   // an IR pole at q = qIR != 0 onto coordinates with the pole at q = 0
   double value = 0;
   // need to regulate only the unique IR poles
   // e.g. in the covariance limit, two IR poles can be degenerate
   // and we should treat them simultaneously
   std::vector<ThreeVector> uniqueIRpoles;
   // pole at q = 0
   uniqueIRpoles.push_back(ThreeVector(0, 0, 0));
   // loop over the nonzero poles
   for (auto& pole_prop : _IRpoles) {
      // check if pole is unique
      bool is_unique = true;
      ThreeVector pole = pole_prop.p(mom);
      for (auto unique_pole : uniqueIRpoles) {
         if (pole == unique_pole) {
            is_unique = false;
            break;
         }
      }
      if (is_unique) { uniqueIRpoles.push_back(pole); }
   }
   // now loop over all the unique IR poles
   for (size_t i = 0; i < uniqueIRpoles.size(); i++) {
      // for these poles we change variables: q -> q + pole
      // so that the pole maps to 0 and we exclude all other poles
      ThreeVector pole = uniqueIRpoles[i];
      double PSregion = 1;
      // loop over all other poles and make PS cuts for each
      for (size_t j = 0; j < uniqueIRpoles.size(); j++) {
         if (j != i) {
            ThreeVector pole_j = uniqueIRpoles[j];
            PSregion *= theta(mom[Momentum::q], mom[Momentum::q] + pole - pole_j);
         }
      }
      // copy and shift the diagram momentum for the pole
      LabelMap<Momentum, ThreeVector> mom_shift = mom;
      mom_shift[Momentum::q] = mom[Momentum::q] + pole;
      // add the diagram value for this shifted momentum, times the PS factor
      value += PSregion * value_base(mom_shift, kernels, PL);
   }

   return value;
}
示例#5
0
// Constructor for central Rope
ManipulatorRope::ManipulatorRope(const ThreeVector &abushing,
			  	const ThreeVector &aaxis,float abushingRadius, const AV &av)

			:	//av(aav),
         	bushing(abushing), bushingRadius(abushingRadius),
            bushingExit(cross(kVector, aaxis)),
         	anchorExit(oVector), anchorROC(tempROC),
            anchorHoleOffset(tempHoleOffset),
            pulleyAxis(aaxis),neckRingRadius(av.getNeckRingRadius()),
            neckRingROC(av.getNeckRingROC()),
            neckRingCenter(av.getNeckRingPosition()),
            neckRingAxis(av.getNeckDirection())
{
//	bushingRadius = abushingRadius;
	ropeType = centralRope;
//	pulleyAxis = aaxis;
//	bushingExit = cross(kVector, aaxis);
	getLength(ThreeVector(0,0,0));
}
示例#6
0
//------------------------------------------------------------------------------
std::pair<double, LabelMap<Momentum, ThreeVector>* const> Bispectrum::LoopPhaseSpace::generate_point_oneLoop(std::vector<double> xpts)
{
   // we sample q flat in spherical coordinates
   // q components
   double qmag = xpts[0] * qmax;
   double qcosth = 2 * xpts[1] - 1.;
   double qphi = 2*pi * xpts[2];

   // jacobian
   // qmax from the magnitude integral,
   // 2 from the cos theta jacobian,
   // pick up a 2pi from the phi integral,
   // and a 1/(2pi)^3 from the measure
   double jacobian = qmag * qmag * qmax / (2 * pi*pi);

   // 3-vector for the loop momentum
   momenta[Momentum::q] = ThreeVector(qmag * sqrt(1. - qcosth*qcosth) * cos(qphi), qmag * sqrt(1. - qcosth*qcosth) * sin(qphi), qmag * qcosth);

   return std::pair<double, LabelMap<Momentum, ThreeVector>* const>(jacobian, &momenta);
}
示例#7
0
// Constructor for side Ropes //
ManipulatorRope::ManipulatorRope(const ThreeVector &abushing,
				const ThreeVector &aanchor,
				const float &aROC, const float &aHoleOff, const ThreeVector &aaxis,
				float apulleyOffset, float apulleyRadius, float abushingRadius, const AV &av)
			://	av(aav),
					bushing(abushing), bushingRadius(abushingRadius),
						bushingExit(cross(kVector, aaxis)),
					anchorExit(aanchor), anchorROC(aROC), anchorHoleOffset(aHoleOff),
						pulleyAxis(aaxis),pulleyOffset(apulleyOffset),
						neckRingRadius(av.getNeckRingRadius()),
            neckRingROC(av.getNeckRingROC()),
            neckRingCenter(av.getNeckRingPosition()),
            neckRingAxis(av.getNeckDirection())
{
	ropeType=(anchorExit[X]+anchorExit[Y] < 0)?leftRope:rightRope;
	pulleyRadius=apulleyRadius;
//	bushingRadius=abushingRadius;
//	anchorROC=aROC;
//	anchorHoleOffset=aHoleOff;
//	pulleyAxis=aaxis;
	getLength(ThreeVector(0,0,0));
}
示例#8
0
	//Constructors
	Particle(){ mass_ = 0; momentum_= ThreeVector(); pdg_code_=0; }