Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:33

0001 #ifndef MeasurementTrackerEvent_H
0002 #define MeasurementTrackerEvent_H
0003 
0004 #include <vector>
0005 class StMeasurementDetSet;
0006 class PxMeasurementDetSet;
0007 class Phase2OTMeasurementDetSet;
0008 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
0009 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0010 #include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h"
0011 #include "DataFormats/TrackerRecHit2D/interface/VectorHit.h"
0012 #include "DataFormats/Common/interface/ContainerMask.h"
0013 
0014 #include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
0015 
0016 class MeasurementTrackerEvent {
0017 public:
0018   using QualityFlags = MeasurementTracker::QualityFlags;
0019 
0020   /// Dummy constructor used for I/O (even if it's a transient object)
0021   MeasurementTrackerEvent() {}
0022   ~MeasurementTrackerEvent();
0023 
0024   /// Real constructor 1: with the full data (owned)
0025   MeasurementTrackerEvent(const MeasurementTracker &tracker,
0026                           const StMeasurementDetSet *strips,
0027                           const PxMeasurementDetSet *pixels,
0028                           const Phase2OTMeasurementDetSet *phase2OT,
0029                           const VectorHitCollection *phase2OTVectorHits,
0030                           const VectorHitCollection *phase2OTVectorHitsRej,
0031                           const std::vector<bool> &stripClustersToSkip,
0032                           const std::vector<bool> &pixelClustersToSkip,
0033                           const std::vector<bool> &phase2OTClustersToSkip)
0034       : theTracker(&tracker),
0035         theStripData(strips),
0036         thePixelData(pixels),
0037         thePhase2OTData(phase2OT),
0038         thePhase2OTVectorHits(phase2OTVectorHits),
0039         thePhase2OTVectorHitsRej(phase2OTVectorHitsRej),
0040         theOwner(true),
0041         theStripClustersToSkip(stripClustersToSkip),
0042         thePixelClustersToSkip(pixelClustersToSkip),
0043         thePhase2OTClustersToSkip(phase2OTClustersToSkip) {}
0044 
0045   /// Real constructor 2: with new cluster skips (checked)
0046   MeasurementTrackerEvent(const MeasurementTrackerEvent &trackerEvent,
0047                           const edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > &stripClustersToSkip,
0048                           const edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > &pixelClustersToSkip);
0049 
0050   //FIXME:just temporary solution for phase2!
0051   MeasurementTrackerEvent(
0052       const MeasurementTrackerEvent &trackerEvent,
0053       const edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > &phase2pixelClustersToSkip,
0054       const edm::ContainerMask<edmNew::DetSetVector<Phase2TrackerCluster1D> > &phase2OTClustersToSkip);
0055 
0056   MeasurementTrackerEvent(const MeasurementTrackerEvent &other) = delete;
0057   MeasurementTrackerEvent &operator=(const MeasurementTrackerEvent &other) = delete;
0058   MeasurementTrackerEvent(MeasurementTrackerEvent &&other);
0059   MeasurementTrackerEvent &operator=(MeasurementTrackerEvent &&other);
0060 
0061   const MeasurementTracker &measurementTracker() const { return *theTracker; }
0062   const StMeasurementDetSet &stripData() const { return *theStripData; }
0063   const PxMeasurementDetSet &pixelData() const { return *thePixelData; }
0064   const Phase2OTMeasurementDetSet &phase2OTData() const { return *thePhase2OTData; }
0065   const VectorHitCollection &phase2OTVectorHits() const { return *thePhase2OTVectorHits; }
0066   const VectorHitCollection &phase2OTVectorHitsRej() const { return *thePhase2OTVectorHitsRej; }
0067   const std::vector<bool> &stripClustersToSkip() const { return theStripClustersToSkip; }
0068   const std::vector<bool> &pixelClustersToSkip() const { return thePixelClustersToSkip; }
0069   const std::vector<bool> &phase2OTClustersToSkip() const { return thePhase2OTClustersToSkip; }
0070 
0071   // forwarded calls
0072   const TrackerGeometry *geomTracker() const { return measurementTracker().geomTracker(); }
0073   const GeometricSearchTracker *geometricSearchTracker() const { return measurementTracker().geometricSearchTracker(); }
0074 
0075   /// Previous MeasurementDetSystem interface
0076   MeasurementDetWithData idToDet(const DetId &id) const { return measurementTracker().idToDet(id, *this); }
0077 
0078 private:
0079   const MeasurementTracker *theTracker = nullptr;
0080   const StMeasurementDetSet *theStripData = nullptr;
0081   const PxMeasurementDetSet *thePixelData = nullptr;
0082   const Phase2OTMeasurementDetSet *thePhase2OTData = nullptr;
0083   const VectorHitCollection *thePhase2OTVectorHits = nullptr;
0084   const VectorHitCollection *thePhase2OTVectorHitsRej = nullptr;
0085   bool theOwner = false;  // do I own the tree above?
0086   // these  could be const pointers as well, but ContainerMask doesn't expose the vector
0087   std::vector<bool> theStripClustersToSkip;
0088   std::vector<bool> thePixelClustersToSkip;
0089   std::vector<bool> thePhase2OTClustersToSkip;
0090 };
0091 
0092 #endif  // MeasurementTrackerEvent_H