CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
MeasurementTrackerEvent Class Reference

#include <MeasurementTrackerEvent.h>

Public Types

using QualityFlags = MeasurementTracker::QualityFlags
 

Public Member Functions

const GeometricSearchTrackergeometricSearchTracker () const
 
const TrackingGeometrygeomTracker () const
 
MeasurementDetWithData idToDet (const DetId &id) const
 Previous MeasurementDetSystem interface. More...
 
const MeasurementTrackermeasurementTracker () const
 
 MeasurementTrackerEvent ()
 Dummy constructor used for I/O (even if it's a transient object) More...
 
 MeasurementTrackerEvent (const MeasurementTracker &tracker, const StMeasurementDetSet *strips, const PxMeasurementDetSet *pixels, const Phase2OTMeasurementDetSet *phase2OT, const std::vector< bool > &stripClustersToSkip, const std::vector< bool > &pixelClustersToSkip, const std::vector< bool > &phase2OTClustersToSkip)
 Real constructor 1: with the full data (owned) More...
 
 MeasurementTrackerEvent (const MeasurementTrackerEvent &trackerEvent, const edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > &stripClustersToSkip, const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &pixelClustersToSkip)
 Real constructor 2: with new cluster skips (checked) More...
 
 MeasurementTrackerEvent (const MeasurementTrackerEvent &trackerEvent, const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &phase2pixelClustersToSkip, const edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > &phase2OTClustersToSkip)
 
 MeasurementTrackerEvent (const MeasurementTrackerEvent &other)=delete
 
 MeasurementTrackerEvent (MeasurementTrackerEvent &&other)=delete
 
MeasurementTrackerEventoperator= (const MeasurementTrackerEvent &other)=delete
 
MeasurementTrackerEventoperator= (MeasurementTrackerEvent &&other)=delete
 
const std::vector< bool > & phase2OTClustersToSkip () const
 
const Phase2OTMeasurementDetSetphase2OTData () const
 
const std::vector< bool > & pixelClustersToSkip () const
 
const PxMeasurementDetSetpixelData () const
 
const std::vector< bool > & stripClustersToSkip () const
 
const StMeasurementDetSetstripData () const
 
void swap (MeasurementTrackerEvent &other)
 
 ~MeasurementTrackerEvent ()
 

Private Attributes

bool theOwner =false
 
std::vector< bool > thePhase2OTClustersToSkip
 
const Phase2OTMeasurementDetSetthePhase2OTData = 0
 
std::vector< bool > thePixelClustersToSkip
 
const PxMeasurementDetSetthePixelData = 0
 
std::vector< bool > theStripClustersToSkip
 
const StMeasurementDetSettheStripData = 0
 
const MeasurementTrackertheTracker = 0
 

Detailed Description

Definition at line 15 of file MeasurementTrackerEvent.h.

Member Typedef Documentation

Definition at line 17 of file MeasurementTrackerEvent.h.

Constructor & Destructor Documentation

MeasurementTrackerEvent::MeasurementTrackerEvent ( )
inline

Dummy constructor used for I/O (even if it's a transient object)

Definition at line 20 of file MeasurementTrackerEvent.h.

References ~MeasurementTrackerEvent().

Referenced by MeasurementTrackerEvent().

20 {}
MeasurementTrackerEvent::~MeasurementTrackerEvent ( )

Definition at line 4 of file MeasurementTrackerEvent.cc.

References theOwner, thePhase2OTData, thePixelData, and theStripData.

Referenced by MeasurementTrackerEvent().

4  {
5  if (theOwner) {
6  //std::cout << "Deleting owned MT @" << this << " (strip data @ " << theStripData << ")" << std::endl;
7  delete theStripData; theStripData = nullptr; // also sets to zero since sometimes the FWK seems
8  delete thePixelData; thePixelData = nullptr; // to double-delete the same object (!!!)
9  delete thePhase2OTData; thePhase2OTData = nullptr; // to double-delete the same object (!!!)
10  }
11 }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const Phase2OTMeasurementDetSet * thePhase2OTData
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTracker tracker,
const StMeasurementDetSet strips,
const PxMeasurementDetSet pixels,
const Phase2OTMeasurementDetSet phase2OT,
const std::vector< bool > &  stripClustersToSkip,
const std::vector< bool > &  pixelClustersToSkip,
const std::vector< bool > &  phase2OTClustersToSkip 
)
inline

Real constructor 1: with the full data (owned)

Definition at line 24 of file MeasurementTrackerEvent.h.

References MeasurementTrackerEvent(), operator=(), trackingPlots::other, phase2OTClustersToSkip(), pixelClustersToSkip(), stripClustersToSkip(), and swap().

28  :
29  theTracker(&tracker), theStripData(strips), thePixelData(pixels), thePhase2OTData(phase2OT), theOwner(true),
const std::vector< bool > & phase2OTClustersToSkip() const
std::vector< bool > thePhase2OTClustersToSkip
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent trackerEvent,
const edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > &  stripClustersToSkip,
const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &  pixelClustersToSkip 
)

