1 #ifndef PointSeededTrackingRegionsProducer_h 2 #define PointSeededTrackingRegionsProducer_h 22 #include <TLorentzVector.h> 57 if (modeString ==
"BeamSpotFixed")
59 else if (modeString ==
"BeamSpotSigma")
61 else if (modeString ==
"VerticesFixed")
63 else if (modeString ==
"VerticesSigma")
66 edm::LogError(
"PointSeededTrackingRegionsProducer") <<
"Unknown mode string: " << modeString;
72 if (!(etaPoints.size() == phiPoints.size()))
97 if (regPSet.
exists(
"searchOpt"))
107 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
108 if (m_nSigmaZBeamSpot < 0.)
110 <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
120 descPoints.
add<std::vector<double>>(
"eta", {0.});
121 descPoints.
add<std::vector<double>>(
"phi", {0.});
125 desc.
add<
int>(
"maxNRegions", 10);
128 desc.
add<
int>(
"maxNVertices", 1);
130 desc.
add<
double>(
"ptMin", 0.9);
131 desc.
add<
double>(
"originRadius", 0.2);
132 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
133 desc.
add<
double>(
"deltaEta", 0.5);
134 desc.
add<
double>(
"deltaPhi", 0.5);
135 desc.
add<
bool>(
"precise",
true);
137 desc.
add<
double>(
"nSigmaZVertex", 3.);
138 desc.
add<
double>(
"zErrorVetex", 0.2);
139 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
141 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
144 desc.
add<
bool>(
"searchOpt",
false);
152 descriptions.
add(
"pointSeededTrackingRegion", descRegion);
156 std::vector<std::unique_ptr<TrackingRegion>>
result;
168 std::vector<std::pair<GlobalPoint, float>> origins;
172 origins.push_back(std::make_pair(
178 for (reco::VertexCollection::const_iterator iv = vertices->begin(),
ev = vertices->end();
181 if (iv->isFake() || !iv->isValid())
184 origins.push_back(std::make_pair(
GlobalPoint(iv->x(), iv->y(), iv->z()),
189 if (origins.empty()) {
190 origins.push_back(std::make_pair(
199 measurementTracker = hmte.
product();
215 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
229 edm::LogInfo(
"PointSeededTrackingRegionsProducer") <<
"produced " << n_regions <<
" regions";
T getParameter(std::string const &) const
double z0() const
z coordinate
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)
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)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
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)
double z0Error() const
error on z
T const * product() const
double sigmaZ() const
sigma z
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double y0() const
y coordinate
bool isUninitialized() const
std::vector< double > etaPoints
~PointSeededTrackingRegionsProducer() override
double x0() const
x coordinate