00001 
00002 #ifndef TrigConf_TriggerThresholdValue
00003 #define TrigConf_TriggerThresholdValue
00004 
00005 #include "TrigConfL1Data/L1DataBaseclass.h"
00006 
00007 #include <string>
00008 
00009 namespace TrigConf {
00010   
00011    namespace JetWindowSize {
00012       enum Size { NONE, SMALL, LARGE, UNDEF };
00013    }
00014 
00015    class CaloInfo;
00016 
00017    class TriggerThresholdValue : public L1DataBaseclass  {
00018    public:
00019       static const int fgCaloClusterOff;
00020       static const int fgCaloJetOff;
00021       static const int fgCaloEtSumOff;
00022       static const int fgCaloEtMissOff;
00023       static const int fgCaloJetEtOff;
00024       static const int fgCaloIsolationOff;
00025 
00026    public:
00027       static void setCaloInfo(const CaloInfo& ci);
00028       static float caloGlobalScale();
00029       static float caloGlobalScaleGeVToCount();
00030       static float caloGlobalScaleCountToGeV();
00031       
00032    public:
00033       TriggerThresholdValue();
00034       virtual ~TriggerThresholdValue();
00035 
00036       virtual TriggerThresholdValue* createCopy() const = 0;
00037 
00038       
00039       const std::string& type() const { return m_Type; }
00040       float        ptcut() const { return m_Ptcut; }
00041       float        priority() const { return m_Priority; }
00042       int          ptCutCount() const { return thresholdValueCount(); }
00043       virtual int  thresholdValueCount() const;
00044       unsigned int window() const { return m_Window; }
00045       virtual JetWindowSize::Size windowSize() const { return m_WindowSize; }
00046       int        phimin() const { return m_PhiMin; }
00047       int        phimax() const { return m_PhiMax; }
00048       int        etamin() const { return m_EtaMin; }
00049       int        etamax() const { return m_EtaMax; }
00050 
00051       
00052       void setType(const std::string& type) { m_Type = type; }
00053       void setPtcut(float pt) { m_Ptcut = pt; }
00054       void setPriority(float prio) { m_Priority = prio; }
00055       void setWindow( int value ) { m_Window = value; }
00056       void setPhiMin( int value ) { m_PhiMin = value; }
00057       void setPhiMax( int value ) { m_PhiMax = value; }
00058       void setEtaMin( int value ) { m_EtaMin = value; }
00059       void setEtaMax( int value ) { m_EtaMax = value; }
00060 
00061       
00062       bool contains(float eta, float phi) const;
00063 
00064       
00065       const CaloInfo & caloInfo() const;
00066 
00067       virtual void print(const std::string& indent="", unsigned int detail=1) const = 0;
00068       virtual void writeXML(std::ostream & xmlfile, int indentLevel=0, int indentWidth=2) const;
00069     
00070    protected:
00071       std::string  m_Type;
00072       float        m_Ptcut;
00073       unsigned int m_Priority;
00074       unsigned int m_Window;
00075       JetWindowSize::Size m_WindowSize; 
00076       int          m_PhiMin;
00077       int          m_PhiMax;
00078       int          m_EtaMin;
00079       int          m_EtaMax;
00080    };
00081 
00082 }
00083 
00084 #endif 
00085