1 #ifndef MuonAnalysis_MuonAssociators_interface_PropagateToMuonSetup_h 2 #define MuonAnalysis_MuonAssociators_interface_PropagateToMuonSetup_h 22 template <edm::Transition Tr>
32 desc.add<
bool>(
"useSimpleGeometry",
true);
33 desc.add<
bool>(
"useStation2",
true);
34 desc.add<
bool>(
"fallbackToME1",
false);
35 desc.add<
bool>(
"cosmicPropagationHypothesis",
false);
36 desc.add<
bool>(
"useMB2InOverlap",
false);
69 template <edm::Transition Tr>
71 : useSimpleGeometry_(iConfig.getParameter<
bool>(
"useSimpleGeometry")),
72 useMB2_(iConfig.getParameter<
bool>(
"useStation2")),
73 fallbackToME1_(iConfig.getParameter<
bool>(
"fallbackToME1")),
76 cosmicPropagation_(iConfig.getParameter<
bool>(
"cosmicPropagationHypothesis")),
77 useMB2InOverlap_(iConfig.getParameter<
bool>(
"useMB2InOverlap")),
84 if (whichTrack ==
"none") {
86 }
else if (whichTrack ==
"tracker") {
88 }
else if (whichTrack ==
"muon") {
90 }
else if (whichTrack ==
"global") {
93 throw cms::Exception(
"Configuration") <<
"Parameter 'useTrack' must be 'none', 'tracker', 'muon', 'global'\n";
96 if (whichState ==
"atVertex") {
98 }
else if (whichState ==
"innermost") {
100 }
else if (whichState ==
"outermost") {
103 throw cms::Exception(
"Configuration") <<
"Parameter 'useState' must be 'atVertex', 'innermost', " 107 throw cms::Exception(
"Configuration") <<
"When using 'cosmicPropagationHypothesis' useTrack must not be " 108 "'none', and the state must not be 'atVertex'\n";
112 template <edm::Transition Tr>
118 auto const muonGeometry = iSetup.
getHandle(muonGeometryToken_);
T getParameter(std::string const &) const
const bool cosmicPropagation_
for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states...
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
Propagate an object (usually a track) to the second (default) or first muon station.
const edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > muonGeometryToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magfieldToken_
const bool useMB2_
Propagate to MB2 (default) instead of MB1.
Propagate an object (usually a track) to the second (default) or first muon station.
PropagateToMuon init(const edm::EventSetup &iSetup) const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorOppositeToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorAnyToken_
const bool fallbackToME1_
Fallback to ME1 if propagation to ME2 fails.
WhichTrack whichTrack_
Labels for input collections.
static void fillPSetDescription(edm::ParameterSetDescription &desc)
~PropagateToMuonSetupT()=default
const bool useSimpleGeometry_
Use simplified geometry (cylinders and disks, not individual chambers)
const bool useMB2InOverlap_
PropagateToMuonSetupT(const edm::ParameterSet &iConfig, edm::ConsumesCollector)