CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/DataFormats/L1Trigger/interface/L1EtMissParticle.h

Go to the documentation of this file.
00001 #ifndef L1Trigger_L1EtMissParticle_h
00002 #define L1Trigger_L1EtMissParticle_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1Trigger
00006 // Class  :     L1EtMissParticle
00007 // 
00012 //
00013 // Original Author:  Werner Sun
00014 //         Created:  Sat Jul 15 12:41:07 EDT 2006
00015 // $Id: L1EtMissParticle.h,v 1.15 2009/03/22 16:11:30 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   class L1EtMissParticle : public reco::LeafCandidate
00029     {
00030     public:
00031       enum EtMissType{ kMET, kMHT, kNumTypes } ;
00032 
00033       L1EtMissParticle();
00034 
00035       // Default Refs are null.  For type = kET, only the first two are 
00036       // filled; for type = kHT, only the second two are filled.
00037       L1EtMissParticle(
00038         const LorentzVector& p4,
00039         EtMissType type,
00040         const double& etTotal,
00041         const edm::Ref< L1GctEtMissCollection >& aEtMissRef = edm::Ref< 
00042         L1GctEtMissCollection >(),
00043         const edm::Ref< L1GctEtTotalCollection >& aEtTotalRef = edm::Ref< 
00044         L1GctEtTotalCollection >(),
00045         const edm::Ref< L1GctHtMissCollection >& aHtMissRef = edm::Ref< 
00046         L1GctHtMissCollection >(),
00047         const edm::Ref< L1GctEtHadCollection >& aEtHadRef = edm::Ref< 
00048         L1GctEtHadCollection >(),
00049         int bx = 0 ) ;
00050 
00051       L1EtMissParticle(
00052         const PolarLorentzVector& p4,
00053         EtMissType type,
00054         const double& etTotal,
00055         const edm::Ref< L1GctEtMissCollection >& aEtMissRef = edm::Ref< 
00056         L1GctEtMissCollection >(),
00057         const edm::Ref< L1GctEtTotalCollection >& aEtTotalRef = edm::Ref< 
00058         L1GctEtTotalCollection >(),
00059         const edm::Ref< L1GctHtMissCollection >& aHtMissRef = edm::Ref< 
00060         L1GctHtMissCollection >(),
00061         const edm::Ref< L1GctEtHadCollection >& aEtHadRef = edm::Ref< 
00062         L1GctEtHadCollection >(),
00063         int bx = 0 ) ;
00064 
00065       virtual ~L1EtMissParticle() {}
00066 
00067       // ---------- const member functions ---------------------
00068 
00069       EtMissType type() const { return type_ ; }  // kET or kHT
00070 
00071       // For type = kET, this is |MET|; for type = kHT, this is |MHT|
00072       double etMiss() const
00073         { return et() ; }
00074 
00075       // For type = kET, this is total ET; for type = kHT, this is total HT
00076       const double& etTotal() const
00077         { return etTot_ ; }
00078 
00079       // This is filled only for type = kET
00080       const edm::Ref< L1GctEtMissCollection >& gctEtMissRef() const
00081         { return etMissRef_ ; }
00082 
00083       // This is filled only for type = kET
00084       const edm::Ref< L1GctEtTotalCollection >& gctEtTotalRef() const
00085         { return etTotRef_ ; }
00086 
00087       // This is filled only for type = kHT
00088       const edm::Ref< L1GctHtMissCollection >& gctHtMissRef() const
00089         { return htMissRef_ ; }
00090 
00091       // This is filled only for type = kHT
00092       const edm::Ref< L1GctEtHadCollection >& gctEtHadRef() const
00093         { return etHadRef_ ; }
00094 
00095       // This is filled only for type = kET
00096       const L1GctEtMiss* gctEtMiss() const
00097         { return etMissRef_.get() ; }
00098 
00099       // This is filled only for type = kET
00100       const L1GctEtTotal* gctEtTotal() const
00101         { return etTotRef_.get() ; }
00102 
00103       // This is filled only for type = kHT
00104       const L1GctHtMiss* gctHtMiss() const
00105         { return htMissRef_.get() ; }
00106 
00107       // This is filled only for type = kHT
00108       const L1GctEtHad* gctEtHad() const
00109         { return etHadRef_.get() ; }
00110 
00111       virtual L1EtMissParticle* clone() const
00112         { return new L1EtMissParticle( *this ) ; }
00113 
00114       int bx() const
00115         { return bx_ ; }
00116 
00117       // ---------- static member functions --------------------
00118 
00119       // ---------- member functions ---------------------------
00120       void setEtTotal( const double& etTotal )
00121         { etTot_ = etTotal ; }
00122 
00123       void setBx( int bx )
00124         { bx_ = bx ; }
00125 
00126     private:
00127       // L1EtMissParticle(const L1EtMissParticle&); // stop default
00128 
00129       // const L1EtMissParticle& operator=(const L1EtMissParticle&); // stop default
00130 
00131       // ---------- member data --------------------------------
00132       EtMissType type_ ;
00133 
00134       double etTot_ ;
00135 
00136       edm::Ref< L1GctEtMissCollection > etMissRef_ ;
00137       edm::Ref< L1GctEtTotalCollection > etTotRef_ ;
00138       edm::Ref< L1GctHtMissCollection > htMissRef_ ;
00139       edm::Ref< L1GctEtHadCollection > etHadRef_ ;
00140 
00141       int bx_ ;
00142     };
00143 }
00144 
00145 #endif