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 
42 
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 {
49  theCategory = "FastSimulation|Muons||FastTSGFromPropagation";
50 
51 }
52 
53 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)
54 {
55  theCategory = "FastSimulation|Muons|FastTSGFromPropagation";
56 }
57 
59 {
60 
61  LogTrace(theCategory) << " FastTSGFromPropagation dtor called ";
62  if ( theNavigation ) delete theNavigation;
63  if ( theUpdator ) delete theUpdator;
64  if ( theEstimator ) delete theEstimator;
67 
68 }
69 
70 void FastTSGFromPropagation::trackerSeeds(const TrackCand& staMuon, const TrackingRegion& region, std::vector<TrajectorySeed> & result) {
71 
72  if ( theResetMethod == "discrete" ) getRescalingFactor(staMuon);
73 
74  TrajectoryStateOnSurface staState = outerTkState(staMuon);
75 
76  if ( !staState.isValid() ) {
77  LogTrace(theCategory) << "Error: initial state from L2 muon is invalid.";
78  return;
79  }
80 
81  LogTrace(theCategory) << "begin of trackerSeed:\n staState pos: "<<staState.globalPosition()
82  << " mom: "<<staState.globalMomentum()
83  <<"pos eta: "<<staState.globalPosition().eta()
84  <<"mom eta: "<<staState.globalMomentum().eta();
85 
86 
87  std::vector<const DetLayer*> nls = theNavigation->compatibleLayers(*(staState.freeState()), oppositeToMomentum);
88 
89  LogTrace(theCategory) << " compatible layers: "<<nls.size();
90 
91  if ( nls.empty() ) return;
92 
93  int ndesLayer = 0;
94 
95  bool usePredictedState = false;
96 
97  if ( theUpdateStateFlag ) { //use updated states
98  std::vector<TrajectoryMeasurement> alltm;
99 
100  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
101  inl != nls.end(); inl++, ndesLayer++ ) {
102  if ( (*inl == 0) ) break;
103 // if ( (inl != nls.end()-1 ) && ( (*inl)->subDetector() == GeomDetEnumerators::TEC ) && ( (*(inl+1))->subDetector() == GeomDetEnumerators::TOB ) ) continue;
104  alltm = findMeasurements_new(*inl, staState);
105  if ( (!alltm.empty()) ) {
106  LogTrace(theCategory) << "final compatible layer: "<<ndesLayer;
107  break;
108  }
109  }
110 
111  if ( alltm.empty() ) {
112  LogTrace(theCategory) << " NO Measurements Found: eta: "<<staState.globalPosition().eta() <<"pt "<<staState.globalMomentum().perp();
113  usePredictedState = true;
114  } else {
115  LogTrace(theCategory) << " Measurements for seeds: "<<alltm.size();
116  std::stable_sort(alltm.begin(),alltm.end(),increasingEstimate());
117  if ( alltm.size() > 5 ) alltm.erase(alltm.begin() + 5, alltm.end());
118 
119  const edm::SimTrackContainer* simTracks = &(*theSimTracks);
120  const std::vector<unsigned> theSimTrackIds = theGSRecHits->ids();
121  TrackerRecHit theSeedHits;
122  std::vector<TrackerRecHit> outerHits;
123 
124  //std::vector<TrajectorySeed> tmpTS;
125  bool isMatch = false;
126  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
127  const TrajectoryStateOnSurface seedState = itm->predictedState();
128  double preY = seedState.globalPosition().y();
129 
130  // Check SimTrack
131  TrackingRecHit* aTrackingRecHit;
132  FreeTrajectoryState simtrack_trackerstate;
133  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
134  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
135  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
136  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
137  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
139 
141  simtrack.trackerSurfacePosition().y(),
142  simtrack.trackerSurfacePosition().z());
143  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
144  simtrack.trackerSurfaceMomentum().y(),
145  simtrack.trackerSurfaceMomentum().z());
146  int charge = (int)simtrack.charge();
147  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
148  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
149 
150  unsigned int outerId = 0;
151  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
152  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry);
153  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
154  if( preY < 0 ) {
155  if( id > outerId ) outerId = id;
156  }
157  else {
158  if( id > outerId ) outerId = id;
159  }
160  }
161  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
162  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry);
163  if( itm->recHit()->hit()->geographicalId().rawId() == theSeedHits.hit()->geographicalId().rawId() ) {
164  aTrackingRecHit = theSeedHits.hit()->clone();
165  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
166  if( !recHit ) continue;
167  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
168  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
170  container.push_back(recHit->hit()->clone());
171  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
172  // check direction
173  const BasicTrajectorySeed* aSeed = &ts;
174  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
175 
176  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
177  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
178  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
179  result.push_back(ts);
180  isMatch = true;
181  }
182  }
183  }
184  }
185  }
186  if( !isMatch ) {
187  // if there is no hits w.r.t. TM, find outermost hit
188  for (std::vector<TrajectoryMeasurement>::const_iterator itm = alltm.begin(); itm != alltm.end(); itm++) {
189  const TrajectoryStateOnSurface seedState = itm->predictedState();
190  double preY = seedState.globalPosition().y();
191 
192  // Check SimTrack
193  TrackingRecHit* aTrackingRecHit;
194  FreeTrajectoryState simtrack_trackerstate;
195  for( unsigned tkId=0; tkId != theSimTrackIds.size(); ++tkId ) {
196  const SimTrack & simtrack = (*simTracks)[theSimTrackIds[tkId]];
197  SiTrackerGSMatchedRecHit2DCollection::range theRecHitRange = theGSRecHits->get(theSimTrackIds[tkId]);
198  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorBegin = theRecHitRange.first;
199  SiTrackerGSMatchedRecHit2DCollection::const_iterator theRecHitRangeIteratorEnd = theRecHitRange.second;
201 
203  simtrack.trackerSurfacePosition().y(),
204  simtrack.trackerSurfacePosition().z());
205  GlobalVector momentum(simtrack.trackerSurfaceMomentum().x(),
206  simtrack.trackerSurfaceMomentum().y(),
207  simtrack.trackerSurfaceMomentum().z());
208  int charge = (int)simtrack.charge();
209  GlobalTrajectoryParameters glb_parameters(position, momentum, charge, &*theService->magneticField().product());
210  simtrack_trackerstate = FreeTrajectoryState(glb_parameters);
211 
212  unsigned int outerId = 0;
213  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
214  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry);
215  unsigned int id = theSeedHits.hit()->geographicalId().rawId();
216  if( preY < 0 ) {
217  if( id > outerId ) outerId = id;
218  }
219  else {
220  if( id > outerId ) outerId = id;
221  }
222  }
223  for( iterRecHit = theRecHitRangeIteratorBegin; iterRecHit != theRecHitRangeIteratorEnd; ++iterRecHit) {
224  theSeedHits = TrackerRecHit(&(*iterRecHit), theGeometry);
225  if( outerId == theSeedHits.hit()->geographicalId().rawId() ) {
226  aTrackingRecHit = theSeedHits.hit()->clone();
227  TransientTrackingRecHit::ConstRecHitPointer recHit = theTTRHBuilder->build(aTrackingRecHit);
228  if( !recHit ) continue;
229  TrajectoryStateOnSurface updatedTSOS = updator()->update(seedState, *(recHit));
230  if( updatedTSOS.isValid() && passSelection(updatedTSOS) ) {
232  container.push_back(recHit->hit()->clone());
233  TrajectorySeed ts = createSeed(updatedTSOS, container, recHit->geographicalId());
234  // check direction
235  const BasicTrajectorySeed* aSeed = &ts;
236  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
237 
238  const GeomDet *g = theGeometry->idToDet(PTSOD.detId());
239  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
240  if( tsos.globalMomentum().basicVector()*seedState.globalMomentum().basicVector() < 0. ) continue;
241  result.push_back(ts);
242  }
243  }
244  }
245  }
246  }
247  }
248 
249  /*
250  for( unsigned ir = 0; ir < tmpTS.size(); ir++ ) {
251  const BasicTrajectorySeed* aSeed = &((tmpTS)[ir]);
252  PTrajectoryStateOnDet PTSOD = aSeed->startingState();
253 
254  DetId seedDetId(PTSOD.detId());
255  const GeomDet * g = theGeometry->idToDet(seedDetId);
256  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState(PTSOD, &(g->surface()), &*theService->magneticField().product());
257  cout << "tsos3 = " << tsos.globalMomentum() << endl;
258  if( _index == ir ) {
259  cout << "tsos4 = " << tsos.globalMomentum() << endl;
260  result.push_back(tmpTS[ir]);
261  }
262  }
263  */
264  LogTrace(theCategory) << "result: "<<result.size();
265  return;
266  }
267  }
268 
269  if ( !theUpdateStateFlag || usePredictedState ) { //use predicted states
270  LogTrace(theCategory) << "use predicted state: ";
271  for (std::vector<const DetLayer*>::const_iterator inl = nls.begin();
272  inl != nls.end(); inl++ ) {
273 
274  if ( !result.empty() || *inl == 0 ) {
275  break;
276  }
277  std::vector<DetLayer::DetWithState> compatDets = (*inl)->compatibleDets(staState, *propagator(), *estimator());
278  LogTrace(theCategory) << " compatDets "<<compatDets.size();
279  if ( compatDets.empty() ) continue;
280  TrajectorySeed ts = createSeed(compatDets.front().second, compatDets.front().first->geographicalId());
281  result.push_back(ts);
282 
283  }
284  LogTrace(theCategory) << "result: "<<result.size();
285  return;
286  }
287  return;
288 }
289 
291 
292  theMaxChi2 = theConfig.getParameter<double>("MaxChi2");
293 
294  theFixedErrorRescaling = theConfig.getParameter<double>("ErrorRescaling");
295 
296  theFlexErrorRescaling = 1.0;
297 
298  theResetMethod = theConfig.getParameter<std::string>("ResetMethod");
299 
300  if (theResetMethod != "discrete" && theResetMethod != "fixed" && theResetMethod != "matrix" ) {
301  edm::LogError("FastTSGFromPropagation")
302  <<"Wrong error rescaling method: "<<theResetMethod <<"\n"
303  <<"Possible choices are: discrete, fixed, matrix.\n"
304  <<"Use discrete method" <<std::endl;
305  theResetMethod = "discrete";
306  }
307 
309 
310  theCacheId_MT = 0;
311 
312  theCacheId_TG = 0;
313 
314  thePropagatorName = theConfig.getParameter<std::string>("Propagator");
315 
316  theService = service;
317 
318  theUseVertexStateFlag = theConfig.getParameter<bool>("UseVertexState");
319 
320  theUpdateStateFlag = theConfig.getParameter<bool>("UpdateState");
321 
322  theSelectStateFlag = theConfig.getParameter<bool>("SelectState");
323 
324  theSimTrackCollectionLabel = theConfig.getParameter<edm::InputTag>("SimTrackCollectionLabel");
326 
327  theUpdator = new KFUpdator();
328 
329  theSigmaZ = theConfig.getParameter<double>("SigmaZ");
330 
331  edm::ParameterSet errorMatrixPset = theConfig.getParameter<edm::ParameterSet>("errorMatrixPset");
332  if ( theResetMethod == "matrix" && !errorMatrixPset.empty()){
333  theAdjustAtIp = errorMatrixPset.getParameter<bool>("atIP");
334  theErrorMatrixAdjuster = new MuonErrorMatrix(errorMatrixPset);
335  } else {
336  theAdjustAtIp =false;
338  }
339 
340  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
342 
344  theService->eventSetup().get<TrackerDigiGeometryRecord>().get(geometry);
345  theGeometry = &(*geometry);
346 
347  theService->eventSetup().get<TransientRecHitRecord>().get("WithTrackAngle", theTTRHBuilder);
348 
349 }
350 
352 
353  bool measTrackerChanged = false;
354 
355  iEvent.getByType(theBeamSpot);
356 
357  // retrieve the MC truth (SimTracks)
360 
361 
362  unsigned long long newCacheId_MT = theService->eventSetup().get<CkfComponentsRecord>().cacheIdentifier();
363 
364  if ( theUpdateStateFlag && newCacheId_MT != theCacheId_MT ) {
365  LogTrace(theCategory) << "Measurment Tracker Geometry changed!";
366  theCacheId_MT = newCacheId_MT;
367  theService->eventSetup().get<CkfComponentsRecord>().get(theMeasTracker);
368  measTrackerChanged = true;
369  }
370 
371  //if ( theUpdateStateFlag ) theMeasTracker->update(iEvent);
372 
373  if ( measTrackerChanged && (&*theMeasTracker) ) {
376  }
377 
378  bool trackerGeomChanged = false;
379 
380  unsigned long long newCacheId_TG = theService->eventSetup().get<TrackerRecoGeometryRecord>().cacheIdentifier();
381 
382  if ( newCacheId_TG != theCacheId_TG ) {
383  LogTrace(theCategory) << "Tracker Reco Geometry changed!";
384  theCacheId_TG = newCacheId_TG;
385  theService->eventSetup().get<TrackerRecoGeometryRecord>().get(theTracker);
386  trackerGeomChanged = true;
387  }
388 
389  if ( trackerGeomChanged && (&*theTracker) ) {
390  if ( theNavigation ) delete theNavigation;
392  }
393 }
394 
396 
397  TrajectoryStateOnSurface innerTS;
398 
399  if ( staMuon.first && staMuon.first->isValid() ) {
400  if (staMuon.first->direction() == alongMomentum) {
401  innerTS = staMuon.first->firstMeasurement().updatedState();
402  }
403  else if (staMuon.first->direction() == oppositeToMomentum) {
404  innerTS = staMuon.first->lastMeasurement().updatedState();
405  }
406  } else {
407  innerTS = trajectoryStateTransform::innerStateOnSurface(*(staMuon.second),*theService->trackingGeometry(), &*theService->magneticField());
408  }
409  //rescale the error
410  adjust(innerTS);
411 
412  return innerTS;
413 
414 }
415 
417 
419 
420  if ( theUseVertexStateFlag && staMuon.second->pt() > 1.0 ) {
421  FreeTrajectoryState iniState = trajectoryStateTransform::initialFreeState(*(staMuon.second), &*theService->magneticField());
422  //rescale the error at IP
423  adjust(iniState);
424 
425  StateOnTrackerBound fromInside(&*(theService->propagator("PropagatorWithMaterial")));
426  result = fromInside(iniState);
427  } else {
428  StateOnTrackerBound fromOutside(&*propagator());
429  result = fromOutside(innerState(staMuon));
430  }
431  return result;
432 }
433 
435 
437  return createSeed(tsos, container, id);
438 
439 }
440 
442 
444  return TrajectorySeed(seedTSOS,container,oppositeToMomentum);
445 
446 }
447 
448 
449 void FastTSGFromPropagation::validMeasurements(std::vector<TrajectoryMeasurement>& tms) const {
450 
451  std::vector<TrajectoryMeasurement>::iterator tmsend = std::remove_if(tms.begin(), tms.end(), isInvalid());
452  tms.erase(tmsend, tms.end());
453  return;
454 
455 }
456 
457 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements_new(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
458 
459  std::vector<TrajectoryMeasurement> result;
460 
461  std::vector<DetLayer::DetWithState> compatDets = nl->compatibleDets(staState, *propagator(), *estimator());
462  if ( compatDets.empty() ) return result;
463 
464  for (std::vector<DetLayer::DetWithState>::const_iterator idws = compatDets.begin(); idws != compatDets.end(); ++idws) {
465  if ( idws->second.isValid() && (idws->first) ) {
466  std::vector<TrajectoryMeasurement> tmptm =
467  theMeasTracker->idToDet(idws->first->geographicalId())->fastMeasurements(idws->second, idws->second, *propagator(), *estimator());
468  //validMeasurements(tmptm);
469 // if ( tmptm.size() > 2 ) {
470 // std::stable_sort(tmptm.begin(),tmptm.end(),increasingEstimate());
471 // result.insert(result.end(),tmptm.begin(), tmptm.begin()+2);
472 // } else {
473  result.insert(result.end(),tmptm.begin(), tmptm.end());
474 // }
475  }
476  }
477 
478  return result;
479 
480 }
481 
482 std::vector<TrajectoryMeasurement> FastTSGFromPropagation::findMeasurements(const DetLayer* nl, const TrajectoryStateOnSurface& staState) const {
483 
484  std::vector<TrajectoryMeasurement> result = tkLayerMeasurements()->measurements((*nl), staState, *propagator(), *estimator());
485  validMeasurements(result);
486  return result;
487 }
488 
490  if ( !theSelectStateFlag ) return true;
491  else {
492  if ( theBeamSpot.isValid() ) {
493  return ( ( fabs(zDis(tsos) - theBeamSpot->z0() ) < theSigmaZ) );
494 
495  } else {
496  return ( ( fabs(zDis(tsos)) < theSigmaZ) );
497 // double theDxyCut = 100;
498 // return ( (zDis(tsos) < theSigmaZ) && (dxyDis(tsos) < theDxyCut) );
499  }
500  }
501 
502 }
503 
505  return fabs(( - tsos.globalPosition().x() * tsos.globalMomentum().y() + tsos.globalPosition().y() * tsos.globalMomentum().x() )/tsos.globalMomentum().perp());
506 }
507 
509  return tsos.globalPosition().z() - tsos.globalPosition().perp() * tsos.globalMomentum().z()/tsos.globalMomentum().perp();
510 }
511 
513  float pt = (staMuon.second)->pt();
514  if ( pt < 13.0 ) theFlexErrorRescaling = 3;
515  else if ( pt < 30.0 ) theFlexErrorRescaling = 5;
516  else theFlexErrorRescaling = 10;
517  return;
518 }
519 
520 
522 
523  //rescale the error
524  if ( theResetMethod == "discreate" ) {
526  return;
527  }
528 
529  //rescale the error
530  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
532  return;
533  }
534 
536  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.momentum());//FIXME with position
537  MuonErrorMatrix::multiply(oMat, sfMat);
538 
539  state = FreeTrajectoryState(state.parameters(),
540  oMat);
541 }
542 
544 
545  //rescale the error
546  if ( theResetMethod == "discreate" ) {
548  return;
549  }
550 
551  if ( theResetMethod == "fixed" || !theErrorMatrixAdjuster) {
553  return;
554  }
555 
557  CurvilinearTrajectoryError sfMat = theErrorMatrixAdjuster->get(state.globalMomentum());//FIXME with position
558  MuonErrorMatrix::multiply(oMat, sfMat);
559 
561  oMat,
562  state.surface(),
563  state.surfaceSide(),
564  state.weight());
565 }
566 
568  unsigned int detid,
569  PTrajectoryStateOnDet& pts) const
570 {
571  const AlgebraicSymMatrix55& m = ts.localError().matrix();
572  int dim = 5;
573  float localErrors[15];
574  int k = 0;
575  for (int i=0; i<dim; ++i) {
576  for (int j=0; j<=i; ++j) {
577  localErrors[k++] = m(i,j);
578  }
579  }
580  int surfaceSide = static_cast<int>(ts.surfaceSide());
582  localErrors, detid,
583  surfaceSide);
584 }
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:71
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:62
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...
bool getByType(Handle< PROD > &result) const
Definition: Event.h:398
const MuonServiceProxy * theService
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
float charge() const
charge
Definition: CoreSimTrack.cc:3
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
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
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:63
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:356
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.
void trackerSeeds(const TrackCand &, const TrackingRegion &, std::vector< TrajectorySeed > &)
generate seed(s) for a track
char state
Definition: procUtils.cc:75
T eta() const
Definition: PV3DBase.h:75
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
edm::InputTag theSimTrackCollectionLabel
const LayerMeasurements * theTkLayerMeasurements
ESHandle< TrackerGeometry > geometry
GlobalVector globalMomentum() const
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
static int position[264][3]
Definition: ReadPGInfo.cc:509
const Surface & surface() 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
T x() const
Definition: PV3DBase.h:61
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