CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PixelFitterByConformalMappingAndLine Class Reference

#include <PixelFitterByConformalMappingAndLine.h>

Inheritance diagram for PixelFitterByConformalMappingAndLine:
PixelFitterBase

Public Member Functions

 PixelFitterByConformalMappingAndLine (const TransientTrackingRecHitBuilder *ttrhBuilder, const TrackerGeometry *tracker, const MagneticField *field, double fixImpactParameter, bool useFixImpactParameter)
 
std::unique_ptr< reco::Trackrun (const std::vector< const TrackingRecHit * > &hits, const TrackingRegion &region, const edm::EventSetup &setup) const override
 
 ~PixelFitterByConformalMappingAndLine () override
 
- Public Member Functions inherited from PixelFitterBase
virtual ~PixelFitterBase ()
 

Private Attributes

const MagneticFieldtheField
 
const double theFixImpactParameter
 
const TrackerGeometrytheTracker
 
const TransientTrackingRecHitBuildertheTTRHBuilder
 
const bool theUseFixImpactParameter
 

Detailed Description

Definition at line 14 of file PixelFitterByConformalMappingAndLine.h.

Constructor & Destructor Documentation

◆ PixelFitterByConformalMappingAndLine()

PixelFitterByConformalMappingAndLine::PixelFitterByConformalMappingAndLine ( const TransientTrackingRecHitBuilder ttrhBuilder,
const TrackerGeometry tracker,
const MagneticField field,
double  fixImpactParameter,
bool  useFixImpactParameter 
)
explicit

Definition at line 35 of file PixelFitterByConformalMappingAndLine.cc.

41  : theTTRHBuilder(ttrhBuilder),
43  theField(field),
44  theFixImpactParameter(fixImpactParameter),
45  theUseFixImpactParameter(useFixImpactParameter) {}

◆ ~PixelFitterByConformalMappingAndLine()

PixelFitterByConformalMappingAndLine::~PixelFitterByConformalMappingAndLine ( )
inlineoverride

Definition at line 21 of file PixelFitterByConformalMappingAndLine.h.

21 {}

Member Function Documentation

◆ run()

std::unique_ptr< reco::Track > PixelFitterByConformalMappingAndLine::run ( const std::vector< const TrackingRecHit * > &  hits,
const TrackingRegion region,
const edm::EventSetup setup 
) const
overridevirtual

Implements PixelFitterBase.

Definition at line 47 of file PixelFitterByConformalMappingAndLine.cc.

49  {
50  int nhits = hits.size();
51 
52  vector<GlobalPoint> points;
53  vector<GlobalError> errors;
54  vector<bool> isBarrel;
55 
56  for (vector<const TrackingRecHit *>::const_iterator ih = hits.begin(); ih != hits.end(); ih++) {
58  points.push_back(recHit->globalPosition());
59  errors.push_back(recHit->globalPositionError());
60  isBarrel.push_back(recHit->detUnit()->type().isBarrel());
61  }
62 
63  // if (useMultScatt) {
64  // MultipleScatteringParametrisation ms(hits[i].layer());
65  // float cotTheta = (p.z()-zVtx)/p.perp();
66  // err += sqr( ms( pt, cotTheta, PixelRecoPointRZ(0.,zVtx) ) );
67  // }
68 
69  //
70  // simple fit to get pt, phi0 used for precise calcul.
71  //
72  typedef ConformalMappingFit::PointXY PointXY;
73  vector<PointXY> xy;
74  vector<float> errRPhi2;
75  for (int i = 0; i < nhits; ++i) {
76  const GlobalPoint &point = points[i];
77  xy.push_back(PointXY(point.x() - region.origin().x(), point.y() - region.origin().y()));
78  float phiErr2 = errors[i].phierr(point);
79  errRPhi2.push_back(point.perp2() * phiErr2);
80  }
81  ConformalMappingFit parabola(xy, errRPhi2);
83  parabola.fixImpactParmaeter(theFixImpactParameter);
84  else if (nhits < 3)
85  parabola.fixImpactParmaeter(0.);
86 
87  Measurement1D curv = parabola.curvature();
88  float invPt = PixelRecoUtilities::inversePt(curv.value(), setup);
89  float valPt = (invPt > 1.e-4) ? 1. / invPt : 1.e4;
90  float errPt = PixelRecoUtilities::inversePt(curv.error(), setup) * sqr(valPt);
91  Measurement1D pt(valPt, errPt);
92  Measurement1D phi = parabola.directionPhi();
93  Measurement1D tip = parabola.impactParameter();
94 
95  //
96  // precalculate theta to correct errors:
97  //
98  vector<float> r(nhits), z(nhits), errZ(nhits);
99  float simpleCot = (points.back().z() - points.front().z()) / (points.back().perp() - points.front().perp());
100  for (int i = 0; i < nhits; ++i) {
101  const GlobalPoint &point = points[i];
102  const GlobalError &error = errors[i];
103  r[i] = sqrt(sqr(point.x() - region.origin().x()) + sqr(point.y() - region.origin().y()));
105  z[i] = point.z() - region.origin().z();
106  errZ[i] = (isBarrel[i]) ? sqrt(error.czz()) : sqrt(error.rerr(point)) * simpleCot;
107  }
108 
109  //
110  // line fit (R-Z plane)
111  //
112  RZLine rzLine(r, z, errZ);
113 
114  //
115  // parameters for track builder
116  //
117  Measurement1D zip(rzLine.intercept(), sqrt(rzLine.covii()));
118  Measurement1D cotTheta(rzLine.cotTheta(), sqrt(rzLine.covss()));
119  float chi2 = parabola.chi2() + rzLine.chi2();
120  int charge = parabola.charge();
121 
122  PixelTrackBuilder builder;
123  return std::unique_ptr<reco::Track>(
124  builder.build(pt, phi, cotTheta, tip, zip, chi2, charge, hits, theField, region.origin()));
125 }

