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 &other)=delete
 
 MeasurementTrackerEvent (const MeasurementTrackerEvent &trackerEvent, const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &phase2pixelClustersToSkip, const edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > &phase2OTClustersToSkip)
 
 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 (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 = nullptr
 
std::vector< bool > thePixelClustersToSkip
 
const PxMeasurementDetSetthePixelData = nullptr
 
std::vector< bool > theStripClustersToSkip
 
const StMeasurementDetSettheStripData = nullptr
 
const MeasurementTrackertheTracker = nullptr
 

Detailed Description

Definition at line 15 of file MeasurementTrackerEvent.h.

Member Typedef Documentation

◆ QualityFlags

Definition at line 17 of file MeasurementTrackerEvent.h.

Constructor & Destructor Documentation

◆ MeasurementTrackerEvent() [1/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( )
inline

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

Definition at line 20 of file MeasurementTrackerEvent.h.

20 {}

◆ ~MeasurementTrackerEvent()

MeasurementTrackerEvent::~MeasurementTrackerEvent ( )

Definition at line 4 of file MeasurementTrackerEvent.cc.

4  {
5  if (theOwner) {
6  //std::cout << "Deleting owned MT @" << this << " (strip data @ " << theStripData << ")" << std::endl;
7  delete theStripData;
8  theStripData = nullptr; // also sets to zero since sometimes the FWK seems
9  delete thePixelData;
10  thePixelData = nullptr; // to double-delete the same object (!!!)
11  delete thePhase2OTData;
12  thePhase2OTData = nullptr; // to double-delete the same object (!!!)
13  }
14 }

References theOwner, thePhase2OTData, thePixelData, and theStripData.

◆ MeasurementTrackerEvent() [2/6]

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.

◆ MeasurementTrackerEvent() [3/6]

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

42  : theTracker(trackerEvent.theTracker),
43  theStripData(trackerEvent.theStripData),
44  thePixelData(trackerEvent.thePixelData),
45  thePhase2OTData(nullptr),
46  theOwner(false) {
47  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
48  if (stripClustersToSkip.refProd().id() != theStripData->handle().id()) {
49  edm::LogError("ProductIdMismatch") << "The strip masking does not point to the strip collection of clusters: "
50  << stripClustersToSkip.refProd().id() << "!=" << theStripData->handle().id();
51  throw cms::Exception("Configuration")
52  << "The strip masking does not point to the strip collection of clusters: "
53  << stripClustersToSkip.refProd().id() << "!=" << theStripData->handle().id() << "\n";
54  }
55 
56  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()) {
57  edm::LogError("ProductIdMismatch") << "The pixel masking does not point to the proper collection of clusters: "
58  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id();
59  throw cms::Exception("Configuration")
60  << "The pixel masking does not point to the proper collection of clusters: "
61  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id() << "\n";
62  }
63 
66 
69 }

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

◆ MeasurementTrackerEvent() [4/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent trackerEvent,
const edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > &  phase2pixelClustersToSkip,
const edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > &  phase2OTClustersToSkip 
)

Definition at line 72 of file MeasurementTrackerEvent.cc.

76  : theTracker(trackerEvent.theTracker),
77  theStripData(nullptr),
78  thePixelData(trackerEvent.thePixelData),
79  thePhase2OTData(trackerEvent.thePhase2OTData),
80  theOwner(false) {
81  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()) {
82  edm::LogError("ProductIdMismatch") << "The pixel masking does not point to the proper collection of clusters: "
83  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id();
84  throw cms::Exception("Configuration")
85  << "The pixel masking does not point to the proper collection of clusters: "
86  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id() << "\n";
87  }
88 
89  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()) {
90  edm::LogError("ProductIdMismatch") << "The pixel masking does not point to the proper collection of clusters: "
91  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id();
92  throw cms::Exception("Configuration")
93  << "The pixel masking does not point to the proper collection of clusters: "
94  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id() << "\n";
95  }
96 
99 
102 }

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

◆ MeasurementTrackerEvent() [5/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent other)
delete

