CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::CICADACondition Class Reference

#include <CICADACondition.h>

Inheritance diagram for l1t::CICADACondition:
l1t::ConditionEvaluation

Public Member Functions

 CICADACondition ()
 
 CICADACondition (const GlobalCondition *, const GlobalBoard *)
 
 CICADACondition (const CICADACondition &)
 
const bool evaluateCondition (const int bxEval) const override
 the core function to check if the condition matches More...
 
const GlobalBoardgetuGtB () const
 
const CICADATemplategtCICADATemplate () const
 
CICADAConditionoperator= (const CICADACondition &)
 
void print (std::ostream &myCout) const override
 print condition More...
 
void setGtCICADATemplate (const CICADATemplate *cicadaTemplate)
 
void setuGtB (const GlobalBoard *ptrGTB)
 
 ~CICADACondition () override=default
 
- Public Member Functions inherited from l1t::ConditionEvaluation
 ConditionEvaluation ()
 constructor More...
 
bool condLastResult () const
 get the latest result for the condition More...
 
int condMaxNumberObjects () const
 
void evaluateConditionStoreResult (const int bxEval)
 call evaluateCondition and save last result More...
 
CombinationsInCond const & getCombinationsInCond () const
 get all the object combinations evaluated to true in the condition More...
 
virtual std::string getNumericExpression () const
 get numeric expression More...
 
void setCondMaxNumberObjects (int condMaxNumberObjectsValue)
 
void setVerbosity (const int verbosity)
 
virtual ~ConditionEvaluation ()
 destructor More...
 

Private Member Functions

void copy (const CICADACondition &cp)
 

Private Attributes

const CICADATemplatem_gtCICADATemplate
 
const GlobalBoardm_uGtB
 

Additional Inherited Members

- Protected Member Functions inherited from l1t::ConditionEvaluation
template<class Type1 >
const bool checkBit (const Type1 &mask, const unsigned int bitNumber) const
 check if a bit with a given number is set in a mask More...
 
template<class Type1 , class Type2 >
const bool checkCut (const Type1 &cutL, const Type2 &value, bool condGEqValue) const
 
template<class Type1 >
const bool checkIndex (const Type1 &indexLo, const Type1 &indexHi, const unsigned int index) const
 check if a index is in a given range More...
 
template<class Type1 >
const bool checkRangeDeltaEta (const unsigned int obj1Eta, const unsigned int obj2Eta, const Type1 &lowerR, const Type1 &upperR, const unsigned int nEtaBits) const
 check if a value is in a given deltaEta range More...
 
template<class Type1 >
const bool checkRangeDeltaPhi (const unsigned int obj1Phi, const unsigned int obj2Phi, const Type1 &lowerR, const Type1 &upperR) const
 check if a value is in a given deltaPhi range More...
 
template<class Type1 >
const bool checkRangeEta (const unsigned int bitNumber, const std::vector< Type1 > &windows, const unsigned int nEtaBits) const
 
template<class Type1 >
const bool checkRangePhi (const unsigned int bitNumber, const Type1 &W1beginR, const Type1 &W1endR, const Type1 &W2beginR, const Type1 &W2endR) const
 check if a value is in a given phi range and outside of a veto range More...
 
template<class Type1 >
const bool checkRangeTfMuonIndex (const unsigned int bitNumber, const std::vector< Type1 > &windows) const
 check if a value is in a given muon track finder index range More...
 
template<class Type1 , class Type2 >
const bool checkThreshold (const Type1 &thresholdL, const Type1 &thresholdH, const Type2 &value, bool condGEqValue) const
 
template<class Type1 , class Type2 >
const bool checkUnconstrainedPt (const Type1 &thresholdL, const Type1 &thresholdH, const Type2 &value, bool condGEqValue) const
 
CombinationsInCondcombinationsInCond () const
 get all the object combinations (to fill it...) More...
 
- Protected Attributes inherited from l1t::ConditionEvaluation
CombinationsInCond m_combinationsInCond
 store all the object combinations evaluated to true in the condition More...
 
bool m_condLastResult
 the last result of evaluateCondition() More...
 
int m_condMaxNumberObjects
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 15 of file CICADACondition.h.

Constructor & Destructor Documentation

◆ CICADACondition() [1/3]

l1t::CICADACondition::CICADACondition ( )

Definition at line 17 of file CICADACondition.cc.

◆ CICADACondition() [2/3]

l1t::CICADACondition::CICADACondition ( const GlobalCondition cicadaTemplate,
const GlobalBoard ptrGTB 
)

