#include <RecoTracker/TkMSParametrization/interface/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] |
virtual MSLayersKeeperX0DetLayer::~MSLayersKeeperX0DetLayer | ( | ) | [inline, virtual] |
void MSLayersKeeperX0DetLayer::init | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Reimplemented from MSLayersKeeper.
Definition at line 13 of file MSLayersKeeperX0DetLayer.cc.
References GeomDetEnumerators::barrel, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), MSLayersKeeper::getDataX0(), if(), isInitialised, it, middle, MSLayersAtAngle::print(), MSLayersKeeper::setDataX0(), slope, MSLayersAtAngle::sumX0D(), theLayersData, MSLayersAtAngle::update(), and MSLayer::DataX0::x0.
00014 { 00015 if (isInitialised) return; 00016 isInitialised = true; 00017 // vector<MSLayer> allLayers = MSLayersKeeperX0DetLayerGeom().detLayers(); 00018 //MP 00019 vector<MSLayer> allLayers; 00020 theLayersData = MSLayersAtAngle(allLayers); 00021 00022 vector<MSLayer>::iterator it; 00023 PixelRecoPointRZ zero(0.,0.); 00024 for (it = allLayers.begin(); it != allLayers.end(); it++) { 00025 PixelRecoPointRZ middle = it->face()== GeomDetEnumerators::barrel ? 00026 PixelRecoPointRZ(it->position(), it->range().mean()) 00027 : PixelRecoPointRZ(it->range().mean(), it->position()); 00028 00029 float cotTheta = PixelRecoLineRZ(zero,middle).cotLine(); 00030 float x0 = getDataX0(*it).x0; 00031 00032 DataX0 dataX0; 00033 if (it->face()== GeomDetEnumerators::barrel) { 00034 float sumX0D = theLayersData.sumX0D(zero, middle); 00035 dataX0 = DataX0(x0, sumX0D, cotTheta); 00036 } else { 00037 float hrange= (it->range().max()-it->range().min())/2.; 00038 float cot1 = it->position()/(it->range().mean()-hrange/2); 00039 float cot2 = it->position()/(it->range().mean()+hrange/2); 00040 PixelRecoLineRZ line1(zero,cot1); 00041 PixelRecoLineRZ line2(zero,cot2); 00042 float sum1 = theLayersData.sumX0D(zero,it->crossing(line1).first); 00043 float sum2 = theLayersData.sumX0D(zero,it->crossing(line2).first); 00044 float slope = (sum2-sum1)/(1/cot2-1/cot1); 00045 float sumX0D = sum1 + slope*(1/cotTheta-1/cot1); 00046 dataX0 = DataX0(x0, sumX0D, cotTheta); 00047 dataX0.setForwardSumX0DSlope(slope); 00048 } 00049 setDataX0(*it, dataX0); 00050 theLayersData.update(*it); 00051 } 00052 cout << "MSLayersKeeperX0DetLayer LAYERS: "<<endl; 00053 theLayersData.print(); 00054 }
Reimplemented from MSLayersKeeper.
Definition at line 12 of file MSLayersKeeperX0DetLayer.h.
References MSLayersAtAngle::findLayer(), and theLayersData.
00013 {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.
00015 {return theLayersData;}
bool MSLayersKeeperX0DetLayer::isInitialised [private] |
Definition at line 19 of file MSLayersKeeperX0DetLayer.h.