Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef L1Trigger_L1TGlobal_CaloTemplate_h
0002 #define L1Trigger_L1TGlobal_CaloTemplate_h
0003 
0004 /**
0005  * \class CaloTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger calo template.
0009  *
0010  * Implementation:
0011  *    <TODO: enter implementation details>
0012  *
0013  * \author: Vasile Mihai Ghete - HEPHY Vienna
0014  *          Vladimir Rekovic - exted for indexing
0015 
0016  * \new features: R. Cavanaugh
0017  *          - added LUT bit for LLP displaced jets
0018  *            Note: Calo Trig considers the DISP bit part of the
0019  *                  quality word, but uGT firmware considers the
0020  *                  DISP bit to be distinct from the quality word.
0021  * \new features: Bernhard Arnold, Elisa Fontanesi                                                          
0022  *                - added etaWindows for the checkRangeEta function: it allows to use up to five eta cuts in L1 algorithms
0023  * $Date$
0024  * $Revision$
0025  *
0026  */
0027 
0028 // system include files
0029 #include <string>
0030 #include <iosfwd>
0031 
0032 // user include files
0033 
0034 //   base class
0035 #include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"
0036 
0037 // forward declarations
0038 
0039 // class declaration
0040 class CaloTemplate : public GlobalCondition {
0041 public:
0042   // constructor
0043   CaloTemplate();
0044 
0045   // constructor
0046   CaloTemplate(const std::string&);
0047 
0048   // constructor
0049   CaloTemplate(const std::string&, const l1t::GtConditionType&);
0050 
0051   // copy constructor
0052   CaloTemplate(const CaloTemplate&);
0053 
0054   // destructor
0055   ~CaloTemplate() override;
0056 
0057   // assign operator
0058   CaloTemplate& operator=(const CaloTemplate&);
0059 
0060 public:
0061   struct Window {
0062     unsigned int lower;
0063     unsigned int upper;
0064   };
0065 
0066   /// typedef for a single object template
0067   struct ObjectParameter {
0068     unsigned int etLowThreshold;
0069     unsigned int etHighThreshold;
0070     unsigned int indexLow;
0071     unsigned int indexHigh;
0072     unsigned int etaRange;
0073     unsigned int phiRange;
0074 
0075     unsigned int isolationLUT;
0076     unsigned int qualityLUT;
0077     unsigned int displacedLUT;  // Added for LLP Jets
0078 
0079     std::vector<Window> etaWindows;
0080 
0081     unsigned int phiWindow1Lower;
0082     unsigned int phiWindow1Upper;
0083     unsigned int phiWindow2Lower;
0084     unsigned int phiWindow2Upper;
0085   };
0086 
0087   /// typedef for correlation parameters
0088   struct CorrelationParameter {
0089     unsigned long long deltaEtaRange;
0090 
0091     unsigned long long deltaPhiRange;
0092     unsigned int deltaPhiMaxbits;
0093 
0094     unsigned int deltaEtaRangeLower;
0095     unsigned int deltaEtaRangeUpper;
0096 
0097     unsigned int deltaPhiRangeLower;
0098     unsigned int deltaPhiRangeUpper;
0099   };
0100 
0101 public:
0102   inline const std::vector<ObjectParameter>* objectParameter() const { return &m_objectParameter; }
0103 
0104   inline const CorrelationParameter* correlationParameter() const { return &m_correlationParameter; }
0105 
0106   /// set functions
0107   void setConditionParameter(const std::vector<ObjectParameter>& objParameter,
0108                              const CorrelationParameter& corrParameter);
0109 
0110   /// print the condition
0111   void print(std::ostream& myCout) const override;
0112 
0113   /// output stream operator
0114   friend std::ostream& operator<<(std::ostream&, const CaloTemplate&);
0115 
0116 protected:
0117   /// copy function for copy constructor and operator=
0118   void copy(const CaloTemplate& cp);
0119 
0120 protected:
0121   /// variables containing the parameters
0122   std::vector<ObjectParameter> m_objectParameter;
0123   CorrelationParameter m_correlationParameter;
0124 };
0125 
0126 #endif