Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:39:26

0001 #ifndef L1Trigger_L1EtMissParticle_h
0002 #define L1Trigger_L1EtMissParticle_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     L1Trigger
0006 // Class  :     L1EtMissParticle
0007 //
0008 /**\class L1EtMissParticle \file L1EtMissParticle.h DataFormats/L1Trigger/interface/L1EtMissParticle.h \author Werner Sun
0009 
0010  Description: L1Extra particle class for EtMiss object.
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   class L1EtMissParticle : public reco::LeafCandidate {
0028   public:
0029     enum EtMissType { kMET, kMHT, kNumTypes };
0030 
0031     L1EtMissParticle();
0032 
0033     // Default Refs are null.  For type = kET, only the first two are
0034     // filled; for type = kHT, only the second two are filled.
0035     L1EtMissParticle(const LorentzVector& p4,
0036                      EtMissType type,
0037                      const double& etTotal,
0038                      const edm::Ref<L1GctEtMissCollection>& aEtMissRef = edm::Ref<L1GctEtMissCollection>(),
0039                      const edm::Ref<L1GctEtTotalCollection>& aEtTotalRef = edm::Ref<L1GctEtTotalCollection>(),
0040                      const edm::Ref<L1GctHtMissCollection>& aHtMissRef = edm::Ref<L1GctHtMissCollection>(),
0041                      const edm::Ref<L1GctEtHadCollection>& aEtHadRef = edm::Ref<L1GctEtHadCollection>(),
0042                      int bx = 0);
0043 
0044     L1EtMissParticle(const PolarLorentzVector& p4,
0045                      EtMissType type,
0046                      const double& etTotal,
0047                      const edm::Ref<L1GctEtMissCollection>& aEtMissRef = edm::Ref<L1GctEtMissCollection>(),
0048                      const edm::Ref<L1GctEtTotalCollection>& aEtTotalRef = edm::Ref<L1GctEtTotalCollection>(),
0049                      const edm::Ref<L1GctHtMissCollection>& aHtMissRef = edm::Ref<L1GctHtMissCollection>(),
0050                      const edm::Ref<L1GctEtHadCollection>& aEtHadRef = edm::Ref<L1GctEtHadCollection>(),
0051                      int bx = 0);
0052 
0053     ~L1EtMissParticle() override {}
0054 
0055     // ---------- const member functions ---------------------
0056 
0057     EtMissType type() const { return type_; }  // kET or kHT
0058 
0059     // For type = kET, this is |MET|; for type = kHT, this is |MHT|
0060     double etMiss() const { return et(); }
0061 
0062     // For type = kET, this is total ET; for type = kHT, this is total HT
0063     const double& etTotal() const { return etTot_; }
0064 
0065     // This is filled only for type = kET
0066     const edm::Ref<L1GctEtMissCollection>& gctEtMissRef() const { return etMissRef_; }
0067 
0068     // This is filled only for type = kET
0069     const edm::Ref<L1GctEtTotalCollection>& gctEtTotalRef() const { return etTotRef_; }
0070 
0071     // This is filled only for type = kHT
0072     const edm::Ref<L1GctHtMissCollection>& gctHtMissRef() const { return htMissRef_; }
0073 
0074     // This is filled only for type = kHT
0075     const edm::Ref<L1GctEtHadCollection>& gctEtHadRef() const { return etHadRef_; }
0076 
0077     // This is filled only for type = kET
0078     const L1GctEtMiss* gctEtMiss() const { return etMissRef_.get(); }
0079 
0080     // This is filled only for type = kET
0081     const L1GctEtTotal* gctEtTotal() const { return etTotRef_.get(); }
0082 
0083     // This is filled only for type = kHT
0084     const L1GctHtMiss* gctHtMiss() const { return htMissRef_.get(); }
0085 
0086     // This is filled only for type = kHT
0087     const L1GctEtHad* gctEtHad() const { return etHadRef_.get(); }
0088 
0089     L1EtMissParticle* clone() const override { return new L1EtMissParticle(*this); }
0090 
0091     int bx() const { return bx_; }
0092 
0093     // ---------- static member functions --------------------
0094 
0095     // ---------- member functions ---------------------------
0096     void setEtTotal(const double& etTotal) { etTot_ = etTotal; }
0097 
0098     void setBx(int bx) { bx_ = bx; }
0099 
0100   private:
0101     // L1EtMissParticle(const L1EtMissParticle&); // stop default
0102 
0103     // const L1EtMissParticle& operator=(const L1EtMissParticle&); // stop default
0104 
0105     // ---------- member data --------------------------------
0106     EtMissType type_;
0107 
0108     double etTot_;
0109 
0110     edm::Ref<L1GctEtMissCollection> etMissRef_;
0111     edm::Ref<L1GctEtTotalCollection> etTotRef_;
0112     edm::Ref<L1GctHtMissCollection> htMissRef_;
0113     edm::Ref<L1GctEtHadCollection> etHadRef_;
0114 
0115     int bx_;
0116   };
0117 }  // namespace l1extra
0118 
0119 #endif