CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TUtmTriggerMenuDumper Class Reference
Inheritance diagram for L1TUtmTriggerMenuDumper:

Public Member Functions

 L1TUtmTriggerMenuDumper (const ParameterSet &)
 
 ~L1TUtmTriggerMenuDumper () override
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (Event const &, EventSetup const &) override
 
void beginJob () override
 
void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void beginRun (Run const &, EventSetup const &) override
 
void endJob () override
 
void endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void endRun (Run const &, EventSetup const &) override
 

Private Attributes

edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcdm_l1TriggerMenuToken
 

Detailed Description

Definition at line 37 of file L1TUtmTriggerMenuDumper.cc.

Constructor & Destructor Documentation

◆ L1TUtmTriggerMenuDumper()

L1TUtmTriggerMenuDumper::L1TUtmTriggerMenuDumper ( const ParameterSet iConfig)
explicit

Definition at line 56 of file L1TUtmTriggerMenuDumper.cc.

57  : m_l1TriggerMenuToken(esConsumes<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd, edm::Transition::BeginRun>()) {}
edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > m_l1TriggerMenuToken

◆ ~L1TUtmTriggerMenuDumper()

L1TUtmTriggerMenuDumper::~L1TUtmTriggerMenuDumper ( )
override

Definition at line 59 of file L1TUtmTriggerMenuDumper.cc.

59 {}

Member Function Documentation

◆ analyze()

void L1TUtmTriggerMenuDumper::analyze ( Event const &  iEvent,
EventSetup const &  iSetup 
)
overrideprivate

Definition at line 61 of file L1TUtmTriggerMenuDumper.cc.

61 {}

◆ beginJob()

void L1TUtmTriggerMenuDumper::beginJob ( void  )
overrideprivate

Definition at line 63 of file L1TUtmTriggerMenuDumper.cc.

References gather_cfg::cout.

63 { cout << "INFO: L1TUtmTriggerMenuDumper module beginJob called.\n"; }

◆ beginLuminosityBlock()

void L1TUtmTriggerMenuDumper::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivate

Definition at line 190 of file L1TUtmTriggerMenuDumper.cc.

190 {}

◆ beginRun()

void L1TUtmTriggerMenuDumper::beginRun ( Run const &  run,
EventSetup const &  iSetup 
)
overrideprivate

Definition at line 67 of file L1TUtmTriggerMenuDumper.cc.

References gather_cfg::cout, DMR_cfg::cut, L1TUtmTriggerMenu::getAlgorithmMap(), L1TUtmTriggerMenu::getConditionMap(), L1TUtmCondition::getCuts(), edm::EventSetup::getHandle(), L1TUtmCondition::getObjects(), L1TUtmTriggerMenu::getScaleMap(), L1TUtmCondition::getType(), cuy::ii, findQualityFiles::jj, GetRecoTauVFromDQM_MC_cff::kk, m_l1TriggerMenuToken, dqmiodumpmetadata::n, AlCaHLTBitMon_QueryRunRegistry::string, and unpackBuffers-CaloStage2::token.

