File indexing completed on 2024-04-06 11:57:20
0001 #ifndef Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
0002 #define Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #include "Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h"
0030 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
0031
0032 class ReferenceTrajectory;
0033 namespace reco {
0034 class BeamSpot;
0035 }
0036
0037 class DualReferenceTrajectory : public ReferenceTrajectoryBase {
0038 public:
0039 typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
0040
0041 DualReferenceTrajectory(const TrajectoryStateOnSurface &tsos,
0042 const ConstRecHitContainer &forwardRecHits,
0043 const ConstRecHitContainer &backwardRecHits,
0044 const MagneticField *magField,
0045 const reco::BeamSpot &beamSpot,
0046 const ReferenceTrajectoryBase::Config &config);
0047
0048 ~DualReferenceTrajectory() override {}
0049
0050 DualReferenceTrajectory *clone() const override { return new DualReferenceTrajectory(*this); }
0051
0052 protected:
0053 DualReferenceTrajectory(unsigned int nPar, unsigned int nHits, const ReferenceTrajectoryBase::Config &config);
0054
0055
0056
0057 virtual bool construct(const TrajectoryStateOnSurface &referenceTsos,
0058 const ConstRecHitContainer &forwardRecHits,
0059 const ConstRecHitContainer &backwardRecHits,
0060 const MagneticField *magField,
0061 const reco::BeamSpot &beamSpot);
0062
0063 virtual ReferenceTrajectory *construct(const TrajectoryStateOnSurface &referenceTsos,
0064 const ConstRecHitContainer &recHits,
0065 const MagneticField *magField,
0066 const reco::BeamSpot &beamSpot,
0067 const bool revertDirection = false) const;
0068
0069 virtual AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const;
0070
0071 inline const PropagationDirection oppositeDirection(const PropagationDirection propDir) const {
0072 return (propDir == anyDirection) ? anyDirection : ((propDir == alongMomentum) ? oppositeToMomentum : alongMomentum);
0073 }
0074
0075 private:
0076 const double mass_;
0077 const MaterialEffects materialEffects_;
0078 const PropagationDirection propDir_;
0079 const bool useBeamSpot_;
0080 };
0081
0082 #endif