CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectorySeedProducer.cc
Go to the documentation of this file.
1 #include <memory>
2 
7 
10 
13 
16 
18 
20 
21 
22 
23 
24 
28 
31 
34 
35 //Propagator withMaterial
37 
39 
40 
41 template class SeedingTree<TrackingLayer>;
42 template class SeedingNode<TrackingLayer>;
43 
45  thePropagator(nullptr),
46  vertices(nullptr) //TODO:: what else should be initialized properly?
47 {
49  if (conf.exists("outputSeedCollectionName"))
50  {
51  outputSeedCollectionName=conf.getParameter<std::string>("outputSeedCollectionName");
52  }
53  // The input tag for the beam spot
54  theBeamSpot = conf.getParameter<edm::InputTag>("beamSpot");
55 
56  // The name of the TrajectorySeed Collections
57  produces<TrajectorySeedCollection>(outputSeedCollectionName);
58 
59  // The smallest true pT for a track candidate
60  pTMin = conf.getParameter<double>("pTMin");
61 
62 
63  // The smallest number of Rec Hits for a track candidate
64  minRecHits = conf.getParameter<unsigned int>("minRecHits");
65 
66  //TODO: REMOVE
67  // Set the overall number hits to be checked
69 
70  // The smallest true impact parameters (d0 and z0) for a track candidate
71  maxD0 = conf.getParameter<double>("maxD0");
72 
73  maxZ0 = conf.getParameter<double>("maxZ0");
74 
75  // The name of the hit producer
76  hitProducer = conf.getParameter<edm::InputTag>("HitProducer");
77 
78  // The cuts for seed cleaning
79  seedCleaning = conf.getParameter<bool>("seedCleaning");
80 
81  // Number of hits needed for a seed
82  numberOfHits = conf.getParameter<unsigned int>("numberOfHits");
83 
84  // read Layers
85  std::vector<std::string> layerStringList = conf.getParameter<std::vector<std::string>>("layerList");
86 
87  for(auto it=layerStringList.cbegin(); it < layerStringList.cend(); ++it)
88  {
89  std::vector<TrackingLayer> trackingLayerList;
90  std::string line = *it;
92  while (pos != std::string::npos)
93  {
94  pos=line.find("+");
95  std::string layer = line.substr(0, pos);
97 
98  trackingLayerList.push_back(layerSpec);
99  line=line.substr(pos+1,std::string::npos);
100  }
101  _seedingTree.insert(trackingLayerList);
102  seedingLayers.push_back(std::move(trackingLayerList));
103  }
104 
105  originRadius = conf.getParameter<double>("originRadius");
106 
107  //collections to read in
108  std::vector<edm::InputTag> defaultSkip;
109  std::vector<edm::InputTag> skipSimTrackIdTags = conf.getUntrackedParameter<std::vector<edm::InputTag> >("skipSimTrackIdTags",defaultSkip);
110  for ( unsigned int k=0; k<skipSimTrackIdTags.size(); ++k ) {
111  skipSimTrackIdTokens.push_back(consumes<std::vector<int> >(skipSimTrackIdTags[k]));
112  }
113 
114  originHalfLength = conf.getParameter<double>("originHalfLength");
115 
116  originpTMin = conf.getParameter<double>("originpTMin");
117 
118  edm::InputTag primaryVertex = conf.getParameter<edm::InputTag>("primaryVertex");
119 
120  zVertexConstraint = conf.getParameter<double>("zVertexConstraint");
121 
122 
123 
124 
125  skipPVCompatibility=false;
126  if (conf.exists("skipPVCompatibility"))
127  {
128  skipPVCompatibility = conf.getParameter<bool>("skipPVCompatibility");
129  }
130 
131 
132  // consumes
133  beamSpotToken = consumes<reco::BeamSpot>(theBeamSpot);
134  edm::InputTag("famosSimHits");
135  simTrackToken = consumes<edm::SimTrackContainer>(edm::InputTag("famosSimHits"));
136  simVertexToken = consumes<edm::SimVertexContainer>(edm::InputTag("famosSimHits"));
137  recHitToken = consumes<SiTrackerGSMatchedRecHit2DCollection>(hitProducer);
138 
139  recoVertexToken=consumes<reco::VertexCollection>(primaryVertex);
140 }
141 
142 // Virtual destructor needed.
144 
145  if(thePropagator) delete thePropagator;
146 }
147 
148 void
149 
151 {
152  edm::ESHandle<MagneticField> magneticFieldHandle;
153  edm::ESHandle<TrackerGeometry> trackerGeometryHandle;
154  edm::ESHandle<MagneticFieldMap> magneticFieldMapHandle;
155  edm::ESHandle<TrackerTopology> trackerTopologyHandle;
156 
157  es.get<IdealMagneticFieldRecord>().get(magneticFieldHandle);
158  es.get<TrackerDigiGeometryRecord>().get(trackerGeometryHandle);
159  es.get<MagneticFieldMapRecord>().get(magneticFieldMapHandle);
160  es.get<IdealGeometryRecord>().get(trackerTopologyHandle);
161 
162  magneticField = &(*magneticFieldHandle);
163  trackerGeometry = &(*trackerGeometryHandle);
164  magneticFieldMap = &(*magneticFieldMapHandle);
165  trackerTopology = &(*trackerTopologyHandle);
166 
168 }
169 
170 
171 bool
172 TrajectorySeedProducer::passSimTrackQualityCuts(const SimTrack& theSimTrack, const SimVertex& theSimVertex) const
173 {
174 
175  //require min pT of the simtrack
176  if ( theSimTrack.momentum().Perp2() < pTMin*pTMin)
177  {
178  return false;
179  }
180 
181  //require impact parameter of the simtrack
183  RawParticle(
185  theSimTrack.momentum().px(),
186  theSimTrack.momentum().py(),
187  theSimTrack.momentum().pz(),
188  theSimTrack.momentum().e()
189  ),
191  theSimVertex.position().x(),
192  theSimVertex.position().y(),
193  theSimVertex.position().z(),
194  theSimVertex.position().t())
195  ),
196  0.,0.,4.
197  );
198  theParticle.setCharge(theSimTrack.charge());
199  const double x0 = beamspotPosition.X();
200  const double y0 = beamspotPosition.Y();
201  const double z0 = beamspotPosition.Z();
202  if ( theParticle.xyImpactParameter(x0,y0) > maxD0 )
203  {
204  return false;
205  }
206  if ( fabs( theParticle.zImpactParameter(x0,y0) - z0 ) > maxZ0)
207  {
208  return false;
209  }
210  return true;
211 }
212 
213 bool
215 {
216  bool compatible=false;
218  {
219  compatible = true;
220  }
221  else
222  {
223  GlobalPoint gpos1 = hit1.globalPosition();
224  GlobalPoint gpos2 = hit2.globalPosition();
225  bool forward = hit1.isForward();
226  double error = std::sqrt(hit1.largerError()+hit2.largerError());
227  compatible = compatibleWithBeamAxis(gpos1,gpos2,error,forward);
228  }
229  return compatible;
230 }
231 
233  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
234  std::vector<int>& hitIndicesInTree,
235  const SeedingNode<TrackingLayer>* node, unsigned int trackerHit
236 ) const
237 {
238  if (!node->getParent() || hitIndicesInTree[node->getParent()->getIndex()]>=0)
239  {
240  if (hitIndicesInTree[node->getIndex()]<0)
241  {
242  const TrajectorySeedHitCandidate& currentTrackerHit = trackerRecHits[trackerHit];
243  if (!isHitOnLayer(currentTrackerHit,node->getData()))
244  {
245  return nullptr;
246  }
247  if (!passHitTuplesCuts(*node,trackerRecHits,hitIndicesInTree,currentTrackerHit))
248  {
249  return nullptr;
250  }
251  hitIndicesInTree[node->getIndex()]=trackerHit;
252  if (node->getChildrenSize()==0)
253  {
254  return node;
255  }
256  return nullptr;
257  }
258  else
259  {
260  for (unsigned int ichild = 0; ichild<node->getChildrenSize(); ++ichild)
261  {
262  const SeedingNode<TrackingLayer>* seed = insertHit(trackerRecHits,hitIndicesInTree,node->getChild(ichild),trackerHit);
263  if (seed)
264  {
265  return seed;
266  }
267  }
268  }
269  }
270  return nullptr;
271 }
272 
273 
274 std::vector<unsigned int> TrajectorySeedProducer::iterateHits(
275  unsigned int start,
276  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
277  std::vector<int> hitIndicesInTree,
278  bool processSkippedHits
279  ) const
280 {
281  for (unsigned int irecHit = start; irecHit<trackerRecHits.size(); ++irecHit)
282  {
283  unsigned int currentHitIndex=irecHit;
284 
285  for (unsigned int inext=currentHitIndex+1; inext< trackerRecHits.size(); ++inext)
286  {
287  //if multiple hits are on the same layer -> follow all possibilities by recusion
288  if (trackerRecHits[currentHitIndex].getTrackingLayer()==trackerRecHits[inext].getTrackingLayer())
289  {
290 
291  if (processSkippedHits)
292  {
293  //recusively call the method again with hit 'inext' but skip all following on the same layer though 'processSkippedHits=false'
294  std::vector<unsigned int> seedHits = iterateHits(
295  inext,
296  trackerRecHits,
297  hitIndicesInTree,
298  false
299  );
300  if (seedHits.size()>0)
301  {
302  return seedHits;
303  }
304 
305 
306  }
307  irecHit+=1;
308  }
309  else
310  {
311  break;
312  }
313  }
314 
315  processSkippedHits=true;
316 
317  const SeedingNode<TrackingLayer>* seedNode = nullptr;
318  for (unsigned int iroot=0; seedNode==nullptr && iroot<_seedingTree.numberOfRoots(); ++iroot)
319  {
320  seedNode=insertHit(trackerRecHits,hitIndicesInTree,_seedingTree.getRoot(iroot), currentHitIndex);
321  }
322  if (seedNode)
323  {
324  std::vector<unsigned int> seedIndices(seedNode->getDepth()+1);
325  while (seedNode)
326  {
327  seedIndices[seedNode->getDepth()]=hitIndicesInTree[seedNode->getIndex()];
328  seedNode=seedNode->getParent();
329  }
330  return seedIndices;
331  }
332 
333  }
334 
335  return std::vector<unsigned int>();
336 
337 }
338 
339 void
341 {
342  // unsigned nTrackCandidates = 0;
343  PTrajectoryStateOnDet initialState;
344 
345  // First, the tracks to be removed
346  std::set<unsigned int> skipSimTrackIds;
347  for ( unsigned int i=0; i<skipSimTrackIdTokens.size(); ++i ) {
348  edm::Handle<std::vector<int> > skipSimTrackIds_temp;
349  e.getByToken(skipSimTrackIdTokens[i],skipSimTrackIds_temp);
350  for ( unsigned int j=0; j<skipSimTrackIds_temp->size(); ++j ) {
351  unsigned int mySimTrackId = (*skipSimTrackIds_temp)[j];
352  skipSimTrackIds.insert((unsigned int)mySimTrackId);
353  }
354  }
355 
356  // Beam spot
357  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
358  e.getByToken(beamSpotToken,recoBeamSpotHandle);
359  beamspotPosition = recoBeamSpotHandle->position();
360 
361  // SimTracks and SimVertices
363  e.getByToken(simTrackToken,theSimTracks);
364 
366  e.getByToken(simVertexToken,theSimVtx);
367 
368  // edm::Handle<SiTrackerGSRecHit2DCollection> theGSRecHits;
370  e.getByToken(recHitToken, theGSRecHits);
371 
372  // Primary vertices
374  if (e.getByToken(recoVertexToken,theRecVtx))
375  {
376 
377  //this can be nullptr if the PV compatiblity should not be tested against
378  vertices = &(*theRecVtx);
379  }
380 
381 
382  // Output - gets moved, no delete needed
383  std::auto_ptr<TrajectorySeedCollection> output{new TrajectorySeedCollection()};
384 
385  //if no hits -> directly write empty collection
386  if(theGSRecHits->size() == 0)
387  {
389  return;
390  }
391  for (SiTrackerGSMatchedRecHit2DCollection::id_iterator itSimTrackId=theGSRecHits->id_begin(); itSimTrackId!=theGSRecHits->id_end(); ++itSimTrackId )
392  {
393 
394  const unsigned int currentSimTrackId = *itSimTrackId;
395 
396  if(skipSimTrackIds.find(currentSimTrackId)!=skipSimTrackIds.end()) continue;
397 
398  const SimTrack& theSimTrack = (*theSimTracks)[currentSimTrackId];
399 
400  int vertexIndex = theSimTrack.vertIndex();
401  if (vertexIndex<0)
402  {
403  //tracks are required to be associated to a vertex
404  continue;
405  }
406  const SimVertex& theSimVertex = (*theSimVtx)[vertexIndex];
407 
408  if (!this->passSimTrackQualityCuts(theSimTrack,theSimVertex))
409  {
410  continue;
411 
412  }
413  SiTrackerGSMatchedRecHit2DCollection::range recHitRange = theGSRecHits->get(currentSimTrackId);
414 
415  TrajectorySeedHitCandidate previousTrackerHit;
416  TrajectorySeedHitCandidate currentTrackerHit;
417  unsigned int numberOfNonEqualHits=0;
418 
419  std::vector<TrajectorySeedHitCandidate> trackerRecHits;
420  for (SiTrackerGSMatchedRecHit2DCollection::const_iterator itRecHit = recHitRange.first; itRecHit!=recHitRange.second; ++itRecHit)
421  {
422  const SiTrackerGSMatchedRecHit2D& vec = *itRecHit;
423  previousTrackerHit=currentTrackerHit;
424 
426 
427  if (!currentTrackerHit.isOnTheSameLayer(previousTrackerHit))
428  {
429  ++numberOfNonEqualHits;
430  }
431 
432 
433  if (_seedingTree.getSingleSet().find(currentTrackerHit.getTrackingLayer())!=_seedingTree.getSingleSet().end())
434  {
435  //add only the hits which are actually on the requested layers
436  trackerRecHits.push_back(std::move(currentTrackerHit));
437  }
438 
439  }
440  if ( numberOfNonEqualHits < minRecHits) continue;
441 
442  std::vector<int> hitIndicesInTree(_seedingTree.numberOfNodes(),-1);
443  //A SeedingNode is associated by its index to this list. The list stores the indices of the hits in 'trackerRecHits'
444  /* example
445  SeedingNode | hit index | hit
446  -------------------------------------------------------------------------------
447  index= 0: [BPix1] | hitIndicesInTree[0] (=1) | trackerRecHits[1]
448  index= 1: -- [BPix2] | hitIndicesInTree[1] (=3) | trackerRecHits[3]
449  index= 2: -- -- [BPix3] | hitIndicesInTree[2] (=4) | trackerRecHits[4]
450  index= 3: -- -- [FPix1_pos] | hitIndicesInTree[3] (=6) | trackerRecHits[6]
451  index= 4: -- -- [FPix1_neg] | hitIndicesInTree[4] (=7) | trackerRecHits[7]
452 
453  The implementation has been chosen such that the tree only needs to be build once upon construction.
454  */
455 
456 
457  std::vector<unsigned int> seedHitNumbers = iterateHits(0,trackerRecHits,hitIndicesInTree,true);
458 
459  if (seedHitNumbers.size()>0)
460  {
461 
462 
464  for ( unsigned ihit=0; ihit<seedHitNumbers.size(); ++ihit )
465  {
466  TrackingRecHit* aTrackingRecHit = trackerRecHits[seedHitNumbers[ihit]].hit()->clone();
467  recHits.push_back(aTrackingRecHit);
468  }
469 
470 
471  GlobalPoint position((*theSimVtx)[vertexIndex].position().x(),
472  (*theSimVtx)[vertexIndex].position().y(),
473  (*theSimVtx)[vertexIndex].position().z());
474 
475  GlobalVector momentum(theSimTrack.momentum().x(),theSimTrack.momentum().y(),theSimTrack.momentum().z());
476  float charge = theSimTrack.charge();
477  GlobalTrajectoryParameters initialParams(position,momentum,(int)charge,magneticField);
479  //this line help the fit succeed in the case of pixelless tracks (4th and 5th iteration)
480  //for the future: probably the best thing is to use the mini-kalmanFilter
481  if(trackerRecHits[seedHitNumbers[0]].subDetId() !=1 ||trackerRecHits[seedHitNumbers[0]].subDetId() !=2)
482  {
483  errorMatrix = errorMatrix * 0.0000001;
484  }
485  CurvilinearTrajectoryError initialError(errorMatrix);
486  FreeTrajectoryState initialFTS(initialParams, initialError);
487 
488 
489  const GeomDet* initialLayer = trackerGeometry->idToDet( recHits.back().geographicalId() );
490  const TrajectoryStateOnSurface initialTSOS = thePropagator->propagate(initialFTS,initialLayer->surface()) ;
491 
492 
493  if (!initialTSOS.isValid())
494  {
495  break; //continues with the next seeding algorithm
496  }
497 
498  const AlgebraicSymMatrix55& m = initialTSOS.localError().matrix();
499  int dim = 5;
500  float localErrors[15];
501  int k = 0;
502  for (int i=0; i<dim; ++i)
503  {
504  for (int j=0; j<=i; ++j)
505  {
506  localErrors[k++] = m(i,j);
507  }
508  }
509  int surfaceSide = static_cast<int>(initialTSOS.surfaceSide());
510  initialState = PTrajectoryStateOnDet( initialTSOS.localParameters(),initialTSOS.globalMomentum().perp(),localErrors, recHits.back().geographicalId().rawId(), surfaceSide);
511  output->push_back(TrajectorySeed(initialState, recHits, PropagationDirection::alongMomentum));
512 
513 
514 
515  }
516  } //end loop over simtracks
517 
518 
520 }
521 
522 
523 bool
525  const GlobalPoint& gpos1,
526  const GlobalPoint& gpos2,
527  double error,
528  bool forward
529  ) const
530 {
531 
532  const double x0 = beamspotPosition.X();
533  const double y0 = beamspotPosition.Y();
534  const double z0 = beamspotPosition.Z();
535 
536  if ( !seedCleaning )
537  {
538  return true;
539  }
540 
541  // The hits 1 and 2 positions, in HepLorentzVector's
542  XYZTLorentzVector thePos1(gpos1.x(),gpos1.y(),gpos1.z(),0.);
543  XYZTLorentzVector thePos2(gpos2.x(),gpos2.y(),gpos2.z(),0.);
544 
545  // Create new particles that pass through the second hit with pT = ptMin
546  // and charge = +/-1
547 
548  // The momentum direction is by default joining the two hits
549  XYZTLorentzVector theMom2 = (thePos2-thePos1);
550 
551  // The corresponding RawParticle, with an (irrelevant) electric charge
552  // (The charge is determined in the next step)
553  ParticlePropagator myPart(theMom2,thePos2,1.,magneticFieldMap);
554 
558  bool intersect = myPart.propagateToBeamCylinder(thePos1,originRadius*1.);
559  if ( !intersect )
560  {
561  return false;
562  }
563 
564  // Check if the constraints are satisfied
565  // 1. pT at cylinder with radius originRadius
566  if ( myPart.Pt() < originpTMin )
567  {
568  return false;
569  }
570 
571  // 2. Z compatible with beam spot size
572  if ( fabs(myPart.Z()-z0) > originHalfLength )
573  {
574  return false;
575  }
576 
577 
578  // 3. Z compatible with one of the primary vertices (always the case if no primary vertex)
579  if (!vertices)
580  {
581  return true;
582  }
583  unsigned int nVertices = vertices->size();
584  if ( !nVertices || zVertexConstraint < 0. )
585  {
586  return true;
587  }
588  // Radii of the two hits with respect to the beam spot position
589  double R1 = std::sqrt ( (thePos1.X()-x0)*(thePos1.X()-x0) + (thePos1.Y()-y0)*(thePos1.Y()-y0) );
590  double R2 = std::sqrt ( (thePos2.X()-x0)*(thePos2.X()-x0) + (thePos2.Y()-y0)*(thePos2.Y()-y0) );
591  // Loop on primary vertices
592 
593  //TODO: Check if pTMin is correctly used (old code stored pTMin^2 in pTMin)
594 
595  for ( unsigned iv=0; iv<nVertices; ++iv )
596  {
597  // Z position of the primary vertex
598  double zV = (*vertices)[iv].z();
599  // Constraints on the inner hit
600  double checkRZ1 = forward ?
601  (thePos1.Z()-zV+zVertexConstraint) / (thePos2.Z()-zV+zVertexConstraint) * R2 :
602  -zVertexConstraint + R1/R2*(thePos2.Z()-zV+zVertexConstraint);
603  double checkRZ2 = forward ?
604  (thePos1.Z()-zV-zVertexConstraint)/(thePos2.Z()-zV-zVertexConstraint) * R2 :
605  +zVertexConstraint + R1/R2*(thePos2.Z()-zV-zVertexConstraint);
606  double checkRZmin = std::min(checkRZ1,checkRZ2)-3.*error;
607  double checkRZmax = std::max(checkRZ1,checkRZ2)+3.*error;
608  // Check if the innerhit is within bounds
609  bool compat = forward ?
610  checkRZmin < R1 && R1 < checkRZmax :
611  checkRZmin < thePos1.Z()-zV && thePos1.Z()-zV < checkRZmax;
612  // If it is, just return ok
613  if ( compat )
614  {
615  return compat;
616  }
617  }
618  // Otherwise, return not ok
619  return false;
620 
621 }
622 
bool passHitTuplesCuts(const SeedingNode< TrackingLayer > &seedingNode, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, const std::vector< int > &hitIndicesInTree, const TrajectorySeedHitCandidate &currentTrackerHit) const
method checks if a TrajectorySeedHitCandidate fulfills the quality requirements.
void setCharge(float q)
set the MEASURED charge
Definition: RawParticle.cc:139
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
int i
Definition: DBlmapReader.cc:9
reference back()
Definition: OwnVector.h:327
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
const MagneticField * magneticField
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
double zImpactParameter(double x0=0, double y0=0.) const
Longitudinal impact parameter.
T perp() const
Definition: PV3DBase.h:72
TrajectorySeedProducer(const edm::ParameterSet &conf)
const LocalTrajectoryParameters & localParameters() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
const SingleSet & getSingleSet() const
Definition: SeedingTree.h:204
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
const reco::VertexCollection * vertices
bool isForward() const
Is it a forward hit ?
T y() const
Definition: PV3DBase.h:63
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool propagateToBeamCylinder(const XYZTLorentzVector &v, double radius=0.)
virtual void produce(edm::Event &e, const edm::EventSetup &es)
identifier iterator
Definition: RangeMap.h:136
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
GlobalPoint globalPosition() const
The global position.
const DATA & getData() const
Definition: SeedingTree.h:136
#define nullptr
float charge() const
charge
Definition: CoreSimTrack.cc:18
unsigned int getChildrenSize() const
Definition: SeedingTree.h:121
uint16_t size_type
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > recHitToken
float float float z
tuple node
Definition: Node.py:50
unsigned int getDepth() const
Definition: SeedingTree.h:84
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
PropagatorWithMaterial * thePropagator
bool insert(const std::vector< DATA > &dataList)
Definition: SeedingTree.h:179
unsigned int numberOfNodes() const
Definition: SeedingTree.h:227
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
void push_back(D *&d)
Definition: OwnVector.h:280
unsigned int numberOfRoots() const
Definition: SeedingTree.h:222
const TrackerTopology * trackerTopology
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
unsigned int subDetId[18]
T sqrt(T t)
Definition: SSEVec.h:48
SurfaceSide surfaceSide() const
Position relative to material, defined relative to momentum vector.
T z() const
Definition: PV3DBase.h:64
virtual std::vector< unsigned int > iterateHits(unsigned int start, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > hitIndicesInTree, bool processSkippedHits) const
method tries to insert all hits into the tree structure.
double Z() const
z of vertex
Definition: RawParticle.h:276
int j
Definition: DBlmapReader.cc:9
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es)
static TrackingLayer createFromString(std::string layerSpecification)
bool compatibleWithBeamAxis(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
const AlgebraicSymMatrix55 & matrix() const
const math::XYZTLorentzVectorD & position() const
Definition: CoreSimVertex.h:26
T min(T a, T b)
Definition: MathUtil.h:58
const LocalTrajectoryError & localError() const
edm::EDGetTokenT< edm::SimVertexContainer > simVertexToken
bool isHitOnLayer(const TrajectorySeedHitCandidate &trackerRecHit, const TrackingLayer &layer) const
tuple conf
Definition: dbtoconf.py:185
bool pass2HitsCuts(const TrajectorySeedHitCandidate &hit1, const TrajectorySeedHitCandidate &hit2) const
virtual TrackingRecHit * clone() const =0
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:29
std::vector< edm::EDGetTokenT< std::vector< int > > > skipSimTrackIdTokens
edm::EDGetTokenT< edm::SimTrackContainer > simTrackToken
virtual bool passSimTrackQualityCuts(const SimTrack &theSimTrack, const SimVertex &theSimVertex) const
method checks if a SimTrack fulfills the quality requirements.
virtual TrackingRecHit const * hit() const
const T & get() const
Definition: EventSetup.h:55
std::vector< std::vector< TrackingLayer > > seedingLayers
const SeedingNode< DATA > * getRoot(unsigned int i) const
Definition: SeedingTree.h:232
GlobalVector globalMomentum() const
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
static int position[264][3]
Definition: ReadPGInfo.cc:509
edm::EDGetTokenT< reco::VertexCollection > recoVertexToken
const TrackerGeometry * trackerGeometry
const SeedingNode< TrackingLayer > * insertHit(const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
method inserts hit into the tree structure at an empty position.
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
unsigned int getIndex() const
Definition: SeedingTree.h:107
DetId geographicalId() const
const TrackingLayer & getTrackingLayer() const
Definition: DDAxes.h:10
SeedingTree< TrackingLayer > _seedingTree
bool isOnTheSameLayer(const TrajectorySeedHitCandidate &other) const
Check if two hits are on the same layer of the same subdetector.
T x() const
Definition: PV3DBase.h:62
const MagneticFieldMap * magneticFieldMap
Definition: Run.h:41
double xyImpactParameter(double x0=0., double y0=0.) const
Transverse impact parameter.
const SeedingNode< DATA > * getChild(unsigned int ichild) const
Definition: SeedingTree.h:126
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
virtual const TrackerGeomDet * idToDet(DetId) const