CMS 3D CMS Logo

Functions
GoldenPatternResult.cc File Reference
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPatternResult.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFConfiguration.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iostream>
#include <ostream>
#include <iomanip>
#include <cmath>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &out, const GoldenPatternResult &gpResult)
 

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  out,
const GoldenPatternResult gpResult 
)

Definition at line 438 of file GoldenPatternResult.cc.

References GoldenPatternResult::getFiredLayerCnt(), GoldenPatternResult::getGpProbability1(), GoldenPatternResult::getGpProbability2(), GoldenPatternResult::getPdfSum(), GoldenPatternResult::getPdfSumUnconstr(), GoldenPatternResult::getRefLayer(), OMTFConfiguration::getRefToLogicNumber(), OMTFConfiguration::isBendingLayer(), GoldenPatternResult::isLayerFired(), GoldenPatternResult::omtfConfig, MillePedeFileConverter_cfg::out, and GoldenPatternResult::stubResults.

438  {
439  unsigned int refLayerLogicNum = gpResult.omtfConfig->getRefToLogicNumber()[gpResult.getRefLayer()];
440 
441  unsigned int sumOverFiredLayers = 0;
442  for (unsigned int iLogicLayer = 0; iLogicLayer < gpResult.stubResults.size(); ++iLogicLayer) {
443  out << " layer: " << std::setw(2) << iLogicLayer << " hit: ";
444  if (gpResult.stubResults[iLogicLayer].getMuonStub()) {
445  out << std::setw(4)
446  << (gpResult.omtfConfig->isBendingLayer(iLogicLayer)
447  ? gpResult.stubResults[iLogicLayer].getMuonStub()->phiBHw
448  : gpResult.stubResults[iLogicLayer].getMuonStub()->phiHw);
449 
450  out << " pdfBin: " << std::setw(4) << gpResult.stubResults[iLogicLayer].getPdfBin() << " pdfVal: " << std::setw(3)
451  << gpResult.stubResults[iLogicLayer].getPdfVal() << " fired " << gpResult.isLayerFired(iLogicLayer)
452  << (iLogicLayer == refLayerLogicNum ? " <<< refLayer" : "");
453 
454  if (gpResult.isLayerFired(iLogicLayer))
455  sumOverFiredLayers += gpResult.stubResults[iLogicLayer].getPdfVal();
456  } else if (gpResult.stubResults[iLogicLayer].getPdfVal()) {
457  out << " pdfVal: " << std::setw(3) << gpResult.stubResults[iLogicLayer].getPdfVal();
458  }
459  out << std::endl;
460  }
461 
462  out << " refLayer: ";
463  out << gpResult.getRefLayer() << "\t";
464 
465  out << " Sum over layers: ";
466  out << gpResult.getPdfSum() << "\t";
467 
468  out << " sumOverFiredLayers: ";
469  out << sumOverFiredLayers << "\t";
470 
471  out << " Sum over layers unconstr: ";
472  out << gpResult.getPdfSumUnconstr() << "\t";
473 
474  out << " Number of hits: ";
475  out << gpResult.getFiredLayerCnt() << "\t";
476 
477  out << " GpProbability1: ";
478  out << gpResult.getGpProbability1() << "\t";
479 
480  out << " GpProbability2: ";
481  out << gpResult.getGpProbability2() << "\t";
482 
483  out << std::endl;
484 
485  return out;
486 }
PdfValueType getPdfSumUnconstr() const
double getGpProbability1() const
const OMTFConfiguration * omtfConfig
double getGpProbability2() const
const std::vector< int > & getRefToLogicNumber() const
bool isLayerFired(unsigned int iLayer) const
unsigned int getFiredLayerCnt() const
PdfValueType getPdfSum() const
bool isBendingLayer(unsigned int iLayer) const override