CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
Phase2StripCPE Class Reference

#include <Phase2StripCPE.h>

Inheritance diagram for Phase2StripCPE:
ClusterParameterEstimator< Phase2TrackerCluster1D >

Public Types

using Phase2TrackerGeomDetUnit = PixelGeomDetUnit
 
using Phase2TrackerTopology = PixelTopology
 
- Public Types inherited from ClusterParameterEstimator< Phase2TrackerCluster1D >
typedef std::pair< LocalPoint, LocalErrorLocalValues
 
typedef std::vector< LocalValuesVLocalValues
 

Public Member Functions

LocalVector driftDirection (const Phase2TrackerGeomDetUnit &det) const
 
LocalValues localParameters (const Phase2TrackerCluster1D &cluster, const GeomDetUnit &det) const
 
 Phase2StripCPE ()
 
 Phase2StripCPE (edm::ParameterSet &conf, const MagneticField &)
 
- Public Member Functions inherited from ClusterParameterEstimator< Phase2TrackerCluster1D >
virtual void clearParameters () const
 
virtual void enterLocalParameters (unsigned int id, std::pair< int, int > &row_col, LocalValues pos_err_info) const
 
virtual void enterLocalParameters (uint32_t id, uint16_t firstStrip, LocalValues pos_err_info) const
 
virtual LocalValues localParameters (const Phase2TrackerCluster1D &cluster, const GeomDetUnit &gd, const LocalTrajectoryParameters &) const
 
virtual LocalValues localParameters (const Phase2TrackerCluster1D &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual VLocalValues localParametersV (const Phase2TrackerCluster1D &cluster, const GeomDetUnit &gd) const
 
virtual VLocalValues localParametersV (const Phase2TrackerCluster1D &cluster, const GeomDetUnit &gd, const TrajectoryStateOnSurface &tsos) const
 
virtual ~ClusterParameterEstimator ()
 

Protected Attributes

const MagneticFieldmagfield_
 
double tanLorentzAnglePerTesla_
 
bool use_LorentzAngle_DB_
 

Detailed Description

Definition at line 13 of file Phase2StripCPE.h.

Member Typedef Documentation

Definition at line 18 of file Phase2StripCPE.h.

Definition at line 19 of file Phase2StripCPE.h.

Constructor & Destructor Documentation

Phase2StripCPE::Phase2StripCPE ( )
inline

Definition at line 23 of file Phase2StripCPE.h.

References driftDirection(), and localParameters().

23 {};
Phase2StripCPE::Phase2StripCPE ( edm::ParameterSet conf,
const MagneticField magf 
)

Definition at line 6 of file Phase2StripCPE.cc.

References Exception, edm::ParameterSet::getParameter(), magfield_, tanLorentzAnglePerTesla_, and use_LorentzAngle_DB_.

7 {
8  magfield_ = &magf;
9  use_LorentzAngle_DB_ = conf.getParameter<bool>("LorentzAngle_DB");
11  throw cms::Exception("Lorentz Angle from DB not implemented yet");
13  // old code: LorentzAngleMap_.getLorentzAngle(det->geographicalId().rawId());
14  } else {
15  tanLorentzAnglePerTesla_ = conf.getParameter<double>("TanLorentzAnglePerTesla");
16  }
17 }
T getParameter(std::string const &) const
const MagneticField * magfield_
double tanLorentzAnglePerTesla_
bool use_LorentzAngle_DB_

Member Function Documentation

LocalVector Phase2StripCPE::driftDirection ( const Phase2TrackerGeomDetUnit det) const

Definition at line 47 of file Phase2StripCPE.cc.

References MagneticField::inTesla(), magfield_, GloballyPositioned< T >::position(), GeomDet::surface(), tanLorentzAnglePerTesla_, toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by localParameters(), and Phase2StripCPE().

49 {
50  LocalVector lbfield = (det.surface()).toLocal(magfield_->inTesla(det.surface().position()));
51 
52  float dir_x = -tanLorentzAnglePerTesla_ * lbfield.y();
53  float dir_y = tanLorentzAnglePerTesla_ * lbfield.x();
54  float dir_z = 1.f; // E field always in z direction
55 
56  return LocalVector(dir_x,dir_y,dir_z);
57 }
Local3DVector LocalVector
Definition: LocalVector.h:12
const MagneticField * magfield_
T y() const
Definition: PV3DBase.h:63
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
double tanLorentzAnglePerTesla_
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
Phase2StripCPE::LocalValues Phase2StripCPE::localParameters ( const Phase2TrackerCluster1D cluster,
const GeomDetUnit det 
) const
virtual

Implements ClusterParameterEstimator< Phase2TrackerCluster1D >.

Definition at line 20 of file Phase2StripCPE.cc.

References Surface::bounds(), Phase2TrackerCluster1D::center(), Phase2TrackerCluster1D::column(), shallow::drift(), driftDirection(), PixelTopology::localX(), PixelTopology::localY(), PixelTopology::pitch(), funct::pow(), GeomDet::specificSurface(), PixelGeomDetUnit::specificTopology(), Bounds::thickness(), and PV3DBase< T, PVType, FrameType >::x().

Referenced by Phase2StripCPE().

23 {
24  const Phase2TrackerGeomDetUnit & det = (const Phase2TrackerGeomDetUnit &) detunit;
25  const Phase2TrackerTopology * topo = &det.specificTopology();
26 
27  float pitch_x = topo->pitch().first;
28  float pitch_y = topo->pitch().second;
29 
30  // see https://github.com/cms-sw/cmssw/blob/CMSSW_8_1_X/RecoLocalTracker/SiStripRecHitConverter/src/StripCPE.cc
31 
32  float thickness = det.specificSurface().bounds().thickness();
33  LocalVector drift = driftDirection(det) * thickness;
34  LocalVector lvec = drift + LocalVector(0,0,-thickness);
35  float coveredStrips = lvec.x() / pitch_x; // simplifies wrt Phase0 tracker because only rectangular modules
36 
37  float ix = cluster.center() - 0.5 * coveredStrips;
38  float iy = cluster.column()+0.5; // halfway the column
39 
40  LocalPoint lp( topo->localX(ix), topo->localY(iy), 0 ); // x, y, z
41  LocalError le( pow(pitch_x, 2) / 12, 0, pow(pitch_y, 2) / 12); // e2_xx, e2_xy, e2_yy
42 
43  return std::make_pair( lp, le );
44 }
Local3DVector LocalVector
Definition: LocalVector.h:12
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:38
virtual std::pair< float, float > pitch() const =0
const Bounds & bounds() const
Definition: Surface.h:120
LocalVector driftDirection(const Phase2TrackerGeomDetUnit &det) const
virtual float localX(const float mpX) const =0
unsigned int column() const
virtual float thickness() const =0
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual float localY(const float mpY) const =0
T x() const
Definition: PV3DBase.h:62
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:45

Member Data Documentation

const MagneticField* Phase2StripCPE::magfield_
protected

Definition at line 30 of file Phase2StripCPE.h.

Referenced by driftDirection(), and Phase2StripCPE().

double Phase2StripCPE::tanLorentzAnglePerTesla_
protected

Definition at line 32 of file Phase2StripCPE.h.

Referenced by driftDirection(), and Phase2StripCPE().

bool Phase2StripCPE::use_LorentzAngle_DB_
protected

Definition at line 31 of file Phase2StripCPE.h.

Referenced by Phase2StripCPE().