13 layersX0Eta.
init(iSetup);
15 vector<MSLayer> allLayers =
geom.detLayers(iSetup);
16 vector<MSLayer>::iterator it;
17 for (
int i = -1;
i <= 1;
i++) {
18 float eta =
i * (-1.8);
19 vector<MSLayer> tmpLayers =
geom.otherLayers(
eta, iSetup);
20 vector<MSLayer>::const_iterator ic;
21 for (ic = tmpLayers.begin(); ic != tmpLayers.end(); ic++) {
22 it =
find(allLayers.begin(), allLayers.end(), *ic);
23 if (it == allLayers.end())
24 allLayers.push_back(*ic);
28 for (it = allLayers.begin(); it != allLayers.end(); it++) {
30 : it->position() / it->range().mean();
34 for (
int ibin = 0; ibin < 2 * layersX0Eta.
theHalfNBins; ibin++) {
45 float hrange = (it->range().max() - it->range().min()) / 2.;
48 float cot1 = it->position() / (it->range().mean() - hrange / 2);
49 float cot2 = it->position() / (it->range().mean() + hrange / 2);
52 float sum1 = aLayer1 ? aLayer1->
sumX0D(cot1) : 0.;
53 float sum2 = aLayer2 ? aLayer2->
sumX0D(cot2) : 0.;
54 float slope = (
sum2 - sum1) / (1 / cot2 - 1 / cot1);
55 float sumX0D = sum1 +
slope * (1 / cotTheta - 1 / cot1);
57 dataX0.setForwardSumX0DSlope(
slope);
61 for (
int i = 0;
i < nb;
i++) {
62 float cot = (it->range().mean() + (2 *
i + 1 - nb) * hrange / nb) / it->position();
63 float sin = 1 /
sqrt(1 + cot * cot);