CMS 3D CMS Logo

Functions

reco::helper::VirtualJetProducerHelper Namespace Reference

Functions

double intersection (double r12)
double intersection (double r12, double r23, double r13)

Function Documentation

double reco::helper::VirtualJetProducerHelper::intersection ( double  r12)

Definition at line 6 of file VirtualJetProducerHelper.cc.

References M_PI, and mathSSE::sqrt().

Referenced by DDG4SolidConverter::DDG4SolidConverter(), intersection(), DDLBooleanSolid::processElement(), edm::serviceregistry::ServicesManager::ServicesManager(), DDStreamer::solids_read(), and VirtualJetProducer::writeJets().

{
  if (r12 == 0)         return M_PI;
  if (r12 >= 2)         return 0;
  return 2 * acos(r12/2) - 0.5*r12*sqrt(4 - r12*r12);
}
double reco::helper::VirtualJetProducerHelper::intersection ( double  r12,
double  r23,
double  r13 
)

Definition at line 13 of file VirtualJetProducerHelper.cc.

References intersection(), M_PI, mathSSE::sqrt(), and groupFilesInBlocks::temp.

{
  if (r12 >= 2 || r23 >= 2 || r13 >= 2) return 0;
  const double          r12_2   = r12*r12;
  const double          r13_2   = r13*r13;
  const double          temp    = (r12_2 + r13_2 - r23*r23);
  const double          T2      = 4*r12_2*r13_2 - temp*temp;
  const double          common  = 0.5*( intersection(r12) + intersection(r13) + intersection(r23) - M_PI + sqrt(T2)/2 );
  return common;
}