Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //
0002 // NOTE:  This file was automatically generated from UTM library via import_utm.pl
0003 // DIRECT EDITS MIGHT BE LOST.
0004 //
0005 /**
0006  * @author      Takashi Matsushita
0007  * Created:     8 Nov 2015
0008  */
0009 
0010 #ifndef tmEventSetup_L1TUtmCut_hh
0011 #define tmEventSetup_L1TUtmCut_hh
0012 
0013 #include "CondFormats/L1TObjects/interface/L1TUtmCutValue.h"
0014 #include "CondFormats/Serialization/interface/Serializable.h"
0015 
0016 #include <string>
0017 
0018 /**
0019  *  This class implements data structure for Cut
0020  */
0021 class L1TUtmCut {
0022 public:
0023   L1TUtmCut() : name_(), object_type_(), cut_type_(), minimum_(), maximum_(), data_(), key_(), version(0){};
0024 
0025   virtual ~L1TUtmCut() = default;
0026 
0027   /** set cut name */
0028   void setName(const std::string& name) { name_ = name; };
0029 
0030   /** set object type */
0031   void setObjectType(const int type) { object_type_ = type; };
0032 
0033   /** set cut type */
0034   void setCutType(const int type) { cut_type_ = type; };
0035 
0036   /** set minimum value of cut range (double) */
0037   void setMinimumValue(const double value) { minimum_.value = value; };
0038 
0039   /** set minimum value of cut range (HW index) */
0040   void setMinimumIndex(const unsigned int index) { minimum_.index = index; };
0041 
0042   /** set minimum value of cut range (L1TUtmCutValue struct) */
0043   void setMinimum(const L1TUtmCutValue& minimum) { minimum_ = minimum; };
0044 
0045   /** set maximum value of cut range (double) */
0046   void setMaximumValue(const double value) { maximum_.value = value; };
0047 
0048   /** set maximum value of cut range (HW index) */
0049   void setMaximumIndex(const unsigned int index) { maximum_.index = index; };
0050 
0051   /** set maximum value of cut range (L1TUtmCutValue struct) */
0052   void setMaximum(const L1TUtmCutValue& maximum) { maximum_ = maximum; };
0053 
0054   /** set precision for cut value calculations */
0055   void setPrecision(const unsigned int precision) {
0056     setMaximumIndex(precision);
0057     setMinimumIndex(precision);
0058   };  // HACK
0059 
0060   /** get cut name */
0061   const std::string& getName() const { return name_; };
0062 
0063   /** get target object type : combination of esObjectType and esFunctionType enums */
0064   const int getObjectType() const { return object_type_; };
0065 
0066   /** get cut type */
0067   const int getCutType() const { return cut_type_; };
0068 
0069   /** get L1TUtmCutValue struct for minimum value of cut range */
0070   const L1TUtmCutValue& getMinimum() const { return minimum_; };
0071 
0072   /** get L1TUtmCutValue struct for maximum value of cut range */
0073   const L1TUtmCutValue& getMaximum() const { return maximum_; };
0074 
0075   /** get L1TUtmCutValue struct for minimum value of cut range */
0076   const double getMinimumValue() const { return minimum_.value; };
0077 
0078   /** get L1TUtmCutValue struct for maximum value of cut range */
0079   const double getMaximumValue() const { return maximum_.value; };
0080 
0081   /** get L1TUtmCutValue struct for minimum value of cut range */
0082   const unsigned int getMinimumIndex() const { return minimum_.index; };
0083 
0084   /** get L1TUtmCutValue struct for maximum value of cut range */
0085   const unsigned int getMaximumIndex() const { return maximum_.index; };
0086 
0087   /** get data */
0088   const std::string& getData() const { return data_; };
0089 
0090   /** get key */
0091   const std::string& getKey() const { return key_; };
0092 
0093   /** get precision */
0094   const unsigned int getPrecision() const { return getMinimumIndex(); };  // HACK
0095 
0096 protected:
0097   std::string name_;       /**< name of cut */
0098   int object_type_;        /**< target object type */
0099   int cut_type_;           /**< type of cut */
0100   L1TUtmCutValue minimum_; /**< minimum value of cut range */
0101   L1TUtmCutValue maximum_; /**< maximum value of cut range */
0102   std::string data_;       /**< data for charge/quality/isolation/charge correlation/impact parameter */
0103   std::string key_;        /**< key for accessing a scale */
0104   unsigned int version;
0105   COND_SERIALIZABLE;
0106 };
0107 
0108 #endif  // tmEventSetup_L1TUtmCut_hh