|
|
Go to the documentation of this file. 1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
54 if (modeString ==
"BeamSpotFixed")
56 else if (modeString ==
"BeamSpotSigma")
58 else if (modeString ==
"VerticesFixed")
60 else if (modeString ==
"VerticesSigma")
63 edm::LogError(
"CandidateSeededTrackingRegionsProducer") <<
"Unknown mode string: " << modeString;
89 if (regPSet.
exists(
"searchOpt"))
102 <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
114 desc.
add<
int>(
"maxNRegions", 10);
117 desc.
add<
int>(
"maxNVertices", 1);
119 desc.
add<
double>(
"ptMin", 0.9);
120 desc.
add<
double>(
"originRadius", 0.2);
121 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
122 desc.
add<
double>(
"deltaEta", 0.5);
123 desc.
add<
double>(
"deltaPhi", 0.5);
124 desc.
add<
bool>(
"precise",
true);
126 desc.
add<
double>(
"nSigmaZVertex", 3.);
127 desc.
add<
double>(
"zErrorVetex", 0.2);
128 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
130 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
133 desc.
add<
bool>(
"searchOpt",
false);
139 descriptions.
add(
"seededTrackingRegionsFromBeamSpotFixedZLength", descRegion);
143 std::vector<std::unique_ptr<TrackingRegion> >
result;
148 size_t n_objects =
objects->size();
162 std::vector<std::pair<GlobalPoint, float> > origins;
166 origins.push_back(std::make_pair(
172 for (reco::VertexCollection::const_iterator
v =
vertices->begin();
175 if (
v->isFake() || !
v->isValid())
178 origins.push_back(std::make_pair(
GlobalPoint(
v->x(),
v->y(),
v->z()),
183 if (origins.empty()) {
184 origins.push_back(std::make_pair(
201 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z());
204 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(direction,
219 edm::LogInfo(
"CandidateSeededTrackingRegionsProducer") <<
"produced " << n_regions <<
" regions";
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
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)
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool isUninitialized() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
Global3DPoint GlobalPoint
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
~CandidateSeededTrackingRegionsProducer() override
edm::EDGetTokenT< reco::CandidateView > token_input
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::VertexCollection > token_vertex
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)