18 useSimpleGeometry_(iConfig.getParameter<
bool>(
"useSimpleGeometry")),
19 useMB2_(iConfig.existsAs<
bool>(
"useStation2") ? iConfig.getParameter<
bool>(
"useStation2") :
true),
20 fallbackToME1_(iConfig.existsAs<
bool>(
"fallbackToME1") ? iConfig.getParameter<
bool>(
"fallbackToME1") :
false),
21 whichTrack_(
None), whichState_(AtVertex),
22 cosmicPropagation_(iConfig.existsAs<
bool>(
"cosmicPropagationHypothesis") ? iConfig.getParameter<
bool>(
"cosmicPropagationHypothesis") :
false),
23 useMB2InOverlap_(iConfig.existsAs<
bool>(
"useMB2InOverlap") ? iConfig.getParameter<
bool>(
"useMB2InOverlap") :
false)
31 else throw cms::Exception(
"Configuration") <<
"Parameter 'useTrack' must be 'none', 'tracker', 'muon', 'global'\n";
37 else throw cms::Exception(
"Configuration") <<
"Parameter 'useState' must be 'atVertex', 'innermost', 'outermost'\n";
40 throw cms::Exception(
"Configuration") <<
"When using 'cosmicPropagationHypothesis' useTrack must not be 'none', and the state must not be 'atVertex'\n";
61 for (
size_t i = 0;
i <= (
useMB2_ ? 2 : 1); ++
i) {
78 if (rc ==
nullptr)
throw cms::Exception(
"Invalid Data") <<
"Input object is not a RecoCandidate.\n";
102 if (!
magfield_.
isValid())
throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
124 if (!
magfield_.
isValid())
throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
125 if (tk.
noVertex())
throw cms::Exception(
"UnsupportedOperation") <<
"I can't propagate simtracks without a vertex, I don't know where to start from.\n";
138 throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
168 if (!
final.isValid()) {
169 for (
int ie = (
useMB2_ ? 2 : 1); ie >= 0; --ie) {
180 if (
final.isValid())
break;
193 ret = dets.front().second;
WhichTrack whichTrack_
Labels for input collections.
T getParameter(std::string const &) const
PropagateToMuon(const edm::ParameterSet &iConfig)
TrajectoryStateOnSurface extrapolate(const reco::Track &tk) const
edm::ESHandle< Propagator > propagatorAny_
virtual double pz() const =0
z coordinate of momentum vector
const BoundDisk * endcapDiskNeg_
FreeTrajectoryState startingState(const reco::Candidate &reco) const
Starting state for the propagation.
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual double vx() const =0
x coordinate of vertex position
Global3DPoint GlobalPoint
GlobalPoint globalPosition() const
const BoundDisk * endcapDiskPos_
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
bool useMB2_
Propagate to MB2 (default) instead of MB1.
virtual double vy() const =0
y coordinate of vertex position
virtual reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
TrajectoryStateOnSurface getBestDet(const TrajectoryStateOnSurface &tsos, const DetLayer *station) const
const math::XYZPoint & outerPosition() const
position of the outermost hit
float charge() const
charge
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual reco::TrackRef track() const
reference to a Track
edm::ESHandle< MagneticField > magfield_
const BoundCylinder * barrelCylinder_
const math::XYZPoint & innerPosition() const
position of the innermost hit
U second(std::pair< T, U > const &p)
virtual double py() const =0
y coordinate of momentum vector
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
edm::ESHandle< Propagator > propagator_
bool isNull() const
Checks for null.
GlobalVector momentum() const
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
bool cosmicPropagation_
for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states...
GlobalPoint position() const
const std::vector< const DetLayer * > & allDTLayers() const
return the DT DetLayers (barrel), inside-out
const std::vector< const DetLayer * > & forwardCSCLayers() const
return the forward (+Z) CSC DetLayers, inside-out
std::vector< SimVertex > SimVertexContainer
void init(const edm::EventSetup &iSetup)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
virtual int charge() const =0
electric charge
bool useSimpleGeometry_
Labels for input collections.
const math::XYZTLorentzVectorD & momentum() const
static int position[264][3]
edm::ESHandle< MuonDetLayerGeometry > muonGeometry_
bool fallbackToME1_
Fallback to ME1 if propagation to ME2 fails.
const std::vector< const DetLayer * > & backwardCSCLayers() const
return the backward (-Z) CSC DetLayers, inside-out
virtual double vz() const =0
z coordinate of vertex position
virtual double px() const =0
x coordinate of momentum vector
edm::ESHandle< Propagator > propagatorOpposite_
T const * product() const
Global3DVector GlobalVector
std::pair< float, float > endcapRadii_
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track