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 TrackerGeometrygeomTracker () 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 VectorHitCollection *phase2OTVectorHits, const VectorHitCollection *phase2OTVectorHitsRej, 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 VectorHitCollectionphase2OTVectorHits () const
 
const VectorHitCollectionphase2OTVectorHitsRej () 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
 
const VectorHitCollectionthePhase2OTVectorHits = nullptr
 
const VectorHitCollectionthePhase2OTVectorHitsRej = nullptr
 
std::vector< bool > thePixelClustersToSkip
 
const PxMeasurementDetSetthePixelData = nullptr
 
std::vector< bool > theStripClustersToSkip
 
const StMeasurementDetSettheStripData = nullptr
 
const MeasurementTrackertheTracker = nullptr
 

Detailed Description

Definition at line 16 of file MeasurementTrackerEvent.h.

Member Typedef Documentation

◆ QualityFlags

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

21 {}

◆ ~MeasurementTrackerEvent()

MeasurementTrackerEvent::~MeasurementTrackerEvent ( )

Definition at line 4 of file MeasurementTrackerEvent.cc.

References theOwner, thePhase2OTData, thePixelData, and theStripData.

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 }
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const Phase2OTMeasurementDetSet * thePhase2OTData

◆ MeasurementTrackerEvent() [2/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTracker tracker,
const StMeasurementDetSet strips,
const PxMeasurementDetSet pixels,
const Phase2OTMeasurementDetSet phase2OT,
const VectorHitCollection phase2OTVectorHits,
const VectorHitCollection phase2OTVectorHitsRej,
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 25 of file MeasurementTrackerEvent.h.

34  : theTracker(&tracker),
36  thePixelData(pixels),
37  thePhase2OTData(phase2OT),
40  theOwner(true),
const std::vector< bool > & stripClustersToSkip() const
const VectorHitCollection * thePhase2OTVectorHits
const VectorHitCollection * thePhase2OTVectorHitsRej
std::vector< bool > thePhase2OTClustersToSkip
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const VectorHitCollection & phase2OTVectorHits() const
std::vector< bool > theStripClustersToSkip
const std::vector< bool > & pixelClustersToSkip() const
const VectorHitCollection & phase2OTVectorHitsRej() const
const std::vector< bool > & phase2OTClustersToSkip() const
const Phase2OTMeasurementDetSet * thePhase2OTData
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip

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

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

46  : theTracker(trackerEvent.theTracker),
47  theStripData(trackerEvent.theStripData),
48  thePixelData(trackerEvent.thePixelData),
49  thePhase2OTData(nullptr),
50  thePhase2OTVectorHits(nullptr),
51  thePhase2OTVectorHitsRej(nullptr),
52  theOwner(false) {
53  //std::cout << "Creatign non-owned MT @ " << this << " from @ " << & trackerEvent << " (strip data @ " << trackerEvent.theStripData << ")" << std::endl;
54  if (stripClustersToSkip.refProd().id() != theStripData->handle().id()) {
55  edm::LogError("ProductIdMismatch") << "The strip masking does not point to the strip collection of clusters: "
56  << stripClustersToSkip.refProd().id() << "!=" << theStripData->handle().id();
57  throw cms::Exception("Configuration")
58  << "The strip masking does not point to the strip collection of clusters: "
59  << stripClustersToSkip.refProd().id() << "!=" << theStripData->handle().id() << "\n";
60  }
61 
62  if (pixelClustersToSkip.refProd().id() != thePixelData->handle().id()) {
63  edm::LogError("ProductIdMismatch") << "The pixel masking does not point to the proper collection of clusters: "
64  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id();
65  throw cms::Exception("Configuration")
66  << "The pixel masking does not point to the proper collection of clusters: "
67  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id() << "\n";
68  }
69 
72 
75 }
const std::vector< bool > & stripClustersToSkip() const
const VectorHitCollection * thePhase2OTVectorHits
ProductID id() const
Definition: HandleBase.cc:29
const VectorHitCollection * thePhase2OTVectorHitsRej
Log< level::Error, false > LogError
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
std::vector< bool > theStripClustersToSkip
const std::vector< bool > & pixelClustersToSkip() const
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
edm::Handle< edmNew::DetSetVector< SiStripCluster > > & handle()
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const

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

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

82  : theTracker(trackerEvent.theTracker),
83  theStripData(nullptr),
84  thePixelData(trackerEvent.thePixelData),
85  thePhase2OTData(trackerEvent.thePhase2OTData),
88  theOwner(false) {
89  if (pixelClustersToSkip.refProd().id() != thePixelData->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 
97  if (phase2OTClustersToSkip.refProd().id() != thePhase2OTData->handle().id()) {
98  edm::LogError("ProductIdMismatch") << "The pixel masking does not point to the proper collection of clusters: "
99  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id();
100  throw cms::Exception("Configuration")
101  << "The pixel masking does not point to the proper collection of clusters: "
102  << pixelClustersToSkip.refProd().id() << "!=" << thePixelData->handle().id() << "\n";
103  }
104 
107 
110 }
const VectorHitCollection * thePhase2OTVectorHits
ProductID id() const
Definition: HandleBase.cc:29
const VectorHitCollection * thePhase2OTVectorHitsRej
std::vector< bool > thePhase2OTClustersToSkip
Log< level::Error, false > LogError
const edm::Handle< edmNew::DetSetVector< Phase2TrackerCluster1D > > & handle() const
const StMeasurementDetSet * theStripData
const PxMeasurementDetSet * thePixelData
const std::vector< bool > & pixelClustersToSkip() const
const std::vector< bool > & phase2OTClustersToSkip() const
const Phase2OTMeasurementDetSet * thePhase2OTData
const MeasurementTracker * theTracker
std::vector< bool > thePixelClustersToSkip
const edm::Handle< edmNew::DetSetVector< SiPixelCluster > > & handle() const

◆ MeasurementTrackerEvent() [5/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( const MeasurementTrackerEvent other)
delete

◆ MeasurementTrackerEvent() [6/6]

MeasurementTrackerEvent::MeasurementTrackerEvent ( MeasurementTrackerEvent &&  other)

Definition at line 16 of file MeasurementTrackerEvent.cc.

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

16  {
17  theTracker = other.theTracker;
18  theStripData = other.theStripData;
19  thePixelData = other.thePixelData;
20  thePhase2OTData = other.thePhase2OTData;
21  thePhase2OTVectorHits = other.thePhase2OTVectorHits;
22  thePhase2OTVectorHitsRej = other.thePhase2OTVectorHitsRej;
23  theOwner = other.theOwner;
24  other.theOwner = false; // make sure to fully transfer the ownership
25  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
26  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
27 }
const VectorHitCollection * thePhase2OTVectorHits
const VectorHitCollection * thePhase2OTVectorHitsRej
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

◆ geometricSearchTracker()

const GeometricSearchTracker* MeasurementTrackerEvent::geometricSearchTracker ( ) const
inline

◆ geomTracker()

const TrackerGeometry* MeasurementTrackerEvent::geomTracker ( ) const
inline

◆ idToDet()

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

Previous MeasurementDetSystem interface.

Definition at line 76 of file MeasurementTrackerEvent.h.

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

Referenced by TSGFromPropagation::findMeasurements(), TrajSeedMatcher::layerHasValidHits(), TSGForRoadSearch::pushTrajectorySeed(), and DAFTrackProducerAlgorithm::updateHits().

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

◆ measurementTracker()

const MeasurementTracker& MeasurementTrackerEvent::measurementTracker ( ) const
inline

Definition at line 61 of file MeasurementTrackerEvent.h.

References theTracker.

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

61 { return *theTracker; }
const MeasurementTracker * theTracker

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 28 of file MeasurementTrackerEvent.cc.

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

28  {
29  theTracker = other.theTracker;
30  theStripData = other.theStripData;
31  thePixelData = other.thePixelData;
32  thePhase2OTData = other.thePhase2OTData;
33  thePhase2OTVectorHits = other.thePhase2OTVectorHits;
34  thePhase2OTVectorHitsRej = other.thePhase2OTVectorHitsRej;
35  theOwner = other.theOwner;
36  other.theOwner = false; // make sure to fully transfer the ownership
37  theStripClustersToSkip = std::move(other.theStripClustersToSkip);
38  thePixelClustersToSkip = std::move(other.thePixelClustersToSkip);
39  return *this;
40 }
const VectorHitCollection * thePhase2OTVectorHits
const VectorHitCollection * thePhase2OTVectorHitsRej
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

◆ phase2OTClustersToSkip()

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

Definition at line 69 of file MeasurementTrackerEvent.h.

References thePhase2OTClustersToSkip.

Referenced by MeasurementTrackerEvent().

69 { return thePhase2OTClustersToSkip; }
std::vector< bool > thePhase2OTClustersToSkip

◆ phase2OTData()

const Phase2OTMeasurementDetSet& MeasurementTrackerEvent::phase2OTData ( ) const
inline

Definition at line 64 of file MeasurementTrackerEvent.h.

References thePhase2OTData.

64 { return *thePhase2OTData; }
const Phase2OTMeasurementDetSet * thePhase2OTData

◆ phase2OTVectorHits()

const VectorHitCollection& MeasurementTrackerEvent::phase2OTVectorHits ( ) const
inline

Definition at line 65 of file MeasurementTrackerEvent.h.

References thePhase2OTVectorHits.

65 { return *thePhase2OTVectorHits; }
const VectorHitCollection * thePhase2OTVectorHits

◆ phase2OTVectorHitsRej()

const VectorHitCollection& MeasurementTrackerEvent::phase2OTVectorHitsRej ( ) const
inline

Definition at line 66 of file MeasurementTrackerEvent.h.

References thePhase2OTVectorHitsRej.

66 { return *thePhase2OTVectorHitsRej; }
const VectorHitCollection * thePhase2OTVectorHitsRej

◆ pixelClustersToSkip()

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

Definition at line 68 of file MeasurementTrackerEvent.h.

References thePixelClustersToSkip.

Referenced by MeasurementTrackerEvent().

68 { return thePixelClustersToSkip; }
std::vector< bool > thePixelClustersToSkip

◆ pixelData()

const PxMeasurementDetSet& MeasurementTrackerEvent::pixelData ( ) const
inline

Definition at line 63 of file MeasurementTrackerEvent.h.

References thePixelData.

63 { return *thePixelData; }
const PxMeasurementDetSet * thePixelData

◆ stripClustersToSkip()

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

Definition at line 67 of file MeasurementTrackerEvent.h.

References theStripClustersToSkip.

Referenced by MeasurementTrackerEvent().

67 { return theStripClustersToSkip; }
std::vector< bool > theStripClustersToSkip

◆ stripData()

const StMeasurementDetSet& MeasurementTrackerEvent::stripData ( ) const
inline

Definition at line 62 of file MeasurementTrackerEvent.h.

References theStripData.

62 { return *theStripData; }
const StMeasurementDetSet * theStripData

Member Data Documentation

◆ theOwner

bool MeasurementTrackerEvent::theOwner = false
private

◆ thePhase2OTClustersToSkip

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

Definition at line 89 of file MeasurementTrackerEvent.h.

Referenced by MeasurementTrackerEvent(), and phase2OTClustersToSkip().

◆ thePhase2OTData

const Phase2OTMeasurementDetSet* MeasurementTrackerEvent::thePhase2OTData = nullptr
private

◆ thePhase2OTVectorHits

const VectorHitCollection* MeasurementTrackerEvent::thePhase2OTVectorHits = nullptr
private

◆ thePhase2OTVectorHitsRej

const VectorHitCollection* MeasurementTrackerEvent::thePhase2OTVectorHitsRej = 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