CMS 3D CMS Logo

Functions
GoldenPattern.cc File Reference
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h"
#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 23 of file GoldenPattern.cc.

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

23  {
24  out << "GoldenPattern " << aPattern.theKey << std::endl;
25  out << "Number of reference layers: " << aPattern.meanDistPhi[0].size()
26  << ", number of measurement layers: " << aPattern.pdfAllRef.size() << std::endl;
27 
28  if (aPattern.meanDistPhi.empty())
29  return out;
30  if (aPattern.pdfAllRef.empty())
31  return out;
32 
33  out << "Mean dist phi per layer:" << std::endl;
34  for (unsigned int iRefLayer = 0; iRefLayer < aPattern.meanDistPhi[0].size(); ++iRefLayer) {
35  out << "Ref layer: " << iRefLayer << " (";
36  for (unsigned int iLayer = 0; iLayer < aPattern.meanDistPhi.size(); ++iLayer) {
37  for (unsigned int iPar = 0; iPar < aPattern.meanDistPhi[iLayer][iRefLayer].size(); iPar++)
38  out << std::setw(3) << aPattern.meanDistPhi[iLayer][iRefLayer][iPar] << "\t";
39  }
40  out << ")" << std::endl;
41  }
42 
43  unsigned int nPdfAddrBits = 7;
44  out << "PDF per layer:" << std::endl;
45  for (unsigned int iRefLayer = 0; iRefLayer < aPattern.pdfAllRef[0].size(); ++iRefLayer) {
46  out << "Ref layer: " << iRefLayer;
47  for (unsigned int iLayer = 0; iLayer < aPattern.pdfAllRef.size(); ++iLayer) {
48  out << ", measurement layer: " << iLayer << std::endl;
49  for (unsigned int iPdf = 0; iPdf < exp2(nPdfAddrBits); ++iPdf) {
50  out << std::setw(2) << aPattern.pdfAllRef[iLayer][iRefLayer][iPdf] << " ";
51  }
52  out << std::endl;
53  }
54  }
55 
56  return out;
57 }
vector2D meanDistPhi
Key theKey
Pattern kinematical identification (iEta,iPt,iCharge)
vector3D pdfAllRef