CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
MSLayersKeeperX0DetLayer Class Referencefinal

#include <MSLayersKeeperX0DetLayer.h>

Inheritance diagram for MSLayersKeeperX0DetLayer:
MSLayersKeeper

Public Member Functions

MSLayer layer (const DetLayer *layer) const override
 
const MSLayersAtAnglelayers (float cotTheta) const override
 
 MSLayersKeeperX0DetLayer ()
 
 ~MSLayersKeeperX0DetLayer () override=default
 
- Public Member Functions inherited from MSLayersKeeper
virtual ~MSLayersKeeper ()
 

Private Attributes

MSLayersAtAngle theLayersData
 

Additional Inherited Members

- Protected Types inherited from MSLayersKeeper
typedef MSLayer::DataX0 DataX0
 
- Static Protected Member Functions inherited from MSLayersKeeper
static const DataX0getDataX0 (const MSLayer &l)
 
static void setDataX0 (MSLayer &l, const DataX0 &x0Data)
 

Detailed Description

Definition at line 9 of file MSLayersKeeperX0DetLayer.h.

Constructor & Destructor Documentation

MSLayersKeeperX0DetLayer::MSLayersKeeperX0DetLayer ( )

Definition at line 13 of file MSLayersKeeperX0DetLayer.cc.

References GeomDetEnumerators::barrel, PixelRecoLineRZ::cotLine(), if(), slope, and SiPixelPI::zero.

13  {
14  // vector<MSLayer> allLayers = MSLayersKeeperX0DetLayerGeom().detLayers();
15  //MP
16  vector<MSLayer> allLayers;
17  theLayersData = MSLayersAtAngle(allLayers);
18 
19  vector<MSLayer>::iterator it;
20  PixelRecoPointRZ zero(0., 0.);
21  for (it = allLayers.begin(); it != allLayers.end(); it++) {
22  PixelRecoPointRZ middle = it->face() == GeomDetEnumerators::barrel
23  ? PixelRecoPointRZ(it->position(), it->range().mean())
24  : PixelRecoPointRZ(it->range().mean(), it->position());
25 
26  float cotTheta = PixelRecoLineRZ(zero, middle).cotLine();
27  float x0 = getDataX0(*it).x0;
28 
29  DataX0 dataX0;
30  if (it->face() == GeomDetEnumerators::barrel) {
31  float sumX0D = theLayersData.sumX0D(zero, middle);
32  dataX0 = DataX0(x0, sumX0D, cotTheta);
33  } else {
34  float hrange = (it->range().max() - it->range().min()) / 2.;
35  float cot1 = it->position() / (it->range().mean() - hrange / 2);
36  float cot2 = it->position() / (it->range().mean() + hrange / 2);
37  PixelRecoLineRZ line1(zero, cot1);
38  PixelRecoLineRZ line2(zero, cot2);
39  float sum1 = theLayersData.sumX0D(zero, it->crossing(line1).first);
40  float sum2 = theLayersData.sumX0D(zero, it->crossing(line2).first);
41  float slope = (sum2 - sum1) / (1 / cot2 - 1 / cot1);
42  float sumX0D = sum1 + slope * (1 / cotTheta - 1 / cot1);
43  dataX0 = DataX0(x0, sumX0D, cotTheta);
44  dataX0.setForwardSumX0DSlope(slope);
45  }
46  setDataX0(*it, dataX0);
47  theLayersData.update(*it);
48  }
49  //cout << "MSLayersKeeperX0DetLayer LAYERS: "<<endl;
50  //theLayersData.print();
51 }
static const double slope[3]
MSLayer::DataX0 DataX0
void update(const MSLayer &layer)
static void setDataX0(MSLayer &l, const DataX0 &x0Data)
float cotLine() const
if(conf_.getParameter< bool >("UseStripCablingDB"))
static const DataX0 & getDataX0(const MSLayer &l)
float sumX0D(const PixelRecoPointRZ &pointI, const PixelRecoPointRZ &pointO) const
MSLayersKeeperX0DetLayer::~MSLayersKeeperX0DetLayer ( )
overridedefault

Member Function Documentation

MSLayer MSLayersKeeperX0DetLayer::layer ( const DetLayer layer) const
inlineoverridevirtual

Reimplemented from MSLayersKeeper.

Definition at line 13 of file MSLayersKeeperX0DetLayer.h.

Referenced by geometryXMLparser.DTAlignable::index(), and geometryXMLparser.CSCAlignable::index().

13 { return *theLayersData.findLayer(MSLayer(layer)); }
const MSLayer * findLayer(const MSLayer &layer) const
const MSLayersAtAngle& MSLayersKeeperX0DetLayer::layers ( float  cotTheta) const
inlineoverridevirtual

Implements MSLayersKeeper.

Definition at line 14 of file MSLayersKeeperX0DetLayer.h.

14 { return theLayersData; }

Member Data Documentation

MSLayersAtAngle MSLayersKeeperX0DetLayer::theLayersData
private

Definition at line 17 of file MSLayersKeeperX0DetLayer.h.