13 nrLayersAlongTraj_(0),
15 isTrackerDriven_(
false)
24 nrLayersAlongTraj_(0),
26 isTrackerDriven_(
false) {}
33 nrLayersAlongTraj_(0),
35 isTrackerDriven_(
false) {}
49 for (
size_t hitNr = 0; hitNr <
nHits(); hitNr++) {
50 int bitNr = 0x1 << hitNr;
51 int hitDetId = (
recHits().
begin() + hitNr)->geographicalId().rawId();
64 if (hitNrs.size() != 2) {
66 <<
"in ElectronSeed::" << __FUNCTION__ <<
"," << __LINE__ <<
": number of hits in hit mask is " << hitNrs.size()
68 <<
"pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n "
69 <<
"mask " <<
static_cast<unsigned int>(hitMask) << std::endl;
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()
75 <<
"this means there was a bug in storing or creating the electron seeds "
76 <<
"mask " <<
static_cast<unsigned int>(hitMask) << std::endl;
78 for (
size_t hitNr = 0; hitNr <
hitInfo_.size(); hitNr++) {
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";
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";
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);
123 const float dPhi1Neg,
126 const float dPhi2Pos,
127 const float dPhi2Neg,
133 return std::vector<ElectronSeed::PMVars>();
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;
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
148 <<
"this means there was a bug in storing or creating the electron seeds "
149 <<
"mask " <<
static_cast<unsigned int>(hitMask) << std::endl;
152 std::vector<PMVars>
hitInfo(2);
153 hitInfo[0].setDPhi(dPhi1Pos, dPhi1Neg);
154 hitInfo[0].setDRZ(dRZ1Pos, dRZ1Neg);
156 (recHits.
begin() + hitNrs[0])->geographicalId(),
158 hitInfo[1].setDPhi(dPhi2Pos, dPhi2Neg);
159 hitInfo[1].setDRZ(dRZ2Pos, dRZ2Neg);
161 (recHits.
begin() + hitNrs[1])->geographicalId(),
167 : dRZPos(std::numeric_limits<float>::
infinity()),
168 dRZNeg(std::numeric_limits<float>::
infinity()),
169 dPhiPos(std::numeric_limits<float>::
infinity()),
170 dPhiNeg(std::numeric_limits<float>::
infinity()),
std::vector< PMVars > hitInfo_
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())
void setDPhi(float pos, float neg)
float dRZPos(size_t hitNr) const
void setCtfTrack(const CtfTrackRef &)
Set additional info.
static const double pts[33]
ElectronSeed()
Construction of base attributes.
void setDet(int iDetId, int iLayerOrDiskNr)
list var
if using global norm cols_to_minmax = ['t_delta', 't_hmaxNearP','t_emaxNearP', 't_hAnnular', 't_eAnnular','t_pt','t_nVtx','t_ieta','t_eHcal10', 't_eHcal30','t_rhoh','t_eHcal'] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() > 0) else 1.0/200.0)
RecHitRange recHits() const
int layerOrDiskNr(size_t hitNr) const
int detId(size_t hitNr) const
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())
const std::vector< PMVars > & hitInfo() const
unsigned int nHits() const
static std::vector< PMVars > 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)
unsigned int hitsMask() const
float dRZNeg(size_t hitNr) const
float dPhiNeg(size_t hitNr) const
void setDRZ(float pos, float neg)
float dPhiPos(size_t hitNr) const
static std::vector< unsigned int > hitNrsFromMask(unsigned int hitMask)
const CtfTrackRef & ctfTrack() const
Accessors.
void initTwoHitSeed(const unsigned char hitMask)