CMS 3D CMS Logo

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

#include <DTSegmentUpdator.h>

Public Member Functions

void calculateT0corr (DTRecSegment2D *seg) const
 
void calculateT0corr (DTRecSegment4D *seg) const
 
 DTSegmentUpdator (const edm::ParameterSet &config)
 Constructor. More...
 
bool fit (DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
 
void fit (DTRecSegment2D *seg, bool allow3par, bool block3par) const
 
void fit (DTRecSegment4D *seg, bool allow3par) const
 
void setES (const edm::EventSetup &setup)
 set the setup More...
 
void update (DTRecSegment4D *seg, const bool calcT0, bool allow3par) const
 recompute hits position and refit the segment4D More...
 
void update (DTRecSegment2D *seg, bool allow3par) const
 recompute hits position and refit the segment2D More...
 
 ~DTSegmentUpdator ()
 Destructor. More...
 

Private Member Functions

void fit (const std::vector< float > &x, const std::vector< float > &y, const std::vector< int > &lfit, const std::vector< double > &dist, const std::vector< float > &sigy, LocalPoint &pos, LocalVector &dir, float &cminf, float &vminf, AlgebraicSymMatrix &covMat, double &chi2, const bool allow3par=false, const bool block3par=false) const
 interface to LinearFit More...
 
void rejectBadHits (DTChamberRecSegment2D *) const
 
void updateHits (DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
 

Private Attributes

bool debug
 
double intime_cut
 
bool perform_delta_rejecting
 
double T0_hit_resolution
 
std::unique_ptr< DTRecHitBaseAlgotheAlgo
 
std::unique_ptr< DTLinearFittheFitter
 
edm::ESHandle< DTGeometrytheGeom
 
bool vdrift_4parfit
 

Detailed Description

Perform linear fit and hits update for DT segments. Update a segment by improving the hits thanks to the refined knowledge of impact angle and position (also along the wire) and perform linear fit on improved hits.

Author
Stefano Lacaprara - INFN Legnaro stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
Riccardo Bellan - INFN TO ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch
M.Meneghelli - INFN BO marco.nosp@m..men.nosp@m.eghel.nosp@m.li@c.nosp@m.ern.c.nosp@m.h

Definition at line 43 of file DTSegmentUpdator.h.

Constructor & Destructor Documentation

DTSegmentUpdator::DTSegmentUpdator ( const edm::ParameterSet config)

Constructor.

Definition at line 47 of file DTSegmentUpdator.cc.

References gather_cfg::cout, debug, timingPdfMaker::get, intime_cut, perform_delta_rejecting, T0_hit_resolution, theAlgo, vdrift_4parfit, and ~DTSegmentUpdator().

48  : theFitter{std::make_unique<DTLinearFit>()},
49  theAlgo{DTRecHitAlgoFactory::get()->create(config.getParameter<string>("recAlgo"),
50  config.getParameter<ParameterSet>("recAlgoConfig"))},
51  vdrift_4parfit(config.getParameter<bool>("performT0_vdriftSegCorrection")),
52  T0_hit_resolution(config.getParameter<double>("hit_afterT0_resolution")),
53  perform_delta_rejecting(config.getParameter<bool>("perform_delta_rejecting")),
54  debug(config.getUntrackedParameter<bool>("debug", false)) {
55  intime_cut = 20.;
56  if (config.exists("intime_cut"))
57  intime_cut = config.getParameter<double>("intime_cut");
58 
59  if (debug)
60  cout << "[DTSegmentUpdator] Constructor called" << endl;
61 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< DTRecHitBaseAlgo > theAlgo
std::unique_ptr< DTLinearFit > theFitter
DTSegmentUpdator::~DTSegmentUpdator ( )
default

Destructor.

Referenced by DTSegmentUpdator().

Member Function Documentation

void DTSegmentUpdator::calculateT0corr ( DTRecSegment2D seg) const

Definition at line 618 of file DTSegmentUpdator.cc.

References a, b, gather_cfg::cout, debug, HLT_2018_cff::distance, TrackingRecHit::geographicalId(), hfClusterShapes_cfi::hits, DTGeometry::idToDet(), DTGeometry::layer(), DTEnums::Left, DTRecSegment2D::setT0(), DTRecSegment2D::setVdrift(), DTRecSegment2D::specificRecHits(), DTLayer::specificTopology(), theFitter, theGeom, vdrift_4parfit, DTTopology::wirePosition(), x, PV3DBase< T, PVType, FrameType >::x(), hit::x, y, and PV3DBase< T, PVType, FrameType >::z().

Referenced by calculateT0corr(), DTMeantimerPatternReco4D::reconstruct(), DTCombinatorialPatternReco4D::reconstruct(), and update().

618  {
619  // WARNING: since this method is called both with a 2D and a 2DPhi as argument
620  // seg->geographicalId() can be a superLayerId or a chamberId
621  if (debug)
622  cout << "[DTSegmentUpdator] CalculateT0corr DTRecSegment4D" << endl;
623 
624  vector<double> d_drift;
625  vector<float> x;
626  vector<float> y;
627  vector<int> lc;
628 
629  vector<DTRecHit1D> hits = seg->specificRecHits();
630 
631  DTWireId wireId;
632  int nptfit = 0;
633 
634  for (vector<DTRecHit1D>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
635  // I have to get the hits position (the hit is in the layer rf) in SL frame...
636  GlobalPoint glbPos = (theGeom->layer(hit->wireId().layerId()))->toGlobal(hit->localPosition());
637  LocalPoint pos = (theGeom->idToDet(seg->geographicalId()))->toLocal(glbPos);
638 
639  const DTLayer* layer = theGeom->layer(hit->wireId().layerId());
640  float xwire = layer->specificTopology().wirePosition(hit->wireId().wire());
641  float distance = fabs(hit->localPosition().x() - xwire);
642 
643  int ilc = (hit->lrSide() == DTEnums::Left) ? 1 : -1;
644 
645  nptfit++;
646  x.push_back(pos.z());
647  y.push_back(pos.x());
648  lc.push_back(ilc);
649  d_drift.push_back(distance);
650 
651  // cout << " d_drift "<<distance <<" npt= " <<npt<<endl;
652  }
653 
654  double chi2fit = 0.;
655  float cminf = 0.;
656  float vminf = 0.;
657  float a, b;
658 
659  if (nptfit > 2) {
660  //NB chi2fit is normalized
661  theFitter->fit4Var(x, y, lc, d_drift, nptfit, a, b, cminf, vminf, chi2fit, vdrift_4parfit, debug);
662 
663  double t0cor = -999.;
664  if (cminf > -998.)
665  t0cor = -cminf / 0.00543; // in ns
666 
667  //cout << "In calculateT0corr: t0 = " << t0cor << endl;
668  //cout << "In calculateT0corr: vminf = " << vminf << endl;
669  //cout << "In calculateT0corr: cminf = " << cminf << endl;
670  //cout << "In calculateT0corr: chi2 = " << chi2fit << endl;
671 
672  seg->setT0(t0cor); // time and
673  seg->setVdrift(vminf); // vdrift correction are recorded in the segment
674  }
675 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
edm::ESHandle< DTGeometry > theGeom
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
T z() const
Definition: PV3DBase.h:61
std::unique_ptr< DTLinearFit > theFitter
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
double b
Definition: hdecay.h:118
void setT0(const double &t0)
double a
Definition: hdecay.h:119
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
void setVdrift(const double &vdrift)
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:59
void DTSegmentUpdator::calculateT0corr ( DTRecSegment4D seg) const

Definition at line 611 of file DTSegmentUpdator.cc.

References calculateT0corr(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), DTRecSegment4D::phiSegment(), and DTRecSegment4D::zSegment().

611  {
612  if (seg->hasPhi())
613  calculateT0corr(seg->phiSegment());
614  if (seg->hasZed())
615  calculateT0corr(seg->zSegment());
616 }
void calculateT0corr(DTRecSegment2D *seg) const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
bool DTSegmentUpdator::fit ( DTSegmentCand seg,
bool  allow3par,
const bool  fitdebug 
) const

do the linear fit on the hits of the segment candidate and update it. Returns false if the segment candidate is not good()

Definition at line 216 of file DTSegmentUpdator.cc.

References hltPixelTracks_cff::chi2, gather_cfg::cout, debug, DeadROC_duringRun::dir, HLT_2018_cff::distance, DTSegmentCand::hits(), mps_fire::i, DTEnums::Left, DTEnums::Right, DTSegmentCand::setChi2(), DTSegmentCand::setCovMatrix(), DTSegmentCand::setDirection(), DTSegmentCand::setPosition(), DTSegmentCand::sett0(), mathSSE::sqrt(), x, PV3DBase< T, PVType, FrameType >::x(), y, and PV3DBase< T, PVType, FrameType >::z().

Referenced by DTCombinatorialExtendedPatternReco::buildPointsCollection(), DTCombinatorialPatternReco::buildPointsCollection(), DTCombinatorialExtendedPatternReco::extendCandidates(), fit(), DTMeantimerPatternReco::fitWithT0(), trackingPlots.Iteration::modules(), DTRefitAndCombineReco4D::refitSuperSegments(), and update().

216  {
217  // if (debug && fitdebug) cout << "[DTSegmentUpdator] Fit DTRecSegment2D" << endl;
218  // if (!seg->good()) return false;
219 
220  // DTSuperLayerId DTid = (DTSuperLayerId)seg->superLayer()->id();
221  // if (DTid.superlayer()==2)
222  // allow3par = 0;
223 
224  vector<float> x;
225  vector<float> y;
226  vector<float> sigy;
227  vector<int> lfit;
228  vector<double> dist;
229  int i = 0;
230 
231  x.reserve(8);
232  y.reserve(8);
233  sigy.reserve(8);
234  lfit.reserve(8);
235  dist.reserve(8);
236 
237  for (DTSegmentCand::AssPointCont::const_iterator iter = seg->hits().begin(); iter != seg->hits().end(); ++iter) {
238  LocalPoint pos = (*iter).first->localPosition((*iter).second);
239  float xwire =
240  (((*iter).first)->localPosition(DTEnums::Left).x() + ((*iter).first)->localPosition(DTEnums::Right).x()) / 2.;
241  float distance = pos.x() - xwire;
242 
243  if ((*iter).second == DTEnums::Left)
244  lfit.push_back(1);
245  else
246  lfit.push_back(-1);
247 
248  dist.push_back(distance);
249  sigy.push_back(sqrt((*iter).first->localPositionError().xx()));
250  x.push_back(pos.z());
251  y.push_back(pos.x());
252  i++;
253  }
254 
255  LocalPoint pos;
257  AlgebraicSymMatrix covMat(2);
258  float cminf = 0.;
259  float vminf = 0.;
260  double chi2 = 0.;
261  double t0_corr = 0.;
262 
263  fit(x, y, lfit, dist, sigy, pos, dir, cminf, vminf, covMat, chi2, allow3par);
264  if (cminf != 0)
265  t0_corr = -cminf / 0.00543; // convert drift distance to time
266 
267  if (debug && fitdebug)
268  cout << " DTcand chi2: " << chi2 << "/" << x.size() << " t0: " << t0_corr << endl;
269 
270  seg->setPosition(pos);
271  seg->setDirection(dir);
272  seg->sett0(t0_corr);
273  seg->setCovMatrix(covMat);
274  seg->setChi2(chi2);
275 
276  // cout << "pos " << pos << endl;
277  // cout << "dir " << dir << endl;
278  // cout << "Mat " << covMat << endl;
279 
280  return true;
281 }
virtual const AssPointCont & hits() const
the used hits
virtual void setChi2(double &chi2)
set chi2
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
virtual void setCovMatrix(AlgebraicSymMatrix &cov)
set the cov matrix
virtual void sett0(double &t0)
set t0
virtual void setDirection(LocalVector &dir)
set direction
Definition: DTSegmentCand.h:93
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual void setPosition(LocalPoint &pos)
set position
Definition: DTSegmentCand.h:90
T x() const
Definition: PV3DBase.h:59
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
void DTSegmentUpdator::fit ( DTRecSegment2D seg,
bool  allow3par,
bool  block3par 
) const

ditto for true segment: since the fit is applied on a true segment, by definition the segment is "good", while it's not the case for just candidates

Definition at line 283 of file DTSegmentUpdator.cc.

References hltPixelTracks_cff::chi2, gather_cfg::cout, debug, DeadROC_duringRun::dir, HLT_2018_cff::distance, fit(), TrackingRecHit::geographicalId(), hfClusterShapes_cfi::hits, DTGeometry::idToDet(), DTGeometry::layer(), DTEnums::Left, DTRecSegment2D::setChi2(), DTRecSegment2D::setCovMatrix(), DTRecSegment2D::setDirection(), DTRecSegment2D::setPosition(), DTRecSegment2D::setT0(), DTRecSegment2D::specificRecHits(), DTLayer::specificTopology(), mathSSE::sqrt(), theGeom, ErrorFrameTransformer::transform(), DTTopology::wirePosition(), x, PV3DBase< T, PVType, FrameType >::x(), hit::x, LocalError::xx(), y, and PV3DBase< T, PVType, FrameType >::z().

Referenced by trackingPlots.Iteration::modules().

283  {
284  if (debug)
285  cout << "[DTSegmentUpdator] Fit DTRecSegment2D - 3par: " << allow3par << endl;
286 
287  vector<float> x;
288  vector<float> y;
289  vector<float> sigy;
290  vector<int> lfit;
291  vector<double> dist;
292  x.reserve(8);
293  y.reserve(8);
294  sigy.reserve(8);
295  lfit.reserve(8);
296  dist.reserve(8);
297 
298  // DTSuperLayerId DTid = (DTSuperLayerId)seg->geographicalId();
299  // if (DTid.superlayer()==2)
300  // allow3par = 0;
301 
302  vector<DTRecHit1D> hits = seg->specificRecHits();
303  for (vector<DTRecHit1D>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
304  // I have to get the hits position (the hit is in the layer rf) in SL frame...
305  GlobalPoint glbPos = (theGeom->layer(hit->wireId().layerId()))->toGlobal(hit->localPosition());
306  LocalPoint pos = (theGeom->idToDet(seg->geographicalId()))->toLocal(glbPos);
307  x.push_back(pos.z());
308  y.push_back(pos.x());
309 
310  const DTLayer* layer = theGeom->layer(hit->wireId().layerId());
311  float xwire = layer->specificTopology().wirePosition(hit->wireId().wire());
312  float distance = fabs(hit->localPosition().x() - xwire);
313  dist.push_back(distance);
314 
315  int ilc = (hit->lrSide() == DTEnums::Left) ? 1 : -1;
316  lfit.push_back(ilc);
317 
318  // Get local error in SL frame
319  //RB: is it right in this way?
321  GlobalError glbErr =
322  tran.transform(hit->localPositionError(), (theGeom->layer(hit->wireId().layerId()))->surface());
323  LocalError slErr = tran.transform(glbErr, (theGeom->idToDet(seg->geographicalId()))->surface());
324  sigy.push_back(sqrt(slErr.xx()));
325  }
326 
327  LocalPoint pos;
329  AlgebraicSymMatrix covMat(2);
330  double chi2 = 0.;
331  float cminf = 0.;
332  float vminf = 0.;
333  double t0_corr = 0.;
334 
335  fit(x, y, lfit, dist, sigy, pos, dir, cminf, vminf, covMat, chi2, allow3par, block3par);
336  if (cminf != 0)
337  t0_corr = -cminf / 0.00543; // convert drift distance to time
338 
339  if (debug)
340  cout << " DTSeg2d chi2: " << chi2 << endl;
341  if (debug)
342  cout << " DTSeg2d Fit t0: " << t0_corr << endl;
343  // cout << "pos " << segPosition << endl;
344  // cout << "dir " << segDirection << endl;
345  // cout << "Mat " << mat << endl;
346 
347  seg->setPosition(pos);
348  seg->setDirection(dir);
349  seg->setCovMatrix(covMat);
350  seg->setChi2(chi2);
351  seg->setT0(t0_corr);
352 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
static GlobalError transform(const LocalError &le, const Surface &surf)
float xx() const
Definition: LocalError.h:22
void setChi2(const double &chi2)
void setCovMatrix(const AlgebraicSymMatrix &cov)
edm::ESHandle< DTGeometry > theGeom
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void setT0(const double &t0)
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
void setPosition(const LocalPoint &pos)
CLHEP::HepSymMatrix AlgebraicSymMatrix
void setDirection(const LocalVector &dir)
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:59
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
void DTSegmentUpdator::fit ( DTRecSegment4D seg,
bool  allow3par 
) const

ditto for true segment 4D, the fit is done on either projection and then the 4D direction and position is built. Since the fit is applied on a true segment, by definition the segment is "good", while it's not the case for just candidates

Definition at line 115 of file DTSegmentUpdator.cc.

References DTGeometry::chamber(), DTSuperLayerId::chamberId(), DTRecSegment4D::chamberId(), DTRecSegment2D::chi2(), funct::cos(), gather_cfg::cout, debug, DeadROC_duringRun::dir, fit(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), intime_cut, DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), DTRecSegment2D::parametersError(), DTRecSegment4D::phiSegment(), DTRecSegment4D::setCovMatrix(), DTRecSegment4D::setCovMatrixForZed(), DTRecSegment4D::setDirection(), DTRecSegment4D::setPosition(), DTGeometry::superLayer(), DTSLRecSegment2D::superLayerId(), DTRecSegment2D::t0(), theGeom, PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toGlobal(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and DTRecSegment4D::zSegment().

Referenced by trackingPlots.Iteration::modules().

115  {
116  if (debug)
117  cout << "[DTSegmentUpdator] Fit DTRecSegment4D:" << endl;
118  // after the update must refit the segments
119 
120  if (debug) {
121  if (seg->hasPhi())
122  cout << " 4D Segment contains a Phi segment. t0= " << seg->phiSegment()->t0()
123  << " chi2= " << seg->phiSegment()->chi2() << endl;
124  if (seg->hasZed())
125  cout << " 4D Segment contains a Zed segment. t0= " << seg->zSegment()->t0()
126  << " chi2= " << seg->zSegment()->chi2() << endl;
127  }
128 
129  // If both phi and zed projections are present and the phi segment is in time (segment t0<intime_cut) the 3-par fit is blocked and
130  // segments are fit with the 2-par fit. Setting intime_cut to -1 results in the 3-par fit being used always.
131  if (seg->hasPhi()) {
132  if (seg->hasZed()) {
133  if (fabs(seg->phiSegment()->t0()) < intime_cut) {
134  fit(seg->phiSegment(), allow3par, true);
135  fit(seg->zSegment(), allow3par, true);
136  } else {
137  fit(seg->phiSegment(), allow3par, false);
138  fit(seg->zSegment(), allow3par, false);
139  }
140  } else
141  fit(seg->phiSegment(), allow3par, false);
142  } else
143  fit(seg->zSegment(), allow3par, false);
144 
145  const DTChamber* theChamber = theGeom->chamber(seg->chamberId());
146 
147  if (seg->hasPhi() && seg->hasZed()) {
148  DTChamberRecSegment2D* segPhi = seg->phiSegment();
149  DTSLRecSegment2D* segZed = seg->zSegment();
150 
151  // NB Phi seg is already in chamber ref
152  LocalPoint posPhiInCh = segPhi->localPosition();
153  LocalVector dirPhiInCh = segPhi->localDirection();
154 
155  // Zed seg is in SL one
156  const DTSuperLayer* zSL = theChamber->superLayer(segZed->superLayerId());
157  LocalPoint zPos(segZed->localPosition().x(), (zSL->toLocal(theChamber->toGlobal(segPhi->localPosition()))).y(), 0.);
158 
159  LocalPoint posZInCh = theChamber->toLocal(zSL->toGlobal(zPos));
160 
161  LocalVector dirZInCh = theChamber->toLocal(zSL->toGlobal(segZed->localDirection()));
162 
163  LocalPoint posZAt0 = posZInCh + dirZInCh * (-posZInCh.z()) / cos(dirZInCh.theta());
164 
165  // given the actual definition of chamber refFrame, (with z poiniting to IP),
166  // the zed component of direction is negative.
167  LocalVector dir = LocalVector(dirPhiInCh.x() / fabs(dirPhiInCh.z()), dirZInCh.y() / fabs(dirZInCh.z()), -1.);
168 
169  seg->setPosition(LocalPoint(posPhiInCh.x(), posZAt0.y(), 0.));
170  seg->setDirection(dir.unit());
171 
172  AlgebraicSymMatrix mat(4);
173 
174  // set cov matrix
175  mat[0][0] = segPhi->parametersError()[0][0]; //sigma (dx/dz)
176  mat[0][2] = segPhi->parametersError()[0][1]; //cov(dx/dz,x)
177  mat[2][2] = segPhi->parametersError()[1][1]; //sigma (x)
178 
179  seg->setCovMatrix(mat);
180  seg->setCovMatrixForZed(posZInCh);
181  } else if (seg->hasPhi()) {
182  DTChamberRecSegment2D* segPhi = seg->phiSegment();
183 
184  seg->setPosition(segPhi->localPosition());
185  seg->setDirection(segPhi->localDirection());
186 
187  AlgebraicSymMatrix mat(4);
188  // set cov matrix
189  mat[0][0] = segPhi->parametersError()[0][0]; //sigma (dx/dz)
190  mat[0][2] = segPhi->parametersError()[0][1]; //cov(dx/dz,x)
191  mat[2][2] = segPhi->parametersError()[1][1]; //sigma (x)
192 
193  seg->setCovMatrix(mat);
194  } else if (seg->hasZed()) {
195  DTSLRecSegment2D* segZed = seg->zSegment();
196 
197  // Zed seg is in SL one
198  GlobalPoint glbPosZ = (theGeom->superLayer(segZed->superLayerId()))->toGlobal(segZed->localPosition());
199  LocalPoint posZInCh = (theGeom->chamber(segZed->superLayerId().chamberId()))->toLocal(glbPosZ);
200 
201  GlobalVector glbDirZ = (theGeom->superLayer(segZed->superLayerId()))->toGlobal(segZed->localDirection());
202  LocalVector dirZInCh = (theGeom->chamber(segZed->superLayerId().chamberId()))->toLocal(glbDirZ);
203 
204  LocalPoint posZAt0 = posZInCh + dirZInCh * (-posZInCh.z()) / cos(dirZInCh.theta());
205 
206  seg->setPosition(posZAt0);
207  seg->setDirection(dirZInCh);
208 
209  AlgebraicSymMatrix mat(4);
210  // set cov matrix
211  seg->setCovMatrix(mat);
212  seg->setCovMatrixForZed(posZInCh);
213  }
214 }
Local3DVector LocalVector
Definition: LocalVector.h:12
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
DTChamberId chamberId() const
Return the corresponding ChamberId.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
T y() const
Definition: PV3DBase.h:60
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
AlgebraicSymMatrix parametersError() const override
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
void setCovMatrixForZed(const LocalPoint &posZInCh)
edm::ESHandle< DTGeometry > theGeom
void setCovMatrix(const AlgebraicSymMatrix &mat)
Set covariance matrix.
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
T z() const
Definition: PV3DBase.h:61
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
void setDirection(LocalVector dir)
Set direction.
double chi2() const override
the chi2 of the fit
bool hasPhi() const
Does it have the Phi projection?
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
LocalPoint localPosition() const override
local position in SL frame
LocalVector localDirection() const override
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
void setPosition(LocalPoint pos)
Set position.
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
T x() const
Definition: PV3DBase.h:59
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return a DTSuperLayer given its id.
Definition: DTGeometry.cc:92
void DTSegmentUpdator::fit ( const std::vector< float > &  x,
const std::vector< float > &  y,
const std::vector< int > &  lfit,
const std::vector< double > &  dist,
const std::vector< float > &  sigy,
LocalPoint pos,
LocalVector dir,
float &  cminf,
float &  vminf,
AlgebraicSymMatrix covMat,
double &  chi2,
const bool  allow3par = false,
const bool  block3par = false 
) const
private

interface to LinearFit

Definition at line 354 of file DTSegmentUpdator.cc.

References hltPixelTracks_cff::chi2, debug, mps_fire::i, intime_cut, slope, theFitter, and Vector3DBase< T, FrameTag >::unit().

Referenced by trackingPlots.Iteration::modules().

366  {
367  float slope = 0.;
368  float intercept = 0.;
369  float covss = 0.;
370  float covii = 0.;
371  float covsi = 0.;
372 
373  cminf = 0;
374  vminf = 0;
375 
376  int leftHits = 0, rightHits = 0;
377  for (unsigned int i = 0; i < lfit.size(); i++)
378  if (lfit[i] == 1)
379  leftHits++;
380  else
381  rightHits++;
382 
383  theFitter->fit(x, y, x.size(), sigy, slope, intercept, chi2, covss, covii, covsi);
384 
385  // If we have at least one left and one right hit we can try the 3 parameter fit (if it is switched on)
386  // FIXME: currently the covariance matrix from the 2-par fit is kept
387  if (leftHits && rightHits && (leftHits + rightHits > 3) && allow3par) {
388  theFitter->fitNpar(3, x, y, lfit, dist, sigy, slope, intercept, cminf, vminf, chi2, debug);
389  double t0_corr = -cminf / 0.00543;
390  if (fabs(t0_corr) < intime_cut && block3par) {
391  theFitter->fit(x, y, x.size(), sigy, slope, intercept, chi2, covss, covii, covsi);
392  cminf = 0;
393  }
394  }
395 
396  // cout << "slope " << slope << endl;
397  // cout << "intercept " << intercept << endl;
398 
399  // intercept is the x() in chamber frame when the segment cross the chamber
400  // plane (at z()=0), the y() is not measured, so let's put the center of the
401  // chamber.
402  pos = LocalPoint(intercept, 0., 0.);
403 
404  // slope is dx()/dz(), while dy()/dz() is by definition 0, finally I want the
405  // segment to point outward, so opposite to local z
406  dir = LocalVector(-slope, 0., -1.).unit();
407 
408  covMatrix = AlgebraicSymMatrix(2);
409  covMatrix[0][0] = covss; // this is var(dy/dz)
410  covMatrix[1][1] = covii; // this is var(y)
411  covMatrix[1][0] = covsi; // this is cov(dy/dz,y)
412 }
Local3DVector LocalVector
Definition: LocalVector.h:12
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
static const double slope[3]
std::unique_ptr< DTLinearFit > theFitter
Vector3DBase unit() const
Definition: Vector3DBase.h:54
CLHEP::HepSymMatrix AlgebraicSymMatrix
void DTSegmentUpdator::rejectBadHits ( DTChamberRecSegment2D phiSeg) const
private

Definition at line 490 of file DTSegmentUpdator.cc.

References funct::abs(), gather_cfg::cout, debug, dumpMFGeometry_cfg::delta, TrackingRecHit::geographicalId(), hfClusterShapes_cfi::hits, mps_fire::i, DTGeometry::idToDet(), DTGeometry::layer(), N, DTRecSegment2D::specificRecHits(), theGeom, DTRecSegment2D::update(), x, PV3DBase< T, PVType, FrameType >::x(), y, and PV3DBase< T, PVType, FrameType >::z().

Referenced by update().

490  {
491  vector<float> x;
492  vector<float> y;
493 
494  if (debug)
495  cout << " Inside the segment updator, now loop on hits: ( x == z_loc , y == x_loc) " << endl;
496 
497  vector<DTRecHit1D> hits = phiSeg->specificRecHits();
498  const size_t N = hits.size();
499  if (N < 3)
500  return;
501 
502  for (vector<DTRecHit1D>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
503  // I have to get the hits position (the hit is in the layer rf) in SL frame...
504  GlobalPoint glbPos = (theGeom->layer(hit->wireId().layerId()))->toGlobal(hit->localPosition());
505  LocalPoint pos = (theGeom->idToDet(phiSeg->geographicalId()))->toLocal(glbPos);
506 
507  x.push_back(pos.z());
508  y.push_back(pos.x());
509  }
510 
511  if (debug) {
512  cout << " end of segment! " << endl;
513  cout << " size = Number of Hits: " << x.size() << " " << y.size() << endl;
514  }
515 
516  // Perform the 2 par fit:
517  float par[2] = {0., 0.}; // q , m
518 
519  //variables to perform the fit:
520  float Sx = 0.;
521  float Sy = 0.;
522  float Sx2 = 0.;
523  float Sy2 = 0.;
524  float Sxy = 0.;
525 
526  for (size_t i = 0; i < N; ++i) {
527  Sx += x.at(i);
528  Sy += y.at(i);
529  Sx2 += x.at(i) * x.at(i);
530  Sy2 += y.at(i) * y.at(i);
531  Sxy += x.at(i) * y.at(i);
532  }
533 
534  const float delta = N * Sx2 - Sx * Sx;
535  par[0] = (Sx2 * Sy - Sx * Sxy) / delta;
536  par[1] = (N * Sxy - Sx * Sy) / delta;
537 
538  if (debug)
539  cout << "fit 2 parameters done ----> par0: " << par[0] << " par1: " << par[1] << endl;
540 
541  // Calc residuals:
542  float residuals[N];
543  float mean_residual = 0.; //mean of the absolute values of residuals
544  for (size_t i = 0; i < N; ++i) {
545  residuals[i] = y.at(i) - par[1] * x.at(i) - par[0];
546  mean_residual += std::abs(residuals[i]);
547  if (debug) {
548  cout << " i: " << i << " y_i " << y.at(i) << " x_i " << x.at(i) << " res_i " << residuals[i];
549  if (i == N - 1)
550  cout << endl;
551  }
552  }
553 
554  if (debug)
555  cout << " Residuals computed! " << endl;
556 
557  mean_residual = mean_residual / (N - 2);
558  if (debug)
559  cout << " mean_residual: " << mean_residual << endl;
560 
561  int i = 0;
562 
563  // Perform bad hit rejecting -- update hits
564  vector<DTRecHit1D> updatedRecHits;
565  for (vector<DTRecHit1D>::const_iterator hit = hits.begin(); hit != hits.end(); ++hit) {
566  float normResidual = mean_residual > 0 ? std::abs(residuals[i]) / mean_residual : 0;
567  ++i;
568  if (normResidual < 1.5) {
569  DTRecHit1D newHit1D = (*hit);
570  updatedRecHits.push_back(newHit1D);
571  if (debug)
572  cout << " accepted " << i << "th hit"
573  << " Irej: " << normResidual << endl;
574  } else {
575  if (debug)
576  cout << " rejected " << i << "th hit"
577  << " Irej: " << normResidual << endl;
578  continue;
579  }
580  }
581 
582  phiSeg->update(updatedRecHits);
583 
584  //final check!
585  if (debug) {
586  vector<float> x_upd;
587  vector<float> y_upd;
588 
589  cout << " Check the update action: " << endl;
590 
591  vector<DTRecHit1D> hits_upd = phiSeg->specificRecHits();
592  for (vector<DTRecHit1D>::const_iterator hit = hits_upd.begin(); hit != hits_upd.end(); ++hit) {
593  // I have to get the hits position (the hit is in the layer rf) in SL frame...
594  GlobalPoint glbPos = (theGeom->layer(hit->wireId().layerId()))->toGlobal(hit->localPosition());
595  LocalPoint pos = (theGeom->idToDet(phiSeg->geographicalId()))->toLocal(glbPos);
596 
597  x_upd.push_back(pos.z());
598  y_upd.push_back(pos.x());
599 
600  cout << " x_upd: " << pos.z() << " y_upd: " << pos.x() << endl;
601  }
602 
603  cout << " end of segment! " << endl;
604  cout << " size = Number of Hits: " << x_upd.size() << " " << y_upd.size() << endl;
605 
606  } // end debug
607 
608  return;
609 } //end DTSegmentUpdator::rejectBadHits
void update(std::vector< DTRecHit1D > &updatedRecHits)
edm::ESHandle< DTGeometry > theGeom
T z() const
Definition: PV3DBase.h:61
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
#define N
Definition: blowfish.cc:9
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:59
void DTSegmentUpdator::setES ( const edm::EventSetup setup)
void DTSegmentUpdator::update ( DTRecSegment4D seg,
const bool  calcT0,
bool  allow3par 
) const

recompute hits position and refit the segment4D

Definition at line 73 of file DTSegmentUpdator.cc.

References calculateT0corr(), gather_cfg::cout, debug, DeadROC_duringRun::dir, fit(), TrackingRecHit::geographicalId(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), DTGeometry::idToDet(), DTRecSegment4D::localDirection(), DTRecSegment4D::localPosition(), perform_delta_rejecting, DTRecSegment4D::phiSegment(), rejectBadHits(), theGeom, updateHits(), and DTRecSegment4D::zSegment().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), DTRefitAndCombineReco4D::reconstruct(), DTMeantimerPatternReco4D::reconstruct(), DTCombinatorialPatternReco4D::reconstruct(), DTCombinatorialPatternReco::reconstruct(), DTCombinatorialExtendedPatternReco::reconstruct(), DTMeantimerPatternReco::reconstruct(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

73  {
74  if (debug)
75  cout << "[DTSegmentUpdator] Starting to update the DTRecSegment4D" << endl;
76 
77  const bool hasPhi = seg->hasPhi();
78  const bool hasZed = seg->hasZed();
79 
80  //reject the bad hits (due to delta rays)
81  if (perform_delta_rejecting && hasPhi)
82  rejectBadHits(seg->phiSegment());
83 
84  int step = (hasPhi && hasZed) ? 3 : 2;
85  if (calcT0)
86  step = 4;
87 
88  if (debug)
89  cout << "Step of update is " << step << endl;
90 
91  GlobalPoint pos = theGeom->idToDet(seg->geographicalId())->toGlobal(seg->localPosition());
92  GlobalVector dir = theGeom->idToDet(seg->geographicalId())->toGlobal(seg->localDirection());
93 
94  if (calcT0)
95  calculateT0corr(seg);
96 
97  if (hasPhi)
98  updateHits(seg->phiSegment(), pos, dir, step);
99  if (hasZed)
100  updateHits(seg->zSegment(), pos, dir, step);
101 
102  fit(seg, allow3par);
103 }
void rejectBadHits(DTChamberRecSegment2D *) const
LocalPoint localPosition() const override
Local position in Chamber frame.
void updateHits(DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
void calculateT0corr(DTRecSegment2D *seg) const
LocalVector localDirection() const override
Local direction in Chamber frame.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
edm::ESHandle< DTGeometry > theGeom
bool hasPhi() const
Does it have the Phi projection?
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
step
Definition: StallMonitor.cc:94
DetId geographicalId() const
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
void DTSegmentUpdator::update ( DTRecSegment2D seg,
bool  allow3par 
) const

recompute hits position and refit the segment2D

Definition at line 105 of file DTSegmentUpdator.cc.

References gather_cfg::cout, debug, DeadROC_duringRun::dir, fit(), TrackingRecHit::geographicalId(), DTGeometry::idToDet(), DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), theGeom, and updateHits().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

105  {
106  if (debug)
107  cout << "[DTSegmentUpdator] Starting to update the DTRecSegment2D" << endl;
108  GlobalPoint pos = (theGeom->idToDet(seg->geographicalId()))->toGlobal(seg->localPosition());
109  GlobalVector dir = (theGeom->idToDet(seg->geographicalId()))->toGlobal(seg->localDirection());
110 
111  updateHits(seg, pos, dir);
112  fit(seg, allow3par, false);
113 }
void updateHits(DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
edm::ESHandle< DTGeometry > theGeom
LocalPoint localPosition() const override
local position in SL frame
LocalVector localDirection() const override
the local direction in SL frame
const GeomDet * idToDet(DetId) const override
Definition: DTGeometry.cc:77
DetId geographicalId() const
bool fit(DTSegmentCand *seg, bool allow3par, const bool fitdebug) const
void DTSegmentUpdator::updateHits ( DTRecSegment2D seg,
GlobalPoint gpos,
GlobalVector gdir,
const int  step = 2 
) const
private

Definition at line 416 of file DTSegmentUpdator.cc.

References angle(), funct::cos(), HLT_2018_cff::distance, relativeConstraints::error, Exception, DTRecSegment2D::ist0Valid(), DTGeometry::layer(), DTEnums::Left, convertSQLiteXML::ok, point, DTRecSegment2D::specificRecHits(), DTLayer::specificTopology(), DTRecSegment2D::t0(), T0_hit_resolution, theAlgo, theGeom, PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toLocal(), DTRecSegment2D::update(), DTRecSegment2D::vDrift(), vdrift_4parfit, DTTopology::wirePosition(), PV3DBase< T, PVType, FrameType >::x(), hit::x, and PV3DBase< T, PVType, FrameType >::z().

Referenced by update().

416  {
417  // it is not necessary to have DTRecHit1D* to modify the obj in the container
418  // but I have to be carefully, since I cannot make a copy before the iteration!
419 
420  vector<DTRecHit1D> toBeUpdatedRecHits = seg->specificRecHits();
421  vector<DTRecHit1D> updatedRecHits;
422 
423  for (vector<DTRecHit1D>::iterator hit = toBeUpdatedRecHits.begin(); hit != toBeUpdatedRecHits.end(); ++hit) {
424  const DTLayer* layer = theGeom->layer(hit->wireId().layerId());
425 
426  LocalPoint segPos = layer->toLocal(gpos);
427  LocalVector segDir = layer->toLocal(gdir);
428 
429  // define impact angle needed by the step 2
430  const float angle = atan(segDir.x() / -segDir.z());
431 
432  // define the local position (extr.) of the segment. Needed by the third step
433  LocalPoint segPosAtLayer = segPos + segDir * (-segPos.z()) / cos(segDir.theta());
434 
435  DTRecHit1D newHit1D = (*hit);
436  bool ok = true;
437 
438  if (step == 2) {
439  ok = theAlgo->compute(layer, *hit, angle, newHit1D);
440 
441  } else if (step == 3) {
442  LocalPoint hitPos(hit->localPosition().x(), +segPosAtLayer.y(), 0.);
443  GlobalPoint glbpos = theGeom->layer(hit->wireId().layerId())->toGlobal(hitPos);
444  newHit1D.setPosition(hitPos);
445  ok = theAlgo->compute(layer, *hit, angle, glbpos, newHit1D);
446 
447  } else if (step == 4) {
448  //const double vminf = seg->vDrift(); // vdrift correction are recorded in the segment
449  double vminf = 0.;
450  if (vdrift_4parfit)
451  vminf = seg->vDrift(); // use vdrift recorded in the segment only if vdrift_4parfit=True
452 
453  double cminf = 0.;
454  if (seg->ist0Valid())
455  cminf = -seg->t0() * 0.00543;
456 
457  //cout << "In updateHits: t0 = " << seg->t0() << endl;
458  //cout << "In updateHits: vminf = " << vminf << endl;
459  //cout << "In updateHits: cminf = " << cminf << endl;
460 
461  const float xwire = layer->specificTopology().wirePosition(hit->wireId().wire());
462  const float distance = fabs(hit->localPosition().x() - xwire);
463  const int ilc = (hit->lrSide() == DTEnums::Left) ? 1 : -1;
464  const double dy_corr = (vminf * ilc * distance - cminf * ilc);
465 
466  LocalPoint point(hit->localPosition().x() + dy_corr, +segPosAtLayer.y(), 0.);
467 
468  //double final_hit_resol = T0_hit_resolution;
469  //if(newHit1D.wireId().layerId().superlayerId().superLayer() != 2) final_hit_resol = final_hit_resol * 0.8;
470  //LocalError error(final_hit_resol * final_hit_resol,0.,0.);
472  newHit1D.setPositionAndError(point, error);
473 
474  //FIXME: check that the hit is still inside the cell
475  ok = true;
476 
477  } else
478  throw cms::Exception("DTSegmentUpdator") << " updateHits called with wrong step " << endl;
479 
480  if (ok)
481  updatedRecHits.push_back(newHit1D);
482  else {
483  LogError("DTSegmentUpdator") << "DTSegmentUpdator::updateHits failed update" << endl;
484  throw cms::Exception("DTSegmentUpdator") << "updateHits failed update" << endl;
485  }
486  }
487  seg->update(updatedRecHits);
488 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
void update(std::vector< DTRecHit1D > &updatedRecHits)
edm::ESHandle< DTGeometry > theGeom
std::unique_ptr< DTRecHitBaseAlgo > theAlgo
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
double vDrift() const
T z() const
Definition: PV3DBase.h:61
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
bool ist0Valid() const
step
Definition: StallMonitor.cc:94
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
T x() const
Definition: PV3DBase.h:59
*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
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11

Member Data Documentation

bool DTSegmentUpdator::debug
private
double DTSegmentUpdator::intime_cut
private

Definition at line 106 of file DTSegmentUpdator.h.

Referenced by DTSegmentUpdator(), and fit().

bool DTSegmentUpdator::perform_delta_rejecting
private

Definition at line 109 of file DTSegmentUpdator.h.

Referenced by DTSegmentUpdator(), and update().

double DTSegmentUpdator::T0_hit_resolution
private

Definition at line 108 of file DTSegmentUpdator.h.

Referenced by DTSegmentUpdator(), and updateHits().

std::unique_ptr<DTRecHitBaseAlgo> DTSegmentUpdator::theAlgo
private

Definition at line 83 of file DTSegmentUpdator.h.

Referenced by DTSegmentUpdator(), setES(), and updateHits().

std::unique_ptr<DTLinearFit> DTSegmentUpdator::theFitter
private

Definition at line 82 of file DTSegmentUpdator.h.

Referenced by calculateT0corr(), and fit().

edm::ESHandle<DTGeometry> DTSegmentUpdator::theGeom
private

Definition at line 84 of file DTSegmentUpdator.h.

Referenced by calculateT0corr(), fit(), rejectBadHits(), setES(), update(), and updateHits().

bool DTSegmentUpdator::vdrift_4parfit
private

Definition at line 107 of file DTSegmentUpdator.h.

Referenced by calculateT0corr(), DTSegmentUpdator(), and updateHits().