Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-11 03:34:02

0001 #ifndef DataFormats_L1Trigger_Tau_h
0002 #define DataFormats_L1Trigger_Tau_h
0003 
0004 #include "DataFormats/L1Trigger/interface/L1Candidate.h"
0005 #include "DataFormats/L1Trigger/interface/BXVector.h"
0006 #include "DataFormats/L1Trigger/interface/L1TObjComparison.h"
0007 
0008 namespace l1t {
0009 
0010   class Tau;
0011   typedef BXVector<Tau> TauBxCollection;
0012   typedef edm::Ref<TauBxCollection> TauRef;
0013   typedef edm::RefVector<TauBxCollection> TauRefVector;
0014   typedef std::vector<TauRef> TauVectorRef;
0015 
0016   typedef ObjectRefBxCollection<Tau> TauRefBxCollection;
0017   typedef ObjectRefPair<Tau> TauRefPair;
0018   typedef ObjectRefPairBxCollection<Tau> TauRefPairBxCollection;
0019 
0020   class Tau : public L1Candidate {
0021   public:
0022     Tau() { clear_extended(); }
0023 
0024     // ctor from base allowed, but note that extended variables will be set to zero:
0025     Tau(const L1Candidate& rhs) : L1Candidate(rhs) { clear_extended(); }
0026 
0027     Tau(const LorentzVector& p4, int pt = 0, int eta = 0, int phi = 0, int qual = 0, int iso = 0);
0028     Tau(const PolarLorentzVector& p4, int pt = 0, int eta = 0, int phi = 0, int qual = 0, int iso = 0);
0029 
0030     ~Tau() override;
0031 
0032     void setTowerIEta(short int ieta);  // ieta of seed tower
0033     void setTowerIPhi(short int iphi);  // iphi of seed tower
0034     void setRawEt(short int et);        // raw (uncalibrated) cluster sum
0035     void setIsoEt(short int et);        // raw isolation sum - cluster sum
0036     void setNTT(short int ntt);         // n towers above threshold
0037     void setHasEM(bool hasEM);
0038     void setIsMerged(bool isMerged);
0039 
0040     short int towerIEta() const;
0041     short int towerIPhi() const;
0042     short int rawEt() const;
0043     short int isoEt() const;
0044     short int nTT() const;
0045     bool hasEM() const;
0046     bool isMerged() const;
0047 
0048     bool operator==(const l1t::Tau& rhs) const;
0049     inline bool operator!=(const l1t::Tau& rhs) const { return !(operator==(rhs)); };
0050 
0051   private:
0052     using L1Candidate::operator==;
0053     using L1Candidate::operator!=;
0054     // additional hardware quantities common to L1 global tau
0055     void clear_extended();
0056     short int towerIEta_;
0057     short int towerIPhi_;
0058     short int rawEt_;
0059     short int isoEt_;
0060     short int nTT_;
0061     bool hasEM_;
0062     bool isMerged_;
0063   };
0064 
0065 }  // namespace l1t
0066 
0067 #endif