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)
 
MeasurementTrackerEventoperator= (const MeasurementTrackerEvent &other)=delete
 
MeasurementTrackerEventoperator= (MeasurementTrackerEvent &&other)
 
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
 
 ~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(), and stripClustersToSkip().

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 35 of file MeasurementTrackerEvent.cc.

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

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

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

65  :
66  theTracker(trackerEvent.theTracker),
67  theStripData(nullptr),
68  thePixelData(trackerEvent.thePixelData),
69  thePhase2OTData(trackerEvent.thePhase2OTData),
70  theOwner(false)
71 {
72 
73  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()){
74  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
75  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
76  }
77 
78  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()){
79  edm::LogError("ProductIdMismatch")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id();
80  throw cms::Exception("Configuration")<<"The pixel masking does not point to the proper collection of clusters: "<<pixelClustersToSkip.refProd().id()<<"!="<<thePixelData->handle().id()<<"\n";
81  }
82 
85 
86  thePhase2OTClustersToSkip.resize(phase2OTClustersToSkip.size());
87  phase2OTClustersToSkip.copyMaskTo(thePhase2OTClustersToSkip);
88 }
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:91
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
size_t size() const
Definition: ContainerMask.h:55
ProductID id() const
Accessor for product ID.
Definition: RefProd.h:137
const edm::RefProd< T > & refProd() const
Definition: ContainerMask.h:57
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent other)
delete
MeasurementTrackerEvent::MeasurementTrackerEvent ( MeasurementTrackerEvent &&  other)

Definition at line 13 of file MeasurementTrackerEvent.cc.

References eostools::move(), trackingPlots::other, theOwner, thePhase2OTData, thePixelClustersToSkip, thePixelData, theStripClustersToSkip, theStripData, and theTracker.

13  {
18  theOwner = other.theOwner;
19  other.theOwner = false; // make sure to fully transfer the ownership
22 }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
def move(src, dest)
Definition: eostools.py:511

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 61 of file MeasurementTrackerEvent.h.

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

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

61 { 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 48 of file MeasurementTrackerEvent.h.

References theTracker.

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

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

Referenced by MeasurementTrackerEvent().

MeasurementTrackerEvent & MeasurementTrackerEvent::operator= ( MeasurementTrackerEvent &&  other)

Definition at line 23 of file MeasurementTrackerEvent.cc.

References eostools::move(), trackingPlots::other, theOwner, thePhase2OTData, thePixelClustersToSkip, thePixelData, theStripClustersToSkip, theStripData, and theTracker.

23  {
28  theOwner = other.theOwner;
29  other.theOwner = false; // make sure to fully transfer the ownership
32  return *this;
33 }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
def move(src, dest)
Definition: eostools.py:511
const std::vector<bool>& MeasurementTrackerEvent::phase2OTClustersToSkip ( ) const
inline
const Phase2OTMeasurementDetSet& MeasurementTrackerEvent::phase2OTData ( ) const
inline

Definition at line 51 of file MeasurementTrackerEvent.h.

References thePhase2OTData.

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

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

Definition at line 53 of file MeasurementTrackerEvent.h.

References thePixelClustersToSkip.

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

53 { 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

Member Data Documentation

bool MeasurementTrackerEvent::theOwner =false
private
std::vector<bool> MeasurementTrackerEvent::thePhase2OTClustersToSkip
private

Definition at line 72 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), and phase2OTClustersToSkip().

const Phase2OTMeasurementDetSet* MeasurementTrackerEvent::thePhase2OTData = 0
private
std::vector<bool> MeasurementTrackerEvent::thePixelClustersToSkip
private
const PxMeasurementDetSet* MeasurementTrackerEvent::thePixelData = 0
private
std::vector<bool> MeasurementTrackerEvent::theStripClustersToSkip
private
const StMeasurementDetSet* MeasurementTrackerEvent::theStripData = 0
private
const MeasurementTracker* MeasurementTrackerEvent::theTracker = 0
private