Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:29

0001 #ifndef L1Trigger_L1TGlobal_EnergySumTemplate_h
0002 #define L1Trigger_L1TGlobal_EnergySumTemplate_h
0003 
0004 /**
0005  * \class EnergySumTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger energy-sum template.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *
0015  * $Date$
0016  * $Revision$
0017  *
0018  */
0019 
0020 // system include files
0021 #include <string>
0022 #include <iosfwd>
0023 
0024 // user include files
0025 
0026 //   base class
0027 #include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
0028 
0029 // forward declarations
0030 
0031 // class declaration
0032 class EnergySumTemplate : public GlobalCondition {
0033 public:
0034   // constructor
0035   EnergySumTemplate();
0036 
0037   // constructor
0038   EnergySumTemplate(const std::string&);
0039 
0040   // constructor
0041   EnergySumTemplate(const std::string&, const l1t::GtConditionType&);
0042 
0043   // copy constructor
0044   EnergySumTemplate(const EnergySumTemplate&);
0045 
0046   // destructor
0047   ~EnergySumTemplate() override;
0048 
0049   // assign operator
0050   EnergySumTemplate& operator=(const EnergySumTemplate&);
0051 
0052 public:
0053   /// typedef for a single object template
0054   struct ObjectParameter {
0055     unsigned int etLowThreshold;
0056     unsigned int etHighThreshold;
0057     bool energyOverflow;
0058 
0059     unsigned int phiWindow1Lower;
0060     unsigned int phiWindow1Upper;
0061     unsigned int phiWindow2Lower;
0062     unsigned int phiWindow2Upper;
0063 
0064     // two words used only for ETM (ETM phi has 72 bins - two 64-bits words)
0065     // one word used for HTM
0066     unsigned long long phiRange0Word;
0067     unsigned long long phiRange1Word;
0068   };
0069 
0070 public:
0071   inline const std::vector<ObjectParameter>* objectParameter() const { return &m_objectParameter; }
0072 
0073   /// set functions
0074   void setConditionParameter(const std::vector<ObjectParameter>&);
0075 
0076   /// print the condition
0077   void print(std::ostream& myCout) const override;
0078 
0079   /// output stream operator
0080   friend std::ostream& operator<<(std::ostream&, const EnergySumTemplate&);
0081 
0082 private:
0083   /// copy function for copy constructor and operator=
0084   void copy(const EnergySumTemplate& cp);
0085 
0086 private:
0087   /// variables containing the parameters
0088   std::vector<ObjectParameter> m_objectParameter;
0089 };
0090 
0091 #endif