Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-26 22:39:23

0001 #ifndef DQM_GEM_GEMEffByGEMCSCSegmentSource_h
0002 #define DQM_GEM_GEMEffByGEMCSCSegmentSource_h
0003 
0004 /** \class GEMEffByGEMCSCSegmentSource
0005  * 
0006  * `GEMEffByGEMCSCSegmentSource` measures the efficiency of GE11-L1(2) using GE11-L2(1) and ME11 as trigger detectors.
0007  * See https://github.com/cms-sw/cmssw/blob/CMSSW_12_3_0_pre5/RecoLocalMuon/GEMCSCSegment/plugins/GEMCSCSegAlgoRR.cc
0008  *
0009  * \author Seungjin Yang <seungjin.yang@cern.ch>
0010  */
0011 
0012 #include "DQM/GEM/interface/GEMDQMEfficiencySourceBase.h"
0013 
0014 #include "FWCore/Utilities/interface/EDGetToken.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0017 
0018 #include "DataFormats/GEMRecHit/interface/GEMCSCSegmentCollection.h"
0019 #include "DataFormats/MuonReco/interface/Muon.h"
0020 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0021 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0022 
0023 class GEMEffByGEMCSCSegmentSource : public GEMDQMEfficiencySourceBase {
0024 public:
0025   explicit GEMEffByGEMCSCSegmentSource(const edm::ParameterSet &);
0026   ~GEMEffByGEMCSCSegmentSource() override;
0027   static void fillDescriptions(edm::ConfigurationDescriptions &);
0028 
0029 private:
0030   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0031   void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0032 
0033   MonitorElement *bookCSCChamberType(DQMStore::IBooker &, const TString &, const TString &);
0034 
0035   // GE11_ME11 segments
0036   void analyzeGE11ME11Segment(const GEMCSCSegment &, const GEMOHStatusCollection *, const GEMVFATStatusCollection *);
0037   void checkCoincidenceGE11(const GEMRecHit *, const GEMRecHit *, const GEMCSCSegment &);
0038   void findMatchedME11Segments(const reco::MuonCollection *);
0039   bool isME11SegmentMatched(const CSCSegment &);
0040 
0041   //////////////////////////////////////////////////////////////////////////////
0042   // const member data
0043   //////////////////////////////////////////////////////////////////////////////
0044 
0045   const edm::ESGetToken<GEMGeometry, MuonGeometryRecord> kGEMGeometryTokenBeginRun_;
0046   const edm::EDGetTokenT<GEMCSCSegmentCollection> kGEMCSCSegmentCollectionToken_;
0047   const edm::EDGetTokenT<reco::MuonCollection> kMuonCollectionToken_;
0048   const int kMinCSCRecHits_;
0049   const bool kModeDev_;
0050   const bool kUseMuonSegment_;
0051   const std::string kFolder_;
0052 
0053   //////////////////////////////////////////////////////////////////////////////
0054   // non-const member data
0055   //////////////////////////////////////////////////////////////////////////////
0056   std::vector<const CSCSegment *> matched_me11_segment_vector_;
0057 
0058   // MonitorElement
0059   MEMap me_chamber_;
0060   MEMap me_chamber_matched_;
0061   //// dev
0062   MEMap me_num_csc_hits_;
0063   MEMap me_num_csc_hits_matched_;
0064   MEMap me_csc_reduced_chi2_;
0065   MEMap me_csc_reduced_chi2_matched_;
0066   MEMap me_csc_chamber_type_;
0067   MEMap me_csc_chamber_type_matched_;
0068   //// dev with muon
0069   MEMap me_chamber_muon_segment_;
0070   MEMap me_chamber_muon_segment_matched_;
0071 };
0072 
0073 #endif  // DQM_GEM_GEMEffByGEMCSCSegmentSource_h