|
ATLAS Offline Software
|
#include <RegSelectorHashMap.h>
|
virtual void | HashIDList (const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const override |
| implementation of the IRegSelUT interface More...
|
|
virtual void | HashIDList (long layer, const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const override |
| HashIDList interface declaration. return list of non-repeated IdentifierHash. More...
|
|
virtual void | ROBIDList (const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const override |
| rob methods More...
|
|
virtual void | ROBIDList (long layer, const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const override |
| ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference. More...
|
|
virtual | ~RegSelectorHashMap () override=default |
|
double | etaminValue () const |
| rest of the class implementation More...
|
|
double | etamaxValue () const |
|
double | phiminValue () const |
|
double | phimaxValue () const |
|
const std::vector< double > & | etaMinOut (void) const |
|
const std::vector< double > & | etaMaxOut (void) const |
|
const std::vector< double > & | phiMinOut (void) const |
|
const std::vector< double > & | phiMaxOut (void) const |
|
void | mountDataStruct (void) |
|
const std::vector< IdentifierHash > & | hashIdOut (void) const |
|
const std::vector< std::vector< uint32_t > > & | robIdOut (void) const |
|
const std::vector< int > & | sampleOut (void) const |
|
const std::vector< int > & | layerOut (void) const |
|
void | regionSelectorRobIdUint (double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< uint32_t > &outRobIDList) const |
|
void | regionSelectorRobIdUint (int sampling, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< uint32_t > &outRobIDList) const |
|
void | regionSelector (double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< IdentifierHash > &outList) const |
|
void | regionSelector (int sampling, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< IdentifierHash > &outList) const |
|
void | initvar (void) |
|
StatusCode | read (const char *filename) |
|
void | addLut (const RegionSelectorLUT *detLut) |
|
void | summaryDataFile (std::list< RegSelectorMapElement > &dataList) |
|
void | verifyInputs (double &etaminIn, double &etamaxIn, double &phiminIn, double &phimaxIn) const |
|
void | verifyROBIDOutput (double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< uint32_t > &outputIdlist) const |
|
void | verifyROBIDOutput (int sampling, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< uint32_t > &outputIdlist) const |
|
void | verifyOutput (double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< IdentifierHash > *outputIdlist) const |
|
void | verifyOutput (int sampling, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< IdentifierHash > *outputIdlist) const |
|
void | getEtaPhi (IdentifierHash hashId, double *etaMin, double *etaMax, double *phiMin, double *phiMax) const |
|
void | DisableMissingROBs (const std::vector< uint32_t > &vec) |
|
|
void | populateMatrix (int iPage, IdentifierHash value) |
|
void | populateMatrixRobId (int iPage, uint32_t value) |
|
void | initMatrix (void) |
|
void | writeLine (const int &layer, const IdentifierHash &hashId, const std::vector< uint32_t > &robId, const double &emin, const double &emax, const double &pmin, const double &pmax, const int &samp) |
|
int | MyRound (double pdValue) |
|
void | regionSelectorIN (const int &sampling, const double &etaminIn, const double &etamaxIn, const double &phiminIn, const double &phimaxIn, std::vector< IdentifierHash > *outListIH) const |
|
void | regionSelectorINROB (const int &sampling, const double &etaminIn, const double &etamaxIn, const double &phiminIn, const double &phimaxIn, std::vector< uint32_t > *outList) const |
|
void | phiCondition (const std::vector< IdentifierHash > &identifier, int i, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, double etamin, double etamax, std::set< IdentifierHash > *outset) const |
|
void | phiConditionRobId (const std::vector< std::vector< uint32_t > > &identifier, int i, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, double etamin, double etamax, std::set< uint32_t > *outset) const |
|
void | findIdentifier (std::vector< IdentifierHash > &auxsetIH, const int iXBeg, const int iXEnd, const int iYBeg, const int iYEnd, const int iPage) const |
|
void | findIdentifierROB (std::vector< uint32_t > &auxset, const int iXBeg, const int iXEnd, const int iYBeg, const int iYEnd, const int iPage) const |
|
Definition at line 40 of file RegSelectorHashMap.h.
◆ ~RegSelectorHashMap()
virtual RegSelectorHashMap::~RegSelectorHashMap |
( |
| ) |
|
|
overridevirtualdefault |
◆ addLut()
Definition at line 588 of file RegSelectorHashMap.cxx.
592 std::vector<uint32_t> robId_cpy;
597 double etamin(-999.0), etamax(-999.0), phimin(-999.0), phimax(-999.0);
598 int samp(999),
layer(999);
600 int tablesize = detLut->
maxHash();
610 for(
int j=0; j<tablesize; ++j){
613 detLut->
phiMin(j)==phimin && detLut->
phiMax(j) == phimax &&
615 robId_cpy.push_back(detLut->
robId(j));
630 robId_cpy.push_back(detLut->
robId(j));
636 double stepPhi = std::fabs(phimax-phimin);
637 double stepEta = std::fabs(
etamin-etamax);
◆ DisableMissingROBs()
void RegSelectorHashMap::DisableMissingROBs |
( |
const std::vector< uint32_t > & |
vec | ) |
|
◆ etaMaxOut()
const std::vector< double > & RegSelectorHashMap::etaMaxOut |
( |
void |
| ) |
const |
◆ etamaxValue()
double RegSelectorHashMap::etamaxValue |
( |
| ) |
const |
◆ etaMinOut()
const std::vector< double > & RegSelectorHashMap::etaMinOut |
( |
void |
| ) |
const |
◆ etaminValue()
double RegSelectorHashMap::etaminValue |
( |
| ) |
const |
◆ findIdentifier()
Definition at line 948 of file RegSelectorHashMap.cxx.
952 int xEta, yPhi, iPosition;
954 for(xEta= iXBeg; xEta < iXEnd; ++xEta){
955 for(yPhi=iYBeg; yPhi < iYEnd; ++yPhi){
956 iPosition = iPage + (yPhi*
m_iColumns + xEta);
963 if(auxsetIH.size()!=0){
964 sort(auxsetIH.begin(),auxsetIH.end());
965 auxsetIH.erase(
unique(auxsetIH.begin(),auxsetIH.end()),auxsetIH.end());
◆ findIdentifierROB()
void RegSelectorHashMap::findIdentifierROB |
( |
std::vector< uint32_t > & |
auxset, |
|
|
const int |
iXBeg, |
|
|
const int |
iXEnd, |
|
|
const int |
iYBeg, |
|
|
const int |
iYEnd, |
|
|
const int |
iPage |
|
) |
| const |
|
private |
Definition at line 970 of file RegSelectorHashMap.cxx.
974 int xEta, yPhi, iPosition;
975 unsigned int i,size_rod;
977 for(xEta= iXBeg; xEta < iXEnd; ++xEta){
978 for(yPhi=iYBeg; yPhi < iYEnd; ++yPhi){
979 iPosition = iPage + (yPhi*
m_iColumns + xEta);
981 for(
i=0;
i < size_rod; ++
i)
987 if(auxset.size()!=0){
988 sort(auxset.begin(),auxset.end());
989 auxset.erase(
unique(auxset.begin(),auxset.end()),auxset.end());
◆ getEtaPhi()
void RegSelectorHashMap::getEtaPhi |
( |
IdentifierHash |
hashId, |
|
|
double * |
etaMin, |
|
|
double * |
etaMax, |
|
|
double * |
phiMin, |
|
|
double * |
phiMax |
|
) |
| const |
◆ HashIDList() [1/2]
implementation of the IRegSelUT interface
implementation of the IRegSelUT interface
hash id methods
Implements IRegSelLUT.
Definition at line 21 of file RegSelectorHashMap.cxx.
◆ HashIDList() [2/2]
HashIDList interface declaration. return list of non-repeated IdentifierHash.
- Parameters
-
long | layer, long int to decide which layer within the detector. |
IRoiDescriptor | roi, the IRoiDescriptor for the roi, all enabled elements in the roi are found. |
- Returns
- std::vector<IdentifierHash> which is a list of non-repeated Offline Identifier Hash numbers.
Implements IRegSelLUT.
Definition at line 26 of file RegSelectorHashMap.cxx.
◆ hashIdOut()
◆ initMatrix()
void RegSelectorHashMap::initMatrix |
( |
void |
| ) |
|
|
private |
◆ initvar()
void RegSelectorHashMap::initvar |
( |
void |
| ) |
|
◆ layerOut()
const std::vector< int > & RegSelectorHashMap::layerOut |
( |
void |
| ) |
const |
◆ mountDataStruct()
void RegSelectorHashMap::mountDataStruct |
( |
void |
| ) |
|
Definition at line 95 of file RegSelectorHashMap.cxx.
96 int iNumRanges, iRepeatOverX, iRepeatOverY, xEta, yPhi,
k;
97 int iPage, iPosition, iXeta, iYphi;
98 double dEtaMin=-999, dEtaMax=-999, dPhiMin= -999, dPhiMax = -999;
114 for(
k=0;
k<iNumRanges;++
k){
122 iRepeatOverX = std::abs(iRepeatOverX);
125 iRepeatOverY = std::abs(iRepeatOverY);
131 for(yPhi=0;yPhi<iRepeatOverY;++yPhi){
133 for(xEta=0;xEta<iRepeatOverX;++xEta){
134 iPosition = iPage + (iYphi*
m_iColumns +iXeta);
145 for(
k=0;
k<iNumRanges;++
k){
146 std::cout <<
"REGSELECTOR HASH TABLE " <<
151 std::cout << std::hex;
154 std::cout << std::dec;
155 std::cout << std::endl;
158 for(
k=0;
k<iNumRanges;++
k){
165 iRepeatOverX = std::abs(iRepeatOverX);
167 iRepeatOverY = std::abs(iRepeatOverY);
171 for(yPhi=0;yPhi<iRepeatOverY;++yPhi){
173 for(xEta=0;xEta<iRepeatOverX;++xEta){
174 iPosition = iPage + (iYphi*
m_iColumns +iXeta);
175 std::cout <<
"REGSELECTOR MAPS " <<
176 iXeta <<
" " << iYphi <<
" " << iPosition <<
" " <<
178 std::cout << std::hex;
180 std::cout <<
"0x" <<
m_robIDMap[iPosition][
i] <<
" ";
181 std::cout << std::dec;
182 std::cout << std::endl;
◆ MyRound()
int RegSelectorHashMap::MyRound |
( |
double |
pdValue | ) |
|
|
private |
Definition at line 268 of file RegSelectorHashMap.cxx.
272 dFloor = std::floor(pdValue);
273 dAux = std::fabs(pdValue-dFloor);
275 iReturn = (
int) (dFloor + 1);
277 iReturn = (
int) dFloor;
◆ phiCondition()
void RegSelectorHashMap::phiCondition |
( |
const std::vector< IdentifierHash > & |
identifier, |
|
|
int |
i, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
double |
etamin, |
|
|
double |
etamax, |
|
|
std::set< IdentifierHash > * |
outset |
|
) |
| const |
|
private |
Definition at line 439 of file RegSelectorHashMap.cxx.
444 double phimin, phimax;
449 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
450 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
456 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
457 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
464 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
465 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
◆ phiConditionRobId()
void RegSelectorHashMap::phiConditionRobId |
( |
const std::vector< std::vector< uint32_t > > & |
identifier, |
|
|
int |
i, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
double |
etamin, |
|
|
double |
etamax, |
|
|
std::set< uint32_t > * |
outset |
|
) |
| const |
|
private |
Definition at line 473 of file RegSelectorHashMap.cxx.
478 double phimin, phimax;
483 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
484 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
490 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
491 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
498 if( (etaminIn <= etamax) && (etamaxIn >=
etamin) ){
499 if( (phiminIn <= phimax) && (phimaxIn >= phimin) ){
◆ phiMaxOut()
const std::vector< double > & RegSelectorHashMap::phiMaxOut |
( |
void |
| ) |
const |
◆ phimaxValue()
double RegSelectorHashMap::phimaxValue |
( |
| ) |
const |
◆ phiMinOut()
const std::vector< double > & RegSelectorHashMap::phiMinOut |
( |
void |
| ) |
const |
◆ phiminValue()
double RegSelectorHashMap::phiminValue |
( |
| ) |
const |
◆ populateMatrix()
void RegSelectorHashMap::populateMatrix |
( |
int |
iPage, |
|
|
IdentifierHash |
value |
|
) |
| |
|
private |
Definition at line 204 of file RegSelectorHashMap.cxx.
205 int xEta,yPhi, iPosition;
206 int max_iPosition(0);
211 for(yPhi= 0; yPhi <
m_iLines; ++yPhi){
212 iPosition = iPage + (yPhi*
m_iColumns + xEta);
213 if(iPosition>max_iPosition) max_iPosition=iPosition;
219 for(yPhi= 0; yPhi <
m_iLines; ++yPhi){
220 iPosition = iPage + (yPhi*
m_iColumns + xEta);
◆ populateMatrixRobId()
void RegSelectorHashMap::populateMatrixRobId |
( |
int |
iPage, |
|
|
uint32_t |
value |
|
) |
| |
|
private |
◆ read()
StatusCode RegSelectorHashMap::read |
( |
const char * |
filename | ) |
|
Definition at line 531 of file RegSelectorHashMap.cxx.
537 double emin, emax, pmin, pmax;
538 double stepPhi, stepEta;
539 char robIdStr[12], robIdStr2[12];
541 std::vector<uint32_t> robId;
545 std::string unresolvedFileName(
filename);
547 if (fullFileName ==
"") {
548 std::cerr <<
"LArTTRegionSelectorIdentifierHash: FATAL: Could not find input file in DATAPATH" << unresolvedFileName<< std::endl;
549 return StatusCode::FAILURE;
552 std::ifstream
fin(fullFileName.c_str());
555 sc = StatusCode::FAILURE;
558 if (strncmp(
buffer,
" TT-ID",6)==0){
563 int test = sscanf(pch,
" %u %d %d %lf %lf %lf %lf %11s %11s",
564 &hashId, &
layer, &samp, &emin, &emax, &pmin, &pmax, robIdStr, robIdStr2);
565 robId.push_back(strtol(robIdStr,
nullptr,16));
567 robId.push_back(strtol(robIdStr2,
nullptr,16));
569 stepPhi = std::fabs(pmax-pmin);
570 stepEta = std::fabs(emin-emax);
580 }
while((
fin.getline(
buffer, 128,
'\n')));
◆ regionSelector() [1/2]
void RegSelectorHashMap::regionSelector |
( |
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< IdentifierHash > & |
outList |
|
) |
| const |
◆ regionSelector() [2/2]
void RegSelectorHashMap::regionSelector |
( |
int |
sampling, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< IdentifierHash > & |
outList |
|
) |
| const |
◆ regionSelectorIN()
void RegSelectorHashMap::regionSelectorIN |
( |
const int & |
sampling, |
|
|
const double & |
etaminIn, |
|
|
const double & |
etamaxIn, |
|
|
const double & |
phiminIn, |
|
|
const double & |
phimaxIn, |
|
|
std::vector< IdentifierHash > * |
outListIH |
|
) |
| const |
|
private |
why are we making this
need to check whether spans the pi boundary - using iYBeg > iYEnd isn't good enough since it it is very nearly 2pi, then iYBeg and iYEnd will be equal
wrap phi
why reduce the RoI size?
This is WRONG!! this forces all rois to increase as the radius increases - oh dear
Definition at line 282 of file RegSelectorHashMap.cxx.
286 int iYBeg, iYEnd, iXBeg, iXEnd,
k, iPage;
288 std::vector<IdentifierHash>& auxsetIH=(*outListIH);
298 bool pi_boundary =
false;
299 if ( phiminIn>phimaxIn ) pi_boundary =
true;
312 if(iXBeg < 0) iXBeg = 0;
314 if(iXEnd < 0) iXEnd = 0;
◆ regionSelectorINROB()
void RegSelectorHashMap::regionSelectorINROB |
( |
const int & |
sampling, |
|
|
const double & |
etaminIn, |
|
|
const double & |
etamaxIn, |
|
|
const double & |
phiminIn, |
|
|
const double & |
phimaxIn, |
|
|
std::vector< uint32_t > * |
outList |
|
) |
| const |
|
private |
why do we reduce the size of the RoI here? if we must mess with it, shouldn't we make it larger?
need to check whether spans the pi boundary - using (iYBeg > iYEnd) isn't good enough since it it is very nearly 2pi, then iYBeg and iYEnd will be equal.
wrap phi
why reduce the size of the RoI?
This is WRONG!! this forces all rois to increase as the radius increases - oh dear
Definition at line 359 of file RegSelectorHashMap.cxx.
363 int iYBeg{}, iYEnd{}, iXBeg{}, iXEnd{},
k{}, iPage{};
365 std::vector<uint32_t>& auxset=(*outList);
378 bool pi_boundary =
false;
379 if ( phiminIn>phimaxIn ) pi_boundary =
true;
391 if(iXBeg < 0) iXBeg = 0;
393 if(iXEnd < 0) iXEnd = 0;
◆ regionSelectorRobIdUint() [1/2]
void RegSelectorHashMap::regionSelectorRobIdUint |
( |
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< uint32_t > & |
outRobIDList |
|
) |
| const |
◆ regionSelectorRobIdUint() [2/2]
void RegSelectorHashMap::regionSelectorRobIdUint |
( |
int |
sampling, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< uint32_t > & |
outRobIDList |
|
) |
| const |
◆ ROBIDList() [1/2]
void RegSelectorHashMap::ROBIDList |
( |
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
overridevirtual |
◆ ROBIDList() [2/2]
void RegSelectorHashMap::ROBIDList |
( |
long |
layer, |
|
|
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
overridevirtual |
ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference.
- Parameters
-
long | layer, long int to decide which layer within the detector. |
IRoiDescriptor | the IRoiDescriptor for the roi, all enabled elements in the roi are found. |
- Returns
- std::vector<uint32_t> which is a list of non-repeated ROBID numbers.
Implements IRegSelLUT.
Definition at line 38 of file RegSelectorHashMap.cxx.
◆ robIdOut()
const std::vector< std::vector< uint32_t > > & RegSelectorHashMap::robIdOut |
( |
void |
| ) |
const |
◆ sampleOut()
const std::vector< int > & RegSelectorHashMap::sampleOut |
( |
void |
| ) |
const |
◆ summaryDataFile()
Definition at line 652 of file RegSelectorHashMap.cxx.
654 it != dataList.end(); ++
it){
655 std::cout <<
"position: " << (*it).layerDiskPosition() <<
" number: " << (*it).layerDiskNumber() << std::endl;
658 std::cout <<
"hashId: ";
659 std::vector<IdentifierHash> aux = (*it).hashId();
661 std::cout << (*i) <<
" ";
662 std::cout << std::endl;
◆ verifyInputs()
void RegSelectorHashMap::verifyInputs |
( |
double & |
etaminIn, |
|
|
double & |
etamaxIn, |
|
|
double & |
phiminIn, |
|
|
double & |
phimaxIn |
|
) |
| const |
Definition at line 667 of file RegSelectorHashMap.cxx.
671 while (phiminIn > 2*
M_PI ) phiminIn -= 2*
M_PI;
672 while (phiminIn < 0 ) phiminIn += 2*
M_PI;
673 while (phimaxIn > 2*
M_PI ) phimaxIn -= 2*
M_PI;
674 while (phimaxIn < 0 ) phimaxIn += 2*
M_PI;
676 while (phiminIn >
M_PI ) phiminIn -= 2*
M_PI;
677 while (phiminIn < -
M_PI ) phiminIn += 2*
M_PI;
678 while (phimaxIn >
M_PI ) phimaxIn -= 2*
M_PI;
679 while (phimaxIn < -
M_PI ) phimaxIn += 2*
M_PI;
◆ verifyOutput() [1/2]
void RegSelectorHashMap::verifyOutput |
( |
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< IdentifierHash > * |
outputIdlist |
|
) |
| const |
Definition at line 827 of file RegSelectorHashMap.cxx.
831 std::set<IdentifierHash> myset;
832 std::vector<IdentifierHash> outset;
833 double etamin, etamax, etatmp, phimintmp, phimaxtmp;
836 if(etaminIn > etamaxIn){
842 phimintmp = phiminIn;
843 phimaxtmp = phimaxIn;
845 for(
i= 0;
i < vecsize; ++
i){
852 if(phiminIn > phimaxIn ){
856 phimaxIn = phimaxtmp;
862 phiminIn = phimintmp; phimaxIn = phimaxtmp;
866 for(
it = myset.begin();
it!= myset.end(); ++
it){
867 outset.push_back(*
it);
870 if(outset == (*outputIdlist) ){
871 std::cout <<
"equal vectors " << std::endl;
874 std::cout <<
"eta(" << etaminIn <<
"," << etamaxIn <<
") phi(" << phiminIn <<
"," << phimaxIn <<
")" << std::endl;
875 std::cout <<
"desired output ";
876 for(
unsigned int i=0;
i < outset.size(); ++
i)
877 std::cout << std::dec << outset[
i] <<
" ";
878 std::cout << std::endl;
879 std::cout <<
"obtained output ";
880 for(
unsigned int i=0;
i < (*outputIdlist).size(); ++
i)
881 std::cout << std::dec << (*outputIdlist)[
i] <<
" ";
882 std::cout << std::endl;
◆ verifyOutput() [2/2]
void RegSelectorHashMap::verifyOutput |
( |
int |
sampling, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< IdentifierHash > * |
outputIdlist |
|
) |
| const |
Definition at line 886 of file RegSelectorHashMap.cxx.
890 std::set<IdentifierHash> myset;
891 std::vector<IdentifierHash> outset;
892 double etamin, etamax, etatmp, phimintmp, phimaxtmp;
895 if(etaminIn > etamaxIn){
901 phimintmp = phiminIn;
902 phimaxtmp = phimaxIn;
904 for(
i= 0;
i < vecsize; ++
i){
912 if(phiminIn > phimaxIn ){
916 phimaxIn = phimaxtmp;
923 phiminIn = phimintmp; phimaxIn = phimaxtmp;
927 for(
it = myset.begin();
it!= myset.end(); ++
it){
928 outset.push_back(*
it);
931 if(outset == (*outputIdlist) ){
932 std::cout <<
"equal vectors " << std::endl;
935 std::cout <<
"sampling " << sampling <<
"eta(" << etaminIn <<
"," << etamaxIn <<
") phi(" << phiminIn <<
"," << phimaxIn <<
")" << std::endl;
936 std::cout <<
"desired output ";
937 for(
unsigned int i=0;
i < outset.size(); ++
i)
938 std::cout << std::dec << outset[
i] <<
" ";
939 std::cout << std::endl;
940 std::cout <<
"obtained output ";
941 for(
unsigned int i=0;
i < (*outputIdlist).size(); ++
i)
942 std::cout << std::dec << (*outputIdlist)[
i] <<
" ";
943 std::cout << std::endl;
◆ verifyROBIDOutput() [1/2]
void RegSelectorHashMap::verifyROBIDOutput |
( |
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< uint32_t > & |
outputIdlist |
|
) |
| const |
Definition at line 696 of file RegSelectorHashMap.cxx.
700 std::set<uint32_t> myset;
701 std::vector<uint32_t> outset;
702 std::vector<std::vector<uint32_t> >
identifier;
703 double etamin, etamax, etatmp, phimintmp, phimaxtmp;
708 if(etaminIn > etamaxIn){
714 phimintmp = phiminIn;
715 phimaxtmp = phimaxIn;
717 for(
i= 0;
i < vecsize; ++
i){
724 if(phiminIn > phimaxIn ){
728 phimaxIn = phimaxtmp;
734 phiminIn = phimintmp; phimaxIn = phimaxtmp;
738 for(
it = myset.begin();
it!= myset.end(); ++
it){
739 outset.push_back(*
it);
742 if( (outset == outputIdlist) || (outputIdlist.size() >= outset.size()) ){
743 std::cout <<
"equal vectors " << std::endl;
746 std::cout <<
"nonequal vectors " << std::endl;
747 std::cout <<
"eta(" << etaminIn <<
"," << etamaxIn <<
") phi(" << phiminIn <<
"," << phimaxIn <<
")" << std::endl;
748 std::cout <<
"desired output ";
749 for(
unsigned int i=0;
i < outset.size(); ++
i)
750 std::cout << std::dec << outset[
i] <<
" ";
751 std::cout << std::endl;
752 std::cout <<
"obtained output ";
753 for(
unsigned int i=0;
i < outputIdlist.size(); ++
i)
754 std::cout << std::dec << outputIdlist[
i] <<
" ";
755 std::cout << std::endl;
◆ verifyROBIDOutput() [2/2]
void RegSelectorHashMap::verifyROBIDOutput |
( |
int |
sampling, |
|
|
double |
etaminIn, |
|
|
double |
etamaxIn, |
|
|
double |
phiminIn, |
|
|
double |
phimaxIn, |
|
|
std::vector< uint32_t > & |
outputIdlist |
|
) |
| const |
Definition at line 760 of file RegSelectorHashMap.cxx.
766 std::set<uint32_t> myset;
767 std::vector<std::vector<uint32_t> >
identifier;
768 std::vector<uint32_t> outset;
769 double etamin, etamax, etatmp, phimintmp, phimaxtmp;
774 if(etaminIn > etamaxIn){
780 phimintmp = phiminIn;
781 phimaxtmp = phimaxIn;
783 for(
i= 0;
i < vecsize; ++
i){
791 if(phiminIn > phimaxIn ){
795 phimaxIn = phimaxtmp;
802 phiminIn = phimintmp; phimaxIn = phimaxtmp;
806 for(
it = myset.begin();
it!= myset.end(); ++
it){
807 outset.push_back(*
it);
810 if(outset == outputIdlist){
811 std::cout <<
"equal vectors " << std::endl;
814 std::cout <<
"sampling " << sampling <<
"eta(" << etaminIn <<
"," << etamaxIn <<
") phi(" << phiminIn <<
"," << phimaxIn <<
")" << std::endl;
815 std::cout <<
"desired output ";
816 for(
unsigned int i=0;
i < outset.size(); ++
i)
817 std::cout << std::dec << outset[
i] <<
" ";
818 std::cout << std::endl;
819 std::cout <<
"obtained output ";
820 for(
unsigned int i=0;
i < outputIdlist.size(); ++
i)
821 std::cout << std::dec << outputIdlist[
i] <<
" ";
822 std::cout << std::endl;
◆ writeLine()
◆ m_dataList
◆ m_etamax
std::vector<double> RegSelectorHashMap::m_etamax |
|
private |
◆ m_etamaxDet
double RegSelectorHashMap::m_etamaxDet {} |
|
private |
◆ m_etamin
std::vector<double> RegSelectorHashMap::m_etamin |
|
private |
◆ m_etaminDet
double RegSelectorHashMap::m_etaminDet {} |
|
private |
◆ m_hashId
◆ m_hashIDMap
◆ m_iColumns
int RegSelectorHashMap::m_iColumns {} |
|
private |
◆ m_iLines
int RegSelectorHashMap::m_iLines {} |
|
private |
◆ m_layer
std::vector<int> RegSelectorHashMap::m_layer |
|
private |
◆ m_NumSamples
int RegSelectorHashMap::m_NumSamples {} |
|
private |
◆ m_phimax
std::vector<double> RegSelectorHashMap::m_phimax |
|
private |
◆ m_phimaxDet
double RegSelectorHashMap::m_phimaxDet {} |
|
private |
◆ m_phimin
std::vector<double> RegSelectorHashMap::m_phimin |
|
private |
◆ m_phiminDet
double RegSelectorHashMap::m_phiminDet {} |
|
private |
◆ m_readFromFile
bool RegSelectorHashMap::m_readFromFile {} |
|
private |
◆ m_robId
std::vector<std::vector<uint32_t> > RegSelectorHashMap::m_robId |
|
private |
◆ m_robIDMap
std::vector<std::vector<uint32_t> > RegSelectorHashMap::m_robIDMap |
|
private |
◆ m_sample
std::vector<int> RegSelectorHashMap::m_sample |
|
private |
◆ m_stepMinEta
double RegSelectorHashMap::m_stepMinEta {} |
|
private |
◆ m_stepMinPhi
double RegSelectorHashMap::m_stepMinPhi {} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::vector< IdentifierHash > m_hashId
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
void populateMatrix(int iPage, IdentifierHash value)
void findIdentifierROB(std::vector< uint32_t > &auxset, const int iXBeg, const int iXEnd, const int iYBeg, const int iYEnd, const int iPage) const
int sampling(int hashId) const
virtual double etaMinus() const =0
std::vector< std::vector< uint32_t > > m_robId
void regionSelectorIN(const int &sampling, const double &etaminIn, const double &etamaxIn, const double &phiminIn, const double &phimaxIn, std::vector< IdentifierHash > *outListIH) const
void findIdentifier(std::vector< IdentifierHash > &auxsetIH, const int iXBeg, const int iXEnd, const int iYBeg, const int iYEnd, const int iPage) const
std::vector< std::vector< uint32_t > > m_robIDMap
std::vector< size_t > vec
unsigned int maxHash(void) const
std::vector< double > m_etamax
virtual double etaPlus() const =0
double etaMin(int hashId) const
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
double phiMax(int hashId) const
std::vector< double > m_phimax
void regionSelectorINROB(const int &sampling, const double &etaminIn, const double &etamaxIn, const double &phiminIn, const double &phimaxIn, std::vector< uint32_t > *outList) const
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< int > m_sample
void writeLine(const int &layer, const IdentifierHash &hashId, const std::vector< uint32_t > &robId, const double &emin, const double &emax, const double &pmin, const double &pmax, const int &samp)
void verifyInputs(double &etaminIn, double &etamaxIn, double &phiminIn, double &phimaxIn) const
virtual double phiMinus() const =0
std::vector< double > m_etamin
std::vector< double > m_phimin
std::vector< int > m_layer
virtual double phiPlus() const =0
extreme phi values
int robId(int hashId) const
void phiCondition(const std::vector< IdentifierHash > &identifier, int i, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, double etamin, double etamax, std::set< IdentifierHash > *outset) const
void regionSelectorRobIdUint(double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< uint32_t > &outRobIDList) const
int layerDiskNumber(int hashId) const
double etaMax(int hashId) const
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
virtual bool isFullscan() const =0
is this a full detector RoI?
void regionSelector(double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, std::vector< IdentifierHash > &outList) const
void phiConditionRobId(const std::vector< std::vector< uint32_t > > &identifier, int i, double etaminIn, double etamaxIn, double phiminIn, double phimaxIn, double etamin, double etamax, std::set< uint32_t > *outset) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
int MyRound(double pdValue)
int hashId(int value) const
std::vector< IdentifierHash > m_hashIDMap
double phiMin(int hashId) const