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_TrajectorySeedProducer2_h
2 #define FastSimulation_Tracking_TrajectorySeedProducer2_h
3 
10 
12 
16 
20 
23  //#include "DataFormats/BeamSpot/interface/BeamSpot.h"
24  //#include "DataFormats/TrackReco/interface/TrackFwd.h"
25 
26 #include <vector>
27 #include <sstream>
28 
29 
30 class MagneticField;
31 class MagneticFieldMap;
32 class TrackerGeometry;
34 
36 {
37  private:
39 
40 
45 
47 
48  double pTMin;
49  double maxD0;
50  double maxZ0;
51  unsigned int minRecHits;
54 
56  unsigned int absMinRecHits;
57  unsigned int numberOfHits;
58 
60 
61 
62  std::vector<std::vector<TrackingLayer>> seedingLayers;
63 
65 
66  double originRadius;
68  double originpTMin;
69 
71 
73 
75 
76  // tokens
82  std::vector<edm::EDGetTokenT<std::vector<int> > > skipSimTrackIdTokens;
83 
84  public:
85 
87 
88  virtual ~TrajectorySeedProducer();
89 
90  virtual void beginRun(edm::Run const& run, const edm::EventSetup & es);
91  virtual void produce(edm::Event& e, const edm::EventSetup& es);
92 
94 
99  virtual bool passSimTrackQualityCuts(const SimTrack& theSimTrack, const SimVertex& theSimVertex) const;
100 
102 
109  inline bool passHitTuplesCuts(
110  const SeedingNode<TrackingLayer>& seedingNode,
111  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
112  const std::vector<int>& hitIndicesInTree,
113  const TrajectorySeedHitCandidate& currentTrackerHit
114  ) const
115  {
116  switch (seedingNode.getDepth())
117  {
118  case 0:
119  {
120  return true;
121  /* example for 1 hits
122  const TrajectorySeedHitCandidate& hit1 = currentTrackerHit;
123  return pass1HitsCuts(hit1,trackingAlgorithmId);
124  */
125  }
126 
127  case 1:
128  {
129  const SeedingNode<TrackingLayer>* parentNode = &seedingNode;
130  parentNode = parentNode->getParent();
131  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
132  const TrajectorySeedHitCandidate& hit2 = currentTrackerHit;
133 
134  return pass2HitsCuts(hit1,hit2);
135  }
136  case 2:
137  {
138  return true;
139  /* example for 3 hits
140  const SeedingNode<LayerSpec>* parentNode = &seedingNode;
141  parentNode = parentNode->getParent();
142  const TrajectorySeedHitCandidate& hit2 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
143  parentNode = parentNode->getParent();
144  const TrajectorySeedHitCandidate& hit1 = trackerRecHits[hitIndicesInTree[parentNode->getIndex()]];
145  const TrajectorySeedHitCandidate& hit3 = currentTrackerHit;
146  return pass3HitsCuts(hit1,hit2,hit3,trackingAlgorithmId);
147  */
148  }
149  }
150  return true;
151  }
152 
153  bool pass2HitsCuts(const TrajectorySeedHitCandidate& hit1, const TrajectorySeedHitCandidate& hit2) const;
154 
156 
163  virtual std::vector<unsigned int> iterateHits(
164  unsigned int start,
165  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
166  std::vector<int> hitIndicesInTree,
167  bool processSkippedHits
168  ) const;
169 
170  inline bool isHitOnLayer(const TrajectorySeedHitCandidate& trackerRecHit, const TrackingLayer& layer) const
171  {
172  return layer==trackerRecHit.getTrackingLayer();
173  }
174 
178  const GlobalPoint& gpos1,
179  const GlobalPoint& gpos2,
180  double error,
181  bool forward
182  ) const;
183 
185 
193  const std::vector<TrajectorySeedHitCandidate>& trackerRecHits,
194  std::vector<int>& hitIndicesInTree,
196  unsigned int trackerHit
197  ) const;
198 
199 
200 };
201 
202 #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 TrajectorySeedHitCandidate fulfills the quality requirements.
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
const MagneticField * magneticField
TrajectorySeedProducer(const edm::ParameterSet &conf)
const reco::VertexCollection * vertices
virtual void produce(edm::Event &e, const edm::EventSetup &es)
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< SiTrackerGSMatchedRecHit2DCollection > recHitToken
tuple node
Definition: Node.py:50
unsigned int getDepth() const
Definition: SeedingTree.h:84
const SeedingNode * getParent() const
Definition: SeedingTree.h:112
PropagatorWithMaterial * thePropagator
const TrackerTopology * trackerTopology
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.
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es)
bool compatibleWithBeamAxis(const GlobalPoint &gpos1, const GlobalPoint &gpos2, double error, bool forward) 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
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.
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< std::vector< TrackingLayer > > seedingLayers
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
const TrackingLayer & getTrackingLayer() const
SeedingTree< TrackingLayer > _seedingTree
const MagneticFieldMap * magneticFieldMap
Definition: Run.h:41