13 layersX0Eta.
init(iSetup);
15 vector<MSLayer> allLayers = geom.
detLayers(iSetup);
16 vector<MSLayer>::iterator it;
17 for (
int i=-1;
i<=1;
i++) {
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()) allLayers.push_back(*ic);
29 for (it = allLayers.begin(); it != allLayers.end(); it++) {
31 it->range().mean()/it->position()
32 : it->position()/it->range().mean();
36 for (
int ibin = 0; ibin < 2*layersX0Eta.
theHalfNBins; ibin++) {
39 if (aLayer) { nbins++; sumX0 +=
getDataX0(*aLayer).
x0; }
41 if ( nbins==0) nbins=1;
43 float hrange= (it->range().max()-it->range().min())/2.;
46 float cot1 = it->position()/(it->range().mean()-hrange/2);
47 float cot2 = it->position()/(it->range().mean()+hrange/2);
50 float sum1 = aLayer1 ? aLayer1->
sumX0D(cot1) : 0.;
51 float sum2 = aLayer2 ? aLayer2->
sumX0D(cot2) : 0.;
52 float slope = (sum2-sum1)/(1/cot2-1/cot1);
53 float sumX0D = sum1 + slope*(1/cotTheta-1/cot1);
54 dataX0 =
DataX0(sumX0/nbins, sumX0D, cotTheta);
55 dataX0.setForwardSumX0DSlope(slope);
59 for (
int i=0;
i<nb;
i++) {
60 float cot = (it->range().mean()+(2*
i+1-nb)*hrange/nb)/it->position();
63 if (aLayer) sumX0D += aLayer->
sumX0D(cot) *
sqrt(sin);
65 dataX0 =
DataX0(sumX0/nbins, sumX0D/nb, 0);
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
void init(const edm::EventSetup &iSetup) override
float sumX0D(float cotTheta) const
const MSLayersAtAngle & layers(float cotTheta) const override
std::vector< MSLayer > otherLayers(float eta, const edm::EventSetup &iSetup) const
static const double slope[3]
Sin< T >::type sin(const T &t)
void init(const edm::EventSetup &iSetup) 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
static const DataX0 & getDataX0(const MSLayer &l)
std::vector< MSLayer > detLayers(float eta, float z, const edm::EventSetup &iSetup) const
const MSLayer * findLayer(const MSLayer &layer) const
std::vector< MSLayersAtAngle > theLayersData