CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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) const
 
void fit (DTRecSegment2D *seg) const
 
void fit (DTRecSegment4D *seg) const
 
void setES (const edm::EventSetup &setup)
 set the setup More...
 
void update (DTRecSegment4D *seg, const bool calcT0=false) const
 recompute hits position and refit the segment4D More...
 
void update (DTRecSegment2D *seg) 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< float > &sigy, LocalPoint &pos, LocalVector &dir, AlgebraicSymMatrix &covMat, double &chi2) const
 interface to LinearFit More...
 
void Fit4Var (const std::vector< float > &xfit, const std::vector< float > &yfit, const std::vector< int > &lfit, const std::vector< double > &tfit, const int nptfit, float &cminf, double &vminf, double &chi2fit) const
 
void updateHits (DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
 

Private Attributes

bool debug
 
double T0_hit_resolution
 
DTRecHitBaseAlgotheAlgo
 
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.

Date:
2010/04/15 12:04:46
Revision:
1.17
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

Definition at line 40 of file DTSegmentUpdator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 45 of file DTSegmentUpdator.cc.

References gather_cfg::cout, debug, reco::get(), edm::ParameterSet::getParameter(), and theAlgo.

45  :
46  theFitter(new DTLinearFit()) ,
47  vdrift_4parfit(config.getParameter<bool>("performT0_vdriftSegCorrection")),
48  T0_hit_resolution(config.getParameter<double>("hit_afterT0_resolution")),
49  debug(config.getUntrackedParameter<bool>("debug",false))
50 {
51  string theAlgoName = config.getParameter<string>("recAlgo");
52  theAlgo = DTRecHitAlgoFactory::get()->create(theAlgoName,
53  config.getParameter<ParameterSet>("recAlgoConfig"));
54 
55  if(debug)
56  cout << "[DTSegmentUpdator] Constructor called" << endl;
57 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTLinearFit * theFitter
tuple cout
Definition: gather_cfg.py:41
DTRecHitBaseAlgo * theAlgo
T get(const Candidate &c)
Definition: component.h:56
DTSegmentUpdator::~DTSegmentUpdator ( )

Destructor.

Definition at line 60 of file DTSegmentUpdator.cc.

References theFitter.

60  {
61  delete theFitter;
62 }
DTLinearFit * theFitter

Member Function Documentation

void DTSegmentUpdator::calculateT0corr ( DTRecSegment2D seg) const

Definition at line 396 of file DTSegmentUpdator.cc.

References Fit4Var(), TrackingRecHit::geographicalId(), DTEnums::Left, pos, DTRecSegment2D::setT0(), DTRecSegment2D::setVdrift(), DTRecSegment2D::specificRecHits(), DTLayer::specificTopology(), theGeom, DTTopology::wirePosition(), PV3DBase< T, PVType, FrameType >::x(), hit::x, ExpressReco_HICollisions_FallBack::x, ExpressReco_HICollisions_FallBack::y, and PV3DBase< T, PVType, FrameType >::z().

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

396  {
397  // WARNING: since this method is called both with a 2D and a 2DPhi as argument
398  // seg->geographicalId() can be a superLayerId or a chamberId
399 
400  vector<double> d_drift;
401  vector<float> x;
402  vector<float> y;
403  vector<int> lc;
404 
405  vector<DTRecHit1D> hits=seg->specificRecHits();
406 
407  DTWireId wireId;
408  int nptfit = 0;
409 
410  for (vector<DTRecHit1D>::const_iterator hit=hits.begin();
411  hit!=hits.end(); ++hit) {
412 
413  // I have to get the hits position (the hit is in the layer rf) in SL frame...
414  GlobalPoint glbPos = ( theGeom->layer( hit->wireId().layerId() ) )->toGlobal(hit->localPosition());
415  LocalPoint pos = ( theGeom->idToDet(seg->geographicalId()) )->toLocal(glbPos);
416 
417  const DTLayer* layer = theGeom->layer( hit->wireId().layerId() );
418  float xwire = layer->specificTopology().wirePosition(hit->wireId().wire());
419  float distance = fabs(hit->localPosition().x() - xwire);
420 
421  int ilc = ( hit->lrSide() == DTEnums::Left ) ? 1 : -1;
422 
423  nptfit++;
424  x.push_back(pos.z());
425  y.push_back(pos.x());
426  lc.push_back(ilc);
427  d_drift.push_back(distance);
428 
429  // cout << " d_drift "<<distance <<" npt= " <<npt<<endl;
430  }
431 
432  double chi2fit = 0.;
433  float cminf = 0.;
434  double vminf = 0.;
435 
436  if ( nptfit > 2 ) {
437  //NB chi2fit is normalized
438  Fit4Var(x,y,lc,d_drift,nptfit,cminf,vminf,chi2fit);
439 
440  double t0cor = -999.;
441  if(cminf > -998.) t0cor = - cminf/0.00543 ; // in ns
442 
443  //cout << "In calculateT0corr: t0 = " << t0cor << endl;
444  //cout << "In calculateT0corr: vminf = " << vminf << endl;
445  //cout << "In calculateT0corr: cminf = " << cminf << endl;
446  //cout << "In calculateT0corr: chi2 = " << chi2fit << endl;
447 
448  seg->setT0(t0cor); // time and
449  seg->setVdrift(vminf); // vdrift correction are recorded in the segment
450  }
451 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:73
void Fit4Var(const std::vector< float > &xfit, const std::vector< float > &yfit, const std::vector< int > &lfit, const std::vector< double > &tfit, const int nptfit, float &cminf, double &vminf, double &chi2fit) const
edm::ESHandle< DTGeometry > theGeom
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
T z() const
Definition: PV3DBase.h:58
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void setT0(const double &t0)
void setVdrift(const double &vdrift)
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:56
void DTSegmentUpdator::calculateT0corr ( DTRecSegment4D seg) const

Definition at line 391 of file DTSegmentUpdator.cc.

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

391  {
392  if(seg->hasPhi()) calculateT0corr(seg->phiSegment());
393  if(seg->hasZed()) calculateT0corr(seg->zSegment());
394 }
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) 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 185 of file DTSegmentUpdator.cc.

References ExpressReco_HICollisions_FallBack::chi2, dir, DTSegmentCand::good(), DTSegmentCand::hits(), pos, DTSegmentCand::setChi2(), DTSegmentCand::setCovMatrix(), DTSegmentCand::setDirection(), DTSegmentCand::setPosition(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), ExpressReco_HICollisions_FallBack::x, ExpressReco_HICollisions_FallBack::y, and PV3DBase< T, PVType, FrameType >::z().

Referenced by DTMeantimerPatternReco::addHits(), DTCombinatorialPatternReco::buildPointsCollection(), DTCombinatorialExtendedPatternReco::buildPointsCollection(), DTCombinatorialExtendedPatternReco::extendCandidates(), fit(), DTRefitAndCombineReco4D::refitSuperSegments(), and update().

185  {
186  if (!seg->good()) return false;
187 
188  vector<float> x;
189  vector<float> y;
190  vector<float> sigy;
191 
192  DTSegmentCand::AssPointCont hits=seg->hits();
193  for (DTSegmentCand::AssPointCont::const_iterator iter=hits.begin();
194  iter!=hits.end(); ++iter) {
195  LocalPoint pos = (*iter).first->localPosition((*iter).second);
196  x.push_back(pos.z());
197  y.push_back(pos.x());
198  sigy.push_back(sqrt((*iter).first->localPositionError().xx()));
199  }
200 
201  LocalPoint pos;
203  AlgebraicSymMatrix covMat(2);
204 
205  double chi2 = 0.;
206  fit(x,y,sigy,pos,dir,covMat,chi2);
207 
208  seg->setPosition(pos);
209  seg->setDirection(dir);
210 
211  //cout << "pos " << segPosition<< endl;
212  //cout << "dir " << segDirection<< endl;
213 
214  seg->setCovMatrix(covMat);
215  // cout << "Mat " << covMat << endl;
216 
217  seg->setChi2(chi2);
218  return true;
219 }
virtual void setChi2(double &chi2)
set chi2
virtual bool good() const
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
virtual void setCovMatrix(AlgebraicSymMatrix &cov)
set the cov matrix
bool fit(DTSegmentCand *seg) const
virtual AssPointCont hits() const
the used hits
std::set< AssPoint, AssPointLessZ > AssPointCont
Definition: DTSegmentCand.h:41
virtual void setDirection(LocalVector &dir)
set direction
Definition: DTSegmentCand.h:94
CLHEP::HepSymMatrix AlgebraicSymMatrix
dbl *** dir
Definition: mlp_gen.cc:35
virtual void setPosition(LocalPoint &pos)
set position
Definition: DTSegmentCand.h:91
T x() const
Definition: PV3DBase.h:56
void DTSegmentUpdator::fit ( DTRecSegment2D seg) 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 221 of file DTSegmentUpdator.cc.

References ExpressReco_HICollisions_FallBack::chi2, dir, fit(), TrackingRecHit::geographicalId(), pos, DTRecSegment2D::setChi2(), DTRecSegment2D::setCovMatrix(), DTRecSegment2D::setDirection(), DTRecSegment2D::setPosition(), DTRecSegment2D::specificRecHits(), mathSSE::sqrt(), theGeom, ErrorFrameTransformer::transform(), PV3DBase< T, PVType, FrameType >::x(), ExpressReco_HICollisions_FallBack::x, LocalError::xx(), ExpressReco_HICollisions_FallBack::y, and PV3DBase< T, PVType, FrameType >::z().

221  {
222  // WARNING: since this method is called both with a 2D and a 2DPhi as argument
223  // seg->geographicalId() can be a superLayerId or a chamberId
224 
225  vector<float> x;
226  vector<float> y;
227  vector<float> sigy;
228 
229  vector<DTRecHit1D> hits=seg->specificRecHits();
230  for (vector<DTRecHit1D>::const_iterator hit=hits.begin();
231  hit!=hits.end(); ++hit) {
232 
233  // I have to get the hits position (the hit is in the layer rf) in SL frame...
234  GlobalPoint glbPos = ( theGeom->layer( hit->wireId().layerId() ) )->toGlobal(hit->localPosition());
235  LocalPoint pos = ( theGeom->idToDet(seg->geographicalId()) )->toLocal(glbPos);
236 
237  x.push_back(pos.z());
238  y.push_back(pos.x());
239 
240  // Get local error in SL frame
241  //RB: is it right in this way?
243  GlobalError glbErr =
244  tran.transform( hit->localPositionError(),(theGeom->layer( hit->wireId().layerId() ))->surface());
245  LocalError slErr =
246  tran.transform( glbErr, (theGeom->idToDet(seg->geographicalId()))->surface());
247 
248  sigy.push_back(sqrt(slErr.xx()));
249  }
250 
251  LocalPoint pos;
253  AlgebraicSymMatrix covMat(2);
254  double chi2 = 0.;
255 
256  fit(x,y,sigy,pos,dir,covMat,chi2);
257 
258  seg->setPosition(pos);
259  seg->setDirection(dir);
260 
261  //cout << "pos " << segPosition << endl;
262  //cout << "dir " << segDirection << endl;
263 
264  seg->setCovMatrix(covMat);
265  // cout << "Mat " << mat << endl;
266 
267  seg->setChi2(chi2);
268 }
float xx() const
Definition: LocalError.h:19
void setChi2(const double &chi2)
GlobalError transform(const LocalError &le, const Surface &surf) const
void setCovMatrix(const AlgebraicSymMatrix &cov)
edm::ESHandle< DTGeometry > theGeom
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
bool fit(DTSegmentCand *seg) const
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void setPosition(const LocalPoint &pos)
CLHEP::HepSymMatrix AlgebraicSymMatrix
void setDirection(const LocalVector &dir)
DetId geographicalId() const
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:56
void DTSegmentUpdator::fit ( DTRecSegment4D seg) 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 100 of file DTSegmentUpdator.cc.

References DTSuperLayerId::chamberId(), DTRecSegment4D::chamberId(), funct::cos(), dir, fit(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), DTRecSegment2D::parametersError(), DTRecSegment4D::phiSegment(), DTRecSegment4D::setCovMatrix(), DTRecSegment4D::setCovMatrixForZed(), DTRecSegment4D::setDirection(), DTRecSegment4D::setPosition(), DTChamber::superLayer(), DTSLRecSegment2D::superLayerId(), theGeom, PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toGlobal(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), ExpressReco_HICollisions_FallBack::y, PV3DBase< T, PVType, FrameType >::z(), zPos, and DTRecSegment4D::zSegment().

100  {
101  // after the update must refit the segments
102  if(seg->hasPhi()) fit(seg->phiSegment());
103  if(seg->hasZed()) fit(seg->zSegment());
104 
105  const DTChamber* theChamber = theGeom->chamber(seg->chamberId());
106 
107  if(seg->hasPhi() && seg->hasZed() ) {
108 
109  DTChamberRecSegment2D *segPhi=seg->phiSegment();
110  DTSLRecSegment2D *segZed=seg->zSegment();
111 
112  // NB Phi seg is already in chamber ref
113  LocalPoint posPhiInCh = segPhi->localPosition();
114  LocalVector dirPhiInCh= segPhi->localDirection();
115 
116  // Zed seg is in SL one
117  const DTSuperLayer* zSL = theChamber->superLayer(segZed->superLayerId());
118  LocalPoint zPos(segZed->localPosition().x(),
119  (zSL->toLocal(theChamber->toGlobal(segPhi->localPosition()))).y(),
120  0.);
121 
122  LocalPoint posZInCh = theChamber->toLocal(zSL->toGlobal(zPos));
123 
124  LocalVector dirZInCh = theChamber->toLocal(zSL->toGlobal(segZed->localDirection()));
125 
126  LocalPoint posZAt0 = posZInCh + dirZInCh*(-posZInCh.z())/cos(dirZInCh.theta());
127 
128  // given the actual definition of chamber refFrame, (with z poiniting to IP),
129  // the zed component of direction is negative.
130  LocalVector dir=LocalVector(dirPhiInCh.x()/fabs(dirPhiInCh.z()),dirZInCh.y()/fabs(dirZInCh.z()),-1.);
131 
132  seg->setPosition(LocalPoint(posPhiInCh.x(),posZAt0.y(),0.));
133  seg->setDirection(dir.unit());
134 
135  AlgebraicSymMatrix mat(4);
136 
137  // set cov matrix
138  mat[0][0] = segPhi->parametersError()[0][0]; //sigma (dx/dz)
139  mat[0][2] = segPhi->parametersError()[0][1]; //cov(dx/dz,x)
140  mat[2][2] = segPhi->parametersError()[1][1]; //sigma (x)
141 
142  seg->setCovMatrix(mat);
143  seg->setCovMatrixForZed(posZInCh);
144 
145  }
146 
147  else if (seg->hasPhi()) {
148  DTChamberRecSegment2D *segPhi=seg->phiSegment();
149 
150  seg->setPosition(segPhi->localPosition());
151  seg->setDirection(segPhi->localDirection());
152 
153  AlgebraicSymMatrix mat(4);
154  // set cov matrix
155  mat[0][0] = segPhi->parametersError()[0][0]; //sigma (dx/dz)
156  mat[0][2] = segPhi->parametersError()[0][1]; //cov(dx/dz,x)
157  mat[2][2] = segPhi->parametersError()[1][1]; //sigma (x)
158 
159  seg->setCovMatrix(mat);
160  }
161 
162  else if (seg->hasZed()) {
163  DTSLRecSegment2D *segZed = seg->zSegment();
164 
165  // Zed seg is in SL one
166  GlobalPoint glbPosZ = ( theGeom->superLayer(segZed->superLayerId()) )->toGlobal(segZed->localPosition());
167  LocalPoint posZInCh = ( theGeom->chamber(segZed->superLayerId().chamberId()) )->toLocal(glbPosZ);
168 
169  GlobalVector glbDirZ = (theGeom->superLayer(segZed->superLayerId()) )->toGlobal(segZed->localDirection());
170  LocalVector dirZInCh = (theGeom->chamber(segZed->superLayerId().chamberId()) )->toLocal(glbDirZ);
171 
172  LocalPoint posZAt0 = posZInCh+
173  dirZInCh*(-posZInCh.z())/cos(dirZInCh.theta());
174 
175  seg->setPosition(posZAt0);
176  seg->setDirection(dirZInCh);
177 
178  AlgebraicSymMatrix mat(4);
179  // set cov matrix
180  seg->setCovMatrix(mat);
181  seg->setCovMatrixForZed(posZInCh);
182  }
183 }
Local3DVector LocalVector
Definition: LocalVector.h:12
double zPos
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:57
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:64
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
void setCovMatrixForZed(const LocalPoint &posZInCh)
edm::ESHandle< DTGeometry > theGeom
Geom::Theta< T > theta() const
Definition: PV3DBase.h:69
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
bool fit(DTSegmentCand *seg) const
void setDirection(LocalVector dir)
Set direction.
bool hasPhi() const
Does it have the Phi projection?
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
virtual LocalPoint localPosition() const
local position in SL frame
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
virtual AlgebraicSymMatrix parametersError() const
virtual LocalVector localDirection() const
the local direction in SL frame
CLHEP::HepSymMatrix AlgebraicSymMatrix
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
void setPosition(LocalPoint pos)
Set position.
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV3DBase.h:56
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.
Definition: DTChamber.cc:67
void setCovMatrix(AlgebraicSymMatrix mat)
Set covariance matrix.
void DTSegmentUpdator::fit ( const std::vector< float > &  x,
const std::vector< float > &  y,
const std::vector< float > &  sigy,
LocalPoint pos,
LocalVector dir,
AlgebraicSymMatrix covMat,
double &  chi2 
) const
private

interface to LinearFit

Definition at line 270 of file DTSegmentUpdator.cc.

References DTLinearFit::fit(), i, slope, theFitter, and Vector3DBase< T, FrameTag >::unit().

276  {
277 
278  float slope = 0.;
279  float intercept = 0.;
280  float covss = 0.;
281  float covii = 0.;
282  float covsi = 0.;
283 
284  // do the fit
285  theFitter->fit(x,y,x.size(),sigy,slope,intercept,covss,covii,covsi);
286  // cout << "slope " << slope << endl;
287  // cout << "intercept " << intercept << endl;
288 
289  // intercept is the x() in chamber frame when the segment cross the chamber
290  // plane (at z()=0), the y() is not measured, so let's put the center of the
291  // chamber.
292  pos = LocalPoint(intercept,0.,0.);
293 
294  // slope is dx()/dz(), while dy()/dz() is by definition 0, finally I want the
295  // segment to point outward, so opposite to local z
296  dir = LocalVector(-slope,0.,-1.).unit();
297 
298  covMatrix = AlgebraicSymMatrix(2);
299  covMatrix[0][0] = covss; // this is var(dy/dz)
300  covMatrix[1][1] = covii; // this is var(y)
301  covMatrix[1][0] = covsi; // this is cov(dy/dz,y)
302 
303  /* Calculate chi2. */
304  chi2 = 0.;
305  for(unsigned int i=0; i<x.size() ; ++i) {
306  double resid= y[i] - (intercept + slope*x[i]);
307  chi2 += (resid/sigy[i])*(resid/sigy[i]);
308  }
309 }
int i
Definition: DBlmapReader.cc:9
Local3DVector LocalVector
Definition: LocalVector.h:12
static const double slope[3]
DTLinearFit * theFitter
Vector3DBase unit() const
Definition: Vector3DBase.h:57
void fit(const std::vector< float > &x, const std::vector< float > &y, int ndat, const std::vector< float > &sigy, float &slope, float &intercept, float &covss, float &covii, float &covsi) const
Definition: DTLinearFit.cc:28
CLHEP::HepSymMatrix AlgebraicSymMatrix
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
void DTSegmentUpdator::Fit4Var ( const std::vector< float > &  xfit,
const std::vector< float > &  yfit,
const std::vector< int > &  lfit,
const std::vector< double > &  tfit,
const int  nptfit,
float &  cminf,
double &  vminf,
double &  chi2fit 
) const
private

Definition at line 454 of file DTSegmentUpdator.cc.

References a, b, alignmentValidation::c1, gather_cfg::cout, debug_cff::d1, debug, delta, j, ExpressReco_HICollisions_FallBack::sigma, and vdrift_4parfit.

Referenced by calculateT0corr().

461  {
462 
463  const double sigma = 0.0295;// errors can be inserted .just load them/that is the usual TB resolution value for DT chambers
464  double aminf = 0.;
465  double bminf = 0.;
466  int nppar = 0;
467  double sx = 0.;
468  double sx2 = 0.;
469  double sy = 0.;
470  double sxy = 0.;
471  double sl = 0.;
472  double sl2 = 0.;
473  double sly = 0.;
474  double slx = 0.;
475  double st = 0.;
476  double st2 = 0.;
477  double slt = 0.;
478  double sltx = 0.;
479  double slty = 0.;
480  double chi2fit2 = -1.;
481  double chi2fitN2 = -1. ;
482  double chi2fit3 = -1.;
483  double chi2fitN3 = -1. ;
484  double chi2fit4 = -1.;
485  double chi2fitN4 = -1.;
486  float bminf3 = bminf;
487  float aminf3 = aminf;
488  float cminf3 = cminf;
489  int nppar2 = 0;
490  int nppar3 = 0;
491  int nppar4 = 0;
492 
493  cminf = -999.;
494  vminf = 0.;
495 
496  for (int j=0; j<nptfit; j++){
497  sx = sx + xfit[j];
498  sy = sy + yfit[j];
499  sx2 = sx2 + xfit[j]*xfit[j];
500  sxy = sxy + xfit[j]*yfit[j];
501  sl = sl + lfit[j];
502  sl2 = sl2 + lfit[j]*lfit[j];
503  sly = sly + lfit[j]*yfit[j];
504  slx = slx + lfit[j]*xfit[j];
505  st = st + tfit[j];
506  st2 = st2 + tfit[j] * tfit[j];
507  slt = slt + lfit[j] * tfit[j];
508  sltx = sltx + lfit[j] * tfit[j]*xfit[j];
509  slty = slty + lfit[j] * tfit[j]*yfit[j];
510 
511  } //end loop
512 
513  const double delta = nptfit*sx2 - sx*sx;
514 
515  double a = 0.;
516  double b = 0.;
517 
518  if (delta!=0){ //
519  a = (sx2*sy - sx*sxy)/delta;
520  b = (nptfit*sxy - sx*sy)/delta;
521 
522  // cout << " NPAR=2 : slope = "<<b<< " intercept = "<<a <<endl;
523  for (int j=0; j<nptfit; j++){
524  const double ypred = a + b*xfit[j];
525  const double dy = (yfit[j] - ypred)/sigma;
526  chi2fit = chi2fit + dy*dy;
527  } //end loop chi2
528  }
529 
530  bminf = b;
531  aminf = a;
532 
533  nppar = 2;
534  nppar2 = nppar;
535 
536  chi2fit2 = chi2fit;
537  chi2fitN2 = chi2fit/(nptfit-2);
538 
539  // cout << "dt0 = 0chi2fit = " << chi2fit << " slope = "<<b<<endl;
540 
541  if (nptfit >= 3) {
542 
543  const double d1 = sy;
544  const double d2 = sxy;
545  const double d3 = sly;
546  const double c1 = sl;
547  const double c2 = slx;
548  const double c3 = sl2;
549  const double b1 = sx;
550  const double b2 = sx2;
551  const double b3 = slx;
552  const double a1 = nptfit;
553  const double a2 = sx;
554  const double a3 = sl;
555 
556  //these parameters are not used in the 4-variables fit
557  const double b4 = b2*a1-b1*a2;
558  const double c4 = c2*a1-c1*a2;
559  const double d4 = d2*a1-d1*a2;
560  const double b5 = a1*b3-a3*b1;
561  const double c5 = a1*c3-a3*c1;
562  const double d5 = a1*d3-d1*a3;
563  const double a6 = slt;
564  const double b6 = sltx;
565  const double c6 = st;
566  const double v6 = st2;
567  const double d6 = slty;
568 
569  if (((c5*b4-c4*b5)*b4*a1)!=0) {
570  nppar = 3;
571  chi2fit = 0.;
572  cminf = (d5*b4-d4*b5)/(c5*b4-c4*b5);
573  bminf = d4/b4 -cminf *c4/b4;
574  aminf = (d1/a1 -cminf*c1/a1 -bminf*b1/a1);
575 
576  for (int j=0; j<nptfit; j++){
577  const double ypred = aminf + bminf*xfit[j];
578  const double dy = (yfit[j]-cminf*lfit[j] - ypred)/sigma;
579  chi2fit = chi2fit + dy*dy;
580 
581  } //end loop chi2
582  chi2fit3 = chi2fit;
583  if (nptfit>3)
584  chi2fitN3 = chi2fit /(nptfit-3);
585 
586  }
587  else {
588  cminf = -999.;
589  bminf = b;
590  aminf = a;
591  chi2fit3 = chi2fit;
592  chi2fitN3 = chi2fit /(nptfit-2);
593  }
594 
595  bminf3 = bminf;
596  aminf3 = aminf;
597  cminf3 = cminf;
598  nppar3 = nppar;
599 
600  if (debug) {
601  cout << "dt0= 0 : slope 2 = " << b << " pos in = " << a << " chi2fitN2 = " << chi2fitN2
602  << " nppar = " << nppar2 << " nptfit = " << nptfit << endl;
603  cout << "dt0 = 0 : slope 3 = " << bminf << " pos out = " << aminf << " chi2fitN3 = "
604  << chi2fitN3 << " nppar = " << nppar3 << " T0_ev ns = " << cminf/0.00543 << endl;
605  }
606 
607  //***********************************
608  // cout << " vdrift_4parfit "<< vdrift_4parfit<<endl;
609  if( nptfit>=5 && vdrift_4parfit) {
610  const double det = (a1*a1*(b2*v6 - b6*b6) - a1*(a2*a2*v6 - 2*a2*a6*b6 + a6*a6*b2 + b2*c6*c6 + b3*(b3*v6 - 2*b6*c6))
611  + a2*a2*c6*c6 + 2*a2*(a3*(b3*v6 - b6*c6) - a6*b3*c6) + a3*a3*(b6*b6 - b2*v6)
612  + a6*(2*a3*(b2*c6 - b3*b6) + a6*b3*b3));
613 
614  // the dv/vdrift correction may be computed under vdrift_4parfit request;
615  if (det != 0) {
616  nppar = 4;
617  chi2fit = 0.;
618  // computation of a, b, c e v
619  aminf = (a1*(a2*(b6*d6 - v6*d2) + a6*(b6*d2 - b2*d6) + d1*(b2*v6 - b6*b6)) - a2*(b3*(c6*d6 - v6*d3)
620  + c6*(b6*d3 - c6*d2)) + a3*(b2*(c6*d6 - v6*d3) + b3*(v6*d2 - b6*d6) + b6*(b6*d3 - c6*d2))
621  + a6*(b2*c6*d3 + b3*(b3*d6 - b6*d3 - c6*d2)) - d1*(b2*c6*c6 + b3*(b3*v6 - 2*b6*c6)))/det;
622  bminf = - (a1*a1*(b6*d6 - v6*d2) - a1*(a2*(a6*d6 - v6*d1) - a6*a6*d2 + a6*b6*d1 + b3*(c6*d6 - v6*d3)
623  + c6*(b6*d3 - c6*d2)) + a2*(a3*(c6*d6 - v6*d3) + c6*(a6*d3 - c6*d1)) + a3*a3*(v6*d2 - b6*d6)
624  + a3*(a6*(b3*d6 + b6*d3 - 2*c6*d2) - d1*(b3*v6 - b6*c6)) - a6*b3*(a6*d3 - c6*d1))/det;
625  cminf = -(a1*(b2*(c6*d6 - v6*d3) + b3*(v6*d2 - b6*d6) + b6*(b6*d3 - c6*d2)) + a2*a2*(v6*d3 - c6*d6)
626  + a2*(a3*(b6*d6 - v6*d2) + a6*(b3*d6 - 2*b6*d3 + c6*d2) - d1*(b3*v6 - b6*c6))
627  + a3*(d1*(b2*v6 - b6*b6) - a6*(b2*d6 - b6*d2)) + a6*(a6*(b2*d3 - b3*d2) - d1*(b2*c6 - b3*b6)))/det;
628  vminf = - (a1*a1*(b2*d6 - b6*d2) - a1*(a2*a2*d6 - a2*(a6*d2 + b6*d1) + a6*b2*d1 + b2*c6*d3
629  + b3*(b3*d6 - b6*d3 - c6*d2)) + a2*a2*c6*d3 + a2*(a3*(2*b3*d6 - b6*d3 - c6*d2) - b3*(a6*d3 + c6*d1))
630  + a3*a3*(b6*d2 - b2*d6) + a3*(a6*(b2*d3 - b3*d2) + d1*(b2*c6 - b3*b6)) + a6*b3*b3*d1)/det;
631 
632  // chi 2
633  for (int j=0; j<nptfit; j++) {
634  const double ypred = aminf + bminf*xfit[j];
635  const double dy = (yfit[j]+vminf*lfit[j]*tfit[j]-cminf*lfit[j] -ypred)/sigma;
636  chi2fit = chi2fit + dy*dy;
637 
638  } //end loop chi2
639  if (nptfit<=nppar){
640  chi2fit4=chi2fit; //set negative Chi2 if not a fit...;
641  chi2fitN4=-1;
642  // cout << "nptfit " << nptfit << " nppar " << nppar << endl;
643  }
644  else{
645  chi2fit4 = chi2fit ;
646  chi2fitN4= chi2fit / (nptfit-nppar);
647  }
648  }
649  else {
650  chi2fit4 = chi2fit;
651  vminf = 0.;
652 
653  if (nptfit <= nppar) chi2fitN4=-1;
654  else chi2fitN4 = chi2fit / (nptfit-nppar);
655  }
656 
657  if (fabs(vminf) >= 0.09) {
658  // for safety and for code construction..dont accept correction on dv/vdrift greater then 0.09
659  vminf = 0.;
660  cminf = cminf3;
661  aminf = aminf3;
662  bminf = bminf3;
663  nppar = 3;
664  chi2fit = chi2fit3;
665  }
666 
667  } //end if vdrift
668  nppar4 = nppar;
669 
670  } //end nptfit >=3
671 
672  if (debug) {
673  cout << " dt0= 0 : slope 4 = " << bminf << " pos out = " << aminf <<" chi2fitN4 = " << chi2fitN4
674  << " nppar= " << nppar4 << " T0_ev ns= " << cminf/0.00543 <<" delta v = " << vminf <<endl;
675  cout << nptfit << " nptfit " << " end chi2fit = " << chi2fit/ (nptfit-nppar ) << " T0_ev ns= " << cminf/0.00543 << " delta v = " << vminf <<endl;
676  }
677 
678  if ( fabs(vminf) >= 0.09 && debug ) { //checks only vdrift less then 10 % accepted
679  cout << "vminf gt 0.09 det= " << endl;
680  cout << "dt0= 0 : slope 4 = "<< bminf << " pos out = " << aminf << " chi2fitN4 = " << chi2fitN4
681  << " T0_ev ns = " << cminf/0.00543 << " delta v = "<< vminf << endl;
682  cout << "dt0 = 0 : slope 2 = "<< b << " pos in = " << a <<" chi2fitN2 = " << chi2fitN2
683  << " nppar = " << nppar-1 << " nptfit = " << nptfit <<endl;
684  cout << "dt0 = 0 : slope 3 = " << bminf << " pos out = " << aminf << " chi2fitN3 = "
685  << chi2fitN3 << " T0_ev ns = " << cminf/0.00543 << endl;
686  cout << nptfit <<" nptfit "<< " end chi2fit = " << chi2fit << "T0_ev ns= " << cminf/0.00543 << "delta v = "<< vminf <<endl;
687  }
688 
689  if (nptfit != nppar) chi2fit = chi2fit / (nptfit-nppar);
690 }
dbl * delta
Definition: mlp_gen.cc:36
tuple d1
Definition: debug_cff.py:7
int j
Definition: DBlmapReader.cc:9
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:41
void DTSegmentUpdator::setES ( const edm::EventSetup setup)

set the setup

Definition at line 66 of file DTSegmentUpdator.cc.

References edm::EventSetup::get(), DTRecHitBaseAlgo::setES(), theAlgo, and theGeom.

Referenced by DTMeantimerPatternReco4D::setES(), DTCombinatorialPatternReco4D::setES(), DTRefitAndCombineReco4D::setES(), DTCombinatorialPatternReco::setES(), DTCombinatorialExtendedPatternReco::setES(), and DTMeantimerPatternReco::setES().

66  {
67  setup.get<MuonGeometryRecord>().get(theGeom);
68  theAlgo->setES(setup);
69 }
edm::ESHandle< DTGeometry > theGeom
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the algo at each event.
const T & get() const
Definition: EventSetup.h:55
DTRecHitBaseAlgo * theAlgo
void DTSegmentUpdator::update ( DTRecSegment4D seg,
const bool  calcT0 = false 
) const

recompute hits position and refit the segment4D

Definition at line 71 of file DTSegmentUpdator.cc.

References calculateT0corr(), gather_cfg::cout, debug, dir, fit(), TrackingRecHit::geographicalId(), DTRecSegment4D::hasPhi(), DTRecSegment4D::hasZed(), DTRecSegment4D::localDirection(), DTRecSegment4D::localPosition(), DTRecSegment4D::phiSegment(), pos, ExpressReco_HICollisions_FallBack::step, theGeom, updateHits(), and DTRecSegment4D::zSegment().

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

71  {
72 
73  if(debug) cout << "[DTSegmentUpdator] Starting to update the segment" << endl;
74 
75  const bool hasPhi = seg->hasPhi();
76  const bool hasZed = seg->hasZed();
77 
78  int step = (hasPhi && hasZed) ? 3 : 2;
79  if(calcT0) step = 4;
80 
81  GlobalPoint pos = theGeom->idToDet(seg->geographicalId())->toGlobal(seg->localPosition());
82  GlobalVector dir = theGeom->idToDet(seg->geographicalId())->toGlobal(seg->localDirection());
83 
84  if(calcT0) calculateT0corr(seg);
85 
86  if(hasPhi) updateHits(seg->phiSegment(),pos,dir,step);
87  if(hasZed) updateHits(seg->zSegment() ,pos,dir,step);
88 
89  fit(seg);
90 }
void updateHits(DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
void calculateT0corr(DTRecSegment2D *seg) const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
edm::ESHandle< DTGeometry > theGeom
virtual LocalVector localDirection() const
Local direction in Chamber frame.
bool fit(DTSegmentCand *seg) const
bool hasPhi() const
Does it have the Phi projection?
virtual LocalPoint localPosition() const
Local position in Chamber frame.
bool hasZed() const
Does it have the Z projection?
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
tuple cout
Definition: gather_cfg.py:41
DetId geographicalId() const
dbl *** dir
Definition: mlp_gen.cc:35
void DTSegmentUpdator::update ( DTRecSegment2D seg) const

recompute hits position and refit the segment2D

Definition at line 92 of file DTSegmentUpdator.cc.

References dir, fit(), TrackingRecHit::geographicalId(), DTRecSegment2D::localDirection(), DTRecSegment2D::localPosition(), pos, theGeom, and updateHits().

Referenced by python.Vispa.Gui.VispaWidget.VispaWidget::autosize(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), python.Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), python.Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), python.Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), python.Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), python.Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), python.Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), python.Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), python.Vispa.Gui.FindDialog.FindDialog::reset(), python.Vispa.Gui.PortConnection.PointToPointConnection::select(), python.Vispa.Gui.VispaWidget.VispaWidget::select(), python.Vispa.Views.LineDecayView.LineDecayContainer::select(), python.Vispa.Gui.VispaWidget.VispaWidget::setText(), python.Vispa.Gui.VispaWidget.VispaWidget::setTitle(), python.Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), python.Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and python.Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