Real constructor 2: with new cluster skips (checked)

Definition at line 28 of file MeasurementTrackerEvent.cc.

References Exception, StMeasurementDetSet::handle(), PxMeasurementDetSet::handle(), edm::HandleBase::id(), pixelClustersToSkip(), stripClustersToSkip(), thePixelClustersToSkip, thePixelData, theStripClustersToSkip, and theStripData.

30  :
31  theTracker(trackerEvent.theTracker),
32  theStripData(trackerEvent.theStripData),
33  thePixelData(trackerEvent.thePixelData),
34  thePhase2OTData(nullptr),
35  theOwner(false)
36 {
37  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
38  if (stripClustersToSkip.refProd().id() != theStripData->handle().id() ){
39  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id();
40  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<< theStripData->handle().id()<< "\n";
41  }
42 
43  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
44  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
45  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
46  }
47 
48  theStripClustersToSkip.resize(stripClustersToSkip.size());
49  stripClustersToSkip.copyMaskTo(theStripClustersToSkip);
50 
51  thePixelClustersToSkip.resize(pixelClustersToSkip.size());
52  pixelClustersToSkip.copyMaskTo(thePixelClustersToSkip);
53 }
ProductID id() const
Definition: HandleBase.cc:15
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const
void copyMaskTo(std::vector< bool > &) const
Definition: ContainerMask.h:90
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
size_t size() const
Definition: ContainerMask.h:54
ProductID id() const
Accessor for product ID.
Definition: RefProd.h:137
const edm::RefProd< T > & refProd() const
Definition: ContainerMask.h:56
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent trackerEvent,
const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &  phase2pixelClustersToSkip,
const edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > &  phase2OTClustersToSkip 
)

Definition at line 56 of file MeasurementTrackerEvent.cc.

References Exception, PxMeasurementDetSet::handle(), Phase2OTMeasurementDetSet::handle(), edm::HandleBase::id(), phase2OTClustersToSkip(), pixelClustersToSkip(), thePhase2OTClustersToSkip, thePhase2OTData, thePixelClustersToSkip, and thePixelData.

58  :
59  theTracker(trackerEvent.theTracker),
60  theStripData(nullptr),
61  thePixelData(trackerEvent.thePixelData),
62  thePhase2OTData(trackerEvent.thePhase2OTData),
63  theOwner(false)
64 {
65 
66  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
67  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
68  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
69  }
70 
71  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()){
72  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
73  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
74  }
75 
78 
79  thePhase2OTClustersToSkip.resize(phase2OTClustersToSkip.size());
80  phase2OTClustersToSkip.copyMaskTo(thePhase2OTClustersToSkip);
81 }
ProductID id() const
Definition: HandleBase.cc:15
std::vector< bool > thePhase2OTClustersToSkip
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const
const std::vector< bool > & pixelClustersToSkip() const
void copyMaskTo(std::vector< bool > &) const
Definition: ContainerMask.h:90
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
size_t size() const
Definition: ContainerMask.h:54
const edm::RefProd< T > & refProd() const
Definition: ContainerMask.h:56
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent other)
delete
MeasurementTrackerEvent::MeasurementTrackerEvent ( MeasurementTrackerEvent &&  other)
delete

Member Function Documentation

const GeometricSearchTracker* MeasurementTrackerEvent::geometricSearchTracker ( ) const
inline
const TrackingGeometry* MeasurementTrackerEvent::geomTracker ( ) const
inline
MeasurementDetWithData MeasurementTrackerEvent::idToDet ( const DetId id) const
inline

Previous MeasurementDetSystem interface.

Definition at line 64 of file MeasurementTrackerEvent.h.

