Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:18:22

0001 #include <iostream>
0002 
0003 #include "CondFormats/DataRecord/interface/L1TUtmTriggerMenuRcd.h"
0004 #include "CondFormats/L1TObjects/interface/L1TUtmAlgorithm.h"
0005 #include "CondFormats/L1TObjects/interface/L1TUtmTriggerMenu.h"
0006 #include "DataFormats/Common/interface/Handle.h"
0007 #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
0008 #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
0009 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014 #include "FWCore/ParameterSet/interface/Registry.h"
0015 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
0016 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h"
0017 
0018 #include "EventHeader.h"
0019 #include "HLTInfo.h"
0020 #include "HLTMCtruth.h"
0021 #include "RECOVertex.h"
0022 
0023 /** \class HLTBitAnalyzer
0024   *  
0025   * $Date: November 2006
0026   * $Revision: 
0027   * \author P. Bargassa - Rice U.
0028 
0029   * $Date: April 2016 
0030   * $Revision:   
0031   * \author G. Karapostoli - ULB
0032   */
0033 
0034 class HLTBitAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0035 public:
0036   explicit HLTBitAnalyzer(edm::ParameterSet const& conf);
0037   void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override;
0038   void endJob() override;
0039   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0040   void endRun(edm::Run const&, edm::EventSetup const&) override {}
0041 
0042   //  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
0043 
0044   // Analysis tree to be filled
0045   TTree* HltTree;
0046 
0047 private:
0048   // variables persistent across events should be declared here.
0049   //
0050   ///Default analyses
0051 
0052   EventHeader evt_header_;
0053   HLTInfo hlt_analysis_;
0054 
0055   HLTMCtruth mct_analysis_;
0056   RECOVertex vrt_analysisOffline0_;
0057 
0058   edm::InputTag hltresults_, genEventInfo_;
0059   /*
0060   std::string l1extramc_, l1extramu_;
0061   edm::InputTag m_l1extramu;
0062   edm::InputTag m_l1extraemi;
0063   edm::InputTag m_l1extraemn;
0064   edm::InputTag m_l1extrajetc;
0065   edm::InputTag m_l1extrajetf;
0066   edm::InputTag m_l1extrajet;
0067   edm::InputTag m_l1extrataujet;
0068   edm::InputTag m_l1extramet;
0069   edm::InputTag m_l1extramht;
0070   edm::InputTag gtReadoutRecord_,gtObjectMap_; 
0071   edm::InputTag gctBitCounts_,gctRingSums_;
0072   */
0073   edm::InputTag l1results_;
0074 
0075   edm::InputTag mctruth_, simhits_;
0076   edm::InputTag VertexTagOffline0_;
0077   edm::InputTag pileupInfo_;
0078 
0079   edm::EDGetTokenT<edm::TriggerResults> hltresultsToken_;
0080   edm::EDGetTokenT<GenEventInfoProduct> genEventInfoToken_;
0081 
0082   edm::EDGetTokenT<GlobalAlgBlkBxCollection> l1resultsToken_;
0083   /*
0084   edm::EDGetTokenT<l1extra::L1MuonParticleCollection>    l1extramuToken_;
0085   edm::EDGetTokenT<l1extra::L1EmParticleCollection>      l1extraemiToken_, l1extraemnToken_;
0086   edm::EDGetTokenT<l1extra::L1JetParticleCollection>     l1extrajetcToken_, l1extrajetfToken_, l1extrajetToken_, l1extrataujetToken_;
0087   edm::EDGetTokenT<l1extra::L1EtMissParticleCollection>  l1extrametToken_,l1extramhtToken_;
0088 
0089   edm::EDGetTokenT<L1GlobalTriggerReadoutRecord>         gtReadoutRecordToken_;
0090   edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord>       gtObjectMapToken_;
0091   edm::EDGetTokenT< L1GctHFBitCountsCollection >         gctBitCountsToken_;
0092   edm::EDGetTokenT< L1GctHFRingEtSumsCollection >        gctRingSumsToken_;
0093   */
0094   edm::EDGetTokenT<reco::CandidateView> mctruthToken_;
0095   edm::EDGetTokenT<std::vector<SimTrack> > simtracksToken_;
0096   edm::EDGetTokenT<std::vector<SimVertex> > simverticesToken_;
0097   edm::EDGetTokenT<std::vector<PileupSummaryInfo> > pileupInfoToken_;
0098   edm::EDGetTokenT<reco::VertexCollection> VertexTagOffline0Token_;
0099 
0100   int errCnt;
0101   static int errMax() { return 5; }
0102 
0103   std::string _HistName;  // Name of histogram file
0104   double _EtaMin, _EtaMax;
0105   TFile* m_file;  // pointer to Histogram file
0106   bool _UseTFileService;
0107   bool _isData;
0108 
0109   double ptHat, weight;
0110 };