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...
 
bool isStripRegional () const
 
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 &trackerEvent, const edm::ContainerMask< edm::LazyGetter< 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 22 of file MeasurementTrackerEvent.h.

Member Typedef Documentation

Definition at line 25 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 29 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 34 of file MeasurementTrackerEvent.h.

36  :
37  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 41 of file MeasurementTrackerEvent.h.

43  :
44  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(), StMeasurementDetSet::isRegional(), pixelClustersToSkip(), StMeasurementDetSet::regionalHandle(), 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->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().id())){
36  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<<(!theStripData->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().id());
37  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<<(!theStripData->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().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
edm::Handle< edm::LazyGetter< SiStripCluster > > & regionalHandle()
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 trackerEvent,
const edm::ContainerMask< edm::LazyGetter< SiStripCluster > > &  stripClustersToSkip,
const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &  pixelClustersToSkip 
)

Real constructor 2: with new cluster skips (checked)

Definition at line 52 of file MeasurementTrackerEvent.cc.

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

54  :
55  theTracker(trackerEvent.theTracker),
56  theStripData(trackerEvent.theStripData), thePixelData(trackerEvent.thePixelData), theOwner(false),
59 {
60  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
61  if (stripClustersToSkip.refProd().id() != (!theStripData->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().id())){
62  edm::LogError("ProductIdMismatch")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<<(!theStripData->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().id());
63  throw cms::Exception("Configuration")<<"The strip masking does not point to the strip collection of clusters: "<<stripClustersToSkip.refProd().id()<<"!="<<(!theStripData->isRegional() ? theStripData->handle().id() : theStripData->regionalHandle().id()) << "\n";
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  theStripClustersToSkip.resize(stripClustersToSkip.size());
72  stripClustersToSkip.copyMaskTo(theStripClustersToSkip);
73 
74  thePixelClustersToSkip.resize(pixelClustersToSkip.size());
75  pixelClustersToSkip.copyMaskTo(thePixelClustersToSkip);
76 }
ProductID id() const
Definition: HandleBase.cc:15
edm::Handle< edm::LazyGetter< SiStripCluster > > & regionalHandle()
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 65 of file MeasurementTrackerEvent.h.

References theOwner.

65  :
66  theTracker(other.theTracker),
69  theOwner(false),
72  {
73  assert(other.theOwner == false && "trying to copy an owning pointer");
74  }
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 86 of file MeasurementTrackerEvent.h.

86  :
87  theTracker(other.theTracker),
90  theOwner(other.theOwner),
93  {
94  other.theTracker = 0;
95  other.theStripData = 0; other.thePixelData = 0;
96  other.theOwner = false;
97  }
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 124 of file MeasurementTrackerEvent.h.

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

Referenced by OutsideInMuonSeeder::doLayer(), MuonRoadTrajectoryBuilder::GatherHits(), and TSGForRoadSearch::pushTrajectorySeed().

124 { return measurementTracker().idToDet(id, *this); }
const MeasurementTracker & measurementTracker() const
virtual MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const =0
MeasurementDetSystem interface.
bool MeasurementTrackerEvent::isStripRegional ( ) const

Definition at line 78 of file MeasurementTrackerEvent.cc.

References StMeasurementDetSet::isRegional(), and stripData().

78  {
79  return stripData().isRegional();
80 }
const StMeasurementDetSet & stripData() const
const MeasurementTracker& MeasurementTrackerEvent::measurementTracker ( ) const
inline
MeasurementTrackerEvent& MeasurementTrackerEvent::operator= ( const MeasurementTrackerEvent other)
inline

Definition at line 76 of file MeasurementTrackerEvent.h.

References filterCSVwithJSON::copy, and swap().

77  {
78  if (&other != this) {
80  copy.swap(*this);
81  }
82  return *this;
83  }
MeasurementTrackerEvent& MeasurementTrackerEvent::operator= ( MeasurementTrackerEvent &&  other)
inline

Definition at line 99 of file MeasurementTrackerEvent.h.

References filterCSVwithJSON::copy, and swap().

100  {
101  if (&other != this) {
103  copy.swap(*this);
104  }
105  return *this;
106  }
const std::vector<bool>& MeasurementTrackerEvent::pixelClustersToSkip ( ) const
inline

Definition at line 115 of file MeasurementTrackerEvent.h.

References thePixelClustersToSkip.

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

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

Definition at line 113 of file MeasurementTrackerEvent.h.

References thePixelData.

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

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

Definition at line 114 of file MeasurementTrackerEvent.h.

References theStripClustersToSkip.

Referenced by MeasurementTrackerEvent().

114 { return theStripClustersToSkip; }
std::vector< bool > theStripClustersToSkip
const StMeasurementDetSet& MeasurementTrackerEvent::stripData ( ) const
inline
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 134 of file MeasurementTrackerEvent.h.

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

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

Definition at line 133 of file MeasurementTrackerEvent.h.

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

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

Definition at line 128 of file MeasurementTrackerEvent.h.

Referenced by measurementTracker(), and swap().