References TransientTrackingRecHitBuilder::build(), PixelTrackBuilder::build(), ConformalMappingFit::charge(), ALCARECOTkAlJpsiMuMu_cff::charge, hltPixelTracks_cff::chi2, ConformalMappingFit::chi2(), RZLine::chi2(), RZLine::cotTheta(), RZLine::covii(), RZLine::covss(), ConformalMappingFit::curvature(), ConformalMappingFit::directionPhi(), vertexPlots::e4, Measurement1D::error(), relativeConstraints::error, debug_messages_cfi::errors, fftjetvertexadder_cfi::errZ, ConformalMappingFit::fixImpactParmaeter(), hfClusterShapes_cfi::hits, mps_fire::i, ConformalMappingFit::impactParameter(), RZLine::intercept(), PixelRecoUtilities::inversePt(), PixelPluginsPhase0_cfi::isBarrel, nhits, phi, point, HLT_FULL_cff::points, DiDispStaMuonMonitor_cfi::pt, alignCSCRings::r, rpcPointValidation_cfi::recHit, HLT_FULL_cff::region, singleTopDQM_cfi::setup, sqr(), mathSSE::sqrt(), theField, theFixImpactParameter, theTTRHBuilder, theUseFixImpactParameter, qcdUeDQM_cfi::tip, Measurement1D::value(), geometryCSVtoXML::xy, z, and ComparisonHelper::zip().

Member Data Documentation

◆ theField

const MagneticField* PixelFitterByConformalMappingAndLine::theField
private

Definition at line 29 of file PixelFitterByConformalMappingAndLine.h.

Referenced by run().

◆ theFixImpactParameter

const double PixelFitterByConformalMappingAndLine::theFixImpactParameter
private

Definition at line 30 of file PixelFitterByConformalMappingAndLine.h.

Referenced by run().

◆ theTracker

const TrackerGeometry* PixelFitterByConformalMappingAndLine::theTracker
private

Definition at line 28 of file PixelFitterByConformalMappingAndLine.h.

◆ theTTRHBuilder

const TransientTrackingRecHitBuilder* PixelFitterByConformalMappingAndLine::theTTRHBuilder
private

Definition at line 27 of file PixelFitterByConformalMappingAndLine.h.

Referenced by run().

◆ theUseFixImpactParameter

const bool PixelFitterByConformalMappingAndLine::theUseFixImpactParameter
private

Definition at line 31 of file PixelFitterByConformalMappingAndLine.h.

Referenced by run().

fftjetvertexadder_cfi.errZ
errZ
Definition: fftjetvertexadder_cfi.py:39
Measurement1D
Definition: Measurement1D.h:11
ConformalMappingFit
Definition: ConformalMappingFit.h:16
mps_fire.i
i
Definition: mps_fire.py:428
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21518
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
PixelRecoUtilities::inversePt
T inversePt(T curvature, const edm::EventSetup &iSetup)
Definition: PixelRecoUtilities.h:48
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
PixelFitterByConformalMappingAndLine::theUseFixImpactParameter
const bool theUseFixImpactParameter
Definition: PixelFitterByConformalMappingAndLine.h:31
relativeConstraints.error
error
Definition: relativeConstraints.py:53
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
errors
Definition: errors.py:1
PixelFitterByConformalMappingAndLine::theTracker
const TrackerGeometry * theTracker
Definition: PixelFitterByConformalMappingAndLine.h:28
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
PixelTrackBuilder
Definition: PixelTrackBuilder.h:13
PixelFitterByConformalMappingAndLine::theTTRHBuilder
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: PixelFitterByConformalMappingAndLine.h:27
Point3DBase< float, GlobalTag >
nhits
Definition: HIMultiTrackSelector.h:42
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
Measurement1D::error
double error() const
Definition: Measurement1D.h:27
qcdUeDQM_cfi.tip
tip
Definition: qcdUeDQM_cfi.py:23
Basic2DVector< double >
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:84949
GlobalErrorBase< double, ErrorMatrixTag >
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:41
PixelTrackBuilder::build
reco::Track * build(const Measurement1D &pt, const Measurement1D &phi, const Measurement1D &cotTheta, const Measurement1D &tip, const Measurement1D &zip, float chi2, int charge, const std::vector< const TrackingRecHit * > &hits, const MagneticField *mf, const GlobalPoint &reference=GlobalPoint(0, 0, 0)) const
Definition: PixelTrackBuilder.cc:123
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DDAxes::phi
RZLine
Definition: RZLine.h:12
sqr
T sqr(T t)
Definition: PixelFitterByConformalMappingAndLine.cc:31
PixelFitterByConformalMappingAndLine::theField
const MagneticField * theField
Definition: PixelFitterByConformalMappingAndLine.h:29
pixelrecoutilities::LongitudinalBendingCorrection
Definition: LongitudinalBendingCorrection.h:6
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
vertexPlots.e4
e4
Definition: vertexPlots.py:64
PixelFitterByConformalMappingAndLine::theFixImpactParameter
const double theFixImpactParameter
Definition: PixelFitterByConformalMappingAndLine.h:30
debug_messages_cfi.errors
errors
Definition: debug_messages_cfi.py:54