1 #ifndef CandidateSeededTrackingRegionsProducer_h 2 #define CandidateSeededTrackingRegionsProducer_h 61 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
94 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
95 if (m_nSigmaZBeamSpot < 0.)
96 edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
108 desc.
add<
int>(
"maxNRegions", 10);
111 desc.
add<
int>(
"maxNVertices", 1);
113 desc.
add<
double>(
"ptMin", 0.9);
114 desc.
add<
double>(
"originRadius", 0.2);
115 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
116 desc.
add<
double>(
"deltaEta", 0.5);
117 desc.
add<
double>(
"deltaPhi", 0.5);
118 desc.
add<
bool>(
"precise",
true);
120 desc.
add<
double>(
"nSigmaZVertex", 3.);
121 desc.
add<
double>(
"zErrorVetex", 0.2);
122 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
124 desc.
add<
std::string>(
"whereToUseMeasurementTracker",
"ForSiStrips");
127 desc.
add<
bool>(
"searchOpt",
false);
133 descriptions.
add(
"seededTrackingRegionsFromBeamSpotFixedZLength", descRegion);
139 std::vector<std::unique_ptr<TrackingRegion> >
result;
144 size_t n_objects = objects->
size();
145 if (n_objects == 0)
return result;
150 if( !bs.
isValid() )
return result;
156 std::vector< std::pair< GlobalPoint, float > > origins;
161 origins.push_back( std::make_pair(
171 for (reco::VertexCollection::const_iterator
v = vertices->begin();
v != vertices->end() && n_vert <
m_maxNVertices; ++
v)
173 if (
v->isFake() || !
v->isValid() )
continue;
175 origins.push_back( std::make_pair(
184 origins.push_back( std::make_pair(
195 measurementTracker = hmte.
product();
204 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z() );
206 for (
size_t j=0; j<origins.size() && n_regions <
m_maxNRegions; ++j)
208 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
225 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
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)
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
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)
virtual ~CandidateSeededTrackingRegionsProducer()
double x0() const
x coordinate