References MeasurementTracker::idToDet(), and measurementTracker().

Referenced by OutsideInMuonSeeder::doLayer(), TSGFromPropagation::findMeasurements_new(), TrajSeedMatcher::layerHasValidHits(), TSGForRoadSearch::pushTrajectorySeed(), and DAFTrackProducerAlgorithm::updateHits().

64 { return measurementTracker().idToDet(id, *this); }
const MeasurementTracker & measurementTracker() const
MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const override=0
MeasurementDetSystem interface.
const MeasurementTracker& MeasurementTrackerEvent::measurementTracker ( ) const
inline

Definition at line 51 of file MeasurementTrackerEvent.h.

References theTracker.

Referenced by MuonCkfTrajectoryBuilder::collectMeasurement(), geometricSearchTracker(), geomTracker(), and idToDet().

51 { return * theTracker; }
const MeasurementTracker * theTracker
MeasurementTrackerEvent& MeasurementTrackerEvent::operator= ( const MeasurementTrackerEvent other)
delete

Referenced by MeasurementTrackerEvent().

MeasurementTrackerEvent& MeasurementTrackerEvent::operator= ( MeasurementTrackerEvent &&  other)
delete
const std::vector<bool>& MeasurementTrackerEvent::phase2OTClustersToSkip ( ) const
inline
const Phase2OTMeasurementDetSet& MeasurementTrackerEvent::phase2OTData ( ) const
inline

Definition at line 54 of file MeasurementTrackerEvent.h.

References thePhase2OTData.

Referenced by TkPhase2OTMeasurementDet::isActive(), and TkPhase2OTMeasurementDet::recHits().

54 { return * thePhase2OTData; }
const Phase2OTMeasurementDetSet * thePhase2OTData
const std::vector<bool>& MeasurementTrackerEvent::pixelClustersToSkip ( ) const
inline

Definition at line 56 of file MeasurementTrackerEvent.h.

References thePixelClustersToSkip.

Referenced by TkPixelMeasurementDet::compHits(), and MeasurementTrackerEvent().

56 { return thePixelClustersToSkip; }
std::vector< bool > thePixelClustersToSkip
const PxMeasurementDetSet& MeasurementTrackerEvent::pixelData ( ) const
inline
const std::vector<bool>& MeasurementTrackerEvent::stripClustersToSkip ( ) const
inline
const StMeasurementDetSet& MeasurementTrackerEvent::stripData ( ) const
inline
void MeasurementTrackerEvent::swap ( MeasurementTrackerEvent other)

Definition at line 14 of file MeasurementTrackerEvent.cc.

References std::swap(), theOwner, thePhase2OTData, thePixelClustersToSkip, thePixelData, theStripClustersToSkip, theStripData, and theTracker.

Referenced by MeasurementTrackerEvent(), and swap().

15 {
16  if (&other != this) {
17  using std::swap;
18  swap(theTracker, other.theTracker);
22  swap(theOwner, other.theOwner);
25  }
26 }
const StMeasurementDetSet * theStripData
void swap(MeasurementTrackerEvent &other)
const PxMeasurementDetSet * thePixelData
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< bool > theStripClustersToSkip
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip

Member Data Documentation

bool MeasurementTrackerEvent::theOwner =false
private

Definition at line 71 of file MeasurementTrackerEvent.h.

Referenced by swap(), and ~MeasurementTrackerEvent().

std::vector<bool> MeasurementTrackerEvent::thePhase2OTClustersToSkip
private

Definition at line 75 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), and phase2OTClustersToSkip().

const Phase2OTMeasurementDetSet* MeasurementTrackerEvent::thePhase2OTData = 0
private
std::vector<bool> MeasurementTrackerEvent::thePixelClustersToSkip
private

Definition at line 74 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), pixelClustersToSkip(), and swap().

const PxMeasurementDetSet* MeasurementTrackerEvent::thePixelData = 0
private
std::vector<bool> MeasurementTrackerEvent::theStripClustersToSkip
private

Definition at line 73 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), stripClustersToSkip(), and swap().

const StMeasurementDetSet* MeasurementTrackerEvent::theStripData = 0
private
const MeasurementTracker* MeasurementTrackerEvent::theTracker = 0
private

Definition at line 67 of file MeasurementTrackerEvent.h.

Referenced by measurementTracker(), and swap().