1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
59 if (modeString ==
"BeamSpotFixed")
61 else if (modeString ==
"BeamSpotSigma")
63 else if (modeString ==
"VerticesFixed")
65 else if (modeString ==
"VerticesSigma")
68 edm::LogError(
"CandidateSeededTrackingRegionsProducer") <<
"Unknown mode string: " << modeString;
94 if (regPSet.
exists(
"searchOpt"))
104 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
105 if (m_nSigmaZBeamSpot < 0.)
107 <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
122 desc.
add<
int>(
"maxNRegions", 10);
125 desc.
add<
int>(
"maxNVertices", 1);
127 desc.
add<
double>(
"ptMin", 0.9);
128 desc.
add<
double>(
"originRadius", 0.2);
129 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
130 desc.
add<
double>(
"deltaEta", 0.5);
131 desc.
add<
double>(
"deltaPhi", 0.5);
132 desc.
add<
bool>(
"precise",
true);
134 desc.
add<
double>(
"nSigmaZVertex", 3.);
135 desc.
add<
double>(
"zErrorVetex", 0.2);
136 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
138 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
141 desc.
add<
bool>(
"searchOpt",
false);
147 descriptions.
add(
"seededTrackingRegionsFromBeamSpotFixedZLength", descRegion);
151 std::vector<std::unique_ptr<TrackingRegion> >
result;
156 size_t n_objects = objects->size();
167 GlobalPoint default_origin(bs->x0(), bs->y0(), bs->z0());
170 std::vector<std::pair<GlobalPoint, float> > origins;
174 origins.push_back(std::make_pair(
180 for (reco::VertexCollection::const_iterator
v = vertices->begin();
183 if (
v->isFake() || !
v->isValid())
186 origins.push_back(std::make_pair(
GlobalPoint(
v->x(),
v->y(),
v->z()),
191 if (origins.empty()) {
192 origins.push_back(std::make_pair(
201 measurementTracker = hmte.
product();
215 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z());
218 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
235 edm::LogInfo(
"CandidateSeededTrackingRegionsProducer") <<
"produced " << n_regions <<
" regions";
edm::EDGetTokenT< reco::CandidateView > token_input
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< reco::VertexCollection > token_vertex
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_field
Log< level::Error, false > LogError
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
bool getData(T &iHolder) const
U second(std::pair< T, U > const &p)
~CandidateSeededTrackingRegionsProducer() override=default
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Log< level::Info, false > LogInfo
T const * product() const
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)