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)
29 else throw cms::Exception(
"Configuration") <<
"Parameter 'useTrack' must be 'none', 'tracker', 'muon', 'global'\n";
35 else throw cms::Exception(
"Configuration") <<
"Parameter 'useState' must be 'atVertex', 'innermost', 'outermost'\n";
38 throw cms::Exception(
"Configuration") <<
"When using 'cosmicPropagationHypothesis' useTrack must not be 'none', and the state must not be 'atVertex'\n";
59 for (
size_t i = 0;
i <= (
useMB2_ ? 2 : 1); ++
i) {
72 if (rc == 0)
throw cms::Exception(
"Invalid Data") <<
"Input object is not a RecoCandidate.\n";
96 if (!
magfield_.
isValid())
throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
118 if (!
magfield_.
isValid())
throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
119 if (tk.
noVertex())
throw cms::Exception(
"UnsupportedOperation") <<
"I can't propagate simtracks without a vertex, I don't know where to start from.\n";
132 throw cms::Exception(
"NotInitialized") <<
"PropagateToMuon: You must call init(const edm::EventSetup &iSetup) before using this object.\n";
162 if (!
final.isValid()) {
163 for (
int ie = (
useMB2_ ? 2 : 1); ie >= 0; --ie) {
174 if (
final.isValid())
break;
187 ret = dets.front().second;
WhichTrack whichTrack_
Labels for input collections.
T getParameter(std::string const &) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
PropagateToMuon(const edm::ParameterSet &iConfig)
TrajectoryStateOnSurface extrapolate(const reco::Track &tk) const
Extrapolate reco::Track to the muon station 2, return an invalid TSOS if it fails.
edm::ESHandle< Propagator > propagatorAny_
tuple start
Check for commandline option errors.
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 pz() const =0
z coordinate of momentum vector
Global3DPoint GlobalPoint
virtual double vx() const =0
x coordinate of vertex position
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 reco::TrackRef standAloneMuon() const
reference to a stand-alone muon Track
TrajectoryStateOnSurface getBestDet(const TrajectoryStateOnSurface &tsos, const DetLayer *station) const
Get the best TSOS on one of the chambres of this DetLayer, or an invalid TSOS if none match...
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 double vy() const =0
y coordinate of vertex position
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 int charge() const =0
electric charge
virtual double py() const =0
y coordinate of momentum vector
edm::ESHandle< Propagator > propagator_
bool isNull() const
Checks for null.
GlobalVector momentum() const
virtual double px() const =0
x coordinate of momentum vector
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
std::vector< SimVertex > SimVertexContainer
T const * product() const
void init(const edm::EventSetup &iSetup)
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators...
virtual double vz() const =0
z coordinate of vertex position
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.
volatile std::atomic< bool > shutdown_flag false
edm::ESHandle< Propagator > propagatorOpposite_
Global3DVector GlobalVector
std::pair< float, float > endcapRadii_
virtual reco::TrackRef combinedMuon() const
reference to a stand-alone muon Track