CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
MeasurementTrackerEvent Class Reference

#include <MeasurementTrackerEvent.h>

Public Types

typedef
MeasurementTracker::QualityFlags 
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 std::vector< bool > &stripClustersToSkip=std::vector< bool >(), const std::vector< bool > &pixelClustersToSkip=std::vector< bool >())
 Real constructor 1: with the full data (not owned) More...
 
 MeasurementTrackerEvent (const MeasurementTracker &tracker, const StMeasurementDetSet *strips, const PxMeasurementDetSet *pixels, const std::vector< bool > &stripClustersToSkip=std::vector< bool >(), const std::vector< bool > &pixelClustersToSkip=std::vector< bool >())
 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 &other)
 
 MeasurementTrackerEvent (MeasurementTrackerEvent &&other)
 
MeasurementTrackerEventoperator= (const MeasurementTrackerEvent &other)
 
MeasurementTrackerEventoperator= (MeasurementTrackerEvent &&other)
 
const std::vector< bool > & pixelClustersToSkip () const
 
const PxMeasurementDetSetpixelData () const
 
const std::vector< bool > & stripClustersToSkip () const
 
const StMeasurementDetSetstripData () const
 
void swap (MeasurementTrackerEvent &other)
 
 ~MeasurementTrackerEvent ()
 

Protected Attributes

bool theOwner
 
std::vector< bool > thePixelClustersToSkip
 
const PxMeasurementDetSetthePixelData
 
std::vector< bool > theStripClustersToSkip
 
const StMeasurementDetSettheStripData
 
const MeasurementTrackertheTracker
 

Detailed Description

Definition at line 21 of file MeasurementTrackerEvent.h.

Member Typedef Documentation

Definition at line 24 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 28 of file MeasurementTrackerEvent.h.

const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::~MeasurementTrackerEvent ( )

Definition at line 4 of file MeasurementTrackerEvent.cc.

References theOwner, thePixelData, and theStripData.

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

Real constructor 1: with the full data (not owned)

Definition at line 33 of file MeasurementTrackerEvent.h.

35  :
36  theTracker(&tracker), theStripData(&strips), thePixelData(&pixels), theOwner(false),
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTracker tracker,
const StMeasurementDetSet strips,
const PxMeasurementDetSet pixels,
const std::vector< bool > &  stripClustersToSkip = std::vector<bool>(),
const std::vector< bool > &  pixelClustersToSkip = std::vector<bool>() 
)
inline

Real constructor 1: with the full data (owned)

Definition at line 40 of file MeasurementTrackerEvent.h.

42  :
43  theTracker(&tracker), theStripData(strips), thePixelData(pixels), theOwner(true),
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & stripClustersToSkip() const
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
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 26 of file MeasurementTrackerEvent.cc.

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

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

Definition at line 59 of file MeasurementTrackerEvent.h.

References theOwner.

59  :
60  theTracker(other.theTracker),
63  theOwner(false),
66  {
67  assert(other.theOwner == false && "trying to copy an owning pointer");
68  }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
MeasurementTrackerEvent::MeasurementTrackerEvent ( MeasurementTrackerEvent &&  other)
inline

Definition at line 80 of file MeasurementTrackerEvent.h.

80  :
81  theTracker(other.theTracker),
84  theOwner(other.theOwner),
87  {
88  other.theTracker = 0;
89  other.theStripData = 0; other.thePixelData = 0;
90  other.theOwner = false;
91  }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip

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

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

Referenced by OutsideInMuonSeeder::doLayer(), TSGForRoadSearch::pushTrajectorySeed(), and SimpleDAFHitCollector::recHits().

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

Definition at line 70 of file MeasurementTrackerEvent.h.

References filterCSVwithJSON::copy, and swap().

71  {
72  if (&other != this) {
74  copy.swap(*this);
75  }
76  return *this;
77  }
MeasurementTrackerEvent& MeasurementTrackerEvent::operator= ( MeasurementTrackerEvent &&  other)
inline

Definition at line 93 of file MeasurementTrackerEvent.h.

References filterCSVwithJSON::copy, and swap().

94  {
95  if (&other != this) {
97  copy.swap(*this);
98  }
99  return *this;
100  }
const std::vector<bool>& MeasurementTrackerEvent::pixelClustersToSkip ( ) const
inline

Definition at line 109 of file MeasurementTrackerEvent.h.

References thePixelClustersToSkip.

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

109 { return thePixelClustersToSkip; }
std::vector< bool > thePixelClustersToSkip
const PxMeasurementDetSet& MeasurementTrackerEvent::pixelData ( ) const
inline

Definition at line 107 of file MeasurementTrackerEvent.h.

References thePixelData.

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

107 { return * thePixelData; }
const PxMeasurementDetSet * thePixelData
const std::vector<bool>& MeasurementTrackerEvent::stripClustersToSkip ( ) const
inline

Definition at line 108 of file MeasurementTrackerEvent.h.

References theStripClustersToSkip.

Referenced by MeasurementTrackerEvent().

108 { return theStripClustersToSkip; }
std::vector< bool > theStripClustersToSkip
const StMeasurementDetSet& MeasurementTrackerEvent::stripData ( ) const
inline

Definition at line 106 of file MeasurementTrackerEvent.h.

References theStripData.

Referenced by GCC11_FINAL< T, TOPO >::isActive().

106 { return * theStripData; }
const StMeasurementDetSet * theStripData
void MeasurementTrackerEvent::swap ( MeasurementTrackerEvent other)

Definition at line 13 of file MeasurementTrackerEvent.cc.

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

Referenced by operator=(), and swap().

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

Member Data Documentation

bool MeasurementTrackerEvent::theOwner
protected
std::vector<bool> MeasurementTrackerEvent::thePixelClustersToSkip
protected

Definition at line 127 of file MeasurementTrackerEvent.h.

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

const PxMeasurementDetSet* MeasurementTrackerEvent::thePixelData
protected
std::vector<bool> MeasurementTrackerEvent::theStripClustersToSkip
protected

Definition at line 126 of file MeasurementTrackerEvent.h.

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

const StMeasurementDetSet* MeasurementTrackerEvent::theStripData
protected
const MeasurementTracker* MeasurementTrackerEvent::theTracker
protected

Definition at line 121 of file MeasurementTrackerEvent.h.

Referenced by measurementTracker(), and swap().