File indexing completed on 2024-04-06 12:18:39
0001 #ifndef HLTrigger_Muon_Test_HLTMuonRateAnalyzerWithWeight_H
0002 #define HLTrigger_Muon_Test_HLTMuonRateAnalyzerWithWeight_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012 #include "FWCore/Utilities/interface/InputTag.h"
0013
0014 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0015 #include "DataFormats/HLTReco/interface/TriggerFilterObjectWithRefs.h"
0016 #include "DataFormats/HLTReco/interface/TriggerRefsCollections.h"
0017
0018 #include <vector>
0019
0020 class TFile;
0021 class TH1F;
0022
0023 class HLTMuonRateAnalyzerWithWeight : public edm::one::EDAnalyzer<> {
0024 public:
0025
0026 HLTMuonRateAnalyzerWithWeight(const edm::ParameterSet& pset);
0027
0028
0029 virtual ~HLTMuonRateAnalyzerWithWeight();
0030
0031
0032
0033 void analyze(const edm::Event& event, const edm::EventSetup& eventSetup);
0034
0035 virtual void beginJob();
0036 virtual void endJob();
0037 virtual bool isbc(HepMC::GenEvent const& evt);
0038 virtual double parentWeight(HepMC::GenEvent const& evt);
0039
0040 private:
0041
0042 edm::InputTag theGenLabel;
0043 edm::InputTag theL1CollectionLabel;
0044 std::vector<edm::InputTag> theHLTCollectionLabels;
0045 edm::EDGetTokenT<edm::HepMCProduct> theGenToken;
0046 edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> theL1CollectionToken;
0047 std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > theHLTCollectionTokens;
0048 double theL1ReferenceThreshold;
0049 std::vector<double> theNSigmas;
0050 unsigned int theNumberOfObjects;
0051 double theLuminosity;
0052 double thePtMin;
0053 double thePtMax;
0054 double theIntegratedLumi;
0055 int type;
0056 unsigned int theNbins;
0057 std::string theRootFileName;
0058
0059
0060 TFile* theFile;
0061
0062
0063 TH1F* hBCL1eff;
0064 TH1F* hNumEvents;
0065 TH1F* hBCL1rate;
0066 std::vector<TH1F*> hBCHLTeff;
0067 std::vector<TH1F*> hBCHLTrate;
0068 TH1F* hLightL1eff;
0069 TH1F* hLightL1rate;
0070 std::vector<TH1F*> hLightHLTeff;
0071 std::vector<TH1F*> hLightHLTrate;
0072
0073
0074 double theNumberOfLightEvents;
0075 double theNumberOfBCEvents;
0076 };
0077 #endif