Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:50

0001 #ifndef FastSimulation_Tracking_TrajectorySeedHitCandidate_H_
0002 
0003 #define FastSimulation_Tracking_TrajectorySeedHitCandidate_H_
0004 
0005 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0006 #include "DataFormats/DetId/interface/DetId.h"
0007 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0008 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
0009 #include "DataFormats/TrackerRecHit2D/interface/FastTrackerRecHit.h"
0010 #include "DataFormats/TrackerRecHit2D/interface/FastProjectedTrackerRecHit.h"
0011 #include "DataFormats/TrackerRecHit2D/interface/FastMatchedTrackerRecHit.h"
0012 #include "DataFormats/TrackerRecHit2D/interface/FastSingleTrackerRecHit.h"
0013 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0014 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0015 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0016 
0017 #include "FastSimulation/Tracking/interface/TrackingLayer.h"
0018 
0019 #include <vector>
0020 
0021 class TrackerTopology;
0022 
0023 class TrajectorySeedHitCandidate {
0024 public:
0025   /// Default Constructor
0026   TrajectorySeedHitCandidate()
0027       : theHit(nullptr),
0028         seedingLayer()
0029 
0030   {}
0031 
0032   /// Constructor from a FastTrackerRecHit and topology
0033   TrajectorySeedHitCandidate(const FastTrackerRecHit* hit, const TrackerTopology* tTopo);
0034 
0035   /// The Hit itself
0036   inline const FastTrackerRecHit* hit() const { return theHit; }
0037 
0038   inline const TrackingLayer& getTrackingLayer() const { return seedingLayer; }
0039 
0040   /// The subdet Id
0041   inline unsigned int subDetId() const { return seedingLayer.getSubDetNumber(); }
0042 
0043   /// The Layer Number
0044   inline unsigned int layerNumber() const { return seedingLayer.getLayerNumber(); }
0045 
0046   /// The local position
0047   inline LocalPoint localPosition() const { return hit()->localPosition(); }
0048   /// Check if the hit is on one of the requested detector
0049   //  bool isOnRequestedDet(const std::vector<unsigned int>& whichDet) const;
0050 
0051   /// Check if two hits are on the same layer of the same subdetector
0052   inline bool isOnTheSameLayer(const TrajectorySeedHitCandidate& other) const {
0053     return seedingLayer == other.seedingLayer;
0054   }
0055 
0056 private:
0057   const FastTrackerRecHit* theHit;
0058   TrackingLayer seedingLayer;
0059 };
0060 
0061 #endif