CMS 3D CMS Logo

CosmicTrackingRegion.h
Go to the documentation of this file.
1 #ifndef CosmicTrackingRegion_H
2 #define CosmicTrackingRegion_H
3 
16 
19 
20 #include <vector>
21 
22 using SeedingHit = BaseTrackerRecHit const *;
23 
25 public:
26 
27 
28  ~CosmicTrackingRegion() override { }
29 
55  const GlobalPoint & vertexPos,
56  float ptMin, float rVertex, float zVertex,
57  float deltaEta, float deltaPhi,
58  float dummy = 0.,
59  const MeasurementTrackerEvent * measurementTracker = nullptr)
60  : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
61  rVertex, zVertex),
62  theMeasurementTracker_(measurementTracker),
64  { }
65 
67  const GlobalPoint & vertexPos,
68  float ptMin, float rVertex, float zVertex,
69  float deltaEta, float deltaPhi,
70  const edm::ParameterSet & extra,
71  const MeasurementTrackerEvent * measurementTracker = nullptr)
72  : TrackingRegionBase( dir, vertexPos, Range( -1/ptMin, 1/ptMin),
73  rVertex, zVertex),
74  theMeasurementTracker_(measurementTracker)
75  {
76  measurementTrackerName_ = extra.getParameter<std::string>("measurementTrackerName");
77  }
78 
83 
85  hits(
86  const edm::EventSetup& es,
87  const SeedingLayerSetsHits::SeedingLayer& layer) const override;
88 
90  const DetLayer* layer,
91  const Hit & outerHit,
92  const edm::EventSetup& iSetup,
93  const DetLayer* outerlayer=nullptr,
94  float lr=0, float gz=0, float dr=0, float dz=0) const override {return nullptr; }
95 
96  CosmicTrackingRegion * clone() const override { return new CosmicTrackingRegion(*this); }
97 
98  std::string name() const override { return "CosmicTrackingRegion"; }
99 
100 private:
101  template <typename T>
102  void hits_(
103  const edm::EventSetup& es,
104  const T& layer, TrackingRegion::Hits & result) const;
105 
106 
107 
110 
112  using cacheHits=std::vector<cacheHitPointer>;
113 
114  // not a solution! here just to try to get this thing working....
115  // in any case onDemand is NOT thread safe yet
116  // actually this solution is absolutely safe. It lays in the effimeral nature of the region itself
117  mutable cacheHits cache;
118 
119 
120 
121 };
122 
123 #endif
T getParameter(std::string const &) const
CosmicTrackingRegion(const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, const edm::ParameterSet &extra, const MeasurementTrackerEvent *measurementTracker=0)
TrackingRegion::Hits hits(const edm::EventSetup &es, const SeedingLayerSetsHits::SeedingLayer &layer) const override
get hits from layer compatible with region constraints
std::vector< cacheHitPointer > cacheHits
CosmicTrackingRegion * clone() const override
void hits_(const edm::EventSetup &es, const T &layer, TrackingRegion::Hits &result) const
static const double deltaEta
Definition: CaloConstants.h:8
HitRZCompatibility * checkRZ(const DetLayer *layer, const Hit &outerHit, const edm::EventSetup &iSetup, const DetLayer *outerlayer=0, float lr=0, float gz=0, float dr=0, float dz=0) const override
CosmicTrackingRegion(CosmicTrackingRegion const &rh)
SeedingLayerSetsHits::Hits Hits
float ptMin() const
minimal pt of interest
BaseTrackerRecHit const * SeedingHit
std::string name() const override
const MeasurementTrackerEvent * theMeasurementTracker_
CosmicTrackingRegion(const GlobalVector &dir, const GlobalPoint &vertexPos, float ptMin, float rVertex, float zVertex, float deltaEta, float deltaPhi, float dummy=0., const MeasurementTrackerEvent *measurementTracker=0)
dbl *** dir
Definition: mlp_gen.cc:35
long double T