CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
reco::ElectronSeed Class Reference

#include <ElectronSeed.h>

Inheritance diagram for reco::ElectronSeed:
TrajectorySeed

Classes

struct  PMVars
 

Public Types

typedef edm::RefToBase< CaloClusterCaloClusterRef
 
typedef edm::Ref< TrackCollectionCtfTrackRef
 
- Public Types inherited from TrajectorySeed
typedef edm::OwnVector< TrackingRecHitRecHitContainer
 
typedef edm::Range< RecHitContainer::const_iterator > RecHitRange
 

Public Member Functions

void addHitInfo (const PMVars &hitVars)
 
const CaloClusterRefcaloCluster () const
 
ElectronSeedclone () const override
 
const CtfTrackRefctfTrack () const
 Accessors. More...
 
int detId (size_t hitNr) const
 
float dPhiBest (size_t hitNr) const
 
float dPhiNeg (size_t hitNr) const
 
float dPhiPos (size_t hitNr) const
 
float dRZBest (size_t hitNr) const
 
float dRZNeg (size_t hitNr) const
 
float dRZPos (size_t hitNr) const
 
 ElectronSeed ()
 Construction of base attributes. More...
 
 ElectronSeed (const TrajectorySeed &)
 
 ElectronSeed (PTrajectoryStateOnDet &pts, RecHitContainer &rh, PropagationDirection &dir)
 
TrackCharge getCharge () const
 Utility. More...
 
const std::vector< PMVars > & hitInfo () const
 
unsigned int hitsMask () const
 
void initTwoHitSeed (const unsigned char hitMask)
 
bool isEcalDriven () const
 
bool isTrackerDriven () const
 
int layerOrDiskNr (size_t hitNr) const
 
int nrLayersAlongTraj () const
 
void setCaloCluster (const CaloClusterRef &clus)
 
void setCtfTrack (const CtfTrackRef &)
 Set additional info. More...
 
void setNegAttributes (const float dRZ2=std::numeric_limits< float >::infinity(), const float dPhi2=std::numeric_limits< float >::infinity(), const float dRZ1=std::numeric_limits< float >::infinity(), const float dPhi1=std::numeric_limits< float >::infinity())
 
void setNrLayersAlongTraj (int val)
 
void setPosAttributes (const float dRZ2=std::numeric_limits< float >::infinity(), const float dPhi2=std::numeric_limits< float >::infinity(), const float dRZ1=std::numeric_limits< float >::infinity(), const float dPhi1=std::numeric_limits< float >::infinity())
 
int subDet (size_t hitNr) const
 
 ~ElectronSeed () override
 
- Public Member Functions inherited from TrajectorySeed
PropagationDirection direction () const
 
unsigned int nHits () const
 
TrajectorySeedoperator= (TrajectorySeed const &o)=default
 
TrajectorySeedoperator= (TrajectorySeed &&o) noexcept=default
 
RecHitRange recHits () const
 
PTrajectoryStateOnDet const & startingState () const
 
void swap (PTrajectoryStateOnDet &ptsos, RecHitContainer &rh, PropagationDirection &dir) noexcept
 
void swap (TrajectorySeed &rh) noexcept
 
 TrajectorySeed ()
 
 TrajectorySeed (PTrajectoryStateOnDet const &ptsos, RecHitContainer const &rh, PropagationDirection dir)
 
 TrajectorySeed (PTrajectoryStateOnDet const &ptsos, RecHitContainer &&rh, PropagationDirection dir) noexcept
 
 TrajectorySeed (TrajectorySeed const &o)=default
 
 TrajectorySeed (TrajectorySeed &&o) noexcept=default
 
virtual ~TrajectorySeed ()
 

Static Public Member Functions

static std::vector< PMVarscreateHitInfo (const float dPhi1Pos, const float dPhi1Neg, const float dRZ1Pos, const float dRZ1Neg, const float dPhi2Pos, const float dPhi2Neg, const float dRZ2Pos, const float dRZ2Neg, const char hitMask, TrajectorySeed::RecHitRange const &recHits)
 
static std::string const & name ()
 

Private Member Functions

template<typename T >
T getVal (unsigned int hitNr, T PMVars::*val) const
 

Static Private Member Functions

