1 #ifndef PointSeededTrackingRegionsProducer_h
2 #define PointSeededTrackingRegionsProducer_h
26 #include <TLorentzVector.h>
62 if (modeString ==
"BeamSpotFixed")
64 else if (modeString ==
"BeamSpotSigma")
66 else if (modeString ==
"VerticesFixed")
68 else if (modeString ==
"VerticesSigma")
71 edm::LogError(
"PointSeededTrackingRegionsProducer") <<
"Unknown mode string: " << modeString;
77 if (!(etaPoints.size() == phiPoints.size()))
102 if (regPSet.
exists(
"searchOpt"))
112 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
113 if (m_nSigmaZBeamSpot < 0.)
115 <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
129 descPoints.
add<std::vector<double>>(
"eta", {0.});
130 descPoints.
add<std::vector<double>>(
"phi", {0.});
134 desc.
add<
int>(
"maxNRegions", 10);
137 desc.
add<
int>(
"maxNVertices", 1);
139 desc.
add<
double>(
"ptMin", 0.9);
140 desc.
add<
double>(
"originRadius", 0.2);
141 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
142 desc.
add<
double>(
"deltaEta", 0.5);
143 desc.
add<
double>(
"deltaPhi", 0.5);
144 desc.
add<
bool>(
"precise",
true);
146 desc.
add<
double>(
"nSigmaZVertex", 3.);
147 desc.
add<
double>(
"zErrorVetex", 0.2);
148 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
150 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
153 desc.
add<
bool>(
"searchOpt",
false);
161 descriptions.
add(
"pointSeededTrackingRegion", descRegion);
165 std::vector<std::unique_ptr<TrackingRegion>>
result;
180 GlobalPoint default_origin(bs->x0(), bs->y0(), bs->z0());
183 std::vector<std::pair<GlobalPoint, float>> origins;
187 origins.push_back(std::make_pair(
193 for (reco::VertexCollection::const_iterator
iv = vertices->begin(),
ev = vertices->end();
196 if (
iv->isFake() || !
iv->isValid())
204 if (origins.empty()) {
205 origins.push_back(std::make_pair(
214 measurementTracker = hmte.
product();
230 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
246 edm::LogInfo(
"PointSeededTrackingRegionsProducer") <<
"produced " << n_regions <<
" regions";
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_field
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
std::vector< double > phiPoints
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PointSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Sin< T >::type sin(const T &t)
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
Exp< T >::type exp(const T &t)
Log< level::Error, false > LogError
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
bool getData(T &iHolder) const
U second(std::pair< T, U > const &p)
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< reco::VertexCollection > token_vertex
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Log< level::Info, false > LogInfo
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
T const * product() const
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > etaPoints
~PointSeededTrackingRegionsProducer() override