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"
25 
28 
32 
44 
45 using namespace std;
46 
48 }
49 
51  theCategory("FastSimulation|Muons|FastTSGFromPropagation"),
52  theTkLayerMeasurements(), theTracker(), theNavigation(), theService(service), theUpdator(), theEstimator(), theSigmaZ(0.0), theConfig (iConfig),
53  theSimTrackCollectionToken_(iC.consumes<edm::SimTrackContainer>(theConfig.getParameter<edm::InputTag>("SimTrackCollectionLabel"))),
54  theHitProducer(iC.consumes<SiTrackerGSMatchedRecHit2DCollection>(theConfig.getParameter<edm::InputTag>("HitProducer"))),
55  beamSpot_(iC.consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpot"))),
56  theMeasurementTrackerEventToken_(iC.consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("MeasurementTrackerEvent"))) {
57 }
58 
60  LogTrace(theCategory) << " FastTSGFromPropagation dtor called ";
61 }
62 
64  const TrackerTopology *tTopo, std::vector<TrajectorySeed> & result) {
65 
66  if ( theResetMethod == "discrete" ) getRescalingFactor(staMuon);
67 
68  TrajectoryStateOnSurface staState = outerTkState(staMuon);
69 
70  if ( !staState.isValid() ) {
71  LogTrace(theCategory) << "Error: initial state from L2 muon is invalid.";
72  return;
73  }
74 
75  LogTrace(theCategory) << "begin of trackerSeed:\n staState pos: "<<staState.globalPosition()
76  << " mom: "<<staState.globalMomentum()
77  <<"pos eta: "<<staState.globalPosition().eta()
78  <<"mom eta: "<<staState.globalMomentum().eta();
79 
80 
81  std::vector<const DetLayer*> nls = theNavigation->compatibleLayers(*(staState.freeState()), oppositeToMomentum);
82 
83  LogTrace(theCategory) << " compatible layers: "<<nls.size();
84 
85  if ( nls.empty() ) return;
86 
87  int ndesLayer = 0;
88 
89  bool usePredictedState = false;
90 
91  if ( theUpdateStateFlag ) { //use updated states
92  std::vector<TrajectoryMeasurement> alltm;
93 
94  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
95  inl != nls.end(); inl++, ndesLayer++ ) {
96  if ( (*inl == 0) ) break;
97 // if ( (inl != nls.end()-1 ) && ( (*inl)->subDetector() == GeomDetEnumerators::TEC ) && ( (*(inl+1))->subDetector() == GeomDetEnumerators::TOB ) ) continue;
98  alltm = findMeasurements_new(*inl, staState);
99  if ( (!alltm.empty()) ) {
100  LogTrace(theCategory) << "final compatible layer: "<<ndesLayer;
101  break;
102  }
103  }
104 
105  if ( alltm.empty() ) {
106  LogTrace(theCategory) << " NO Measurements Found: eta: "<<staState.globalPosition().eta() <<"pt "<<staState.globalMomentum().perp();
107  usePredictedState = true;
108  } else {
109  LogTrace(theCategory) << " Measurements for seeds: "<<alltm.size();
110  std::stable_sort(alltm.begin(),alltm.end(),increasingEstimate());
111  if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
112 
113  const edm::SimTrackContainer* simTracks = &(*theSimTracks);
114  const std::vector<unsigned> theSimTrackIds = theGSRecHits->ids();
115  TrajectorySeedHitCandidate theSeedHits;
116  std::vector<TrajectorySeedHitCandidate> outerHits;
117 
118  //std::vector<TrajectorySeed> tmpTS;
119  bool isMatch = false;
120  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
121  const TrajectoryStateOnSurface seedState = itm->predictedState();
122  double preY = seedState.globalPosition().y();
123 
124  // Check SimTrack
125  TrackingRecHit* aTrackingRecHit;
126  FreeTrajectoryState simtrack_trackerstate;
127  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
128  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
129  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
130  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
131  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
133 
135  simtrack.trackerSurfacePosition().y(),
136  simtrack.trackerSurfacePosition().z());
137  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
138  simtrack.trackerSurfaceMomentum().y(),
139  simtrack.trackerSurfaceMomentum().z());
140  int charge = (int)simtrack.charge();
141  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
142  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
143 
144  unsigned int outerId = 0;
145  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
146  theSeedHits = TrajectorySeedHitCandidate(&(*iterRecHit), theGeometry, tTopo);
147  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
148  if( preY < 0 ) {
149  if( id > outerId ) outerId = id;
150  }
151  else {
152  if( id > outerId ) outerId = id;
153  }
154  }
155  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
156  theSeedHits = TrajectorySeedHitCandidate(&(*iterRecHit), theGeometry, tTopo);
157  if( itm->recHit()->hit()->geographicalId().rawId() == theSeedHits.hit()->geographicalId().rawId() ) {
158  aTrackingRecHit = theSeedHits.hit()->clone();
159  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
160  if( !recHit ) continue;
161  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
162  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
164  container.push_back(recHit->hit()->clone());
165  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
166  // check direction
167  const BasicTrajectorySeed* aSeed = &ts;
168  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
169 
170  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
171  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
172  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
173  result.push_back(ts);
174  isMatch = true;
175  }
176  }
177  }
178  }
179  }
180  if( !isMatch ) {
181  // if there is no hits w.r.t. TM, find outermost hit
182  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
183  const TrajectoryStateOnSurface seedState = itm->predictedState();
184  double preY = seedState.globalPosition().y();
185 
186  // Check SimTrack
187  TrackingRecHit* aTrackingRecHit;
188  FreeTrajectoryState simtrack_trackerstate;
189  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
190  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
191  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
192  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
193  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
195 
197  simtrack.trackerSurfacePosition().y(),
198  simtrack.trackerSurfacePosition().z());
199  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
200  simtrack.trackerSurfaceMomentum().y(),
201  simtrack.trackerSurfaceMomentum().z());
202  int charge = (int)simtrack.charge();
203  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
204  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
205 
206  unsigned int outerId = 0;
207  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
208  theSeedHits = TrajectorySeedHitCandidate(&(*iterRecHit), theGeometry, tTopo);
209  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
210  if( preY < 0 ) {
211  if( id > outerId ) outerId = id;
212  }
213  else {
214  if( id > outerId ) outerId = id;
215  }
216  }
217  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
218  theSeedHits = TrajectorySeedHitCandidate(&(*iterRecHit), theGeometry, tTopo);
219  if( outerId == theSeedHits.hit()->geographicalId().rawId() ) {
220  aTrackingRecHit = theSeedHits.hit()->clone();
221  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
222  if( !recHit ) continue;
223  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
224  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
226  container.push_back(recHit->hit()->clone());
227  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
228  // check direction
229  const BasicTrajectorySeed* aSeed = &ts;
230  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
231 
232  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
233  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
234  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
235  result.push_back(ts);
236  }
237  }
238  }
239  }
240  }
241  }
242 
243  /*
244  for( unsigned ir = 0; ir < tmpTS.size(); ir++ ) {
245  const BasicTrajectorySeed* aSeed = &((tmpTS)[ir]);
246  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
247 
248  DetId seedDetId(PTSOD.detId());
249  const GeomDet * g = theGeometry->idToDet(seedDetId);
250  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
251  cout << "tsos3 = " << tsos.globalMomentum() << endl;
252  if( _index == ir ) {
253  cout << "tsos4 = " << tsos.globalMomentum() << endl;
254  result.push_back(tmpTS[ir]);
255  }
256  }
257  */
258  LogTrace(theCategory) << "result: "<<result.size();
259  return;
260  }
261  }
262 
263  if ( !theUpdateStateFlag || usePredictedState ) { //use predicted states
264  LogTrace(theCategory) << "use predicted state: ";
265  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
266  inl != nls.end(); inl++ ) {
267 
268  if ( !result.empty() || *inl == 0 ) {
269  break;
270  }
271  std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *propagator(), *estimator());
272  LogTrace(theCategory) << " compatDets "<<compatDets.size();
273  if ( compatDets.empty() ) continue;
274  TrajectorySeed ts = createSeed(compatDets.front().second, compatDets.front().first->geographicalId());
275  result.push_back(ts);
276 
277  }
278  LogTrace(theCategory) << "result: "<<result.size();
279  return;
280  }
281  return;
282 }
283 
285 
286  theMaxChi2 = theConfig.getParameter<double>("MaxChi2");
287 
288  theFixedErrorRescaling = theConfig.getParameter<double>("ErrorRescaling");
289 
290  theFlexErrorRescaling = 1.0;
291 
293 
294  if (theResetMethod != "discrete" && theResetMethod != "fixed" && theResetMethod != "matrix" ) {
295  edm::LogError("FastTSGFromPropagation")
296  <<"Wrong error rescaling method: "<<theResetMethod <<"\n"
297  <<"Possible choices are: discrete, fixed, matrix.\n"
298  <<"Use discrete method" <<std::endl;
299  theResetMethod = "discrete";
300  }
301 
303 
304  theCacheId_MT = 0;
305 
306  theCacheId_TG = 0;
307 
309 
310  theService = service;
311 
312  theUseVertexStateFlag = theConfig.getParameter<bool>("UseVertexState");
313 
314  theUpdateStateFlag = theConfig.getParameter<bool>("UpdateState");
315 
316  theSelectStateFlag = theConfig.getParameter<bool>("SelectState");
317 
318  theUpdator.reset(new KFUpdator());
319 
320  theSigmaZ = theConfig.getParameter<double>("SigmaZ");
321 
322  edm::ParameterSet errorMatrixPset = theConfig.getParameter<edm::ParameterSet>("errorMatrixPset");
323  if ( theResetMethod == "matrix" && !errorMatrixPset.empty()){
324  theAdjustAtIp = errorMatrixPset.getParameter<bool>("atIP");
325  theErrorMatrixAdjuster.reset(new MuonErrorMatrix(errorMatrixPset));
326  } else {
327  theAdjustAtIp =false;
328  theErrorMatrixAdjuster.reset();
329  }
330 
331  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
333 
335  theService->eventSetup().get<TrackerDigiGeometryRecord>().get(geometry);
336  theGeometry = &(*geometry);
337 
338  theService->eventSetup().get<TransientRecHitRecord>().get("WithTrackAngle", theTTRHBuilder);
339 
340 }
341 
343 
345 
346  // retrieve the MC truth (SimTracks)
349 
350 
351  unsigned long long newCacheId_MT = theService->eventSetup().get<CkfComponentsRecord>().cacheIdentifier();
352 
353  if ( theUpdateStateFlag && newCacheId_MT != theCacheId_MT ) {
354  LogTrace(theCategory) << "Measurment Tracker Geometry changed!";
355  theCacheId_MT = newCacheId_MT;
356  theService->eventSetup().get<CkfComponentsRecord>().get(theMeasTracker);
357  }
358 
359  if ( theUpdateStateFlag ) {
362  }
363 
364  bool trackerGeomChanged = false;
365 
366  unsigned long long newCacheId_TG = theService->eventSetup().get<TrackerRecoGeometryRecord>().cacheIdentifier();
367 
368  if ( newCacheId_TG != theCacheId_TG ) {
369  LogTrace(theCategory) << "Tracker Reco Geometry changed!";
370  theCacheId_TG = newCacheId_TG;
371  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
372  trackerGeomChanged = true;
373  }
374 
375  if ( trackerGeomChanged && (&*theTracker) ) {
377  }
378 }
379 
381 
382  TrajectoryStateOnSurface innerTS;
383 
384  if ( staMuon.first && staMuon.first->isValid() ) {
385  if (staMuon.first->direction() == alongMomentum) {
386  innerTS = staMuon.first->firstMeasurement().updatedState();
387  }
388  else if (staMuon.first->direction() == oppositeToMomentum) {
389  innerTS = staMuon.first->lastMeasurement().updatedState();
390  }
391  } else {
392  innerTS = trajectoryStateTransform::innerStateOnSurface(*(staMuon.second),*theService->trackingGeometry(), &*theService->magneticField());
393  }
394  //rescale the error
395  adjust(innerTS);
396 
397  return innerTS;
398 
399 }
400 
402 
404 
405  if ( theUseVertexStateFlag && staMuon.second->pt() > 1.0 ) {
406  FreeTrajectoryState iniState = trajectoryStateTransform::initialFreeState(*(staMuon.second), &*theService->magneticField());
407  //rescale the error at IP
408  adjust(iniState);
409 
410  StateOnTrackerBound fromInside(&*(theService->propagator("PropagatorWithMaterial")));
411  result = fromInside(iniState);
412  } else {
413  StateOnTrackerBound fromOutside(&*propagator());
414  result = fromOutside(innerState(staMuon));
415  }
416  return result;
417 }
418 
420 
422  return createSeed(tsos, container, id);
423 
424 }
425 
427 
429  return TrajectorySeed(seedTSOS,container,oppositeToMomentum);
430 
431 }
432 
433 
434 void FastTSGFromPropagation::validMeasurements(std::vector<TrajectoryMeasurement>& tms) const {
435 
436  std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(), isInvalid());
437  tms.erase(tmsend, tms.end());
438  return;
439 
440 }
441 
442 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements_new(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
443 
444  std::vector<TrajectoryMeasurement> result;
445 
446  std::vector<DetLayer::DetWithState> compatDets = nl->compatibleDets(staState, *propagator(), *estimator());
447  if ( compatDets.empty() ) return result;
448 
449  for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
450  if ( idws->second.isValid() && (idws->first) ) {
451  std::vector<TrajectoryMeasurement> tmptm =
452  theMeasTrackerEvent->idToDet(idws->first->geographicalId()).fastMeasurements(idws->second, idws->second, *propagator(), *estimator());
453  //validMeasurements(tmptm);
454 // if ( tmptm.size() > 2 ) {
455 // std::stable_sort(tmptm.begin(),tmptm.end(),increasingEstimate());
456 // result.insert(result.end(),tmptm.begin(), tmptm.begin()+2);
457 // } else {
458  result.insert(result.end(),tmptm.begin(), tmptm.end());
459 // }
460  }
461  }
462 
463  return result;
464 
465 }
466 
467 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
468 
469  std::vector<TrajectoryMeasurement> result = tkLayerMeasurements()->measurements((*nl), staState, *propagator(), *estimator());
470  validMeasurements(result);
471  return result;
472 }
473 
475  if ( !theSelectStateFlag ) return true;
476  else {
477  if ( theBeamSpot.isValid() ) {
478  return ( ( fabs(zDis(tsos) - theBeamSpot->z0() ) < theSigmaZ) );
479 
480  } else {
481  return ( ( fabs(zDis(tsos)) < theSigmaZ) );
482 // double theDxyCut = 100;
483 // return ( (zDis(tsos) < theSigmaZ) && (dxyDis(tsos) < theDxyCut) );
484  }
485  }
486 
487 }
488 
490  return fabs(( - tsos.globalPosition().x() * tsos.globalMomentum().y() + tsos.globalPosition().y() * tsos.globalMomentum().x() )/tsos.globalMomentum().perp());
491 }
492 
494  return tsos.globalPosition().z() - tsos.globalPosition().perp() * tsos.globalMomentum().z()/tsos.globalMomentum().perp();
495 }
496 
498  float pt = (staMuon.second)->pt();
499  if ( pt < 13.0 ) theFlexErrorRescaling = 3;
500  else if ( pt < 30.0 ) theFlexErrorRescaling = 5;
501  else theFlexErrorRescaling = 10;
502  return;
503 }
504 
505 
507 
508  //rescale the error
509  if ( theResetMethod == "discreate" ) {
511  return;
512  }
513 
514  //rescale the error
515  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
517  return;
518  }
519 
521  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.momentum());//FIXME with position
522  MuonErrorMatrix::multiply(oMat, sfMat);
523 
524  state = FreeTrajectoryState(state.parameters(),
525  oMat);
526 }
527 
529 
530  //rescale the error
531  if ( theResetMethod == "discreate" ) {
533  return;
534  }
535 
536  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
538  return;
539  }
540 
542  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.globalMomentum());//FIXME with position
543  MuonErrorMatrix::multiply(oMat, sfMat);
544 
545  state = TrajectoryStateOnSurface(state.weight(),
546  state.globalParameters(),
547  oMat,
548  state.surface(),
549  state.surfaceSide());
550 }
551 
553  unsigned int detid,
554  PTrajectoryStateOnDet& pts) const
555 {
556  const AlgebraicSymMatrix55& m = ts.localError().matrix();
557  int dim = 5;
558  float localErrors[15];
559  int k = 0;
560  for (int i=0; i<dim; ++i) {
561  for (int j=0; j<=i; ++j) {
562  localErrors[k++] = m(i,j);
563  }
564  }
565  int surfaceSide = static_cast<int>(ts.surfaceSide());
567  localErrors, detid,
568  surfaceSide);
569 }
std::vector< TrajectoryMeasurement > findMeasurements(const DetLayer *, const TrajectoryStateOnSurface &) const
look for measurements on the first compatible layer
edm::Handle< MeasurementTrackerEvent > theMeasTrackerEvent
edm::ESHandle< MeasurementTracker > theMeasTracker
std::unique_ptr< const TrajectoryStateUpdator > theUpdator
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > theHitProducer
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
FastTSGFromPropagation(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
constructor
edm::Handle< reco::BeamSpot > theBeamSpot
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
T perp() const
Definition: PV3DBase.h:72
void adjust(FreeTrajectoryState &) const
adjust the error matrix of the FTS
unsigned long long theCacheId_MT
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const LocalTrajectoryParameters & localParameters() const
const LayerMeasurements * tkLayerMeasurements() const
const GlobalTrajectoryParameters & parameters() const
const GSSiTrackerRecHit2DLocalPos * hit() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
edm::EDGetTokenT< edm::SimTrackContainer > theSimTrackCollectionToken_
edm::Handle< edm::SimTrackContainer > theSimTracks
const CurvilinearTrajectoryError & curvilinearError() const
virtual ~FastTSGFromPropagation()
destructor
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
const MuonServiceProxy * theService
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
#define nullptr
float charge() const
charge
Definition: CoreSimTrack.cc:18
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
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
const Chi2MeasurementEstimator * estimator() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
void getRescalingFactor(const TrackCand &staMuon)
static const double pts[33]
Definition: Constants.h:30
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken_
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
void push_back(D *&d)
Definition: OwnVector.h:280
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
int iEvent
Definition: GenABIO.cc:230
const edm::ParameterSet theConfig
const SurfaceType & surface() const
bool passSelection(const TrajectoryStateOnSurface &) const
check some quantity and beam-spot compatibility and decide to continue
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
FreeTrajectoryState const * freeState(bool withErrors=true) const
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
LayerMeasurements theTkLayerMeasurements
const LocalTrajectoryError & localError() const
bool isValid() const
Definition: HandleBase.h:75
GlobalVector momentum() const
#define LogTrace(id)
edm::Handle< SiTrackerGSMatchedRecHit2DCollection > theGSRecHits
Definition: DetId.h:18
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
std::unique_ptr< const DirectTrackerNavigation > theNavigation
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.
virtual GSSiTrackerRecHit2DLocalPos * clone() const =0
T eta() const
Definition: PV3DBase.h:76
ESHandle< TrackerGeometry > geometry
GlobalVector globalMomentum() const
edm::EDGetTokenT< reco::BeamSpot > beamSpot_
static int position[264][3]
Definition: ReadPGInfo.cc:509
std::unique_ptr< const Chi2MeasurementEstimator > theEstimator
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
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
edm::ESHandle< TransientTrackingRecHitBuilder > theTTRHBuilder
std::vector< SimTrack > SimTrackContainer
void setEvent(const edm::Event &)
set an event
virtual const TrackerGeomDet * idToDet(DetId) const
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
unsigned long long theCacheId_TG
std::unique_ptr< MuonErrorMatrix > theErrorMatrixAdjuster