67  {
69 
70  const std::map<std::string, L1TUtmAlgorithm>& algoMap = hmenu->getAlgorithmMap();
71  const std::map<std::string, L1TUtmCondition>& condMap = hmenu->getConditionMap();
72  //We use es types for scale map to use auxiliary functions without having to duplicate code
73  const std::map<std::string, tmeventsetup::esScale> scaleMap(std::begin(hmenu->getScaleMap()),
74  std::end(hmenu->getScaleMap()));
75 
76  bool hasPrecision = false;
77  std::map<std::string, unsigned int> precisions;
78  getPrecisions(precisions, scaleMap);
79  for (std::map<std::string, unsigned int>::const_iterator cit = precisions.begin(); cit != precisions.end(); cit++) {
80  std::cout << cit->first << " = " << cit->second << "\n";
81  hasPrecision = true;
82  }
83 
84  if (hasPrecision) {
85  std::map<std::string, tmeventsetup::esScale>::iterator it1, it2;
86  const tmeventsetup::esScale* scale1 = &scaleMap.find("EG-ETA")->second;
87  const tmeventsetup::esScale* scale2 = &scaleMap.find("MU-ETA")->second;
88 
89  std::vector<long long> lut_eg_2_mu_eta;
90  getCaloMuonEtaConversionLut(lut_eg_2_mu_eta, scale1, scale2);
91 
92  scale1 = &scaleMap.find("EG-PHI")->second;
93  scale2 = &scaleMap.find("MU-PHI")->second;
94 
95  std::vector<long long> lut_eg_2_mu_phi;
96  getCaloMuonPhiConversionLut(lut_eg_2_mu_phi, scale1, scale2);
97 
98  scale1 = &scaleMap.find("EG-ETA")->second;
99  scale2 = &scaleMap.find("MU-ETA")->second;
100 
101  std::vector<double> eg_mu_delta_eta;
102  std::vector<long long> lut_eg_mu_delta_eta;
103  size_t n = getDeltaVector(eg_mu_delta_eta, scale1, scale2);
104  setLut(lut_eg_mu_delta_eta, eg_mu_delta_eta, precisions["PRECISION-EG-MU-Delta"]);
105 
106  std::vector<long long> lut_eg_mu_cosh;
107  applyCosh(eg_mu_delta_eta, n);
108  setLut(lut_eg_mu_cosh, eg_mu_delta_eta, precisions["PRECISION-EG-MU-Math"]);
109 
110  scale1 = &scaleMap.find("EG-PHI")->second;
111  scale2 = &scaleMap.find("MU-PHI")->second;
112 
113  std::vector<double> eg_mu_delta_phi;
114  std::vector<long long> lut_eg_mu_delta_phi;
115  n = getDeltaVector(eg_mu_delta_phi, scale1, scale2);
116  setLut(lut_eg_mu_delta_phi, eg_mu_delta_phi, precisions["PRECISION-EG-MU-Delta"]);
117 
118  std::vector<long long> lut_eg_mu_cos;
119  applyCos(eg_mu_delta_phi, n);
120  setLut(lut_eg_mu_cos, eg_mu_delta_phi, precisions["PRECISION-EG-MU-Math"]);
121 
122  scale1 = &scaleMap.find("EG-ET")->second;
123  std::vector<long long> lut_eg_et;
124  getLut(lut_eg_et, scale1, precisions["PRECISION-EG-MU-MassPt"]);
125 
126  scale1 = &scaleMap.find("MU-ET")->second;
127  std::vector<long long> lut_mu_et;
128  getLut(lut_mu_et, scale1, precisions["PRECISION-EG-MU-MassPt"]);
129  for (size_t ii = 0; ii < lut_mu_et.size(); ii++) {
130  std::cout << lut_mu_et.at(ii) << "\n";
131  }
132  }
133 
134  for (std::map<std::string, L1TUtmAlgorithm>::const_iterator cit = algoMap.begin(); cit != algoMap.end(); cit++) {
135  const L1TUtmAlgorithm& algo = cit->second;
136  std::cout << "algo name = " << algo.getName() << "\n";
137  std::cout << "algo exp. = " << algo.getExpression() << "\n";
138  std::cout << "algo exp. in cond. = " << algo.getExpressionInCondition() << "\n";
139 
140  const std::vector<std::string>& rpn_vec = algo.getRpnVector();
141  for (size_t ii = 0; ii < rpn_vec.size(); ii++) {
142  const std::string& token = rpn_vec.at(ii);
143  if (Algorithm::isGate(token))
144  continue;
145  const L1TUtmCondition& condition = condMap.find(token)->second;
146  std::cout << " cond type = " << condition.getType() << "\n";
147 
148  const std::vector<L1TUtmCut>& cuts = condition.getCuts();
149  for (size_t jj = 0; jj < cuts.size(); jj++) {
150  const L1TUtmCut& cut = cuts.at(jj);
151  std::cout << " cut name = " << cut.getName() << "\n";
152  std::cout << " cut target = " << cut.getObjectType() << "\n";
153  std::cout << " cut type = " << cut.getCutType() << "\n";
154  std::cout << " cut min. value index = " << cut.getMinimum().value << " " << cut.getMinimum().index << "\n";
155  std::cout << " cut max. value index = " << cut.getMaximum().value << " " << cut.getMaximum().index << "\n";
156  std::cout << " cut data = " << cut.getData() << "\n";
157  }
158 
159  const std::vector<L1TUtmObject>& objects = condition.getObjects();
160  for (size_t jj = 0; jj < objects.size(); jj++) {
161  const L1TUtmObject& object = objects.at(jj);
162  std::cout << " obj name = " << object.getName() << "\n";
163  std::cout << " obj type = " << object.getType() << "\n";
164  std::cout << " obj op = " << object.getComparisonOperator() << "\n";
165  std::cout << " obj bx = " << object.getBxOffset() << "\n";
166  if (object.getType() == esObjectType::EXT) {
167  std::cout << " ext name = " << object.getExternalSignalName() << "\n";
168  std::cout << " ext ch id = " << object.getExternalChannelId() << "\n";
169  }
170 
171  const std::vector<L1TUtmCut>& cuts = object.getCuts();
172  for (size_t kk = 0; kk < cuts.size(); kk++) {
173  const L1TUtmCut& cut = cuts.at(kk);
174  std::cout << " cut name = " << cut.getName() << "\n";
175  std::cout << " cut target = " << cut.getObjectType() << "\n";
176  std::cout << " cut type = " << cut.getCutType() << "\n";
177  std::cout << " cut min. value index = " << cut.getMinimum().value << " " << cut.getMinimum().index
178  << "\n";
179  std::cout << " cut max. value index = " << cut.getMaximum().value << " " << cut.getMaximum().index
180  << "\n";
181  std::cout << " cut data = " << cut.getData() << "\n";
182  }
183  }
184  }
185  }
186 }
const int getType() const
const std::vector< L1TUtmObject > & getObjects() const
const std::map< std::string, L1TUtmScale > & getScaleMap() const
const std::map< std::string, L1TUtmCondition > & getConditionMap() const
ii
Definition: cuy.py:589
edm::ESGetToken< L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd > m_l1TriggerMenuToken
const std::vector< L1TUtmCut > & getCuts() const
const std::map< std::string, L1TUtmAlgorithm > & getAlgorithmMap() const

