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"))
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.);
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();
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(
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
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
T const * product() const
constexpr bool isUninitialized() const noexcept
Global3DPoint GlobalPoint
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
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
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)