CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/DataFormats/L1Trigger/interface/L1EmParticle.h

Go to the documentation of this file.
00001 #ifndef L1Trigger_L1EmParticle_h
00002 #define L1Trigger_L1EmParticle_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1Trigger
00006 // Class  :     L1EmParticle
00007 // 
00012 //
00013 // Original Author:  Werner Sun
00014 //         Created:  Sat Jul 15 12:41:07 EDT 2006
00015 // $Id: L1EmParticle.h,v 1.12 2008/04/03 03:37:20 wsun Exp $
00016 //
00017 
00018 // system include files
00019 
00020 // user include files
00021 #include "DataFormats/Candidate/interface/LeafCandidate.h"
00022 #include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCollections.h"
00023 #include "DataFormats/Common/interface/Ref.h"
00024 
00025 // forward declarations
00026 
00027 namespace l1extra {
00028 
00029    class L1EmParticle : public reco::LeafCandidate
00030    {
00031 
00032       public:
00033          enum EmType
00034          {
00035             kIsolated,
00036             kNonIsolated,
00037             kUndefined,
00038             kNumOfEmTypes
00039          } ;
00040 
00041          L1EmParticle();
00042 
00043          L1EmParticle( const LorentzVector& p4,
00044                        const edm::Ref< L1GctEmCandCollection >& aRef,
00045                        int bx = 0 ) ;
00046 
00047          L1EmParticle( const PolarLorentzVector& p4,
00048                        const edm::Ref< L1GctEmCandCollection >& aRef,
00049                        int bx = 0 ) ;
00050 
00051          // Creates null Ref.
00052          L1EmParticle( const LorentzVector& p4,
00053                        EmType type = kUndefined,
00054                        int bx = 0 ) ;
00055 
00056          L1EmParticle( const PolarLorentzVector& p4,
00057                        EmType type = kUndefined,
00058                        int bx = 0 ) ;
00059 
00060          virtual ~L1EmParticle() {}
00061 
00062          // ---------- const member functions ---------------------
00063          EmType type() const
00064          { return type_ ; }
00065 
00066          const edm::Ref< L1GctEmCandCollection >& gctEmCandRef() const
00067          { return ref_ ; }
00068 
00069          const L1GctEmCand* gctEmCand() const
00070          { return ref_.get() ; }
00071 
00072          virtual L1EmParticle* clone() const
00073          { return new L1EmParticle( *this ) ; }
00074 
00075          int bx() const
00076          { return bx_ ; }
00077 
00078          // ---------- static member functions --------------------
00079 
00080          // ---------- member functions ---------------------------
00081          void setType( EmType type )
00082          { type_ = type ; }
00083 
00084          void setBx( int bx )
00085            { bx_ = bx ; }
00086 
00087       private:
00088          // L1EmParticle(const L1EmParticle&); // stop default
00089 
00090          // const L1EmParticle& operator=(const L1EmParticle&); // stop default
00091 
00092          // ---------- member data --------------------------------
00093          EmType type_ ;
00094          edm::Ref< L1GctEmCandCollection > ref_ ;
00095          int bx_ ;
00096    };
00097 }
00098 
00099 #endif