92  {
93  GlobalPoint pos = (theGeom->idToDet(seg->geographicalId()))->toGlobal(seg->localPosition());
94  GlobalVector dir = (theGeom->idToDet(seg->geographicalId()))->toGlobal(seg->localDirection());
95 
96  updateHits(seg,pos,dir);
97  fit(seg);
98 }
void updateHits(DTRecSegment2D *seg, GlobalPoint &gpos, GlobalVector &gdir, const int step=2) const
edm::ESHandle< DTGeometry > theGeom
bool fit(DTSegmentCand *seg) const
virtual LocalPoint localPosition() const
local position in SL frame
virtual LocalVector localDirection() const
the local direction in SL frame
DetId geographicalId() const
dbl *** dir
Definition: mlp_gen.cc:35
void DTSegmentUpdator::updateHits ( DTRecSegment2D seg,
GlobalPoint gpos,
GlobalVector gdir,
const int  step = 2 
) const
private

Definition at line 313 of file DTSegmentUpdator.cc.

References angle(), DTRecHitBaseAlgo::compute(), funct::cos(), error, edm::hlt::Exception, DTRecSegment2D::ist0Valid(), 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(), DTTopology::wirePosition(), PV3DBase< T, PVType, FrameType >::x(), hit::x, and PV3DBase< T, PVType, FrameType >::z().

