1 #ifndef CandidateSeededTrackingRegionsProducer_h 2 #define CandidateSeededTrackingRegionsProducer_h 62 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
95 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
96 if (m_nSigmaZBeamSpot < 0.)
97 edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
109 desc.
add<
int>(
"maxNRegions", 10);
112 desc.
add<
int>(
"maxNVertices", 1);
114 desc.
add<
double>(
"ptMin", 0.9);
115 desc.
add<
double>(
"originRadius", 0.2);
116 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
117 desc.
add<
double>(
"deltaEta", 0.5);
118 desc.
add<
double>(
"deltaPhi", 0.5);
119 desc.
add<
bool>(
"precise",
true);
121 desc.
add<
double>(
"nSigmaZVertex", 3.);
122 desc.
add<
double>(
"zErrorVetex", 0.2);
123 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
125 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
128 desc.
add<
bool>(
"searchOpt",
false);
134 descriptions.
add(
"seededTrackingRegionsFromBeamSpotFixedZLength", descRegion);
140 std::vector<std::unique_ptr<TrackingRegion> >
result;
145 size_t n_objects = objects->
size();
146 if (n_objects == 0)
return result;
151 if( !bs.
isValid() )
return result;
157 std::vector< std::pair< GlobalPoint, float > > origins;
162 origins.push_back( std::make_pair(
172 for (reco::VertexCollection::const_iterator
v = vertices->begin();
v != vertices->end() && n_vert <
m_maxNVertices; ++
v)
174 if (
v->isFake() || !
v->isValid() )
continue;
176 origins.push_back( std::make_pair(
185 origins.push_back( std::make_pair(
196 measurementTracker = hmte.
product();
205 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z() );
207 for (
size_t j=0; j<origins.size() && n_regions <
m_maxNRegions; ++j)
209 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
226 edm::LogInfo (
"CandidateSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
edm::EDGetTokenT< reco::CandidateView > token_input
T getParameter(std::string const &) const
double z0() const
z coordinate
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Global3DPoint GlobalPoint
bool exists(std::string const ¶meterName) const
checks if a parameter exists
~CandidateSeededTrackingRegionsProducer() override
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)
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double z0Error() const
error on z
T const * product() const
double sigmaZ() const
sigma z
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double y0() const
y coordinate
bool isUninitialized() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double x0() const
x coordinate