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 321 of file GoldenPatternResult.cc.

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

321  {
322  unsigned int refLayerLogicNum = gpResult.omtfConfig->getRefToLogicNumber()[gpResult.getRefLayer()];
323 
324  unsigned int sumOverFiredLayers = 0;
325  for (unsigned int iLogicLayer = 0; iLogicLayer < gpResult.stubResults.size(); ++iLogicLayer) {
326  out << " layer: " << std::setw(2) << iLogicLayer << " hit: ";
327  if (gpResult.stubResults[iLogicLayer].getMuonStub()) {
328  out << std::setw(4)
329  << (gpResult.omtfConfig->isBendingLayer(iLogicLayer)
330  ? gpResult.stubResults[iLogicLayer].getMuonStub()->phiBHw
331  : gpResult.stubResults[iLogicLayer].getMuonStub()->phiHw);
332 
333  out << " pdfBin: " << std::setw(4) << gpResult.stubResults[iLogicLayer].getPdfBin() << " pdfVal: " << std::setw(3)
334  << gpResult.stubResults[iLogicLayer].getPdfVal() << " fired " << gpResult.isLayerFired(iLogicLayer)
335  << (iLogicLayer == refLayerLogicNum ? " <<< refLayer" : "");
336 
337  if (gpResult.isLayerFired(iLogicLayer))
338  sumOverFiredLayers += gpResult.stubResults[iLogicLayer].getPdfVal();
339  } else if (gpResult.stubResults[iLogicLayer].getPdfVal()) {
340  out << " pdfVal: " << std::setw(3) << gpResult.stubResults[iLogicLayer].getPdfVal();
341  }
342  out << std::endl;
343  }
344 
345  out << " refLayer: ";
346  out << gpResult.getRefLayer() << "\t";
347 
348  out << " Sum over layers: ";
349  out << gpResult.getPdfSum() << "\t";
350 
351  out << " sumOverFiredLayers: ";
352  out << sumOverFiredLayers << "\t";
353 
354  out << " Number of hits: ";
355  out << gpResult.getFiredLayerCnt() << "\t";
356 
357  out << " GpProbability1: ";
358  out << gpResult.getGpProbability1() << "\t";
359 
360  out << " GpProbability2: ";
361  out << gpResult.getGpProbability2() << "\t";
362 
363  out << std::endl;
364 
365  return out;
366 }
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