11 nrLayersAlongTraj_(0),
47 for(
size_t hitNr=0;hitNr<
nHits();hitNr++){
48 int bitNr = 0x1 << hitNr;
49 int hitDetId = (
recHits().first+hitNr)->geographicalId().rawId();
65 <<
"in ElectronSeed::"<<__FUNCTION__<<
","<<__LINE__
66 <<
": number of hits in hit mask is "<<hitNrs.size()<<
"\n" 67 <<
"pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n " 68 <<
"mask "<<
static_cast<unsigned int>(hitMask)<<std::endl;
72 <<
"in ElectronSeed::"<<__FUNCTION__<<
","<<__LINE__
73 <<
": hits are "<<hitNrs[0]<<
" and "<<hitNrs[1]
74 <<
" while number of hits are "<<
nHits()<<
"\n" 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++){
90 throw cms::Exception(
"LogicError") <<
"ElectronSeed::setNegAttributes should only operate on seeds with exactly two hits. This is because it is a legacy function to preverse backwards compatiblity and should not be used on new code which matches variable number of hits";
102 throw cms::Exception(
"LogicError") <<
"ElectronSeed::setPosAttributes should only operate on seeds with exactly two hits. This is because it is a legacy function to preverse backwards compatiblity and should not be used on new code which matches variable number of hits";
110 std::vector<unsigned int>
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) hitNrs.push_back(bitNr);
121 std::vector<ElectronSeed::PMVars>
123 const float dRZ1Pos,
const float dRZ1Neg,
124 const float dPhi2Pos,
const float dPhi2Neg,
125 const float dRZ2Pos,
const float dRZ2Neg,
128 if(hitMask==0)
return std::vector<ElectronSeed::PMVars>();
130 size_t nrRecHits =
std::distance(recHits.first,recHits.second);
133 if(hitNrs.size()!=2){
135 <<
"in ElectronSeed::"<<__FUNCTION__<<
","<<__LINE__
136 <<
": number of hits in hit mask is "<<nrRecHits<<
"\n" 137 <<
"pre-2017 pixel upgrade ecalDriven ElectronSeeds should have exactly 2 hits\n" 138 <<
"mask "<<
static_cast<unsigned int>(hitMask)<<std::endl;
140 if(hitNrs[0]>=nrRecHits || hitNrs[1]>=nrRecHits){
142 <<
"in ElectronSeed::"<<__FUNCTION__<<
","<<__LINE__
143 <<
": hits are "<<hitNrs[0]<<
" and "<<hitNrs[1]
144 <<
" while number of hits are "<<nrRecHits<<
"\n" 145 <<
"this means there was a bug in storing or creating the electron seeds " 146 <<
"mask "<<
static_cast<unsigned int>(hitMask)<<std::endl;
149 std::vector<PMVars>
hitInfo(2);
150 hitInfo[0].setDPhi(dPhi1Pos,dPhi1Neg);
151 hitInfo[0].setDRZ(dRZ1Pos,dRZ1Neg);
152 hitInfo[0].setDet((recHits.first+hitNrs[0])->geographicalId(),-1);
153 hitInfo[1].setDPhi(dPhi2Pos,dPhi2Neg);
154 hitInfo[1].setDRZ(dRZ2Pos,dRZ2Neg);
155 hitInfo[1].setDet((recHits.first+hitNrs[1])->geographicalId(),-1);
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)
std::pair< const_iterator, const_iterator > range
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)