◆ MeasurementTrackerEvent() [6/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( MeasurementTrackerEvent &&  other)

Definition at line 16 of file MeasurementTrackerEvent.cc.

16  {
17  theTracker = std::move(other.theTracker);
18  theStripData = std::move(other.theStripData);
19  thePixelData = std::move(other.thePixelData);
20  thePhase2OTData = std::move(other.thePhase2OTData);
21  theOwner = other.theOwner;
22  other.theOwner = false; // make sure to fully transfer the ownership
23  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
24  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
25 }

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

Member Function Documentation

◆ geometricSearchTracker()

const GeometricSearchTracker* MeasurementTrackerEvent::geometricSearchTracker ( ) const
inline

◆ geomTracker()

const TrackingGeometry* MeasurementTrackerEvent::geomTracker ( ) const
inline

◆ idToDet()

MeasurementDetWithData MeasurementTrackerEvent::idToDet ( const DetId id) const
inline

◆ measurementTracker()

const MeasurementTracker& MeasurementTrackerEvent::measurementTracker ( ) const
inline

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 26 of file MeasurementTrackerEvent.cc.

26  {
27  theTracker = std::move(other.theTracker);
28  theStripData = std::move(other.theStripData);
29  thePixelData = std::move(other.thePixelData);
30  thePhase2OTData = std::move(other.thePhase2OTData);
31  theOwner = other.theOwner;
32  other.theOwner = false; // make sure to fully transfer the ownership
33  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
34  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
35  return *this;
36 }

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

◆ phase2OTClustersToSkip()

const std::vector<bool>& MeasurementTrackerEvent::phase2OTClustersToSkip ( ) const
inline

Definition at line 62 of file MeasurementTrackerEvent.h.

62 { return thePhase2OTClustersToSkip; }

References thePhase2OTClustersToSkip.

Referenced by MeasurementTrackerEvent().

◆ phase2OTData()

const Phase2OTMeasurementDetSet& MeasurementTrackerEvent::phase2OTData ( ) const
inline

Definition at line 59 of file MeasurementTrackerEvent.h.

59 { return *thePhase2OTData; }

References thePhase2OTData.

◆ pixelClustersToSkip()

const std::vector<bool>& MeasurementTrackerEvent::pixelClustersToSkip ( ) const
inline

Definition at line 61 of file MeasurementTrackerEvent.h.

61 { return thePixelClustersToSkip; }

References thePixelClustersToSkip.

Referenced by MeasurementTrackerEvent().

◆ pixelData()

const PxMeasurementDetSet& MeasurementTrackerEvent::pixelData ( ) const
inline

Definition at line 58 of file MeasurementTrackerEvent.h.

58 { return *thePixelData; }

References thePixelData.

◆ stripClustersToSkip()

const std::vector<bool>& MeasurementTrackerEvent::stripClustersToSkip ( ) const
inline

Definition at line 60 of file MeasurementTrackerEvent.h.

60 { return theStripClustersToSkip; }

References theStripClustersToSkip.

Referenced by MeasurementTrackerEvent().

◆ stripData()

const StMeasurementDetSet& MeasurementTrackerEvent::stripData ( ) const
inline

Definition at line 57 of file MeasurementTrackerEvent.h.

57 { return *theStripData; }

References theStripData.

Member Data Documentation

◆ theOwner

bool MeasurementTrackerEvent::theOwner = false
private

◆ thePhase2OTClustersToSkip

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

Definition at line 80 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), and phase2OTClustersToSkip().

◆ thePhase2OTData

const Phase2OTMeasurementDetSet* MeasurementTrackerEvent::thePhase2OTData = nullptr
private

◆ thePixelClustersToSkip

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

◆ thePixelData

const PxMeasurementDetSet* MeasurementTrackerEvent::thePixelData = nullptr
private

◆ theStripClustersToSkip

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

◆ theStripData

const StMeasurementDetSet* MeasurementTrackerEvent::theStripData = nullptr
private

◆ theTracker

const MeasurementTracker* MeasurementTrackerEvent::theTracker = nullptr
private
MeasurementTrackerEvent::theTracker
const MeasurementTracker * theTracker
Definition: MeasurementTrackerEvent.h:72
MeasurementTrackerEvent::thePixelClustersToSkip
std::vector< bool > thePixelClustersToSkip
Definition: MeasurementTrackerEvent.h:79
MeasurementTrackerEvent::thePhase2OTClustersToSkip
std::vector< bool > thePhase2OTClustersToSkip
Definition: MeasurementTrackerEvent.h:80
MeasurementTracker::geometricSearchTracker
const GeometricSearchTracker * geometricSearchTracker() const
Definition: MeasurementTracker.h:38
MeasurementTrackerEvent::stripClustersToSkip
const std::vector< bool > & stripClustersToSkip() const
Definition: MeasurementTrackerEvent.h:60
MeasurementTrackerEvent::theStripClustersToSkip
std::vector< bool > theStripClustersToSkip
Definition: MeasurementTrackerEvent.h:78
MeasurementTracker::geomTracker
const TrackingGeometry * geomTracker() const
Definition: MeasurementTracker.h:36
PxMeasurementDetSet::handle
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const
Definition: TkMeasurementDetSet.h:385
Phase2OTMeasurementDetSet::handle
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
Definition: TkMeasurementDetSet.h:471
trackingPlots.other
other
Definition: trackingPlots.py:1465
PbPb_ZMuSkimMuonDPG_cff.tracker
tracker
Definition: PbPb_ZMuSkimMuonDPG_cff.py:60
MeasurementTrackerEvent::measurementTracker
const MeasurementTracker & measurementTracker() const
Definition: MeasurementTrackerEvent.h:56
edm::LogError
Definition: MessageLogger.h:183
MeasurementTrackerEvent::phase2OTClustersToSkip
const std::vector< bool > & phase2OTClustersToSkip() const
Definition: MeasurementTrackerEvent.h:62
MeasurementTrackerEvent::theStripData
const StMeasurementDetSet * theStripData
Definition: MeasurementTrackerEvent.h:73
MeasurementTrackerEvent::thePixelData
const PxMeasurementDetSet * thePixelData
Definition: MeasurementTrackerEvent.h:74
MeasurementTracker::idToDet
MeasurementDetWithData idToDet(const DetId &id, const MeasurementTrackerEvent &data) const override=0
MeasurementDetSystem interface.
StMeasurementDetSet::handle
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
Definition: TkMeasurementDetSet.h:204
eostools.move
def move(src, dest)
Definition: eostools.py:511
Exception
Definition: hltDiff.cc:246
MeasurementTrackerEvent::pixelClustersToSkip
const std::vector< bool > & pixelClustersToSkip() const
Definition: MeasurementTrackerEvent.h:61
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:13
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
MeasurementTrackerEvent::thePhase2OTData
const Phase2OTMeasurementDetSet * thePhase2OTData
Definition: MeasurementTrackerEvent.h:75
MeasurementTrackerEvent::theOwner
bool theOwner
Definition: MeasurementTrackerEvent.h:76