Definition at line 19 of file CICADACondition.cc.

References l1t::ConditionEvaluation::m_condMaxNumberObjects.

20  : ConditionEvaluation(), m_gtCICADATemplate(static_cast<const CICADATemplate*>(cicadaTemplate)), m_uGtB(ptrGTB) {
21  m_condMaxNumberObjects = 1; //necessary?
22 }
const CICADATemplate * m_gtCICADATemplate
const GlobalBoard * m_uGtB

◆ CICADACondition() [3/3]

l1t::CICADACondition::CICADACondition ( const CICADACondition cp)

Definition at line 35 of file CICADACondition.cc.

References copy().

35 : ConditionEvaluation() { copy(cp); }
void copy(const CICADACondition &cp)

◆ ~CICADACondition()

l1t::CICADACondition::~CICADACondition ( )
overridedefault

Member Function Documentation

◆ copy()

void l1t::CICADACondition::copy ( const CICADACondition cp)
private

Definition at line 24 of file CICADACondition.cc.

Referenced by CICADACondition().

24  {
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 }
const CICADATemplate * m_gtCICADATemplate
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
int m_verbosity
verbosity level
bool m_condLastResult
the last result of evaluateCondition()
const GlobalBoard * m_uGtB

◆ evaluateCondition()

const bool l1t::CICADACondition::evaluateCondition ( const int  bxEval) const
overridevirtual

the core function to check if the condition matches

Implements l1t::ConditionEvaluation.

Definition at line 42 of file CICADACondition.cc.

References CICADATemplate::ObjectParameter::minCICADAThreshold.

42  {
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
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 }
const CICADATemplate * m_gtCICADATemplate
const float getCICADAScore() const
Definition: GlobalBoard.h:182
const std::vector< ObjectParameter > * objectParameter() const
const bool condGEq() const
get / set condition GEq flag
const bool checkCut(const Type1 &cutL, const Type2 &value, bool condGEqValue) const
const GlobalBoard * m_uGtB

◆ getuGtB()

const GlobalBoard* l1t::CICADACondition::getuGtB ( ) const
inline

Definition at line 32 of file CICADACondition.h.

References m_uGtB.

32 { return m_uGtB; }
const GlobalBoard * m_uGtB

◆ gtCICADATemplate()

const CICADATemplate* l1t::CICADACondition::gtCICADATemplate ( ) const
inline

Definition at line 28 of file CICADACondition.h.

References m_gtCICADATemplate.

28 { return m_gtCICADATemplate; }
const CICADATemplate * m_gtCICADATemplate

◆ operator=()

l1t::CICADACondition & l1t::CICADACondition::operator= ( const CICADACondition cp)

Definition at line 37 of file CICADACondition.cc.

References filterCSVwithJSON::copy.

37  {
38  copy(cp);
39  return *this;
40 }
void copy(const CICADACondition &cp)

◆ print()

void l1t::CICADACondition::print ( std::ostream &  myCout) const
overridevirtual

print condition

Reimplemented from l1t::ConditionEvaluation.

Definition at line 61 of file CICADACondition.cc.

References l1t::ConditionEvaluation::print().

Referenced by l1t::GlobalBoard::runGTL().

61  {
62  myCout << "CICADA Condition Print: " << std::endl;
63  m_gtCICADATemplate->print(myCout);
65 }
const CICADATemplate * m_gtCICADATemplate
void print(std::ostream &myCout) const override
print condition
virtual void print(std::ostream &myCout) const
print condition

◆ setGtCICADATemplate()

void l1t::CICADACondition::setGtCICADATemplate ( const CICADATemplate cicadaTemplate)
inline

Definition at line 30 of file CICADACondition.h.

References m_gtCICADATemplate.

30 { m_gtCICADATemplate = cicadaTemplate; }
const CICADATemplate * m_gtCICADATemplate

◆ setuGtB()

void l1t::CICADACondition::setuGtB ( const GlobalBoard ptrGTB)
inline

Definition at line 34 of file CICADACondition.h.

References m_uGtB.

34 { m_uGtB = ptrGTB; }
const GlobalBoard * m_uGtB

Member Data Documentation

◆ m_gtCICADATemplate

const CICADATemplate* l1t::CICADACondition::m_gtCICADATemplate
private

Definition at line 39 of file CICADACondition.h.

Referenced by gtCICADATemplate(), and setGtCICADATemplate().

◆ m_uGtB

const GlobalBoard* l1t::CICADACondition::m_uGtB
private

Definition at line 41 of file CICADACondition.h.

Referenced by getuGtB(), and setuGtB().