CMS 3D CMS Logo

Functions
GoldenPattern.cc File Reference
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h"
#include "boost/multi_array/multi_array_ref.hpp"
#include "boost/multi_array/subarray.hpp"
#include <cmath>
#include <iomanip>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const GoldenPattern &aPattern)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const GoldenPattern aPattern 
)

Definition at line 28 of file GoldenPattern.cc.

References GoldenPattern::meanDistPhi, MillePedeFileConverter_cfg::out, GoldenPattern::pdfAllRef, and GoldenPattern::theKey.

28  {
29  out << "GoldenPattern " << aPattern.theKey << std::endl;
30  out << "Number of reference layers: " << aPattern.meanDistPhi[0].size()
31  << ", number of measurement layers: " << aPattern.pdfAllRef.size() << std::endl;
32 
33  if (aPattern.meanDistPhi.empty())
34  return out;
35  if (aPattern.pdfAllRef.empty())
36  return out;
37 
38  out << "Mean dist phi per layer:" << std::endl;
39  for (unsigned int iRefLayer = 0; iRefLayer < aPattern.meanDistPhi[0].size(); ++iRefLayer) {
40  out << "Ref layer: " << iRefLayer << " (";
41  for (unsigned int iLayer = 0; iLayer < aPattern.meanDistPhi.size(); ++iLayer) {
42  for (unsigned int iPar = 0; iPar < aPattern.meanDistPhi[iLayer][iRefLayer].size(); iPar++)
43  out << std::setw(3) << aPattern.meanDistPhi[iLayer][iRefLayer][iPar] << "\t";
44  }
45  out << ")" << std::endl;
46  }
47 
48  /* if(aPattern.meanDistPhiCounts.size()){
49  out<<"Counts number per layer:"<<std::endl;
50  for (unsigned int iRefLayer=0;iRefLayer<aPattern.meanDistPhi[0].size();++iRefLayer){
51  out<<"Ref layer: "<<iRefLayer<<" (";
52  for (unsigned int iLayer=0;iLayer<aPattern.meanDistPhi.size();++iLayer){
53  out<<aPattern.meanDistPhiCounts[iLayer][iRefLayer]<<"\t";
54  }
55  out<<")"<<std::endl;
56  }
57  }*/
58 
59  unsigned int nPdfAddrBits = 7;
60  out << "PDF per layer:" << std::endl;
61  for (unsigned int iRefLayer = 0; iRefLayer < aPattern.pdfAllRef[0].size(); ++iRefLayer) {
62  out << "Ref layer: " << iRefLayer;
63  for (unsigned int iLayer = 0; iLayer < aPattern.pdfAllRef.size(); ++iLayer) {
64  out << ", measurement layer: " << iLayer << std::endl;
65  for (unsigned int iPdf = 0; iPdf < exp2(nPdfAddrBits); ++iPdf) {
66  out << std::setw(2) << aPattern.pdfAllRef[iLayer][iRefLayer][iPdf] << " ";
67  }
68  out << std::endl;
69  }
70  }
71 
72  return out;
73 }
vector2D meanDistPhi
Key theKey
Pattern kinematical identification (iEta,iPt,iCharge)
vector3D pdfAllRef