13 nrLayersAlongTraj_(0),
15 isTrackerDriven_(
false)
49 for (
size_t hitNr = 0; hitNr <
nHits(); hitNr++) {
50 int bitNr = 0x1 << hitNr;
51 int hitDetId = (
recHits().first + 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>();
135 size_t nrRecHits =
std::distance(recHits.first, recHits.second);
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.first + hitNrs[0])->geographicalId(),
158 hitInfo[1].setDPhi(dPhi2Pos, dPhi2Neg);
159 hitInfo[1].setDRZ(dRZ2Pos, dRZ2Neg);
161 (recHits.first + hitNrs[1])->geographicalId(),
std::pair< const_iterator, const_iterator > range
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)
CaloClusterRef caloCluster_
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
unsigned int hitsMask() const
float dRZNeg(size_t hitNr) 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, const TrajectorySeed::range recHits)
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)