/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
MagneticField/VolumeGeometry/src/MagVolume6Faces.cc
20 строк
900 B
Matti Kortelainen
Add "inverse of nominal value" in GeV to MagneticField, and calculate nominal values in the constructor.
31 авг 2021, 04:10
31 авг 2021, 04:10
5986927
Код
Авторство
О чём код?
#include "MagneticField/VolumeGeometry/interface/MagVolume6Faces.h" MagVolume6Faces::MagVolume6Faces(const PositionType& pos, const RotationType& rot, const std::vector<VolumeSide>& faces, const MagneticFieldProvider<float>* mfp, double sf) : MagVolume(pos, rot, mfp, sf), volumeNo(0), copyno(0), theFaces(faces) { setNominalValue(); } bool MagVolume6Faces::inside(const GlobalPoint& gp, double tolerance) const { // check if the point is on the correct side of all delimiting surfaces for (std::vector<VolumeSide>::const_iterator i = theFaces.begin(); i != theFaces.end(); ++i) { Surface::Side side = i->surface().side(gp, tolerance); if (side != i->surfaceSide() && side != SurfaceOrientation::onSurface) return false; } return true; }