Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:17

0001 #ifndef CondFormats_L1TObjects_L1GtCorrelationTemplate_h
0002 #define CondFormats_L1TObjects_L1GtCorrelationTemplate_h
0003 
0004 /**
0005  * \class L1GtCorrelationTemplate
0006  *
0007  *
0008  * Description: L1 Global Trigger correlation template.
0009  * Includes spatial correlation for two objects of different type.
0010  *
0011  * Implementation:
0012  *    <TODO: enter implementation details>
0013  *
0014  * \author: Vasile Mihai Ghete - HEPHY Vienna
0015  *
0016  * $Date$
0017  * $Revision$
0018  *
0019  */
0020 
0021 // system include files
0022 #include "CondFormats/Serialization/interface/Serializable.h"
0023 
0024 #include <string>
0025 #include <iosfwd>
0026 
0027 // user include files
0028 
0029 //   base class
0030 #include "CondFormats/L1TObjects/interface/L1GtCondition.h"
0031 
0032 #include "CondFormats/L1TObjects/interface/L1GtFwd.h"
0033 
0034 // forward declarations
0035 
0036 // class declaration
0037 class L1GtCorrelationTemplate : public L1GtCondition {
0038 public:
0039   /// constructor(s)
0040   ///   default
0041   L1GtCorrelationTemplate();
0042 
0043   ///   from condition name
0044   L1GtCorrelationTemplate(const std::string&);
0045 
0046   ///   from condition name, the category of first sub-condition, the category of the
0047   ///   second sub-condition, the index of first sub-condition in the cor* vector,
0048   ///   the index of second sub-condition in the cor* vector
0049   L1GtCorrelationTemplate(
0050       const std::string&, const L1GtConditionCategory&, const L1GtConditionCategory&, const int, const int);
0051 
0052   /// copy constructor
0053   L1GtCorrelationTemplate(const L1GtCorrelationTemplate&);
0054 
0055   /// destructor
0056   ~L1GtCorrelationTemplate() override;
0057 
0058   /// assign operator
0059   L1GtCorrelationTemplate& operator=(const L1GtCorrelationTemplate&);
0060 
0061 public:
0062   /// typedef for correlation parameters
0063   struct CorrelationParameter {
0064     std::string deltaEtaRange;
0065 
0066     std::string deltaPhiRange;
0067     unsigned int deltaPhiMaxbits;
0068 
0069     COND_SERIALIZABLE;
0070   };
0071 
0072 public:
0073   /// get / set the category of the two sub-conditions
0074   inline const L1GtConditionCategory cond0Category() const { return m_cond0Category; }
0075 
0076   inline const L1GtConditionCategory cond1Category() const { return m_cond1Category; }
0077 
0078   void setCond0Category(const L1GtConditionCategory&);
0079   void setCond1Category(const L1GtConditionCategory&);
0080 
0081   /// get / set the index of the two sub-conditions in the cor* vector from menu
0082   inline const int cond0Index() const { return m_cond0Index; }
0083 
0084   inline const int cond1Index() const { return m_cond1Index; }
0085 
0086   void setCond0Index(const int&);
0087   void setCond1Index(const int&);
0088 
0089   /// get / set correlation parameters
0090 
0091   inline const CorrelationParameter* correlationParameter() const { return &m_correlationParameter; }
0092 
0093   void setCorrelationParameter(const CorrelationParameter& corrParameter);
0094 
0095   /// print the condition
0096   void print(std::ostream& myCout) const override;
0097 
0098   /// output stream operator
0099   friend std::ostream& operator<<(std::ostream&, const L1GtCorrelationTemplate&);
0100 
0101 private:
0102   /// copy function for copy constructor and operator=
0103   void copy(const L1GtCorrelationTemplate& cp);
0104 
0105 private:
0106   L1GtConditionCategory m_cond0Category;
0107   L1GtConditionCategory m_cond1Category;
0108   int m_cond0Index;
0109   int m_cond1Index;
0110   CorrelationParameter m_correlationParameter;
0111 
0112   COND_SERIALIZABLE;
0113 };
0114 
0115 #endif