CMS 3D CMS Logo

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

#include <TSGForRoadSearch.h>

Inheritance diagram for TSGForRoadSearch:
TrackerSeedGenerator

Public Types

typedef std::vector< TrajectorySeedBTSeedCollection
 
typedef std::pair< const Trajectory *, reco::TrackRefTrackCand
 
- Public Types inherited from TrackerSeedGenerator
typedef std::vector< TrajectorySeedBTSeedCollection
 
typedef std::pair< const Trajectory *, reco::TrackRefTrackCand
 

Public Member Functions

void init (const MuonServiceProxy *service) override
 initialize the service More...
 
void setEvent (const edm::Event &event) override
 set the event: update the MeasurementTracker More...
 
void trackerSeeds (const TrackCand &, const TrackingRegion &, const TrackerTopology *, BTSeedCollection &) override
 generated seed(s) for a track. the tracking region is not used. More...
 
 TSGForRoadSearch (const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
 
 ~TSGForRoadSearch () override
 
- Public Member Functions inherited from TrackerSeedGenerator
const edm::EventgetEvent () const
 
 TrackerSeedGenerator ()
 
virtual ~TrackerSeedGenerator ()
 destructor More...
 

Private Member Functions

bool IPfts (const reco::Track &, FreeTrajectoryState &)
 get the FTS for a Track: adjusting the error matrix if requested More...
 
void makeSeeds_0 (const reco::Track &, std::vector< TrajectorySeed > &)
 oseed from inside-out: innermost Strip layer More...
 
void makeSeeds_1 (const reco::Track &, std::vector< TrajectorySeed > &)
 not implemented More...
 
void makeSeeds_2 (const reco::Track &, std::vector< TrajectorySeed > &)
 not implemented More...
 
void makeSeeds_3 (const reco::Track &, std::vector< TrajectorySeed > &)
 outside-in: outermost Strip layer More...
 
void makeSeeds_4 (const reco::Track &, std::vector< TrajectorySeed > &)
 inside-out: innermost Pixel/Strip layer More...
 
bool notAtIPtsos (TrajectoryStateOnSurface &state)
 make the adjustement away from PCA state if requested More...
 
void pushTrajectorySeed (const reco::Track &muon, std::vector< DetLayer::DetWithState > &compatible, PropagationDirection direction, std::vector< TrajectorySeed > &result) const
 add the seed(s) to the collection of seeds More...
 

Private Attributes

bool theAdjustAtIp
 adjust the state at IP or where it is defined for the seed More...
 
std::string theCategory
 
Chi2MeasurementEstimatortheChi2Estimator
 
edm::ParameterSet theConfig
 
bool theCopyMuonRecHit
 
MuonErrorMatrixtheErrorMatrixAdjuster
 
edm::ESHandle< GeometricSearchTrackertheGeometricSearchTracker
 
bool theManySeeds
 
edm::ESHandle< MeasurementTrackertheMeasurementTracker
 
const MeasurementTrackerEventtheMeasurementTrackerEvent
 
edm::InputTag theMeasurementTrackerEventTag
 
edm::EDGetTokenT< MeasurementTrackerEventtheMeasurementTrackerEventToken
 
unsigned int theOption
 
edm::ESHandle< PropagatortheProp
 
std::string thePropagatorCompatibleName
 
std::string thePropagatorName
 
edm::ESHandle< PropagatorthePropCompatible
 
const MuonServiceProxytheProxyService
 
TrajectoryStateUpdatortheUpdator
 

Additional Inherited Members

- Protected Attributes inherited from TrackerSeedGenerator
const edm::EventtheEvent
 
const MuonServiceProxytheProxyService
 

Detailed Description

Description: this class generates hit-less TrajectorySeed from a given Track. the original error matrix of the Track is adjusted (configurable). this class is principally used for muon HLT. for options are available:

regular operation is one seed per track, but optionnaly, more than one seed can be madefor one track.

Author
Jean-Roch Vlimant

Definition at line 45 of file TSGForRoadSearch.h.

Member Typedef Documentation

◆ BTSeedCollection

Definition at line 47 of file TSGForRoadSearch.h.

◆ TrackCand

Definition at line 48 of file TSGForRoadSearch.h.

Constructor & Destructor Documentation

◆ TSGForRoadSearch()

TSGForRoadSearch::TSGForRoadSearch ( const edm::ParameterSet pset,
edm::ConsumesCollector IC 
)

Definition at line 26 of file TSGForRoadSearch.cc.

26  {
27  theOption = par.getParameter<unsigned int>("option");
28  theCopyMuonRecHit = par.getParameter<bool>("copyMuonRecHit");
29 
30  double Chi2 = par.getParameter<double>("maxChi2");
32 
33  thePropagatorName = par.getParameter<std::string>("propagatorName");
34  thePropagatorCompatibleName = par.getParameter<std::string>("propagatorCompatibleName");
35 
36  theCategory = "TSGForRoadSearch|TrackerSeedGenerator";
37 
38  theManySeeds = par.getParameter<bool>("manySeeds");
39  if (theManySeeds) {
40  theUpdator = new KFUpdator();
41  } else {
42  theUpdator = nullptr;
43  }
44 
45  edm::ParameterSet errorMatrixPset = par.getParameter<edm::ParameterSet>("errorMatrixPset");
46  if (!errorMatrixPset.empty()) {
47  theAdjustAtIp = errorMatrixPset.getParameter<bool>("atIP");
49  } else {
50  theAdjustAtIp = false;
51  theErrorMatrixAdjuster = nullptr;
52  }
53 
54  theMeasurementTrackerEventTag = par.getParameter<edm::InputTag>("MeasurementTrackerEvent");
56 
58 }

References Chi2MeasurementEstimator_cfi::Chi2MeasurementEstimator, edm::ConsumesCollector::consumes(), HLT_FULL_cff::errorMatrixPset, edm::ParameterSet::getParameter(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, theAdjustAtIp, theCategory, theChi2Estimator, theCopyMuonRecHit, theErrorMatrixAdjuster, theManySeeds, theMeasurementTrackerEvent, theMeasurementTrackerEventTag, theMeasurementTrackerEventToken, theOption, thePropagatorCompatibleName, thePropagatorName, and theUpdator.

◆ ~TSGForRoadSearch()

TSGForRoadSearch::~TSGForRoadSearch ( )
override

Definition at line 60 of file TSGForRoadSearch.cc.

60  {
61  delete theChi2Estimator;
62  if (theUpdator)
63  delete theUpdator;
66 }

References theChi2Estimator, theErrorMatrixAdjuster, and theUpdator.

Member Function Documentation

◆ init()

void TSGForRoadSearch::init ( const MuonServiceProxy service)
overridevirtual

initialize the service

Reimplemented from TrackerSeedGenerator.

Definition at line 68 of file TSGForRoadSearch.cc.

References theProxyService.

◆ IPfts()

bool TSGForRoadSearch::IPfts ( const reco::Track muon,
FreeTrajectoryState fts 
)
private

get the FTS for a Track: adjusting the error matrix if requested

Definition at line 117 of file TSGForRoadSearch.cc.

117  {
119  LogDebug(theCategory) << "pure L2 state: " << fts;
120  if (fts.position().mag() == 0 && fts.momentum().mag() == 0) {
121  edm::LogError(theCategory) << "initial state of muon is (0,0,0)(0,0,0). no seed.";
122  return false;
123  }
124 
125  //rescale the error at IP
128  LogDebug(theCategory) << "after adjusting the error matrix: " << fts;
129  }
130 
131  return true;
132 }

References MuonErrorMatrix::adjust(), trajectoryStateTransform::initialFreeState(), LogDebug, MuonServiceProxy::magneticField(), theAdjustAtIp, theCategory, theErrorMatrixAdjuster, and theProxyService.

Referenced by makeSeeds_0(), makeSeeds_3(), and makeSeeds_4().

◆ makeSeeds_0()

void TSGForRoadSearch::makeSeeds_0 ( const reco::Track muon,
std::vector< TrajectorySeed > &  result 
)
private

oseed from inside-out: innermost Strip layer

Definition at line 137 of file TSGForRoadSearch.cc.

137  {
138  //get the state at IP
139  FreeTrajectoryState cIPFTS;
140  if (!IPfts(muon, cIPFTS))
141  return;
142 
143  //take state at inner surface and check the first part reached
144  const std::vector<const BarrelDetLayer *> &blc = theGeometricSearchTracker->tibLayers();
146  theProxyService->propagator(thePropagatorName)->propagate(cIPFTS, blc.front()->surface());
147  if (!inner.isValid()) {
148  LogDebug(theCategory) << "inner state is not valid. no seed.";
149  return;
150  }
151 
152  //rescale the error
153  if (!notAtIPtsos(inner))
154  return;
155 
156  double z = inner.globalPosition().z();
157 
158  const std::vector<const ForwardDetLayer *> &ptidc = theGeometricSearchTracker->posTidLayers();
159  const std::vector<const ForwardDetLayer *> &ptecc = theGeometricSearchTracker->posTecLayers();
160  const std::vector<const ForwardDetLayer *> &ntidc = theGeometricSearchTracker->negTidLayers();
161  const std::vector<const ForwardDetLayer *> &ntecc = theGeometricSearchTracker->negTecLayers();
162 
163  const DetLayer *inLayer = nullptr;
164  if (fabs(z) < ptidc.front()->surface().position().z()) {
165  inLayer = blc.front();
166  } else if (fabs(z) < ptecc.front()->surface().position().z()) {
167  inLayer = (z < 0) ? ntidc.front() : ptidc.front();
168  } else {
169  inLayer = (z < 0) ? ntecc.front() : ptecc.front();
170  }
171 
172  //find out at least one compatible detector reached
173  std::vector<DetLayer::DetWithState> compatible;
174  compatible.reserve(10);
175  inLayer->compatibleDetsV(
177 
178  //loop the parts until at least a compatible is found
179  while (compatible.empty()) {
180  switch (GeomDetEnumerators::subDetGeom[inLayer->subDetector()]) {
185  LogDebug(theCategory) << "from inside-out, trying TEC or TOB layers. no seed.";
186  return;
187  break;
189  inLayer = (z < 0) ? ntidc.front() : ptidc.front();
190  break;
192  inLayer = (z < 0) ? ntecc.front() : ptecc.front();
193  break;
194  default:
195  LogDebug(theCategory) << "subdetectorid is not a tracker sub-dectector id. skipping.";
196  return;
197  }
198  inLayer->compatibleDetsV(
200  }
201 
203 
204  return;
205 }

References alongMomentum, GeometricSearchDet::compatibleDetsV(), SurfaceOrientation::inner, IPfts(), LogDebug, GeometricSearchTracker::negTecLayers(), GeometricSearchTracker::negTidLayers(), notAtIPtsos(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GeometricSearchTracker::posTecLayers(), GeometricSearchTracker::posTidLayers(), Propagator::propagate(), MuonServiceProxy::propagator(), pushTrajectorySeed(), mps_fire::result, DetLayer::subDetector(), GeomDetEnumerators::subDetGeom, GeomDetEnumerators::TEC, theCategory, theChi2Estimator, theGeometricSearchTracker, thePropagatorCompatibleName, thePropagatorName, theProxyService, GeomDetEnumerators::TIB, GeometricSearchTracker::tibLayers(), GeomDetEnumerators::TID, GeomDetEnumerators::TOB, and z.

Referenced by makeSeeds_4(), and trackerSeeds().

◆ makeSeeds_1()

void TSGForRoadSearch::makeSeeds_1 ( const reco::Track muon,
std::vector< TrajectorySeed > &  result 
)
private

not implemented

Definition at line 207 of file TSGForRoadSearch.cc.

207  {
208  edm::LogError(theCategory) << "option 1 of TSGForRoadSearch is not implemented yet. Please use 0,3 or 4. no seed.";
209  return;
210 }

References theCategory.

Referenced by trackerSeeds().

◆ makeSeeds_2()

void TSGForRoadSearch::makeSeeds_2 ( const reco::Track muon,
std::vector< TrajectorySeed > &  result 
)
private

not implemented

Definition at line 212 of file TSGForRoadSearch.cc.

212  {
213  edm::LogError(theCategory) << "option 2 of TSGForRoadSearch is not implemented yet. Please use 0,3 or 4. no seed.";
214  return;
215 }

References theCategory.

Referenced by trackerSeeds().

◆ makeSeeds_3()

void TSGForRoadSearch::makeSeeds_3 ( const reco::Track muon,
std::vector< TrajectorySeed > &  result 
)
private

outside-in: outermost Strip layer

Definition at line 220 of file TSGForRoadSearch.cc.

220  {
221  //get the state at IP
222  FreeTrajectoryState cIPFTS;
223  if (!IPfts(muon, cIPFTS))
224  return;
225 
226  //take state at outer surface and check the first part reached
227  const std::vector<const BarrelDetLayer *> &blc = theGeometricSearchTracker->tobLayers();
228 
229  // TrajectoryStateOnSurface outer = theProxyService->propagator(thePropagatorName)->propagate(cIPFTS,blc.back()->surface());
231  TrajectoryStateOnSurface outer = onBounds(cIPFTS);
232 
233  if (!outer.isValid()) {
234  LogDebug(theCategory) << "outer state is not valid. no seed.";
235  return;
236  }
237 
238  //rescale the error
239  if (!notAtIPtsos(outer))
240  return;
241 
242  double z = outer.globalPosition().z();
243 
244  const std::vector<const ForwardDetLayer *> &ptecc = theGeometricSearchTracker->posTecLayers();
245  const std::vector<const ForwardDetLayer *> &ntecc = theGeometricSearchTracker->negTecLayers();
246 
247  LogDebug(theCategory) << "starting looking for a compatible layer from: " << outer << "\nz: " << z
248  << "TEC1 z: " << ptecc.front()->surface().position().z();
249 
250  unsigned int layerShift = 0;
251  const DetLayer *inLayer = nullptr;
252  if (fabs(z) < ptecc.front()->surface().position().z()) {
253  inLayer = *(blc.rbegin() + layerShift);
254  LogTrace(theCategory) << "choosing TOB layer with shift: " << layerShift;
255  } else {
256  unsigned int tecIt = 1;
257  for (; tecIt != ptecc.size(); tecIt++) {
258  LogTrace(theCategory) << "checking surface with shift: " << tecIt
259  << "z: " << ptecc[tecIt]->surface().position().z();
260  if (fabs(z) < ptecc[tecIt]->surface().position().z()) {
261  inLayer = (z < 0) ? ntecc[tecIt - 1] : ptecc[tecIt - 1];
262  layerShift = tecIt - 1;
263  LogTrace(theCategory) << "choosing TEC layer with shift: " << layerShift
264  << " and z: " << inLayer->surface().position().z();
265  break;
266  }
267  }
268  if (!inLayer) {
269  inLayer = (z < 0) ? ntecc.back() : ptecc.back();
270  LogTrace(theCategory) << "choosing last TEC layer with z: " << inLayer->surface().position().z();
271  }
272  }
273 
274  //find out at least one compatible detector reached
275  std::vector<DetLayer::DetWithState> compatible;
276  compatible.reserve(10);
277  inLayer->compatibleDetsV(
279 
280  //loop the parts until at least a compatible is found
281  while (compatible.empty()) {
282  switch (GeomDetEnumerators::subDetGeom[inLayer->subDetector()]) {
288  layerShift++;
289  if (layerShift >= blc.size()) {
290  LogDebug(theCategory) << "all barrel layers are exhausted to find starting state. no seed,";
291  return;
292  }
293  inLayer = *(blc.rbegin() + layerShift);
294  break;
296  if (layerShift == 0) {
297  LogDebug(theCategory) << "failed to get a compatible module on a TEC layer, using the last TOB layer.";
298  inLayer = *(blc.rbegin() + layerShift);
299  } else {
300  layerShift--;
301  LogDebug(theCategory) << "reaching more in with layer " << layerShift << " in TEC";
302  inLayer = (z < 0) ? ntecc[layerShift] : ptecc[layerShift];
303  }
304  break;
305  default:
306  edm::LogError(theCategory) << "subdetectorid is not a tracker sub-dectector id. skipping.";
307  return;
308  }
309  inLayer->compatibleDetsV(
311  }
312 
314 
315  return;
316 }

References GeometricSearchDet::compatibleDetsV(), IPfts(), LogDebug, LogTrace, GeometricSearchTracker::negTecLayers(), notAtIPtsos(), oppositeToMomentum, SurfaceOrientation::outer, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, GloballyPositioned< T >::position(), position, GeometricSearchTracker::posTecLayers(), edm::ESHandle< T >::product(), MuonServiceProxy::propagator(), pushTrajectorySeed(), mps_fire::result, DetLayer::subDetector(), GeomDetEnumerators::subDetGeom, GeometricSearchDet::surface(), GeomDetEnumerators::TEC, theCategory, theChi2Estimator, theGeometricSearchTracker, thePropagatorCompatibleName, thePropagatorName, theProxyService, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, GeomDetEnumerators::TOB, GeometricSearchTracker::tobLayers(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by trackerSeeds().

◆ makeSeeds_4()

void TSGForRoadSearch::makeSeeds_4 ( const reco::Track muon,
std::vector< TrajectorySeed > &  result 
)
private

inside-out: innermost Pixel/Strip layer

Definition at line 321 of file TSGForRoadSearch.cc.

321  {
322  //get the state at IP
323  FreeTrajectoryState cIPFTS;
324  if (!IPfts(muon, cIPFTS))
325  return;
326 
327  //take state at inner surface and check the first part reached
328  const std::vector<const BarrelDetLayer *> &blc = theGeometricSearchTracker->pixelBarrelLayers();
329  if (blc.empty()) {
330  edm::LogError(theCategory) << "want to start from pixel layer, but no barrel exists. trying without pixel.";
332  return;
333  }
334 
336  theProxyService->propagator(thePropagatorName)->propagate(cIPFTS, blc.front()->surface());
337  if (!inner.isValid()) {
338  LogDebug(theCategory) << "inner state is not valid. no seed.";
339  return;
340  }
341 
342  //rescale the error
343  if (!notAtIPtsos(inner))
344  return;
345 
346  double z = inner.globalPosition().z();
347 
348  const std::vector<const ForwardDetLayer *> &ppxlc = theGeometricSearchTracker->posPixelForwardLayers();
349  const std::vector<const ForwardDetLayer *> &npxlc = theGeometricSearchTracker->negPixelForwardLayers();
350  const std::vector<const ForwardDetLayer *> &ptidc = theGeometricSearchTracker->posTidLayers();
351  const std::vector<const ForwardDetLayer *> &ptecc = theGeometricSearchTracker->posTecLayers();
352  const std::vector<const ForwardDetLayer *> &ntidc = theGeometricSearchTracker->negTidLayers();
353  const std::vector<const ForwardDetLayer *> &ntecc = theGeometricSearchTracker->negTecLayers();
354 
355  if ((ppxlc.empty() || npxlc.empty()) && (ptidc.empty() || ptecc.empty())) {
356  edm::LogError(theCategory) << "want to start from pixel layer, but no forward layer exists. trying without pixel.";
358  return;
359  }
360 
361  const DetLayer *inLayer = nullptr;
362  std::vector<const ForwardDetLayer *>::const_iterator layerIt;
363 
364  double fz = fabs(z);
365 
366  //simple way of finding a first layer to try out
367  if (fz < fabs(((z > 0) ? ppxlc : npxlc).front()->surface().position().z())) {
368  inLayer = blc.front();
369  } else if (fz < fabs(((z > 0) ? ppxlc : npxlc).back()->surface().position().z())) {
370  layerIt = ((z > 0) ? ppxlc : npxlc).begin();
371  inLayer = *layerIt;
372  } else if (fz < fabs(((z > 0) ? ptidc : ntidc).front()->surface().position().z())) {
373  layerIt = ((z > 0) ? ppxlc : npxlc).end() - 1;
374  inLayer = *layerIt;
375  } else if (fz < fabs(((z > 0) ? ptecc : ntecc).front()->surface().position().z())) {
376  layerIt = ((z > 0) ? ptidc : ntidc).begin();
377  inLayer = *layerIt;
378  } else if (fz < fabs(((z > 0) ? ptecc : ntecc).back()->surface().position().z())) {
379  layerIt = ((z > 0) ? ptecc : ntecc).begin();
380  inLayer = *layerIt;
381  } else {
382  edm::LogWarning(theCategory) << "the state is not consistent with any tracker layer:\n" << inner;
383  return;
384  }
385 
386  //find out at least one compatible detector reached
387  std::vector<DetLayer::DetWithState> compatible;
388  compatible.reserve(10);
389  inLayer->compatibleDetsV(
391 
392  //if none were found. you should do something more.
393  if (compatible.empty()) {
394  std::vector<const ForwardDetLayer *>::const_iterator pxlEnd = (z > 0) ? ppxlc.end() : npxlc.end();
395  std::vector<const ForwardDetLayer *>::const_iterator tidEnd = (z > 0) ? ptidc.end() : ntidc.end();
396  std::vector<const ForwardDetLayer *>::const_iterator tecEnd = (z > 0) ? ptecc.end() : ntecc.end();
397  std::vector<const ForwardDetLayer *>::const_iterator pxlBegin = (z > 0) ? ppxlc.begin() : npxlc.begin();
398  std::vector<const ForwardDetLayer *>::const_iterator tidBegin = (z > 0) ? ptidc.begin() : ntidc.begin();
399  std::vector<const ForwardDetLayer *>::const_iterator tecBegin = (z > 0) ? ptecc.begin() : ntecc.begin();
400 
401  //go to first disk if not already in a disk situation
402  if (!dynamic_cast<const ForwardDetLayer *>(inLayer))
403  layerIt = pxlBegin--;
404 
405  while (compatible.empty()) {
406  switch (GeomDetEnumerators::subDetGeom[(*layerIt)->subDetector()]) {
408  layerIt++;
409  //if end of list reached. go to the first TID
410  if (layerIt == pxlEnd)
411  layerIt = tidBegin;
412  break;
413  }
415  layerIt++;
416  //if end of list reached. go to the first TEC
417  if (layerIt == tidEnd)
418  layerIt = tecBegin;
419  break;
420  }
422  layerIt++;
423  if (layerIt == tecEnd) {
424  edm::LogWarning(theCategory) << "ran out of layers to find a seed: no seed.";
425  return;
426  }
427  break;
428  }
431  << "this should not happen... ever. Please report. GeomDetEnumerators::PixelBarrel. no seed.";
432  return;
433  }
436  << "this should not happen... ever. Please report. GeomDetEnumerators::TIB. no seed.";
437  return;
438  }
441  << "this should not happen... ever. Please report. GeomDetEnumerators::TOB. no seed.";
442  return;
443  }
444  default: {
445  edm::LogError(theCategory) << "Subdetector id is not a tracker sub-detector id. no seed.";
446  return;
447  }
448  } //switch
449 
450  (*layerIt)->compatibleDetsV(
452  } //while
453  } //if size==0
454 
456 
457  return;
458 }

References alongMomentum, GeometricSearchDet::compatibleDetsV(), SurfaceOrientation::inner, IPfts(), LogDebug, makeSeeds_0(), GeometricSearchTracker::negPixelForwardLayers(), GeometricSearchTracker::negTecLayers(), GeometricSearchTracker::negTidLayers(), notAtIPtsos(), GeomDetEnumerators::PixelBarrel, GeometricSearchTracker::pixelBarrelLayers(), GeomDetEnumerators::PixelEndcap, position, GeometricSearchTracker::posPixelForwardLayers(), GeometricSearchTracker::posTecLayers(), GeometricSearchTracker::posTidLayers(), Propagator::propagate(), MuonServiceProxy::propagator(), pushTrajectorySeed(), mps_fire::result, GeomDetEnumerators::subDetGeom, GeomDetEnumerators::TEC, theCategory, theChi2Estimator, theGeometricSearchTracker, thePropagatorCompatibleName, thePropagatorName, theProxyService, GeomDetEnumerators::TIB, GeomDetEnumerators::TID, GeomDetEnumerators::TOB, and z.

Referenced by trackerSeeds().

◆ notAtIPtsos()

bool TSGForRoadSearch::notAtIPtsos ( TrajectoryStateOnSurface state)
private

make the adjustement away from PCA state if requested

Definition at line 108 of file TSGForRoadSearch.cc.

108  {
109  LogDebug(theCategory) << "outer state: " << state;
112  LogDebug(theCategory) << "outer state after rescale: " << state;
113  }
114  return true;
115 }

References MuonErrorMatrix::adjust(), LogDebug, theAdjustAtIp, theCategory, and theErrorMatrixAdjuster.

Referenced by makeSeeds_0(), makeSeeds_3(), and makeSeeds_4().

◆ pushTrajectorySeed()

void TSGForRoadSearch::pushTrajectorySeed ( const reco::Track muon,
std::vector< DetLayer::DetWithState > &  compatible,
PropagationDirection  direction,
std::vector< TrajectorySeed > &  result 
) const
private

add the seed(s) to the collection of seeds

Definition at line 463 of file TSGForRoadSearch.cc.

466  {
467  if (compatible.empty()) {
468  LogDebug(theCategory) << "pushTrajectorySeed with no compatible module. 0 seed.";
469  return;
470  }
471 
472  if (theManySeeds) {
473  //finf out every compatible measurements
474  for (std::vector<DetLayer::DetWithState>::iterator DWSit = compatible.begin(); DWSit != compatible.end(); ++DWSit) {
475  bool aBareTS = false;
476  const GeomDet *gd = DWSit->first;
477  if (!gd) {
478  edm::LogError(theCategory) << "GeomDet is not valid.";
479  continue;
480  }
482  std::vector<TrajectoryMeasurement> tmp = md.fastMeasurements(
483  DWSit->second, DWSit->second, *theProxyService->propagator(thePropagatorCompatibleName), *theChi2Estimator);
484  //make a trajectory seed for each of them
485 
486  for (std::vector<TrajectoryMeasurement>::iterator Mit = tmp.begin(); Mit != tmp.end(); ++Mit) {
487  TrajectoryStateOnSurface predState(Mit->predictedState());
490  if (theCopyMuonRecHit) {
491  LogDebug(theCategory) << "copying (" << muon.recHitsSize() << ") muon recHits";
492  //copy the muon rechit into the seed
493  for (trackingRecHit_iterator trit = muon.recHitsBegin(); trit != muon.recHitsEnd(); trit++) {
494  rhContainer.push_back((*trit)->clone());
495  }
496  }
497 
498  if (hit->isValid()) {
499  TrajectoryStateOnSurface upState(theUpdator->update(predState, *hit));
500 
501  PTrajectoryStateOnDet const &PTSOD =
503  LogDebug(theCategory) << "state used to build a trajectory seed: \n"
504  << upState << "on detector: " << gd->geographicalId().rawId();
505  //add the tracking rechit
506  if (theCopyMuonRecHit) {
507  edm::LogError(theCategory) << "not a bare seed and muon hits are copied. dumping the muon hits.";
508  rhContainer.clear();
509  }
510  rhContainer.push_back(hit->hit()->clone());
511 
512  result.push_back(TrajectorySeed(PTSOD, rhContainer, direction));
513  } else {
514  //rec hit is not valid. put a bare TrajectorySeed, only once !
515  if (!aBareTS) {
516  aBareTS = true;
517 
518  PTrajectoryStateOnDet const &PTSOD =
520  LogDebug(theCategory) << "state used to build a bare trajectory seed: \n"
521  << predState << "on detector: " << gd->geographicalId().rawId();
522 
523  result.push_back(TrajectorySeed(PTSOD, rhContainer, direction));
524  }
525  }
526  }
527  }
528  } else {
529  //transform it into a PTrajectoryStateOnDet
530 
532  compatible.front().second, compatible.front().first->geographicalId().rawId());
533  LogDebug(theCategory) << "state used to build a bare trajectory seed: \n"
534  << compatible.front().second
535  << "on detector: " << compatible.front().first->geographicalId().rawId();
536 
538  if (theCopyMuonRecHit) {
539  LogDebug(theCategory) << "copying (" << muon.recHitsSize() << ") muon recHits";
540  //copy the muon rechit into the seed
541  for (trackingRecHit_iterator trit = muon.recHitsBegin(); trit != muon.recHitsEnd(); trit++) {
542  rhContainer.push_back((*trit)->clone());
543  }
544  }
545 
546  //add this seed to the list and return it
547  result.push_back(TrajectorySeed(PTSOD, rhContainer, direction));
548  }
549  return;
550 }

References edm::OwnVector< T, P >::clear(), MeasurementDetWithData::fastMeasurements(), GeomDet::geographicalId(), MeasurementTrackerEvent::idToDet(), LogDebug, trajectoryStateTransform::persistentState(), MuonServiceProxy::propagator(), edm::OwnVector< T, P >::push_back(), DetId::rawId(), mps_fire::result, theCategory, theChi2Estimator, theCopyMuonRecHit, theManySeeds, theMeasurementTrackerEvent, thePropagatorCompatibleName, theProxyService, theUpdator, createJobs::tmp, and TrajectoryStateUpdator::update().

Referenced by makeSeeds_0(), makeSeeds_3(), and makeSeeds_4().

◆ setEvent()

void TSGForRoadSearch::setEvent ( const edm::Event event)
overridevirtual

◆ trackerSeeds()

void TSGForRoadSearch::trackerSeeds ( const TrackCand ,
const TrackingRegion ,
const TrackerTopology ,
BTSeedCollection  
)
overridevirtual

generated seed(s) for a track. the tracking region is not used.

Reimplemented from TrackerSeedGenerator.

Definition at line 85 of file TSGForRoadSearch.cc.

88  {
89  switch (theOption) {
90  case 0:
91  makeSeeds_0(*muonTrackCand.second, result);
92  break;
93  case 1:
94  makeSeeds_1(*muonTrackCand.second, result);
95  break;
96  case 2:
97  makeSeeds_2(*muonTrackCand.second, result);
98  break;
99  case 3:
100  makeSeeds_3(*muonTrackCand.second, result);
101  break;
102  case 4:
103  makeSeeds_4(*muonTrackCand.second, result);
104  break;
105  }
106 }

References makeSeeds_0(), makeSeeds_1(), makeSeeds_2(), makeSeeds_3(), makeSeeds_4(), mps_fire::result, and theOption.

Member Data Documentation

◆ theAdjustAtIp

bool TSGForRoadSearch::theAdjustAtIp
private

adjust the state at IP or where it is defined for the seed

Definition at line 82 of file TSGForRoadSearch.h.

Referenced by IPfts(), notAtIPtsos(), and TSGForRoadSearch().

◆ theCategory

std::string TSGForRoadSearch::theCategory
private

◆ theChi2Estimator

Chi2MeasurementEstimator* TSGForRoadSearch::theChi2Estimator
private

◆ theConfig

edm::ParameterSet TSGForRoadSearch::theConfig
private

Definition at line 89 of file TSGForRoadSearch.h.

◆ theCopyMuonRecHit

bool TSGForRoadSearch::theCopyMuonRecHit
private

Definition at line 102 of file TSGForRoadSearch.h.

Referenced by pushTrajectorySeed(), and TSGForRoadSearch().

◆ theErrorMatrixAdjuster

MuonErrorMatrix* TSGForRoadSearch::theErrorMatrixAdjuster
private

Definition at line 111 of file TSGForRoadSearch.h.

Referenced by IPfts(), notAtIPtsos(), TSGForRoadSearch(), and ~TSGForRoadSearch().

◆ theGeometricSearchTracker

edm::ESHandle<GeometricSearchTracker> TSGForRoadSearch::theGeometricSearchTracker
private

Definition at line 92 of file TSGForRoadSearch.h.

Referenced by makeSeeds_0(), makeSeeds_3(), makeSeeds_4(), and setEvent().

◆ theManySeeds

bool TSGForRoadSearch::theManySeeds
private

Definition at line 103 of file TSGForRoadSearch.h.

Referenced by pushTrajectorySeed(), setEvent(), and TSGForRoadSearch().

◆ theMeasurementTracker

edm::ESHandle<MeasurementTracker> TSGForRoadSearch::theMeasurementTracker
private

Definition at line 91 of file TSGForRoadSearch.h.

Referenced by setEvent().

◆ theMeasurementTrackerEvent

const MeasurementTrackerEvent* TSGForRoadSearch::theMeasurementTrackerEvent
private

Definition at line 96 of file TSGForRoadSearch.h.

Referenced by pushTrajectorySeed(), setEvent(), and TSGForRoadSearch().

◆ theMeasurementTrackerEventTag

edm::InputTag TSGForRoadSearch::theMeasurementTrackerEventTag
private

Definition at line 94 of file TSGForRoadSearch.h.

Referenced by TSGForRoadSearch().

◆ theMeasurementTrackerEventToken

edm::EDGetTokenT<MeasurementTrackerEvent> TSGForRoadSearch::theMeasurementTrackerEventToken
private

Definition at line 95 of file TSGForRoadSearch.h.

Referenced by setEvent(), and TSGForRoadSearch().

◆ theOption

unsigned int TSGForRoadSearch::theOption
private

Definition at line 101 of file TSGForRoadSearch.h.

Referenced by trackerSeeds(), and TSGForRoadSearch().

◆ theProp

edm::ESHandle<Propagator> TSGForRoadSearch::theProp
private

Definition at line 105 of file TSGForRoadSearch.h.

◆ thePropagatorCompatibleName

std::string TSGForRoadSearch::thePropagatorCompatibleName
private

◆ thePropagatorName

std::string TSGForRoadSearch::thePropagatorName
private

Definition at line 104 of file TSGForRoadSearch.h.

Referenced by makeSeeds_0(), makeSeeds_3(), makeSeeds_4(), and TSGForRoadSearch().

◆ thePropCompatible

edm::ESHandle<Propagator> TSGForRoadSearch::thePropCompatible
private

Definition at line 107 of file TSGForRoadSearch.h.

◆ theProxyService

const MuonServiceProxy* TSGForRoadSearch::theProxyService
private

◆ theUpdator

TrajectoryStateUpdator* TSGForRoadSearch::theUpdator
private

Definition at line 98 of file TSGForRoadSearch.h.

Referenced by pushTrajectorySeed(), TSGForRoadSearch(), and ~TSGForRoadSearch().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
TSGForRoadSearch::theOption
unsigned int theOption
Definition: TSGForRoadSearch.h:101
TSGForRoadSearch::makeSeeds_4
void makeSeeds_4(const reco::Track &, std::vector< TrajectorySeed > &)
inside-out: innermost Pixel/Strip layer
Definition: TSGForRoadSearch.cc:321
service
Definition: service.py:1
MeasurementDetWithData::fastMeasurements
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
Definition: MeasurementDetWithData.h:46
GeometricSearchTracker::tobLayers
std::vector< BarrelDetLayer const * > const & tobLayers() const
Definition: GeometricSearchTracker.h:46
GeomDet
Definition: GeomDet.h:27
GeomDetEnumerators::TID
Definition: GeomDetEnumerators.h:15
trajectoryStateTransform::initialFreeState
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:58
GeometricSearchTracker::tibLayers
std::vector< BarrelDetLayer const * > const & tibLayers() const
Definition: GeometricSearchTracker.h:45
DetLayer::subDetector
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel,...
DetLayer
Definition: DetLayer.h:21
muon
Definition: MuonCocktails.h:17
TSGForRoadSearch::notAtIPtsos
bool notAtIPtsos(TrajectoryStateOnSurface &state)
make the adjustement away from PCA state if requested
Definition: TSGForRoadSearch.cc:108
trajectoryStateTransform::persistentState
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
Definition: TrajectoryStateTransform.cc:14
GeomDetEnumerators::TIB
Definition: GeomDetEnumerators.h:13
TSGForRoadSearch::theMeasurementTracker
edm::ESHandle< MeasurementTracker > theMeasurementTracker
Definition: TSGForRoadSearch.h:91
oppositeToMomentum
Definition: PropagationDirection.h:4
GeomDetEnumerators::TOB
Definition: GeomDetEnumerators.h:14
TSGForRoadSearch::makeSeeds_2
void makeSeeds_2(const reco::Track &, std::vector< TrajectorySeed > &)
not implemented
Definition: TSGForRoadSearch.cc:212
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle< MeasurementTrackerEvent >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
TSGForRoadSearch::theAdjustAtIp
bool theAdjustAtIp
adjust the state at IP or where it is defined for the seed
Definition: TSGForRoadSearch.h:82
TSGForRoadSearch::makeSeeds_1
void makeSeeds_1(const reco::Track &, std::vector< TrajectorySeed > &)
not implemented
Definition: TSGForRoadSearch.cc:207
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Chi2
Definition: Chi2.h:15
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
GeometricSearchTracker::posTecLayers
std::vector< ForwardDetLayer const * > const & posTecLayers() const
Definition: GeometricSearchTracker.h:54
SurfaceOrientation::inner
Definition: Surface.h:19
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
TSGForRoadSearch::theCategory
std::string theCategory
Definition: TSGForRoadSearch.h:109
DDAxes::z
Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator_cfi.py:5
GeometricSearchTracker::posTidLayers
std::vector< ForwardDetLayer const * > const & posTidLayers() const
Definition: GeometricSearchTracker.h:53
MeasurementTrackerEvent::idToDet
MeasurementDetWithData idToDet(const DetId &id) const
Previous MeasurementDetSystem interface.
Definition: MeasurementTrackerEvent.h:76
TSGForRoadSearch::thePropagatorName
std::string thePropagatorName
Definition: TSGForRoadSearch.h:104
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MuonServiceProxy::eventSetup
const edm::EventSetup & eventSetup() const
Definition: MuonServiceProxy.h:76
TrajectoryStateUpdator::update
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
MuonErrorMatrix::adjust
void adjust(FreeTrajectoryState &state)
adjust the error matrix on the state
Definition: MuonErrorMatrix.cc:498
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
GeometricSearchTracker::negTecLayers
std::vector< ForwardDetLayer const * > const & negTecLayers() const
Definition: GeometricSearchTracker.h:50
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
edm::ParameterSet
Definition: ParameterSet.h:47
GeometricSearchTracker::posPixelForwardLayers
std::vector< ForwardDetLayer const * > const & posPixelForwardLayers() const
Definition: GeometricSearchTracker.h:52
GeomDetEnumerators::TEC
Definition: GeomDetEnumerators.h:16
GeometricSearchDet::compatibleDetsV
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
Definition: GeometricSearchDet.cc:9
TSGForRoadSearch::theMeasurementTrackerEvent
const MeasurementTrackerEvent * theMeasurementTrackerEvent
Definition: TSGForRoadSearch.h:96
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
TSGForRoadSearch::theMeasurementTrackerEventToken
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventToken
Definition: TSGForRoadSearch.h:95
TSGForRoadSearch::pushTrajectorySeed
void pushTrajectorySeed(const reco::Track &muon, std::vector< DetLayer::DetWithState > &compatible, PropagationDirection direction, std::vector< TrajectorySeed > &result) const
add the seed(s) to the collection of seeds
Definition: TSGForRoadSearch.cc:463
StateOnTrackerBound
Definition: StateOnTrackerBound.h:13
TSGForRoadSearch::theErrorMatrixAdjuster
MuonErrorMatrix * theErrorMatrixAdjuster
Definition: TSGForRoadSearch.h:111
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
TSGForRoadSearch::makeSeeds_3
void makeSeeds_3(const reco::Track &, std::vector< TrajectorySeed > &)
outside-in: outermost Strip layer
Definition: TSGForRoadSearch.cc:220
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
TSGForRoadSearch::theGeometricSearchTracker
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
Definition: TSGForRoadSearch.h:92
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
TSGForRoadSearch::thePropagatorCompatibleName
std::string thePropagatorCompatibleName
Definition: TSGForRoadSearch.h:106
TSGForRoadSearch::theChi2Estimator
Chi2MeasurementEstimator * theChi2Estimator
Definition: TSGForRoadSearch.h:108
MeasurementDetWithData
Definition: MeasurementDetWithData.h:6
TSGForRoadSearch::theMeasurementTrackerEventTag
edm::InputTag theMeasurementTrackerEventTag
Definition: TSGForRoadSearch.h:94
RunInfoPI::state
state
Definition: RunInfoPayloadInspectoHelper.h:16
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
GeometricSearchTracker::negPixelForwardLayers
std::vector< ForwardDetLayer const * > const & negPixelForwardLayers() const
Definition: GeometricSearchTracker.h:48
TrajectoryMeasurement::ConstRecHitPointer
TrackingRecHit::ConstRecHitPointer ConstRecHitPointer
Definition: TrajectoryMeasurement.h:28
TSGForRoadSearch::makeSeeds_0
void makeSeeds_0(const reco::Track &, std::vector< TrajectorySeed > &)
oseed from inside-out: innermost Strip layer
Definition: TSGForRoadSearch.cc:137
GeomDetEnumerators::subDetGeom
constexpr SubDetector subDetGeom[21]
Definition: GeomDetEnumerators.h:40
GeometricSearchDet::surface
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
TrajectorySeed
Definition: TrajectorySeed.h:18
MuonServiceProxy::magneticField
edm::ESHandle< MagneticField > magneticField() const
get the magnetic field
Definition: MuonServiceProxy.h:56
MuonErrorMatrix
Definition: MuonErrorMatrix.h:24
TSGForRoadSearch::theManySeeds
bool theManySeeds
Definition: TSGForRoadSearch.h:103
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
mps_fire.result
result
Definition: mps_fire.py:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
TSGForRoadSearch::theUpdator
TrajectoryStateUpdator * theUpdator
Definition: TSGForRoadSearch.h:98
SurfaceOrientation::outer
Definition: Surface.h:19
HLT_FULL_cff.errorMatrixPset
errorMatrixPset
Definition: HLT_FULL_cff.py:46146
TSGForRoadSearch::IPfts
bool IPfts(const reco::Track &, FreeTrajectoryState &)
get the FTS for a Track: adjusting the error matrix if requested
Definition: TSGForRoadSearch.cc:117
edm::OwnVector::clear
void clear()
Definition: OwnVector.h:481
edm::InputTag
Definition: InputTag.h:15
alongMomentum
Definition: PropagationDirection.h:4
KFUpdator
Definition: KFUpdator.h:32
TSGForRoadSearch::theCopyMuonRecHit
bool theCopyMuonRecHit
Definition: TSGForRoadSearch.h:102
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
GeometricSearchTracker::negTidLayers
std::vector< ForwardDetLayer const * > const & negTidLayers() const
Definition: GeometricSearchTracker.h:49
GeometricSearchTracker::pixelBarrelLayers
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
Definition: GeometricSearchTracker.h:44
TSGForRoadSearch::theProxyService
const MuonServiceProxy * theProxyService
Definition: TSGForRoadSearch.h:99