24 for(
auto itHit: layerHits){
26 if(
abs(itHit-phiMean-phiRefHit)<
abs(phiDist)) phiDist = itHit-phiMean-phiRefHit;
40 int pdfVal =
pdfAllRef[iLayer][iRefLayer][phiDist];
47 unsigned int iLayer = 2;
62 for(
auto itHit: layerHits){
64 if(
abs(itHit-phiRefHit)<phiDist) phiDist = itHit-phiRefHit;
68 if(nHitsInLayer>1 || nHitsInLayer==0)
return;
86 ++
pdfAllRef[iLayer][iRefLayer][phiDistShift];
92 out <<
"GoldenPattern "<< aPattern.
theKey <<std::endl;
93 out <<
"Number of reference layers: "<<aPattern.
meanDistPhi[0].size()
94 <<
", number of measurement layers: "<<aPattern.
pdfAllRef.size()
98 if(!aPattern.
pdfAllRef.size())
return out;
100 out<<
"Mean dist phi per layer:"<<std::endl;
101 for (
unsigned int iRefLayer=0;iRefLayer<aPattern.
meanDistPhi[0].size();++iRefLayer){
102 out<<
"Ref layer: "<<iRefLayer<<
" (";
103 for (
unsigned int iLayer=0;iLayer<aPattern.
meanDistPhi.size();++iLayer){
104 out<<std::setw(3)<<aPattern.
meanDistPhi[iLayer][iRefLayer]<<
"\t";
110 out<<
"Counts number per layer:"<<std::endl;
111 for (
unsigned int iRefLayer=0;iRefLayer<aPattern.
meanDistPhi[0].size();++iRefLayer){
112 out<<
"Ref layer: "<<iRefLayer<<
" (";
113 for (
unsigned int iLayer=0;iLayer<aPattern.
meanDistPhi.size();++iLayer){
156 for (
unsigned int iRefLayer=0;iRefLayer<
pdfAllRef[0].size();++iRefLayer){
157 for (
unsigned int iLayer=0;iLayer<
pdfAllRef.size();++iLayer){
158 for (
unsigned int iPdf=0;iPdf<
pdfAllRef[iLayer][iRefLayer].size();++iPdf){
168 for (
unsigned int iRefLayer=0;iRefLayer<
meanDistPhi[0].size();++iRefLayer){
169 for (
unsigned int iLayer=0;iLayer<
meanDistPhi.size();++iLayer){
181 int digitisedVal, truncatedValue;
182 for (
unsigned int iRefLayer=0;iRefLayer<
pdfAllRef[0].size();++iRefLayer){
183 for (
unsigned int iLayer=0;iLayer<
pdfAllRef.size();++iLayer){
184 for (
unsigned int iPdf=0;iPdf<
pdfAllRef[iLayer][iRefLayer].size();++iPdf){
186 !
pdfAllRef[iLayer][iRefLayer][iPdf])
continue;
196 digitisedVal = rint((
std::pow(2,nPdfValBits)-1) - (pVal/minPlog)*(
std::pow(2,nPdfValBits)-1));
198 truncatedValue = 0 | (digitisedVal & ((int)
pow(2,nPdfValBits)-1));
199 pdfAllRef[iLayer][iRefLayer][iPdf] = truncatedValue;
207 const unsigned int nPdfAddrBits = 7;
208 for (
unsigned int iRefLayer=0;iRefLayer<
pdfAllRef[0].size();++iRefLayer){
209 for (
unsigned int iLayer=0;iLayer<
pdfAllRef.size();++iLayer){
210 for (
unsigned int iPdf=0;iPdf<
pdfAllRef[iLayer][iRefLayer].size();++iPdf){
214 if(index<0 || index>exp2(nPdfAddrBits)-1)
continue;
215 pdfAllRef[iLayer][iRefLayer][
index] = pdfAllRefTmp[iLayer][iRefLayer][iPdf];
224 for (
unsigned int iRefLayer=0;iRefLayer<
meanDistPhi[0].size();++iRefLayer){
225 for (
unsigned int iLayer=0;iLayer<
meanDistPhi.size();++iLayer){
vector2D meanDistPhiCounts
std::vector< int > vector1D
std::ostream & operator<<(std::ostream &out, const ALILine &li)
bool hasCounts()
Check if the GP has any counts in any of referecne layers;.
std::vector< int > refToLogicNumber
GoldenPattern::layerResult process1Layer1RefLayer(unsigned int iRefLayer, unsigned int iLayer, const int refPhi, const OMTFinput::vector1D &layerHits)
std::vector< vector1D > vector2D
std::vector< vector2D > vector3D
Key theKey
Pattern kinematical identification (iEta,iPt,iCharge)
Abs< T >::type abs(const T &t)
std::pair< int, bool > layerResult
void reset()
Reset contents of all data vectors, keeping the vectors size.
int propagateRefPhi(int phiRef, int etaRef, unsigned int iRefLayer)
void addCount(unsigned int iRefLayer, unsigned int iLayer, const int refPhi, const OMTFinput::vector1D &layerHits)
Add a single count to the relevant pdf bin in three dimensions.
Power< A, B >::type pow(const A &a, const B &b)
static const OMTFConfiguration * instance()