Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:38

0001 #ifndef L1Trigger_L1EmParticle_h
0002 #define L1Trigger_L1EmParticle_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     L1Trigger
0006 // Class  :     L1EmParticle
0007 //
0008 /**\class L1EmParticle \file L1EmParticle.h DataFormats/L1Trigger/interface/L1EmParticle.h \author Werner Sun
0009 
0010  Description: L1Extra particle class for EM objects.
0011 */
0012 //
0013 // Original Author:  Werner Sun
0014 //         Created:  Sat Jul 15 12:41:07 EDT 2006
0015 //
0016 
0017 // system include files
0018 
0019 // user include files
0020 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0021 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
0022 #include "DataFormats/Common/interface/Ref.h"
0023 
0024 // forward declarations
0025 
0026 namespace l1extra {
0027 
0028   class L1EmParticle : public reco::LeafCandidate {
0029   public:
0030     enum EmType { kIsolated, kNonIsolated, kUndefined, kNumOfEmTypes };
0031 
0032     L1EmParticle();
0033 
0034     L1EmParticle(const LorentzVector& p4, const edm::Ref<L1GctEmCandCollection>& aRef, int bx = 0);
0035 
0036     L1EmParticle(const PolarLorentzVector& p4, const edm::Ref<L1GctEmCandCollection>& aRef, int bx = 0);
0037 
0038     // Creates null Ref.
0039     L1EmParticle(const LorentzVector& p4, EmType type = kUndefined, int bx = 0);
0040 
0041     L1EmParticle(const PolarLorentzVector& p4, EmType type = kUndefined, int bx = 0);
0042 
0043     ~L1EmParticle() override {}
0044 
0045     // ---------- const member functions ---------------------
0046     EmType type() const { return type_; }
0047 
0048     const edm::Ref<L1GctEmCandCollection>& gctEmCandRef() const { return ref_; }
0049 
0050     const L1GctEmCand* gctEmCand() const { return ref_.get(); }
0051 
0052     L1EmParticle* clone() const override { return new L1EmParticle(*this); }
0053 
0054     int bx() const { return bx_; }
0055 
0056     // ---------- static member functions --------------------
0057 
0058     // ---------- member functions ---------------------------
0059     void setType(EmType type) { type_ = type; }
0060 
0061     void setBx(int bx) { bx_ = bx; }
0062 
0063   private:
0064     // L1EmParticle(const L1EmParticle&); // stop default
0065 
0066     // const L1EmParticle& operator=(const L1EmParticle&); // stop default
0067 
0068     // ---------- member data --------------------------------
0069     EmType type_;
0070     edm::Ref<L1GctEmCandCollection> ref_;
0071     int bx_;
0072   };
0073 }  // namespace l1extra
0074 
0075 #endif