Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-30 01:18:15

0001 #ifndef HLTrigger_Muon_Test_HLTMuonTurnOnAnalyzer_H
0002 #define HLTrigger_Muon_Test_HLTMuonTurnOnAnalyzer_H
0003 
0004 /** \class HLTMuonTurnOnAnalyzer
0005  *  Get L1/HLT turn on curves
0006  *
0007  *  \author J. Alcaraz
0008  */
0009 
0010 // Base Class Headers
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 HLTMuonTurnOnAnalyzer : public edm::one::EDAnalyzer<> {
0024 public:
0025   /// Constructor
0026   HLTMuonTurnOnAnalyzer(const edm::ParameterSet& pset);
0027 
0028   /// Destructor
0029   virtual ~HLTMuonTurnOnAnalyzer();
0030 
0031   // Operations
0032 
0033   void analyze(const edm::Event& event, const edm::EventSetup& eventSetup);
0034 
0035   virtual void beginJob();
0036   virtual void endJob();
0037 
0038 private:
0039   // Input from cfg file
0040   edm::InputTag theGenLabel;
0041   bool useMuonFromGenerator;
0042   edm::InputTag theL1CollectionLabel;
0043   std::vector<edm::InputTag> theHLTCollectionLabels;
0044   edm::EDGetTokenT<edm::HepMCProduct> theGenToken;
0045   edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> theL1CollectionToken;
0046   std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > theHLTCollectionTokens;
0047   double theReferenceThreshold;
0048   double thePtMin;
0049   double thePtMax;
0050   unsigned int theNbins;
0051   std::string theRootFileName;
0052 
0053   // The output Root file
0054   TFile* theFile;
0055 
0056   // Histograms
0057   TH1F* hL1eff;
0058   std::vector<TH1F*> hHLTeff;
0059   TH1F* hL1nor;
0060   std::vector<TH1F*> hHLTnor;
0061 
0062   // Counter of events (weighted in general)
0063   double theNumberOfEvents;
0064 };
0065 #endif