11 fieldBarrelHistos(200, static_cast<std::
vector<double> >(std::
vector<double>(bins, static_cast<double>(0.)))),
12 fieldEndcapHistos(200, static_cast<std::
vector<double> >(std::
vector<double>(bins, static_cast<double>(0.)))),
13 fieldBarrelBinWidth(200, static_cast<double>(0.)),
14 fieldBarrelZMin(200, static_cast<double>(0.)),
15 fieldEndcapBinWidth(200, static_cast<double>(0.)),
16 fieldEndcapRMin(200, static_cast<double>(0.))
19 std::list<TrackerLayer>::const_iterator cyliter;
25 for (cyliter = cylitBeg; cyliter != cylitEnd; ++cyliter) {
26 int layer = cyliter->layerNumber();
34 if (cyliter->forward()) {
35 zmax = cyliter->disk()->position().z();
36 rmax = cyliter->disk()->outerRadius();
38 zmax = cyliter->cylinder()->bounds().length() / 2.;
39 rmax = cyliter->cylinder()->bounds().width() / 2. - cyliter->cylinder()->bounds().thickness() / 2.;
46 step = (rmax - rmin) / (
bins - 1);
58 step = (zmax - zmin) / (
bins - 1);
64 for (
double zed = zmin + step / 2.; zed < zmax +
step; zed +=
step) {
101 const std::vector<double>* theHisto;
114 double x = fabs(coord);
115 unsigned bin = (unsigned)((x - theXMin) / theBinWidth);
116 if (bin + 1 == (
unsigned)
bins)
118 double x1 = theXMin + (bin - 0.5) * theBinWidth;
119 double x2 = x1 + theBinWidth;
122 double field1 = (*theHisto)[
bin];
123 double field2 = (*theHisto)[bin + 1];
125 return field1 + (field2 - field1) * (x - x1) / (x2 - x1);
std::vector< double > fieldEndcapBinWidth
double inTeslaZ(const GlobalPoint &) const
unsigned int layerNumber() const
Returns the layer number.
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
double inInverseGeVZ(const GlobalPoint &) const
Global3DPoint GlobalPoint
std::list< TrackerLayer >::const_iterator cylinderEnd() const
Returns the last pointer in the cylinder list.
const GlobalVector inKGauss(const GlobalPoint &) const
double inKGaussZ(const GlobalPoint &) const
const GlobalVector inTesla(const GlobalPoint &) const
const MagneticField * pMF_
constexpr std::array< uint8_t, layerIndexSize > layer
std::vector< double > fieldEndcapRMin
MagneticFieldMap(const MagneticField *pmF, const TrackerInteractionGeometry *myGeo)
const GlobalVector inInverseGeV(const GlobalPoint &) const
const TrackerInteractionGeometry * geometry_
std::vector< std::vector< double > > fieldBarrelHistos
std::vector< double > fieldBarrelBinWidth
std::list< TrackerLayer >::const_iterator cylinderBegin() const
Returns the first pointer in the cylinder list.
const std::vector< double > * theFieldEndcapHisto(unsigned layer) const
std::vector< double > fieldBarrelZMin
std::vector< std::vector< double > > fieldEndcapHistos
const std::vector< double > * theFieldBarrelHisto(unsigned layer) const
Global3DVector GlobalVector