Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:19

0001 #ifndef MuonTransientTrackingRecHit_h
0002 #define MuonTransientTrackingRecHit_h
0003 
0004 /** \class MuonTransientTrackingRecHit
0005  *
0006  *  A TransientTrackingRecHit for muons.
0007  *
0008  *
0009  *   \author   C. Liu            Purdue University
0010  *
0011  *   \modified by C. Calabria    INFN & Universita  Bari
0012  */
0013 
0014 #include "TrackingTools/TransientTrackingRecHit/interface/GenericTransientTrackingRecHit.h"
0015 #include "DataFormats/TrackingRecHit/interface/RecSegment.h"
0016 
0017 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0018 
0019 class MuonTransientTrackingRecHit final : public GenericTransientTrackingRecHit {
0020 public:
0021   using MuonRecHitPointer = std::shared_ptr<MuonTransientTrackingRecHit>;
0022   using ConstMuonRecHitPointer = std::shared_ptr<MuonTransientTrackingRecHit const>;
0023 
0024   //  typedef ReferenceCountingPointer<MuonTransientTrackingRecHit>      MuonRecHitPointer;
0025   //  typedef ConstReferenceCountingPointer<MuonTransientTrackingRecHit> ConstMuonRecHitPointer;
0026   typedef std::vector<MuonRecHitPointer> MuonRecHitContainer;
0027   typedef std::vector<ConstMuonRecHitPointer> ConstMuonRecHitContainer;
0028 
0029   ~MuonTransientTrackingRecHit() override {}
0030 
0031   /// Direction in 3D for segments, otherwise (0,0,0)
0032   virtual LocalVector localDirection() const;
0033 
0034   /// Direction in 3D for segments, otherwise (0,0,0)
0035   virtual GlobalVector globalDirection() const;
0036 
0037   /// Error on the local direction
0038   virtual LocalError localDirectionError() const;
0039 
0040   /// Error on the global direction
0041   virtual GlobalError globalDirectionError() const;
0042 
0043   AlgebraicSymMatrix parametersError() const override;
0044 
0045   /// Chi square of the fit for segments, else 0
0046   virtual double chi2() const;
0047 
0048   /// Degrees of freedom for segments, else 0
0049   virtual int degreesOfFreedom() const;
0050 
0051   /// if this rec hit is a DT rec hit
0052   bool isDT() const;
0053 
0054   /// if this rec hit is a CSC rec hit
0055   bool isCSC() const;
0056 
0057   /// if this rec hit is a GEM rec hit
0058   bool isGEM() const;
0059 
0060   /// if this rec hit is a ME0 rec hit
0061   bool isME0() const;
0062 
0063   /// if this rec hit is a RPC rec hit
0064   bool isRPC() const;
0065 
0066   /// return the sub components of this transient rechit
0067   ConstRecHitContainer transientHits() const override;
0068 
0069   /// FIXME virtual ConstMuonRecHitContainer specificTransientHits() const;
0070 
0071   static RecHitPointer build(const GeomDet* geom, const TrackingRecHit* rh) {
0072     return RecHitPointer(new MuonTransientTrackingRecHit(geom, rh));
0073   }
0074 
0075   static MuonRecHitPointer specificBuild(const GeomDet* geom, const TrackingRecHit* rh) {
0076     LogDebug("Muon|RecoMuon|MuonDetLayerMeasurements") << "Getting specificBuild" << std::endl;
0077     return MuonRecHitPointer(new MuonTransientTrackingRecHit(geom, rh));
0078   }
0079 
0080   void invalidateHit();
0081 
0082 private:
0083   friend class kkkwwwxxxyyyzzz;  //just to avoid the compiler warning...
0084 
0085   /// Construct from a TrackingRecHit and its GeomDet
0086   MuonTransientTrackingRecHit(const GeomDet* geom, const TrackingRecHit* rh);
0087 
0088   /// Copy ctor
0089   MuonTransientTrackingRecHit(const MuonTransientTrackingRecHit& other);
0090 
0091   MuonTransientTrackingRecHit* clone() const override { return new MuonTransientTrackingRecHit(*this); }
0092 };
0093 #endif