Referenced by update().

314  {
315 
316  // it is not necessary to have DTRecHit1D* to modify the obj in the container
317  // but I have to be carefully, since I cannot make a copy before the iteration!
318 
319  vector<DTRecHit1D> toBeUpdatedRecHits = seg->specificRecHits();
320  vector<DTRecHit1D> updatedRecHits;
321 
322  for (vector<DTRecHit1D>::iterator hit= toBeUpdatedRecHits.begin();
323  hit!=toBeUpdatedRecHits.end(); ++hit) {
324 
325  const DTLayer* layer = theGeom->layer( hit->wireId().layerId() );
326 
327  LocalPoint segPos=layer->toLocal(gpos);
328  LocalVector segDir=layer->toLocal(gdir);
329 
330  // define impact angle needed by the step 2
331  const float angle = atan(segDir.x()/-segDir.z());
332 
333  // define the local position (extr.) of the segment. Needed by the third step
334  LocalPoint segPosAtLayer=segPos+segDir*(-segPos.z())/cos(segDir.theta());
335 
336  DTRecHit1D newHit1D = (*hit);
337 
338  bool ok = true;
339 
340  if (step == 2) {
341  ok = theAlgo->compute(layer,*hit,angle,newHit1D);
342 
343  } else if (step == 3) {
344 
345  LocalPoint hitPos(hit->localPosition().x(),+segPosAtLayer.y(),0.);
346 
347  GlobalPoint glbpos= theGeom->layer( hit->wireId().layerId() )->toGlobal(hitPos);
348 
349  newHit1D.setPosition(hitPos);
350 
351  ok = theAlgo->compute(layer,*hit,angle,glbpos,newHit1D);
352 
353  } else if (step == 4) {
354 
355  const double vminf = seg->vDrift(); // vdrift correction are recorded in the segment
356  double cminf = 0.;
357  if(seg->ist0Valid()) cminf = - seg->t0()*0.00543;
358 
359  //cout << "In updateHits: t0 = " << seg->t0() << endl;
360  //cout << "In updateHits: vminf = " << vminf << endl;
361  //cout << "In updateHits: cminf = " << cminf << endl;
362 
363  const float xwire = layer->specificTopology().wirePosition(hit->wireId().wire());
364  const float distance = fabs(hit->localPosition().x() - xwire);
365 
366  const int ilc = ( hit->lrSide() == DTEnums::Left ) ? 1 : -1;
367 
368  const double dy_corr = (vminf*ilc*distance-cminf*ilc );
369 
370  LocalPoint point(hit->localPosition().x() + dy_corr, +segPosAtLayer.y(), 0.);
371 
373 
374  newHit1D.setPositionAndError(point, error);
375 
376  //FIXME: check that the hit is still inside the cell
377  ok = true;
378 
379  } else throw cms::Exception("DTSegmentUpdator")<<" updateHits called with wrong step " << endl;
380 
381  if (ok) updatedRecHits.push_back(newHit1D);
382  else {
383  LogError("DTSegmentUpdator")<<"DTSegmentUpdator::updateHits failed update" << endl;
384  throw cms::Exception("DTSegmentUpdator")<<"updateHits failed update"<<endl;
385  }
386 
387  }
388  seg->update(updatedRecHits);
389 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:73
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:64
void update(std::vector< DTRecHit1D > &updatedRecHits)
edm::ESHandle< DTGeometry > theGeom
Geom::Theta< T > theta() const
Definition: PV3DBase.h:69
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
double vDrift() const
T z() const
Definition: PV3DBase.h:58
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual bool compute(const DTLayer *layer, const DTDigi &digi, LocalPoint &leftPoint, LocalPoint &rightPoint, LocalError &error) const =0
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
bool ist0Valid() const
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
T x() const
Definition: PV3DBase.h:56
DTRecHitBaseAlgo * theAlgo
*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

Definition at line 110 of file DTSegmentUpdator.h.

Referenced by DTSegmentUpdator(), Fit4Var(), and update().

double DTSegmentUpdator::T0_hit_resolution
private

Definition at line 109 of file DTSegmentUpdator.h.

Referenced by updateHits().

DTRecHitBaseAlgo* DTSegmentUpdator::theAlgo
private

Definition at line 83 of file DTSegmentUpdator.h.

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

DTLinearFit* DTSegmentUpdator::theFitter
private

Definition at line 82 of file DTSegmentUpdator.h.

Referenced by fit(), and ~DTSegmentUpdator().

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

Definition at line 84 of file DTSegmentUpdator.h.

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

bool DTSegmentUpdator::vdrift_4parfit
private

Definition at line 108 of file DTSegmentUpdator.h.

Referenced by Fit4Var().