◆ endJob()

void L1TUtmTriggerMenuDumper::endJob ( void  )
overrideprivate

Definition at line 65 of file L1TUtmTriggerMenuDumper.cc.

References gather_cfg::cout.

65 { cout << "INFO: L1TUtmTriggerMenuDumper module endJob called.\n"; }

◆ endLuminosityBlock()

void L1TUtmTriggerMenuDumper::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivate

Definition at line 192 of file L1TUtmTriggerMenuDumper.cc.

192 {}

◆ endRun()

void L1TUtmTriggerMenuDumper::endRun ( Run const &  ,
EventSetup const &   
)
overrideprivate

Definition at line 188 of file L1TUtmTriggerMenuDumper.cc.

188 {}

◆ fillDescriptions()

void L1TUtmTriggerMenuDumper::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 194 of file L1TUtmTriggerMenuDumper.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

194  {
195  //The following says we do not know what parameters are allowed so do no validation
196  // Please change this to state exactly what you do use, even if it is no parameters
198  desc.setUnknown();
199  descriptions.addDefault(desc);
200 }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ m_l1TriggerMenuToken

edm::ESGetToken<L1TUtmTriggerMenu, L1TUtmTriggerMenuRcd> L1TUtmTriggerMenuDumper::m_l1TriggerMenuToken
private

Definition at line 53 of file L1TUtmTriggerMenuDumper.cc.

Referenced by beginRun().