static float bestVal (float val1, float val2)
 
static std::vector< unsigned int > hitNrsFromMask (unsigned int hitMask)
 

Private Attributes

CaloClusterRef caloCluster_
 
CtfTrackRef ctfTrack_
 
std::vector< PMVarshitInfo_
 
bool isEcalDriven_
 
bool isTrackerDriven_
 
int nrLayersAlongTraj_
 

Detailed Description

Definition at line 51 of file ElectronSeed.h.

Member Typedef Documentation

◆ CaloClusterRef

Definition at line 68 of file ElectronSeed.h.

◆ CtfTrackRef

Definition at line 69 of file ElectronSeed.h.

Constructor & Destructor Documentation

◆ ElectronSeed() [1/3]

ElectronSeed::ElectronSeed ( )

Construction of base attributes.

Definition at line 8 of file ElectronSeed.cc.

Referenced by clone().

9  : TrajectorySeed(),
10  ctfTrack_(),
11  caloCluster_(),
12  hitInfo_(),
14  isEcalDriven_(false),
15  isTrackerDriven_(false)
16 
17 {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:149
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:148

◆ ElectronSeed() [2/3]

ElectronSeed::ElectronSeed ( const TrajectorySeed seed)

Definition at line 19 of file ElectronSeed.cc.

21  ctfTrack_(),
22  caloCluster_(),
23  hitInfo_(),
25  isEcalDriven_(false),
26  isTrackerDriven_(false) {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:149
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:148

◆ ElectronSeed() [3/3]

ElectronSeed::ElectronSeed ( PTrajectoryStateOnDet pts,
RecHitContainer rh,
PropagationDirection dir 
)

Definition at line 28 of file ElectronSeed.cc.

29  : TrajectorySeed(pts, rh, dir),
30  ctfTrack_(),
31  caloCluster_(),
32  hitInfo_(),
34  isEcalDriven_(false),
35  isTrackerDriven_(false) {}
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
static const double pts[33]
Definition: Constants.h:30
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:149
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:148

◆ ~ElectronSeed()

ElectronSeed::~ElectronSeed ( )
overridedefault

Member Function Documentation

◆ addHitInfo()

void reco::ElectronSeed::addHitInfo ( const PMVars hitVars)
inline

Definition at line 89 of file ElectronSeed.h.

References hitInfo_.

Referenced by ElectronNHitSeedProducer::produce().

89 { hitInfo_.push_back(hitVars); }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150

◆ bestVal()

static float reco::ElectronSeed::bestVal ( float  val1,
float  val2 
)
inlinestaticprivate

Definition at line 140 of file ElectronSeed.h.

References funct::abs().

Referenced by dPhiBest(), and dRZBest().

140 { return std::abs(val1) < std::abs(val2) ? val1 : val2; }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ caloCluster()

const CaloClusterRef& reco::ElectronSeed::caloCluster ( ) const
inline

Definition at line 93 of file ElectronSeed.h.

References caloCluster_.

Referenced by PFElecTkProducer::isSameEgSC(), and PFElecTkProducer::isSharingEcalEnergyWithEgSC().

93 { return caloCluster_; }
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:149

◆ clone()

ElectronSeed* reco::ElectronSeed::clone ( void  ) const
inlineoverridevirtual

Reimplemented from TrajectorySeed.

Definition at line 80 of file ElectronSeed.h.

References ElectronSeed().

80 { return new ElectronSeed(*this); }
ElectronSeed()
Construction of base attributes.
Definition: ElectronSeed.cc:8

◆ createHitInfo()

std::vector< ElectronSeed::PMVars > ElectronSeed::createHitInfo ( const float  dPhi1Pos,
const float  dPhi1Neg,
const float  dRZ1Pos,
const float  dRZ1Neg,
const float  dPhi2Pos,
const float  dPhi2Neg,
const float  dRZ2Pos,
const float  dRZ2Neg,
const char  hitMask,
TrajectorySeed::RecHitRange const &  recHits 
)
static

Definition at line 122 of file ElectronSeed.cc.

References edm::Range< T >::begin(), HLT_2023v12_cff::distance, edm::Range< T >::end(), Exception, hitInfo(), hitNrsFromMask(), and TrajectorySeed::recHits().

131  {
132  if (hitMask == 0)
133  return std::vector<ElectronSeed::PMVars>(); //was trackerDriven so no matched hits
134 
135  size_t nrRecHits = std::distance(recHits.begin(), recHits.end());
136  std::vector<unsigned int> hitNrs = hitNrsFromMask(hitMask);
137 
138  if (hitNrs.size() != 2) {
139  throw cms::Exception("LogicError") << "in ElectronSeed::" << __FUNCTION__ << "," << __LINE__
140  << ": number of hits in hit mask is " << nrRecHits << "\n"
141  << "pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n"
142  << "mask " << static_cast<unsigned int>(hitMask) << std::endl;
143  }
144  if (hitNrs[0] >= nrRecHits || hitNrs[1] >= nrRecHits) {
145  throw cms::Exception("LogicError") << "in ElectronSeed::" << __FUNCTION__ << "," << __LINE__ << ": hits are "
146  << hitNrs[0] << " and " << hitNrs[1] << " while number of hits are " << nrRecHits
147  << "\n"
148  << "this means there was a bug in storing or creating the electron seeds "
149  << "mask " << static_cast<unsigned int>(hitMask) << std::endl;
150  }
151 
152  std::vector<PMVars> hitInfo(2);
153  hitInfo[0].setDPhi(dPhi1Pos, dPhi1Neg);
154  hitInfo[0].setDRZ(dRZ1Pos, dRZ1Neg);
155  hitInfo[0].setDet(
156  (recHits.begin() + hitNrs[0])->geographicalId(),
157  -1); //getting the layer information needs tracker topo, hence why its stored in the first as its a pain to access
158  hitInfo[1].setDPhi(dPhi2Pos, dPhi2Neg);
159  hitInfo[1].setDRZ(dRZ2Pos, dRZ2Neg);
160  hitInfo[1].setDet(
161  (recHits.begin() + hitNrs[1])->geographicalId(),
162  -1); //getting the layer information needs tracker topo, hence why its stored in the first as its a pain to access
163  return hitInfo;
164 }
const std::vector< PMVars > & hitInfo() const
Definition: ElectronSeed.h:101
T begin() const
Definition: Range.h:15
RecHitRange recHits() const
T end() const
Definition: Range.h:16
static std::vector< unsigned int > hitNrsFromMask(unsigned int hitMask)

◆ ctfTrack()

const CtfTrackRef& reco::ElectronSeed::ctfTrack ( ) const
inline

Accessors.

Definition at line 92 of file ElectronSeed.h.

References ctfTrack_.

Referenced by setCtfTrack().

92 { return ctfTrack_; }
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:148

◆ detId()

int reco::ElectronSeed::detId ( size_t  hitNr) const
inline

Definition at line 108 of file ElectronSeed.h.

References hitInfo_.

Referenced by reco::ElectronSeed::PMVars::setDet(), and subDet().

108 { return hitNr < hitInfo_.size() ? hitInfo_[hitNr].detId : 0; }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150

◆ dPhiBest()

float reco::ElectronSeed::dPhiBest ( size_t  hitNr) const
inline

Definition at line 104 of file ElectronSeed.h.

References bestVal(), dPhiNeg(), and dPhiPos().

Referenced by EgammaHLTPixelMatchVarProducer::produce().

104 { return bestVal(dPhiNeg(hitNr), dPhiPos(hitNr)); }
static float bestVal(float val1, float val2)
Definition: ElectronSeed.h:140
float dPhiPos(size_t hitNr) const
Definition: ElectronSeed.h:103
float dPhiNeg(size_t hitNr) const
Definition: ElectronSeed.h:102

◆ dPhiNeg()

float reco::ElectronSeed::dPhiNeg ( size_t  hitNr) const
inline

Definition at line 102 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiNeg, and getVal().

Referenced by dPhiBest(), and reco::ElectronSeed::PMVars::setDPhi().

102 { return getVal(hitNr, &PMVars::dPhiNeg); }
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:142

◆ dPhiPos()

float reco::ElectronSeed::dPhiPos ( size_t  hitNr) const
inline

Definition at line 103 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dPhiPos, and getVal().

Referenced by dPhiBest(), and reco::ElectronSeed::PMVars::setDPhi().

103 { return getVal(hitNr, &PMVars::dPhiPos); }
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:142

◆ dRZBest()

float reco::ElectronSeed::dRZBest ( size_t  hitNr) const
inline

Definition at line 107 of file ElectronSeed.h.

References bestVal(), dRZNeg(), and dRZPos().

Referenced by EgammaHLTPixelMatchVarProducer::produce().

107 { return bestVal(dRZNeg(hitNr), dRZPos(hitNr)); }
float dRZPos(size_t hitNr) const
Definition: ElectronSeed.h:105
static float bestVal(float val1, float val2)
Definition: ElectronSeed.h:140
float dRZNeg(size_t hitNr) const
Definition: ElectronSeed.h:106

◆ dRZNeg()

float reco::ElectronSeed::dRZNeg ( size_t  hitNr) const
inline

Definition at line 106 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZNeg, and getVal().

Referenced by dRZBest(), and reco::ElectronSeed::PMVars::setDRZ().

106 { return getVal(hitNr, &PMVars::dRZNeg); }
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:142

◆ dRZPos()

float reco::ElectronSeed::dRZPos ( size_t  hitNr) const
inline

Definition at line 105 of file ElectronSeed.h.

References reco::ElectronSeed::PMVars::dRZPos, and getVal().

Referenced by dRZBest(), and reco::ElectronSeed::PMVars::setDRZ().

105 { return getVal(hitNr, &PMVars::dRZPos); }
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:142

◆ getCharge()

TrackCharge reco::ElectronSeed::getCharge ( ) const
inline

Utility.

Definition at line 96 of file ElectronSeed.h.

References LocalTrajectoryParameters::charge(), PTrajectoryStateOnDet::parameters(), and TrajectorySeed::startingState().

96 { return startingState().parameters().charge(); }
const LocalTrajectoryParameters & parameters() const
PTrajectoryStateOnDet const & startingState() const
TrackCharge charge() const
Charge (-1, 0 or 1)

◆ getVal()

template<typename T >
T reco::ElectronSeed::getVal ( unsigned int  hitNr,
T PMVars::*  val 
) const
inlineprivate

Definition at line 142 of file ElectronSeed.h.

References hitInfo_, infinity, and heppy_batch::val.

Referenced by dPhiNeg(), dPhiPos(), dRZNeg(), dRZPos(), and layerOrDiskNr().

142  {
143  return hitNr < hitInfo_.size() ? hitInfo_[hitNr].*val : std::numeric_limits<T>::infinity();
144  }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
const double infinity

◆ hitInfo()

const std::vector<PMVars>& reco::ElectronSeed::hitInfo ( ) const
inline

Definition at line 101 of file ElectronSeed.h.

References hitInfo_.

Referenced by createHitInfo().

101 { return hitInfo_; }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150

◆ hitNrsFromMask()

std::vector< unsigned int > ElectronSeed::hitNrsFromMask ( unsigned int  hitMask)
staticprivate

Definition at line 112 of file ElectronSeed.cc.

References triggerObjects_cff::bit.

Referenced by createHitInfo(), and initTwoHitSeed().

112  {
113  std::vector<unsigned int> hitNrs;
114  for (size_t bitNr = 0; bitNr < sizeof(hitMask) * CHAR_BIT; bitNr++) {
115  char bit = 0x1 << bitNr;
116  if ((hitMask & bit) != 0)
117  hitNrs.push_back(bitNr);
118  }
119  return hitNrs;
120 }

◆ hitsMask()

unsigned int ElectronSeed::hitsMask ( ) const

Definition at line 47 of file ElectronSeed.cc.

References edm::Range< T >::begin(), hitInfo_, ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::mask, TrajectorySeed::nHits(), TrajectorySeed::recHits(), and trigObjTnPSource_cfi::var.

47  {
48  int mask = 0;
49  for (size_t hitNr = 0; hitNr < nHits(); hitNr++) {
50  int bitNr = 0x1 << hitNr;
51  int hitDetId = (recHits().begin() + hitNr)->geographicalId().rawId();
52  auto detIdMatcher = [hitDetId](const ElectronSeed::PMVars& var) { return hitDetId == var.detId; };
53  if (std::find_if(hitInfo_.begin(), hitInfo_.end(), detIdMatcher) != hitInfo_.end()) {
54  mask |= bitNr;
55  }
56  }
57  return mask;
58 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
T begin() const
Definition: Range.h:15
RecHitRange recHits() const
unsigned int nHits() const

◆ initTwoHitSeed()

void ElectronSeed::initTwoHitSeed ( const unsigned char  hitMask)

Definition at line 60 of file ElectronSeed.cc.

References Exception, hitInfo_, hitNrsFromMask(), infinity, info(), TrajectorySeed::nHits(), and TrajectorySeed::recHits().

60  {
61  hitInfo_.resize(2);
62 
63  std::vector<unsigned int> hitNrs = hitNrsFromMask(hitMask);
64  if (hitNrs.size() != 2) {
65  throw cms::Exception("LogicError")
66  << "in ElectronSeed::" << __FUNCTION__ << "," << __LINE__ << ": number of hits in hit mask is " << hitNrs.size()
67  << "\n"
68  << "pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n "
69  << "mask " << static_cast<unsigned int>(hitMask) << std::endl;
70  }
71  if (hitNrs[0] >= nHits() || hitNrs[1] >= nHits()) {
72  throw cms::Exception("LogicError") << "in ElectronSeed::" << __FUNCTION__ << "," << __LINE__ << ": hits are "
73  << hitNrs[0] << " and " << hitNrs[1] << " while number of hits are " << nHits()
74  << "\n"
75  << "this means there was a bug in storing or creating the electron seeds "
76  << "mask " << static_cast<unsigned int>(hitMask) << std::endl;
77  }
78  for (size_t hitNr = 0; hitNr < hitInfo_.size(); hitNr++) {
79  auto& info = hitInfo_[hitNr];
82  info.setDet((recHits().begin() + hitNrs[hitNr])->geographicalId(), -1);
83  }
84 }
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150
RecHitRange recHits() const
unsigned int nHits() const
const double infinity
static std::vector< unsigned int > hitNrsFromMask(unsigned int hitMask)

◆ isEcalDriven()

bool reco::ElectronSeed::isEcalDriven ( ) const
inline

Definition at line 98 of file ElectronSeed.h.

References isEcalDriven_.

98 { return isEcalDriven_; }

◆ isTrackerDriven()

bool reco::ElectronSeed::isTrackerDriven ( ) const
inline

Definition at line 99 of file ElectronSeed.h.

References isTrackerDriven_.

99 { return isTrackerDriven_; }

◆ layerOrDiskNr()

int reco::ElectronSeed::layerOrDiskNr ( size_t  hitNr) const
inline

Definition at line 110 of file ElectronSeed.h.

References getVal(), and reco::ElectronSeed::PMVars::layerOrDiskNr.

Referenced by reco::ElectronSeed::PMVars::setDet().

110 { return getVal(hitNr, &PMVars::layerOrDiskNr); }
T getVal(unsigned int hitNr, T PMVars::*val) const
Definition: ElectronSeed.h:142

◆ name()

static std::string const& reco::ElectronSeed::name ( )
inlinestatic

Definition at line 71 of file ElectronSeed.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

71  {
72  static std::string const name_("ElectronSeed");
73  return name_;
74  }

◆ nrLayersAlongTraj()

int reco::ElectronSeed::nrLayersAlongTraj ( ) const
inline

Definition at line 111 of file ElectronSeed.h.

References nrLayersAlongTraj_.

111 { return nrLayersAlongTraj_; }

◆ setCaloCluster()

void reco::ElectronSeed::setCaloCluster ( const CaloClusterRef clus)
inline

Definition at line 85 of file ElectronSeed.h.

References caloCluster_, and isEcalDriven_.

Referenced by ElectronNHitSeedProducer::produce().

85  {
86  caloCluster_ = clus;
87  isEcalDriven_ = true;
88  }
CaloClusterRef caloCluster_
Definition: ElectronSeed.h:149

◆ setCtfTrack()

void ElectronSeed::setCtfTrack ( const CtfTrackRef ctfTrack)

Set additional info.

Definition at line 39 of file ElectronSeed.cc.

References ctfTrack(), ctfTrack_, and isTrackerDriven_.

Referenced by GoodSeedProducer::produce().

39  {
41  isTrackerDriven_ = true;
42 }
const CtfTrackRef & ctfTrack() const
Accessors.
Definition: ElectronSeed.h:92
CtfTrackRef ctfTrack_
Definition: ElectronSeed.h:148

◆ setNegAttributes()

void ElectronSeed::setNegAttributes ( const float  dRZ2 = std::numeric_limits<float>::infinity(),
const float  dPhi2 = std::numeric_limits<float>::infinity(),
const float  dRZ1 = std::numeric_limits<float>::infinity(),
const float  dPhi1 = std::numeric_limits<float>::infinity() 
)

Definition at line 86 of file ElectronSeed.cc.

References Exception, and hitInfo_.

86  {
87  if (hitInfo_.size() != 2) {
88  throw cms::Exception("LogicError")
89  << "ElectronSeed::setNegAttributes should only operate on seeds with exactly two hits. This is because it is a "
90  "legacy function to preverse backwards compatiblity and should not be used on new code which matches "
91  "variable number of hits";
92  }
93  hitInfo_[0].dRZNeg = dRZ1;
94  hitInfo_[1].dRZNeg = dRZ2;
95  hitInfo_[0].dPhiNeg = dPhi1;
96  hitInfo_[1].dPhiNeg = dPhi2;
97 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150

◆ setNrLayersAlongTraj()

void reco::ElectronSeed::setNrLayersAlongTraj ( int  val)
inline

◆ setPosAttributes()

void ElectronSeed::setPosAttributes ( const float  dRZ2 = std::numeric_limits<float>::infinity(),
const float  dPhi2 = std::numeric_limits<float>::infinity(),
const float  dRZ1 = std::numeric_limits<float>::infinity(),
const float  dPhi1 = std::numeric_limits<float>::infinity() 
)

Definition at line 99 of file ElectronSeed.cc.

References Exception, and hitInfo_.

99  {
100  if (hitInfo_.size() != 2) {
101  throw cms::Exception("LogicError")
102  << "ElectronSeed::setPosAttributes should only operate on seeds with exactly two hits. This is because it is a "
103  "legacy function to preverse backwards compatiblity and should not be used on new code which matches "
104  "variable number of hits";
105  }
106  hitInfo_[0].dRZPos = dRZ1;
107  hitInfo_[1].dRZPos = dRZ2;
108  hitInfo_[0].dPhiPos = dPhi1;
109  hitInfo_[1].dPhiPos = dPhi2;
110 }
std::vector< PMVars > hitInfo_
Definition: ElectronSeed.h:150

◆ subDet()

int reco::ElectronSeed::subDet ( size_t  hitNr) const
inline

Definition at line 109 of file ElectronSeed.h.

References detId(), and DetId::subdetId().

109 { return DetId(detId(hitNr)).subdetId(); }
int detId(size_t hitNr) const
Definition: ElectronSeed.h:108
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Definition: DetId.h:17

Member Data Documentation

◆ caloCluster_

CaloClusterRef reco::ElectronSeed::caloCluster_
private

Definition at line 149 of file ElectronSeed.h.

Referenced by caloCluster(), and setCaloCluster().

◆ ctfTrack_

CtfTrackRef reco::ElectronSeed::ctfTrack_
private

Definition at line 148 of file ElectronSeed.h.

Referenced by ctfTrack(), and setCtfTrack().

◆ hitInfo_

std::vector<PMVars> reco::ElectronSeed::hitInfo_
private

◆ isEcalDriven_

bool reco::ElectronSeed::isEcalDriven_
private

Definition at line 153 of file ElectronSeed.h.

Referenced by isEcalDriven(), and setCaloCluster().

◆ isTrackerDriven_

bool reco::ElectronSeed::isTrackerDriven_
private

Definition at line 154 of file ElectronSeed.h.

Referenced by isTrackerDriven(), and setCtfTrack().

◆ nrLayersAlongTraj_

int reco::ElectronSeed::nrLayersAlongTraj_
private

Definition at line 151 of file ElectronSeed.h.

Referenced by nrLayersAlongTraj(), and setNrLayersAlongTraj().