Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-25 23:59:50

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/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::EDAnalyzer {
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 
0041   //  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
0042 
0043   // Analysis tree to be filled
0044   TTree* HltTree;
0045 
0046 private:
0047   // variables persistent across events should be declared here.
0048   //
0049   ///Default analyses
0050 
0051   EventHeader evt_header_;
0052   HLTInfo hlt_analysis_;
0053 
0054   HLTMCtruth mct_analysis_;
0055   RECOVertex vrt_analysisOffline0_;
0056 
0057   edm::InputTag hltresults_, genEventInfo_;
0058   /*
0059   std::string l1extramc_, l1extramu_;
0060   edm::InputTag m_l1extramu;
0061   edm::InputTag m_l1extraemi;
0062   edm::InputTag m_l1extraemn;
0063   edm::InputTag m_l1extrajetc;
0064   edm::InputTag m_l1extrajetf;
0065   edm::InputTag m_l1extrajet;
0066   edm::InputTag m_l1extrataujet;
0067   edm::InputTag m_l1extramet;
0068   edm::InputTag m_l1extramht;
0069   edm::InputTag gtReadoutRecord_,gtObjectMap_; 
0070   edm::InputTag gctBitCounts_,gctRingSums_;
0071   */
0072   edm::InputTag l1results_;
0073 
0074   edm::InputTag mctruth_, simhits_;
0075   edm::InputTag VertexTagOffline0_;
0076   edm::InputTag pileupInfo_;
0077 
0078   edm::EDGetTokenT<edm::TriggerResults> hltresultsToken_;
0079   edm::EDGetTokenT<GenEventInfoProduct> genEventInfoToken_;
0080 
0081   edm::EDGetTokenT<GlobalAlgBlkBxCollection> l1resultsToken_;
0082   /*
0083   edm::EDGetTokenT<l1extra::L1MuonParticleCollection>    l1extramuToken_;
0084   edm::EDGetTokenT<l1extra::L1EmParticleCollection>      l1extraemiToken_, l1extraemnToken_;
0085   edm::EDGetTokenT<l1extra::L1JetParticleCollection>     l1extrajetcToken_, l1extrajetfToken_, l1extrajetToken_, l1extrataujetToken_;
0086   edm::EDGetTokenT<l1extra::L1EtMissParticleCollection>  l1extrametToken_,l1extramhtToken_;
0087 
0088   edm::EDGetTokenT<L1GlobalTriggerReadoutRecord>         gtReadoutRecordToken_;
0089   edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord>       gtObjectMapToken_;
0090   edm::EDGetTokenT< L1GctHFBitCountsCollection >         gctBitCountsToken_;
0091   edm::EDGetTokenT< L1GctHFRingEtSumsCollection >        gctRingSumsToken_;
0092   */
0093   edm::EDGetTokenT<reco::CandidateView> mctruthToken_;
0094   edm::EDGetTokenT<std::vector<SimTrack> > simtracksToken_;
0095   edm::EDGetTokenT<std::vector<SimVertex> > simverticesToken_;
0096   edm::EDGetTokenT<std::vector<PileupSummaryInfo> > pileupInfoToken_;
0097   edm::EDGetTokenT<reco::VertexCollection> VertexTagOffline0Token_;
0098 
0099   int errCnt;
0100   static int errMax() { return 5; }
0101 
0102   std::string _HistName;  // Name of histogram file
0103   double _EtaMin, _EtaMax;
0104   TFile* m_file;  // pointer to Histogram file
0105   bool _UseTFileService;
0106   bool _isData;
0107 
0108   double ptHat, weight;
0109 };