CMS 3D CMS Logo

MSLayersKeeperX0DetLayer Class Reference

#include <RecoTracker/TkMSParametrization/interface/MSLayersKeeperX0DetLayer.h>

Inheritance diagram for MSLayersKeeperX0DetLayer:

MSLayersKeeper

List of all members.

Public Member Functions

virtual void init (const edm::EventSetup &iSetup)
virtual MSLayer layer (const DetLayer *layer) const
virtual const MSLayersAtAnglelayers (float cotTheta) const
 MSLayersKeeperX0DetLayer ()
virtual ~MSLayersKeeperX0DetLayer ()

Private Attributes

bool isInitialised
MSLayersAtAngle theLayersData


Detailed Description

Definition at line 7 of file MSLayersKeeperX0DetLayer.h.


Constructor & Destructor Documentation

MSLayersKeeperX0DetLayer::MSLayersKeeperX0DetLayer (  )  [inline]

Definition at line 9 of file MSLayersKeeperX0DetLayer.h.

00009 : isInitialised(false) { }

virtual MSLayersKeeperX0DetLayer::~MSLayersKeeperX0DetLayer (  )  [inline, virtual]

Definition at line 10 of file MSLayersKeeperX0DetLayer.h.

00010 { }


Member Function Documentation

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 }

virtual MSLayer MSLayersKeeperX0DetLayer::layer ( const DetLayer layer  )  const [inline, virtual]

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;}


Member Data Documentation

bool MSLayersKeeperX0DetLayer::isInitialised [private]

Definition at line 18 of file MSLayersKeeperX0DetLayer.h.

Referenced by init().

MSLayersAtAngle MSLayersKeeperX0DetLayer::theLayersData [private]

Definition at line 19 of file MSLayersKeeperX0DetLayer.h.

Referenced by init(), layer(), and layers().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:25 2009 for CMSSW by  doxygen 1.5.4