Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:17

0001 /*
0002  * L1RecoMatch
0003  *
0004  * Intermediate light-weight dataformat that puts all of the
0005  * matched objects in one object.
0006  *
0007  * This is just a trick so we can operate on the objects using the string cut
0008  * parser to build the TTrees.
0009  *
0010  */
0011 
0012 #ifndef L1RECOMATCH_L5Q3TJND
0013 #define L1RECOMATCH_L5Q3TJND
0014 
0015 #include "L1Trigger/L1TCalorimeter/interface/L1GObject.h"
0016 #include "DataFormats/Candidate/interface/Candidate.h"
0017 #include "DataFormats/Provenance/interface/EventID.h"
0018 
0019 class L1RecoMatch {
0020 public:
0021   // Default needed for persistency
0022   L1RecoMatch() {}
0023   L1RecoMatch(const reco::Candidate* reco,
0024               const reco::Candidate* l1,
0025               const reco::Candidate* l1g,
0026               edm::EventID id,
0027               unsigned int index,
0028               unsigned int nTotalObjects,
0029               unsigned int nPVs);
0030 
0031   const reco::Candidate* reco() const;
0032   const reco::Candidate* l1() const;
0033   const reco::Candidate* l1g() const;
0034 
0035   // Returns true if l1() is not NULL (i.e. there is a match)
0036   bool l1Match() const;
0037 
0038   // Returns true if l1g() is not NULL (i.e. there is a match)
0039   bool l1gMatch() const;
0040 
0041   /// Get the run-lumi-event numbers
0042   const edm::EventID& id() const;
0043   /// Get the index of this match in the event.
0044   unsigned int index() const;
0045   /// Get the total number of reco objects in this event.
0046   unsigned int nTotalObjects() const;
0047   /// Get number of PVs
0048   unsigned int nPVs() const;
0049 
0050 private:
0051   const reco::Candidate* reco_;
0052   const reco::Candidate* l1extra_;
0053   const reco::Candidate* l1g_;
0054   edm::EventID id_;
0055   unsigned int index_;
0056   unsigned int nTotalObjects_;
0057   unsigned int nPVs_;
0058 };
0059 
0060 #endif /* end of include guard: L1RECOMATCH_L5Q3TJND */