test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectorySeedProducer.h
Go to the documentation of this file.
1 #ifndef FastSimulation_Tracking_TrajectorySeedProducer_h
2 #define FastSimulation_Tracking_TrajectorySeedProducer_h
3 
11 
17 
19 
24 
25 #include <memory>
26 #include <vector>
27 #include <sstream>
28 
29 
30 class MagneticField;
31 class MagneticFieldMap;
32 class TrackerGeometry;
35 
38 {
39  private:
41 
46 
47  std::shared_ptr<PropagatorWithMaterial> thePropagator;
48 
52  std::unique_ptr<SeedCreator> seedCreator;
53  unsigned int minLayersCrossed;
54 
55  std::vector<std::vector<TrackingLayer>> seedingLayers;
56  //std::vector<edm::EDGetTokenT<std::vector<unsigned int> > > skipSimTrackIdTokens;
57  double originRadius;
58  double ptMin;
60  double nSigmaZ;
61 
67  // tokens
70  public:
71 
73 
75  {
76  }
77 
78  virtual void produce(edm::Event& e, const edm::EventSetup& es);
79 
81 
86  //virtual bool passSimTrackQualityCuts(const SimTrack& theSimTrack, const SimVertex& theSimVertex) const;
87 
89 
96  inline bool passHitTuplesCuts(
97  const SeedingNode<TrackingLayer>& seedingNode,
98  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
99  const std::vector<int>& hitIndicesInTree,
100  const TrajectorySeedHitCandidate& currentTrackerHit
101  ) const
102  {
103  switch (seedingNode.getDepth())
104  {
105  case 0:
106  {
107  return true;
108  /* example for 1 hits
109  const TrajectorySeedHitCandidate& hit1 = currentTrackerHit;
110  return pass1HitsCuts(hit1,trackingAlgorithmId);
111  */
112  }
113 
114  case 1:
115  {
116  const SeedingNode<TrackingLayer>* parentNode = &seedingNode;
117  parentNode = parentNode->getParent();
118  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
119  const TrajectorySeedHitCandidate& hit2 = currentTrackerHit;
120 
121  return pass2HitsCuts(hit1,hit2);
122  }
123  case 2:
124  {
125  return true;
126  /* example for 3 hits
127  const SeedingNode<LayerSpec>* parentNode = &seedingNode;
128  parentNode = parentNode->getParent();
129  const TrajectorySeedHitCandidate& hit2 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
130  parentNode = parentNode->getParent();
131  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
132  const TrajectorySeedHitCandidate& hit3 = currentTrackerHit;
133  return pass3HitsCuts(hit1,hit2,hit3,trackingAlgorithmId);
134  */
135  }
136  }
137  return true;
138  }
139 
140  bool pass2HitsCuts(const TrajectorySeedHitCandidate& hit1, const TrajectorySeedHitCandidate& hit2) const;
141 
143 
150  virtual std::vector<unsigned int> iterateHits(
151  unsigned int start,
152  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
153  std::vector<int> hitIndicesInTree,
154  bool processSkippedHits
155  ) const;
156 
157  inline bool isHitOnLayer(const TrajectorySeedHitCandidate& trackerRecHit, const TrackingLayer& layer) const
158  {
159  return layer==trackerRecHit.getTrackingLayer();
160  }
161 
165  const GlobalPoint& gpos1,
166  const GlobalPoint& gpos2,
167  double error,
168  bool forward
169  ) const;
170 
174  const GlobalPoint& gpos1,
175  const GlobalPoint& gpos2,
176  double error,
177  bool forward
178  ) const;
179 
181 
188  bool testWithRegions(const TrajectorySeedHitCandidate & innerHit,const TrajectorySeedHitCandidate & outerHit) const;
190  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
191  std::vector<int>& hitIndicesInTree,
193  unsigned int trackerHit
194  ) const;
195 
196  // typedef std::vector<TrackingRegion* > Regions;
197  typedef std::vector<std::unique_ptr<TrackingRegion> > Regions;
199  //TrackingRegionProducer* theRegionProducer;
200 
201  std::unique_ptr<TrackingRegionProducer> theRegionProducer;
205 
206 
207 };
208 
209 #endif
bool passHitTuplesCuts(const SeedingNode< TrackingLayer > &seedingNode, const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, const std::vector< int > &hitIndicesInTree, const TrajectorySeedHitCandidate &currentTrackerHit) const
method checks if a SimTrack fulfills the quality requirements.
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
const MagneticField * magneticField
bool compatibleWithBeamSpot(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
TrajectorySeedProducer(const edm::ParameterSet &conf)
std::unique_ptr< TrackingRegionProducer > theRegionProducer
edm::EDGetTokenT< std::vector< bool > > hitMasksToken
virtual void produce(edm::Event &e, const edm::EventSetup &es)
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
tuple node
Definition: Node.py:50
unsigned int getDepth() const
Definition: SeedingTree.h:84
const reco::BeamSpot * beamSpot
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
const TrackerTopology * trackerTopology
const edm::EventSetup * es_
const reco::VertexCollection * primaryVertices
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.
bool isHitOnLayer(const TrajectorySeedHitCandidate &trackerRecHit, const TrackingLayer &layer) const
tuple conf
Definition: dbtoconf.py:185
bool pass2HitsCuts(const TrajectorySeedHitCandidate &hit1, const TrajectorySeedHitCandidate &hit2) const
std::vector< std::vector< TrackingLayer > > seedingLayers
edm::EDGetTokenT< FastTrackerRecHitCombinationCollection > recHitCombinationsToken
const MeasurementTrackerEvent * measurementTrackerEvent
std::vector< std::unique_ptr< TrackingRegion > > Regions
edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerEventToken
const TrackerGeometry * trackerGeometry
const SeedingNode< TrackingLayer > * insertHit(const std::vector< TrajectorySeedHitCandidate > &trackerRecHits, std::vector< int > &hitIndicesInTree, const SeedingNode< TrackingLayer > *node, unsigned int trackerHit) const
std::shared_ptr< PropagatorWithMaterial > thePropagator
unsigned int getIndex() const
Definition: SeedingTree.h:107
const TrackingLayer & getTrackingLayer() const
SeedingTree< TrackingLayer > _seedingTree
bool compatibleWithPrimaryVertex(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) const
std::unique_ptr< SeedCreator > seedCreator
const MagneticFieldMap * magneticFieldMap
bool testWithRegions(const TrajectorySeedHitCandidate &innerHit, const TrajectorySeedHitCandidate &outerHit) const
method inserts hit into the tree structure at an empty position.