Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:08

0001 #ifndef Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
0002 #define Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
0003 
0004 /**
0005  *  Class implementing the reference trajectory of a single charged
0006  *  particle, i.e. a helix with 5 parameters. Here, not the parameters
0007  *  of the trajectory state of the first (or the last) hit are used,
0008  *  but at a surface in "the middle" of the track. By this the track is
0009  *  "split" into two parts (hence "dual wield"). The list of all hits
0010  *  the local measurements, derivatives etc. as described in (and
0011  *  accessed via) ReferenceTrajectoryBase are calculated.
0012  * 
0013  *  The covariance-matrix of the measurements may include effects of
0014  *  multiple-scattering or energy-loss effects or both. This can be
0015  *  defined in the constructor via the variable 'materialEffects
0016  *  (cf. ReferenceTrajectoryBase):
0017  *
0018  *  materialEffects =  none/multipleScattering/energyLoss/combined
0019  *
0020  *  By default, the mass is assumed to be the muon-mass, but can be
0021  *  changed via a constructor argument.
0022  *
0023  * LIMITATIONS:
0024  *  So far all input hits have to be valid, but invalid hits
0025  *  would be needed to take into account the material effects in them...
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   /** internal method to calculate members
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