1 #ifndef RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducerFromBeamSpot_H 2 #define RecoTracker_TkTrackingRegions_GlobalTrackingRegionProducerFromBeamSpot_H 24 if (!regionPSet.
existsAs<
double>(
"nSigmaZ") && !regionPSet.
existsAs<
double>(
"originHalfLength")) {
25 throw cms::Exception(
"Configuration") <<
"GlobalTrackingRegionProducerFromBeamSpot: at least one of nSigmaZ, " 26 "originHalfLength must be present in the cfg.\n";
30 (regionPSet.
existsAs<
double>(
"originHalfLength") ? regionPSet.
getParameter<
double>(
"originHalfLength") : 0.0);
34 (regionPSet.
existsAs<
bool>(
"useMultipleScattering") ? regionPSet.
getParameter<
bool>(
"useMultipleScattering")
44 desc.
add<
bool>(
"precise",
true);
45 desc.
add<
bool>(
"useMultipleScattering",
false);
46 desc.
add<
double>(
"nSigmaZ", 4.0);
47 desc.
add<
double>(
"originHalfLength", 0.0);
48 desc.
add<
double>(
"originRadius", 0.2);
49 desc.
add<
double>(
"ptMin", 0.9);
56 descriptions.
add(
"globalTrackingRegionFromBeamSpot", descRegion);
62 desc.
add<
bool>(
"precise",
true);
63 desc.
add<
bool>(
"useMultipleScattering",
false);
64 desc.
add<
double>(
"nSigmaZ", 0.0);
65 desc.
add<
double>(
"originHalfLength", 21.2);
66 desc.
add<
double>(
"originRadius", 0.2);
67 desc.
add<
double>(
"ptMin", 0.9);
74 descriptions.
add(
"globalTrackingRegionFromBeamSpotFixedZ", descRegion);
79 std::vector<std::unique_ptr<TrackingRegion> >
result;
87 result.push_back(std::make_unique<GlobalTrackingRegion>(
thePtMin,
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
double z0() const
z coordinate
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
double theOriginHalfLength
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
GlobalTrackingRegionProducerFromBeamSpot(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
~GlobalTrackingRegionProducerFromBeamSpot() override
std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &ev, const edm::EventSetup &) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
GlobalTrackingRegionProducerFromBeamSpot(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
double sigmaZ() const
sigma z
void add(std::string const &label, ParameterSetDescription const &psetDescription)
double y0() const
y coordinate
double x0() const
x coordinate