#include <MSLayersKeeperX0DetLayer.h>
Public Member Functions | |
virtual void | init (const edm::EventSetup &iSetup) |
virtual MSLayer | layer (const DetLayer *layer) const |
virtual const MSLayersAtAngle & | layers (float cotTheta) const |
MSLayersKeeperX0DetLayer () | |
virtual | ~MSLayersKeeperX0DetLayer () |
Private Attributes | |
bool | isInitialised |
MSLayersAtAngle | theLayersData |
Definition at line 7 of file MSLayersKeeperX0DetLayer.h.
MSLayersKeeperX0DetLayer::MSLayersKeeperX0DetLayer | ( | ) | [inline] |
Definition at line 9 of file MSLayersKeeperX0DetLayer.h.
: isInitialised(false) { }
virtual MSLayersKeeperX0DetLayer::~MSLayersKeeperX0DetLayer | ( | ) | [inline, virtual] |
Definition at line 10 of file MSLayersKeeperX0DetLayer.h.
{ }
void MSLayersKeeperX0DetLayer::init | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Reimplemented from MSLayersKeeper.
Definition at line 13 of file MSLayersKeeperX0DetLayer.cc.
References Reference_intrackfit_cff::barrel, GeomDetEnumerators::barrel, PixelRecoLineRZ::cotLine(), gather_cfg::cout, if(), slope, and zero.
{ if (isInitialised) return; isInitialised = true; // vector<MSLayer> allLayers = MSLayersKeeperX0DetLayerGeom().detLayers(); //MP vector<MSLayer> allLayers; theLayersData = MSLayersAtAngle(allLayers); vector<MSLayer>::iterator it; PixelRecoPointRZ zero(0.,0.); for (it = allLayers.begin(); it != allLayers.end(); it++) { PixelRecoPointRZ middle = it->face()== GeomDetEnumerators::barrel ? PixelRecoPointRZ(it->position(), it->range().mean()) : PixelRecoPointRZ(it->range().mean(), it->position()); float cotTheta = PixelRecoLineRZ(zero,middle).cotLine(); float x0 = getDataX0(*it).x0; DataX0 dataX0; if (it->face()== GeomDetEnumerators::barrel) { float sumX0D = theLayersData.sumX0D(zero, middle); dataX0 = DataX0(x0, sumX0D, cotTheta); } else { float hrange= (it->range().max()-it->range().min())/2.; float cot1 = it->position()/(it->range().mean()-hrange/2); float cot2 = it->position()/(it->range().mean()+hrange/2); PixelRecoLineRZ line1(zero,cot1); PixelRecoLineRZ line2(zero,cot2); float sum1 = theLayersData.sumX0D(zero,it->crossing(line1).first); float sum2 = theLayersData.sumX0D(zero,it->crossing(line2).first); float slope = (sum2-sum1)/(1/cot2-1/cot1); float sumX0D = sum1 + slope*(1/cotTheta-1/cot1); dataX0 = DataX0(x0, sumX0D, cotTheta); dataX0.setForwardSumX0DSlope(slope); } setDataX0(*it, dataX0); theLayersData.update(*it); } cout << "MSLayersKeeperX0DetLayer LAYERS: "<<endl; theLayersData.print(); }
Reimplemented from MSLayersKeeper.
Definition at line 12 of file MSLayersKeeperX0DetLayer.h.
References MSLayersAtAngle::findLayer(), and theLayersData.
{return *theLayersData.findLayer(MSLayer(layer)); }
virtual const MSLayersAtAngle& MSLayersKeeperX0DetLayer::layers | ( | float | cotTheta | ) | const [inline, virtual] |
Implements MSLayersKeeper.
Definition at line 14 of file MSLayersKeeperX0DetLayer.h.
References theLayersData.
{return theLayersData;}
bool MSLayersKeeperX0DetLayer::isInitialised [private] |
Definition at line 18 of file MSLayersKeeperX0DetLayer.h.
Definition at line 19 of file MSLayersKeeperX0DetLayer.h.