CMS 3D CMS Logo

AreaSeededTrackingRegionsBuilder.h
Go to the documentation of this file.
1 #ifndef RecoTracker_TkTrackingRegions_AreaSeededTrackingRegionsBuilder_h
2 #define RecoTracker_TkTrackingRegions_AreaSeededTrackingRegionsBuilder_h
3 
5 
14 
15 #include "TrackingSeedCandidates.h"
17 public:
18  using Origin = std::pair<GlobalPoint, float>; // (origin, half-length in z)
19  using Origins = std::vector<Origin>;
20 
21  class Area {
22  public:
23  Area() {}
24 
25  // phimin and phimax, and hence xmin+xmax and ymin+ymax are
26  // ordered by which way one goes around the unit circle, so it may
27  // happen that actually phimax < phimin
28  Area(float rmin, float rmax, float phimin, float phimax, float zmin, float zmax) : m_zmin(zmin), m_zmax(zmax) {
29  auto cosphimin = std::cos(phimin);
30  auto sinphimin = std::sin(phimin);
31  auto cosphimax = std::cos(phimax);
32  auto sinphimax = std::sin(phimax);
33 
34  m_x_rmin_phimin = rmin * cosphimin;
35  m_x_rmin_phimax = rmin * cosphimax;
36  m_x_rmax_phimin = rmax * cosphimin;
37  m_x_rmax_phimax = rmax * cosphimax;
38 
39  m_y_rmin_phimin = rmin * sinphimin;
40  m_y_rmin_phimax = rmin * sinphimax;
41  m_y_rmax_phimin = rmax * sinphimin;
42  m_y_rmax_phimax = rmax * sinphimax;
43  }
44 
45  float x_rmin_phimin() const { return m_x_rmin_phimin; }
46  float x_rmin_phimax() const { return m_x_rmin_phimax; }
47  float x_rmax_phimin() const { return m_x_rmax_phimin; }
48  float x_rmax_phimax() const { return m_x_rmax_phimax; }
49  float y_rmin_phimin() const { return m_y_rmin_phimin; }
50  float y_rmin_phimax() const { return m_y_rmin_phimax; }
51  float y_rmax_phimin() const { return m_y_rmax_phimin; }
52  float y_rmax_phimax() const { return m_y_rmax_phimax; }
53 
54  float zmin() const { return m_zmin; }
55  float zmax() const { return m_zmax; }
56 
57  private:
58  // all of these are in global coordinates
59  float m_x_rmin_phimin = 0;
60  float m_x_rmin_phimax = 0;
61  float m_x_rmax_phimin = 0;
62  float m_x_rmax_phimax = 0;
63 
64  float m_y_rmin_phimin = 0;
65  float m_y_rmin_phimax = 0;
66  float m_y_rmax_phimin = 0;
67  float m_y_rmax_phimax = 0;
68 
69  float m_zmin = 0;
70  float m_zmax = 0;
71  };
72 
73  class Builder {
74  public:
75  explicit Builder(const AreaSeededTrackingRegionsBuilder* conf) : m_conf(conf) {}
76  ~Builder() = default;
77 
80 
81  std::vector<std::unique_ptr<TrackingRegion> > regions(const Origins& origins, const std::vector<Area>& areas) const;
82  std::unique_ptr<TrackingRegion> region(const Origin& origin, const std::vector<Area>& areas) const;
83  std::unique_ptr<TrackingRegion> region(const Origin& origin, const edm::VecArray<Area, 2>& areas) const;
84 
85  private:
86  template <typename T>
87  std::unique_ptr<TrackingRegion> regionImpl(const Origin& origin, const T& areas) const;
88 
92  };
93 
95  : AreaSeededTrackingRegionsBuilder(regPSet, iC) {}
98 
100 
101  Builder beginEvent(const edm::Event& e) const;
102 
103 private:
104  std::vector<Area> m_areas;
106  float m_extraPhi;
107  float m_extraEta;
108  float m_ptMin;
110  bool m_precise;
114 };
115 
116 #endif
AreaSeededTrackingRegionsBuilder::Area::zmin
float zmin() const
Definition: AreaSeededTrackingRegionsBuilder.h:54
AreaSeededTrackingRegionsBuilder::Origins
std::vector< Origin > Origins
Definition: AreaSeededTrackingRegionsBuilder.h:19
AreaSeededTrackingRegionsBuilder::Builder::setMeasurementTracker
void setMeasurementTracker(const MeasurementTrackerEvent *mte)
Definition: AreaSeededTrackingRegionsBuilder.h:78
AreaSeededTrackingRegionsBuilder::m_ptMin
float m_ptMin
Definition: AreaSeededTrackingRegionsBuilder.h:108
AreaSeededTrackingRegionsBuilder::Builder::m_conf
const AreaSeededTrackingRegionsBuilder * m_conf
Definition: AreaSeededTrackingRegionsBuilder.h:89
AreaSeededTrackingRegionsBuilder::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &desc)
Definition: AreaSeededTrackingRegionsBuilder.cc:36
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
edm::EDGetTokenT< MeasurementTrackerEvent >
AreaSeededTrackingRegionsBuilder::Area::x_rmin_phimin
float x_rmin_phimin() const
Definition: AreaSeededTrackingRegionsBuilder.h:45
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
AreaSeededTrackingRegionsBuilder::Area::m_y_rmax_phimin
float m_y_rmax_phimin
Definition: AreaSeededTrackingRegionsBuilder.h:66
AreaSeededTrackingRegionsBuilder::Area::Area
Area()
Definition: AreaSeededTrackingRegionsBuilder.h:23
AreaSeededTrackingRegionsBuilder::Area::m_x_rmax_phimax
float m_x_rmax_phimax
Definition: AreaSeededTrackingRegionsBuilder.h:62
AreaSeededTrackingRegionsBuilder::m_extraEta
float m_extraEta
Definition: AreaSeededTrackingRegionsBuilder.h:107
AreaSeededTrackingRegionsBuilder::Builder::regionImpl
std::unique_ptr< TrackingRegion > regionImpl(const Origin &origin, const T &areas) const
Definition: AreaSeededTrackingRegionsBuilder.cc:90
AreaSeededTrackingRegionsBuilder::Builder::region
std::unique_ptr< TrackingRegion > region(const Origin &origin, const std::vector< Area > &areas) const
Definition: AreaSeededTrackingRegionsBuilder.cc:80
AreaSeededTrackingRegionsBuilder::m_originRadius
float m_originRadius
Definition: AreaSeededTrackingRegionsBuilder.h:109
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
AreaSeededTrackingRegionsBuilder::Area::y_rmin_phimin
float y_rmin_phimin() const
Definition: AreaSeededTrackingRegionsBuilder.h:49
TrackingSeedCandidates
Definition: TrackingSeedCandidates.h:14
AreaSeededTrackingRegionsBuilder::Area::m_x_rmin_phimin
float m_x_rmin_phimin
Definition: AreaSeededTrackingRegionsBuilder.h:59
AreaSeededTrackingRegionsBuilder::Area::x_rmax_phimin
float x_rmax_phimin() const
Definition: AreaSeededTrackingRegionsBuilder.h:47
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
AreaSeededTrackingRegionsBuilder::Area::m_x_rmin_phimax
float m_x_rmin_phimax
Definition: AreaSeededTrackingRegionsBuilder.h:60
BeamSpot.h
AreaSeededTrackingRegionsBuilder::Builder::candidates
TrackingSeedCandidates::Objects candidates
Definition: AreaSeededTrackingRegionsBuilder.h:91
AreaSeededTrackingRegionsBuilder::Builder::regions
std::vector< std::unique_ptr< TrackingRegion > > regions(const Origins &origins, const std::vector< Area > &areas) const
Definition: AreaSeededTrackingRegionsBuilder.cc:62
AreaSeededTrackingRegionsBuilder::Builder::Builder
Builder(const AreaSeededTrackingRegionsBuilder *conf)
Definition: AreaSeededTrackingRegionsBuilder.h:75
AreaSeededTrackingRegionsBuilder::Area::m_zmax
float m_zmax
Definition: AreaSeededTrackingRegionsBuilder.h:70
AreaSeededTrackingRegionsBuilder::Area::m_y_rmin_phimin
float m_y_rmin_phimin
Definition: AreaSeededTrackingRegionsBuilder.h:64
AreaSeededTrackingRegionsBuilder::m_whereToUseMeasurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
Definition: AreaSeededTrackingRegionsBuilder.h:112
AreaSeededTrackingRegionsBuilder::Area::x_rmax_phimax
float x_rmax_phimax() const
Definition: AreaSeededTrackingRegionsBuilder.h:48
AreaSeededTrackingRegionsBuilder::candidates_
TrackingSeedCandidates candidates_
Definition: AreaSeededTrackingRegionsBuilder.h:105
ParameterSetDescription.h
AreaSeededTrackingRegionsBuilder::Area::m_x_rmax_phimin
float m_x_rmax_phimin
Definition: AreaSeededTrackingRegionsBuilder.h:61
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15161
edm::VecArray
Definition: VecArray.h:28
TrackingSeedCandidates.h
edm::ParameterSet
Definition: ParameterSet.h:47
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
AreaSeededTrackingRegionsBuilder::token_measurementTracker
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
Definition: AreaSeededTrackingRegionsBuilder.h:111
AreaSeededTrackingRegionsBuilder::Builder
Definition: AreaSeededTrackingRegionsBuilder.h:73
Event.h
AreaSeededTrackingRegionsBuilder::m_searchOpt
bool m_searchOpt
Definition: AreaSeededTrackingRegionsBuilder.h:113
AreaSeededTrackingRegionsBuilder::Builder::setCandidates
void setCandidates(const TrackingSeedCandidates::Objects cands)
Definition: AreaSeededTrackingRegionsBuilder.h:79
AreaSeededTrackingRegionsBuilder::m_areas
std::vector< Area > m_areas
Definition: AreaSeededTrackingRegionsBuilder.h:104
RectangularEtaPhiTrackingRegion.h
RectangularEtaPhiTrackingRegion::UseMeasurementTracker
UseMeasurementTracker
Definition: RectangularEtaPhiTrackingRegion.h:27
AreaSeededTrackingRegionsBuilder::Area::m_zmin
float m_zmin
Definition: AreaSeededTrackingRegionsBuilder.h:69
AreaSeededTrackingRegionsBuilder::beginEvent
Builder beginEvent(const edm::Event &e) const
Definition: AreaSeededTrackingRegionsBuilder.cc:50
AreaSeededTrackingRegionsBuilder::Area::m_y_rmin_phimax
float m_y_rmin_phimax
Definition: AreaSeededTrackingRegionsBuilder.h:65
VertexFwd.h
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
AreaSeededTrackingRegionsBuilder::Origin
std::pair< GlobalPoint, float > Origin
Definition: AreaSeededTrackingRegionsBuilder.h:18
AreaSeededTrackingRegionsBuilder::AreaSeededTrackingRegionsBuilder
AreaSeededTrackingRegionsBuilder(const edm::ParameterSet &regPSet, edm::ConsumesCollector &&iC)
Definition: AreaSeededTrackingRegionsBuilder.h:94
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
AreaSeededTrackingRegionsBuilder::m_extraPhi
float m_extraPhi
Definition: AreaSeededTrackingRegionsBuilder.h:106
AreaSeededTrackingRegionsBuilder::Area::x_rmin_phimax
float x_rmin_phimax() const
Definition: AreaSeededTrackingRegionsBuilder.h:46
AreaSeededTrackingRegionsBuilder::Area::zmax
float zmax() const
Definition: AreaSeededTrackingRegionsBuilder.h:55
Vertex.h
T
long double T
Definition: Basic3DVectorLD.h:48
AreaSeededTrackingRegionsBuilder::Area::y_rmax_phimax
float y_rmax_phimax() const
Definition: AreaSeededTrackingRegionsBuilder.h:52
AreaSeededTrackingRegionsBuilder
Definition: AreaSeededTrackingRegionsBuilder.h:16
AreaSeededTrackingRegionsBuilder::Area::Area
Area(float rmin, float rmax, float phimin, float phimax, float zmin, float zmax)
Definition: AreaSeededTrackingRegionsBuilder.h:28
VecArray.h
AreaSeededTrackingRegionsBuilder::Builder::~Builder
~Builder()=default
AreaSeededTrackingRegionsBuilder::~AreaSeededTrackingRegionsBuilder
~AreaSeededTrackingRegionsBuilder()=default
AreaSeededTrackingRegionsBuilder::Builder::m_measurementTracker
const MeasurementTrackerEvent * m_measurementTracker
Definition: AreaSeededTrackingRegionsBuilder.h:90
ConsumesCollector.h
AreaSeededTrackingRegionsBuilder::Area::y_rmin_phimax
float y_rmin_phimax() const
Definition: AreaSeededTrackingRegionsBuilder.h:50
AreaSeededTrackingRegionsBuilder::Area::m_y_rmax_phimax
float m_y_rmax_phimax
Definition: AreaSeededTrackingRegionsBuilder.h:67
ParameterSet.h
TrackingSeedCandidates::Objects
std::pair< const reco::CandidateView *, std::pair< float, float > > Objects
Definition: TrackingSeedCandidates.h:18
edm::Event
Definition: Event.h:73
AreaSeededTrackingRegionsBuilder::m_precise
bool m_precise
Definition: AreaSeededTrackingRegionsBuilder.h:110
AreaSeededTrackingRegionsBuilder::Area::y_rmax_phimin
float y_rmax_phimin() const
Definition: AreaSeededTrackingRegionsBuilder.h:51
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
AreaSeededTrackingRegionsBuilder::Area
Definition: AreaSeededTrackingRegionsBuilder.h:21
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37