CMS 3D CMS Logo

CICADACondition.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 #include <iomanip>
5 
6 #include <string>
7 #include <vector>
8 #include <algorithm>
9 
13 
16 
18 
20  : ConditionEvaluation(), m_gtCICADATemplate(static_cast<const CICADATemplate*>(cicadaTemplate)), m_uGtB(ptrGTB) {
21  m_condMaxNumberObjects = 1; //necessary?
22 }
23 
25  m_gtCICADATemplate = cp.gtCICADATemplate();
26  m_uGtB = cp.getuGtB();
27 
28  m_condMaxNumberObjects = cp.condMaxNumberObjects();
29  m_condLastResult = cp.condLastResult();
30  m_combinationsInCond = cp.getCombinationsInCond();
31 
32  m_verbosity = cp.m_verbosity;
33 }
34 
36 
38  copy(cp);
39  return *this;
40 }
41 
42 const bool l1t::CICADACondition::evaluateCondition(const int bxEval) const {
43  bool condResult = false;
44  const float cicadaScore = m_uGtB->getCICADAScore();
45 
46  // This gets rid of a GT emulator convention "iCondition".
47  // This usually indexes the next line, which is somewhat concerning
48  // AXOL1TL operates this way, but it should be checked
49  const CICADATemplate::ObjectParameter objPar = (*(m_gtCICADATemplate->objectParameter()))[0];
50 
51  bool condGEqVal = m_gtCICADATemplate->condGEq();
52  bool passCondition = false;
53 
54  passCondition = checkCut(objPar.minCICADAThreshold, cicadaScore, condGEqVal);
55 
56  condResult |= passCondition;
57 
58  return condResult;
59 }
60 
61 void l1t::CICADACondition::print(std::ostream& myCout) const {
62  myCout << "CICADA Condition Print: " << std::endl;
63  m_gtCICADATemplate->print(myCout);
65 }
const bool evaluateCondition(const int bxEval) const override
the core function to check if the condition matches
void print(std::ostream &myCout) const override
print condition
virtual void print(std::ostream &myCout) const
print condition
void copy(const CICADACondition &cp)
CICADACondition & operator=(const CICADACondition &)