CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FastTSGFromPropagation.cc
Go to the documentation of this file.
2 
18 
21 // #include "RecoTracker/MeasurementDet/interface/TkStripMeasurementDet.h"
24 
27 
31 
43 
44 using namespace std;
45 
46 
47 FastTSGFromPropagation::FastTSGFromPropagation(const edm::ParameterSet & iConfig) :theTkLayerMeasurements (0), theTracker(0), theNavigation(0), theService(0), theEstimator(0), theSigmaZ(0), theConfig (iConfig),
48  beamSpot_(iConfig.getParameter<edm::InputTag>("beamSpot"))
49 {
50  theCategory = "FastSimulation|Muons||FastTSGFromPropagation";
51 
52 }
53 
54 FastTSGFromPropagation::FastTSGFromPropagation(const edm::ParameterSet & iConfig, const MuonServiceProxy* service) : theTkLayerMeasurements (0), theTracker(0), theNavigation(0), theService(service),theUpdator(0), theEstimator(0), theSigmaZ(0), theConfig (iConfig),
55  beamSpot_(iConfig.getParameter<edm::InputTag>("beamSpot"))
56 {
57  theCategory = "FastSimulation|Muons|FastTSGFromPropagation";
58 }
59 
61 {
62 
63  LogTrace(theCategory) << " FastTSGFromPropagation dtor called ";
64  if ( theNavigation ) delete theNavigation;
65  if ( theUpdator ) delete theUpdator;
66  if ( theEstimator ) delete theEstimator;
69 
70 }
71 
73  const TrackerTopology *tTopo, std::vector<TrajectorySeed> & result) {
74 
75  if ( theResetMethod == "discrete" ) getRescalingFactor(staMuon);
76 
77  TrajectoryStateOnSurface staState = outerTkState(staMuon);
78 
79  if ( !staState.isValid() ) {
80  LogTrace(theCategory) << "Error: initial state from L2 muon is invalid.";
81  return;
82  }
83 
84  LogTrace(theCategory) << "begin of trackerSeed:\n staState pos: "<<staState.globalPosition()
85  << " mom: "<<staState.globalMomentum()
86  <<"pos eta: "<<staState.globalPosition().eta()
87  <<"mom eta: "<<staState.globalMomentum().eta();
88 
89 
90  std::vector<const DetLayer*> nls = theNavigation->compatibleLayers(*(staState.freeState()), oppositeToMomentum);
91 
92  LogTrace(theCategory) << " compatible layers: "<<nls.size();
93 
94  if ( nls.empty() ) return;
95 
96  int ndesLayer = 0;
97 
98  bool usePredictedState = false;
99 
100  if ( theUpdateStateFlag ) { //use updated states
101  std::vector<TrajectoryMeasurement> alltm;
102 
103  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
104  inl != nls.end(); inl++, ndesLayer++ ) {
105  if ( (*inl == 0) ) break;
106 // if ( (inl != nls.end()-1 ) && ( (*inl)->subDetector() == GeomDetEnumerators::TEC ) && ( (*(inl+1))->subDetector() == GeomDetEnumerators::TOB ) ) continue;
107  alltm = findMeasurements_new(*inl, staState);
108  if ( (!alltm.empty()) ) {
109  LogTrace(theCategory) << "final compatible layer: "<<ndesLayer;
110  break;
111  }
112  }
113 
114  if ( alltm.empty() ) {
115  LogTrace(theCategory) << " NO Measurements Found: eta: "<<staState.globalPosition().eta() <<"pt "<<staState.globalMomentum().perp();
116  usePredictedState = true;
117  } else {
118  LogTrace(theCategory) << " Measurements for seeds: "<<alltm.size();
119  std::stable_sort(alltm.begin(),alltm.end(),increasingEstimate());
120  if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
121 
122  const edm::SimTrackContainer* simTracks = &(*theSimTracks);
123  const std::vector<unsigned> theSimTrackIds = theGSRecHits->ids();
124  TrackerRecHit theSeedHits;
125  std::vector<TrackerRecHit> outerHits;
126 
127  //std::vector<TrajectorySeed> tmpTS;
128  bool isMatch = false;
129  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
130  const TrajectoryStateOnSurface seedState = itm->predictedState();
131  double preY = seedState.globalPosition().y();
132 
133  // Check SimTrack
134  TrackingRecHit* aTrackingRecHit;
135  FreeTrajectoryState simtrack_trackerstate;
136  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
137  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
138  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
139  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
140  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
142 
144  simtrack.trackerSurfacePosition().y(),
145  simtrack.trackerSurfacePosition().z());
146  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
147  simtrack.trackerSurfaceMomentum().y(),
148  simtrack.trackerSurfaceMomentum().z());
149  int charge = (int)simtrack.charge();
150  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
151  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
152 
153  unsigned int outerId = 0;
154  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
155  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry, tTopo);
156  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
157  if( preY < 0 ) {
158  if( id > outerId ) outerId = id;
159  }
160  else {
161  if( id > outerId ) outerId = id;
162  }
163  }
164  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
165  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry, tTopo);
166  if( itm->recHit()->hit()->geographicalId().rawId() == theSeedHits.hit()->geographicalId().rawId() ) {
167  aTrackingRecHit = theSeedHits.hit()->clone();
168  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
169  if( !recHit ) continue;
170  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
171  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
173  container.push_back(recHit->hit()->clone());
174  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
175  // check direction
176  const BasicTrajectorySeed* aSeed = &ts;
177  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
178 
179  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
180  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
181  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
182  result.push_back(ts);
183  isMatch = true;
184  }
185  }
186  }
187  }
188  }
189  if( !isMatch ) {
190  // if there is no hits w.r.t. TM, find outermost hit
191  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
192  const TrajectoryStateOnSurface seedState = itm->predictedState();
193  double preY = seedState.globalPosition().y();
194 
195  // Check SimTrack
196  TrackingRecHit* aTrackingRecHit;
197  FreeTrajectoryState simtrack_trackerstate;
198  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
199  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
200  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
201  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
202  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
204 
206  simtrack.trackerSurfacePosition().y(),
207  simtrack.trackerSurfacePosition().z());
208  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
209  simtrack.trackerSurfaceMomentum().y(),
210  simtrack.trackerSurfaceMomentum().z());
211  int charge = (int)simtrack.charge();
212  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
213  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
214 
215  unsigned int outerId = 0;
216  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
217  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry, tTopo);
218  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
219  if( preY < 0 ) {
220  if( id > outerId ) outerId = id;
221  }
222  else {
223  if( id > outerId ) outerId = id;
224  }
225  }
226  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
227  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry, tTopo);
228  if( outerId == theSeedHits.hit()->geographicalId().rawId() ) {
229  aTrackingRecHit = theSeedHits.hit()->clone();
230  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
231  if( !recHit ) continue;
232  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
233  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
235  container.push_back(recHit->hit()->clone());
236  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
237  // check direction
238  const BasicTrajectorySeed* aSeed = &ts;
239  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
240 
241  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
242  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
243  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
244  result.push_back(ts);
245  }
246  }
247  }
248  }
249  }
250  }
251 
252  /*
253  for( unsigned ir = 0; ir < tmpTS.size(); ir++ ) {
254  const BasicTrajectorySeed* aSeed = &((tmpTS)[ir]);
255  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
256 
257  DetId seedDetId(PTSOD.detId());
258  const GeomDet * g = theGeometry->idToDet(seedDetId);
259  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
260  cout << "tsos3 = " << tsos.globalMomentum() << endl;
261  if( _index == ir ) {
262  cout << "tsos4 = " << tsos.globalMomentum() << endl;
263  result.push_back(tmpTS[ir]);
264  }
265  }
266  */
267  LogTrace(theCategory) << "result: "<<result.size();
268  return;
269  }
270  }
271 
272  if ( !theUpdateStateFlag || usePredictedState ) { //use predicted states
273  LogTrace(theCategory) << "use predicted state: ";
274  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
275  inl != nls.end(); inl++ ) {
276 
277  if ( !result.empty() || *inl == 0 ) {
278  break;
279  }
280  std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *propagator(), *estimator());
281  LogTrace(theCategory) << " compatDets "<<compatDets.size();
282  if ( compatDets.empty() ) continue;
283  TrajectorySeed ts = createSeed(compatDets.front().second, compatDets.front().first->geographicalId());
284  result.push_back(ts);
285 
286  }
287  LogTrace(theCategory) << "result: "<<result.size();
288  return;
289  }
290  return;
291 }
292 
294 
295  theMaxChi2 = theConfig.getParameter<double>("MaxChi2");
296 
297  theFixedErrorRescaling = theConfig.getParameter<double>("ErrorRescaling");
298 
299  theFlexErrorRescaling = 1.0;
300 
302 
303  if (theResetMethod != "discrete" && theResetMethod != "fixed" && theResetMethod != "matrix" ) {
304  edm::LogError("FastTSGFromPropagation")
305  <<"Wrong error rescaling method: "<<theResetMethod <<"\n"
306  <<"Possible choices are: discrete, fixed, matrix.\n"
307  <<"Use discrete method" <<std::endl;
308  theResetMethod = "discrete";
309  }
310 
312 
313  theCacheId_MT = 0;
314 
315  theCacheId_TG = 0;
316 
318 
319  theService = service;
320 
321  theUseVertexStateFlag = theConfig.getParameter<bool>("UseVertexState");
322 
323  theUpdateStateFlag = theConfig.getParameter<bool>("UpdateState");
324 
325  theSelectStateFlag = theConfig.getParameter<bool>("SelectState");
326 
327  theSimTrackCollectionLabel = theConfig.getParameter<edm::InputTag>("SimTrackCollectionLabel");
329 
330  theUpdator = new KFUpdator();
331 
332  theSigmaZ = theConfig.getParameter<double>("SigmaZ");
333 
334  edm::ParameterSet errorMatrixPset = theConfig.getParameter<edm::ParameterSet>("errorMatrixPset");
335  if ( theResetMethod == "matrix" && !errorMatrixPset.empty()){
336  theAdjustAtIp = errorMatrixPset.getParameter<bool>("atIP");
337  theErrorMatrixAdjuster = new MuonErrorMatrix(errorMatrixPset);
338  } else {
339  theAdjustAtIp =false;
341  }
342 
343  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
345 
347  theService->eventSetup().get<TrackerDigiGeometryRecord>().get(geometry);
348  theGeometry = &(*geometry);
349 
350  theService->eventSetup().get<TransientRecHitRecord>().get("WithTrackAngle", theTTRHBuilder);
351 
352 }
353 
355 
356  bool measTrackerChanged = false;
357 
359 
360  // retrieve the MC truth (SimTracks)
363 
364 
365  unsigned long long newCacheId_MT = theService->eventSetup().get<CkfComponentsRecord>().cacheIdentifier();
366 
367  if ( theUpdateStateFlag && newCacheId_MT != theCacheId_MT ) {
368  LogTrace(theCategory) << "Measurment Tracker Geometry changed!";
369  theCacheId_MT = newCacheId_MT;
370  theService->eventSetup().get<CkfComponentsRecord>().get(theMeasTracker);
371  measTrackerChanged = true;
372  }
373 
374  //if ( theUpdateStateFlag ) theMeasTracker->update(iEvent);
375 
376  if ( measTrackerChanged && (&*theMeasTracker) ) {
379  }
380 
381  bool trackerGeomChanged = false;
382 
383  unsigned long long newCacheId_TG = theService->eventSetup().get<TrackerRecoGeometryRecord>().cacheIdentifier();
384 
385  if ( newCacheId_TG != theCacheId_TG ) {
386  LogTrace(theCategory) << "Tracker Reco Geometry changed!";
387  theCacheId_TG = newCacheId_TG;
388  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
389  trackerGeomChanged = true;
390  }
391 
392  if ( trackerGeomChanged && (&*theTracker) ) {
393  if ( theNavigation ) delete theNavigation;
395  }
396 }
397 
399 
400  TrajectoryStateOnSurface innerTS;
401 
402  if ( staMuon.first && staMuon.first->isValid() ) {
403  if (staMuon.first->direction() == alongMomentum) {
404  innerTS = staMuon.first->firstMeasurement().updatedState();
405  }
406  else if (staMuon.first->direction() == oppositeToMomentum) {
407  innerTS = staMuon.first->lastMeasurement().updatedState();
408  }
409  } else {
410  innerTS = trajectoryStateTransform::innerStateOnSurface(*(staMuon.second),*theService->trackingGeometry(), &*theService->magneticField());
411  }
412  //rescale the error
413  adjust(innerTS);
414 
415  return innerTS;
416 
417 }
418 
420 
422 
423  if ( theUseVertexStateFlag && staMuon.second->pt() > 1.0 ) {
424  FreeTrajectoryState iniState = trajectoryStateTransform::initialFreeState(*(staMuon.second), &*theService->magneticField());
425  //rescale the error at IP
426  adjust(iniState);
427 
428  StateOnTrackerBound fromInside(&*(theService->propagator("PropagatorWithMaterial")));
429  result = fromInside(iniState);
430  } else {
431  StateOnTrackerBound fromOutside(&*propagator());
432  result = fromOutside(innerState(staMuon));
433  }
434  return result;
435 }
436 
438 
440  return createSeed(tsos, container, id);
441 
442 }
443 
445 
447  return TrajectorySeed(seedTSOS,container,oppositeToMomentum);
448 
449 }
450 
451 
452 void FastTSGFromPropagation::validMeasurements(std::vector<TrajectoryMeasurement>& tms) const {
453 
454  std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(), isInvalid());
455  tms.erase(tmsend, tms.end());
456  return;
457 
458 }
459 
460 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements_new(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
461 
462  std::vector<TrajectoryMeasurement> result;
463 
464  std::vector<DetLayer::DetWithState> compatDets = nl->compatibleDets(staState, *propagator(), *estimator());
465  if ( compatDets.empty() ) return result;
466 
467  for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
468  if ( idws->second.isValid() && (idws->first) ) {
469  std::vector<TrajectoryMeasurement> tmptm =
470  theMeasTracker->idToDet(idws->first->geographicalId())->fastMeasurements(idws->second, idws->second, *propagator(), *estimator());
471  //validMeasurements(tmptm);
472 // if ( tmptm.size() > 2 ) {
473 // std::stable_sort(tmptm.begin(),tmptm.end(),increasingEstimate());
474 // result.insert(result.end(),tmptm.begin(), tmptm.begin()+2);
475 // } else {
476  result.insert(result.end(),tmptm.begin(), tmptm.end());
477 // }
478  }
479  }
480 
481  return result;
482 
483 }
484 
485 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
486 
487  std::vector<TrajectoryMeasurement> result = tkLayerMeasurements()->measurements((*nl), staState, *propagator(), *estimator());
488  validMeasurements(result);
489  return result;
490 }
491 
493  if ( !theSelectStateFlag ) return true;
494  else {
495  if ( theBeamSpot.isValid() ) {
496  return ( ( fabs(zDis(tsos) - theBeamSpot->z0() ) < theSigmaZ) );
497 
498  } else {
499  return ( ( fabs(zDis(tsos)) < theSigmaZ) );
500 // double theDxyCut = 100;
501 // return ( (zDis(tsos) < theSigmaZ) && (dxyDis(tsos) < theDxyCut) );
502  }
503  }
504 
505 }
506 
508  return fabs(( - tsos.globalPosition().x() * tsos.globalMomentum().y() + tsos.globalPosition().y() * tsos.globalMomentum().x() )/tsos.globalMomentum().perp());
509 }
510 
512  return tsos.globalPosition().z() - tsos.globalPosition().perp() * tsos.globalMomentum().z()/tsos.globalMomentum().perp();
513 }
514 
516  float pt = (staMuon.second)->pt();
517  if ( pt < 13.0 ) theFlexErrorRescaling = 3;
518  else if ( pt < 30.0 ) theFlexErrorRescaling = 5;
519  else theFlexErrorRescaling = 10;
520  return;
521 }
522 
523 
525 
526  //rescale the error
527  if ( theResetMethod == "discreate" ) {
529  return;
530  }
531 
532  //rescale the error
533  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
535  return;
536  }
537 
539  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.momentum());//FIXME with position
540  MuonErrorMatrix::multiply(oMat, sfMat);
541 
542  state = FreeTrajectoryState(state.parameters(),
543  oMat);
544 }
545 
547 
548  //rescale the error
549  if ( theResetMethod == "discreate" ) {
551  return;
552  }
553 
554  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
556  return;
557  }
558 
560  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.globalMomentum());//FIXME with position
561  MuonErrorMatrix::multiply(oMat, sfMat);
562 
564  oMat,
565  state.surface(),
566  state.surfaceSide(),
567  state.weight());
568 }
569 
571  unsigned int detid,
572  PTrajectoryStateOnDet& pts) const
573 {
574  const AlgebraicSymMatrix55& m = ts.localError().matrix();
575  int dim = 5;
576  float localErrors[15];
577  int k = 0;
578  for (int i=0; i<dim; ++i) {
579  for (int j=0; j<=i; ++j) {
580  localErrors[k++] = m(i,j);
581  }
582  }
583  int surfaceSide = static_cast<int>(ts.surfaceSide());
585  localErrors, detid,
586  surfaceSide);
587 }
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
edm::ESHandle< MeasurementTracker > theMeasTracker
const math::XYZVectorD & trackerSurfacePosition() const
Definition: SimTrack.h:36
T getParameter(std::string const &) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
int i
Definition: DBlmapReader.cc:9
edm::Handle< reco::BeamSpot > theBeamSpot
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:52
T perp() const
Definition: PV3DBase.h:72
const Chi2MeasurementEstimator * theEstimator
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
unsigned long long theCacheId_MT
std::pair< const Trajectory *, reco::TrackRef > TrackCand
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field)
const LocalTrajectoryParameters & localParameters() const
const LayerMeasurements * tkLayerMeasurements() const
const GlobalTrajectoryParameters & parameters() const
edm::Handle< edm::SimTrackContainer > theSimTracks
const DirectTrackerNavigation * theNavigation
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const =0
const CurvilinearTrajectoryError & curvilinearError() const
virtual ~FastTSGFromPropagation()
destructor
virtual RecHit2DLocalPos * clone() const =0
edm::ESHandle< GeometricSearchTracker > theTracker
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
void validMeasurements(std::vector< TrajectoryMeasurement > &) const
select valid measurements
CurvilinearTrajectoryError get(GlobalVector momentum, bool convolute=true)
main method to be used. Retrieve a 5x5 symetrical matrix according to parametrization of error or sca...
const MuonServiceProxy * theService
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
float charge() const
charge
Definition: CoreSimTrack.cc:3
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
double charge(const std::vector< uint8_t > &Ampls)
const CurvilinearTrajectoryError & curvilinearError() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
const Chi2MeasurementEstimator * estimator() const
FastTSGFromPropagation(const edm::ParameterSet &pset)
constructor
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
void getRescalingFactor(const TrackCand &staMuon)
static const double pts[33]
Definition: Constants.h:31
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
void push_back(D *&d)
Definition: OwnVector.h:273
int iEvent
Definition: GenABIO.cc:243
const SurfaceType & surface() const
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
FreeTrajectoryState * freeState(bool withErrors=true) const
const TrajectoryStateUpdator * theUpdator
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
int j
Definition: DBlmapReader.cc:9
std::vector< TrajectoryMeasurement > findMeasurements_new(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer (faster way)
unsigned int detId() const
TrajectoryStateOnSurface outerTkState(const TrackCand &) const
const AlgebraicSymMatrix55 & matrix() const
static void multiply(CurvilinearTrajectoryError &initial_error, const CurvilinearTrajectoryError &scale_error)
multiply term by term the two matrix
TrajectoryStateOnSurface innerState(const TrackCand &) const
const LocalTrajectoryError & localError() const
bool isValid() const
Definition: HandleBase.h:76
virtual const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
GlobalVector momentum() const
#define LogTrace(id)
int k[5][pyjets_maxn]
MuonErrorMatrix * theErrorMatrixAdjuster
edm::Handle< SiTrackerGSMatchedRecHit2DCollection > theGSRecHits
Definition: DetId.h:20
void rescaleError(double factor)
const TrackerGeometry * theGeometry
void init(const MuonServiceProxy *)
initialize
double zDis(const TrajectoryStateOnSurface &tsos) const
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
const TrajectoryStateUpdator * updator() const
const GlobalTrajectoryParameters & globalParameters() const
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field)
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: SimTrack.h:38
edm::ESHandle< Propagator > propagator() const
TrajectorySeed createSeed(const TrajectoryStateOnSurface &, const DetId &) const
create a hitless seed from a trajectory state
void stateOnDet(const TrajectoryStateOnSurface &ts, unsigned int detid, PTrajectoryStateOnDet &pts) const
A mere copy (without memory leak) of an existing tracking method.
char state
Definition: procUtils.cc:75
T eta() const
Definition: PV3DBase.h:76
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
edm::InputTag theSimTrackCollectionLabel
const LayerMeasurements * theTkLayerMeasurements
ESHandle< TrackerGeometry > geometry
GlobalVector globalMomentum() const
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
find compatible layers for a given trajectory state
double dxyDis(const TrajectoryStateOnSurface &tsos) const
DetId geographicalId() const
void trackerSeeds(const TrackCand &, const TrackingRegion &, const TrackerTopology *tTopo, std::vector< TrajectorySeed > &)
generate seed(s) for a track
T x() const
Definition: PV3DBase.h:62
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
std::vector< SimTrack > SimTrackContainer
void setEvent(const edm::Event &)
set an event
unsigned long long theCacheId_TG