11 vector<MSLayer> allLayers = geom.
detLayers();
12 vector<MSLayer>::iterator it;
13 for (
int i = -1;
i <= 1;
i++) {
14 float eta =
i * (-1.8);
16 vector<MSLayer>::const_iterator ic;
17 for (ic = tmpLayers.begin(); ic != tmpLayers.end(); ic++) {
18 it =
find(allLayers.begin(), allLayers.end(), *ic);
19 if (it == allLayers.end())
20 allLayers.push_back(*ic);
24 for (it = allLayers.begin(); it != allLayers.end(); it++) {
26 : it->position() / it->range().mean();
30 for (
int ibin = 0; ibin < 2 * layersX0Eta.
theHalfNBins; ibin++) {
41 float hrange = (it->range().max() - it->range().min()) / 2.;
44 float cot1 = it->position() / (it->range().mean() - hrange / 2);
45 float cot2 = it->position() / (it->range().mean() + hrange / 2);
48 float sum1 = aLayer1 ? aLayer1->
sumX0D(cot1) : 0.;
49 float sum2 = aLayer2 ? aLayer2->
sumX0D(cot2) : 0.;
50 float slope = (sum2 - sum1) / (1 / cot2 - 1 / cot1);
51 float sumX0D = sum1 + slope * (1 / cotTheta - 1 / cot1);
52 dataX0 =
DataX0(sumX0 / nbins, sumX0D, cotTheta);
53 dataX0.setForwardSumX0DSlope(slope);
57 for (
int i = 0;
i < nb;
i++) {
58 float cot = (it->range().mean() + (2 *
i + 1 - nb) * hrange / nb) / it->position();
59 float sin = 1 /
sqrt(1 + cot * cot);
64 dataX0 =
DataX0(sumX0 / nbins, sumX0D / nb, 0);
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
float sumX0D(float cotTheta) const
static const double slope[3]
Sin< T >::type sin(const T &t)
const MSLayersAtAngle & layers(float cotTheta) const override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static void setDataX0(MSLayer &l, const DataX0 &x0Data)
MSLayersAtAngle theLayersData
std::vector< MSLayer > detLayers(float eta, float z, const MagneticField &bfield) const
std::vector< MSLayer > otherLayers(float eta) const
static const DataX0 & getDataX0(const MSLayer &l)
MSLayersKeeperX0Averaged(const GeometricSearchTracker &tracker, const MagneticField &bfield)
const MSLayer * findLayer(const MSLayer &layer) const
std::vector< MSLayersAtAngle > theLayersData