Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:38

0001 #ifndef MuonEnergyDepositAnalyzer_H
0002 #define MuonEnergyDepositAnalyzer_H
0003 
0004 /** \class MuEnergyDepositAnalyzer
0005  *
0006  *  DQM monitoring source for muon energy deposits
0007  *
0008  *  \author G. Mila - INFN Torino
0009  */
0010 
0011 #include <memory>
0012 #include <fstream>
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/Framework/interface/Event.h"
0015 #include "FWCore/Framework/interface/MakerMacros.h"
0016 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0017 #include "FWCore/ServiceRegistry/interface/Service.h"
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "FWCore/Utilities/interface/InputTag.h"
0020 
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0023 
0024 #include "DataFormats/MuonReco/interface/Muon.h"
0025 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0026 #include "DataFormats/MuonReco/interface/MuonEnergy.h"
0027 
0028 #include "TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
0029 #include "TrackingTools/Records/interface/TransientTrackRecord.h"
0030 
0031 class MuonEnergyDepositAnalyzer : public DQMEDAnalyzer {
0032 public:
0033   /// Constructor
0034   MuonEnergyDepositAnalyzer(const edm::ParameterSet &);
0035 
0036   /// Destructor
0037   ~MuonEnergyDepositAnalyzer() override;
0038 
0039   /* Operations */
0040   void analyze(const edm::Event &, const edm::EventSetup &) override;
0041   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0042 
0043 private:
0044   // ----------member data ---------------------------
0045   edm::ParameterSet parameters;
0046   edm::EDGetTokenT<reco::MuonCollection> theMuonCollectionLabel_;
0047 
0048   edm::ESHandle<TransientTrackBuilder> theB;
0049 
0050   edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> trasientTrackToken_;
0051 
0052   // Switch for verbosity
0053   std::string metname;
0054   std::string AlgoName;
0055 
0056   //histo binning parameters
0057   int emNoBin;
0058   double emNoMin;
0059   double emNoMax;
0060 
0061   int emS9NoBin;
0062   double emS9NoMin;
0063   double emS9NoMax;
0064 
0065   int hadNoBin;
0066   double hadNoMin;
0067   double hadNoMax;
0068 
0069   int hadS9NoBin;
0070   double hadS9NoMin;
0071   double hadS9NoMax;
0072 
0073   int hoNoBin;
0074   double hoNoMin;
0075   double hoNoMax;
0076 
0077   int hoS9NoBin;
0078   double hoS9NoMin;
0079   double hoS9NoMax;
0080 
0081   //the histos
0082   MonitorElement *ecalDepEnergyBarrel;
0083   MonitorElement *ecalS9DepEnergyBarrel;
0084   MonitorElement *hcalDepEnergyBarrel;
0085   MonitorElement *hcalS9DepEnergyBarrel;
0086   MonitorElement *ecalDepEnergyEndcap;
0087   MonitorElement *ecalS9DepEnergyEndcap;
0088   MonitorElement *hcalDepEnergyEndcap;
0089   MonitorElement *hcalS9DepEnergyEndcap;
0090   MonitorElement *hoDepEnergy;
0091   MonitorElement *hoS9DepEnergy;
0092   MonitorElement *ecalS9PointingMuDepEnergy_Glb;
0093   MonitorElement *hcalS9PointingMuDepEnergy_Glb;
0094   MonitorElement *hoS9PointingMuDepEnergy_Glb;
0095   MonitorElement *ecalS9PointingMuDepEnergy_Tk;
0096   MonitorElement *hcalS9PointingMuDepEnergy_Tk;
0097   MonitorElement *hoS9PointingMuDepEnergy_Tk;
0098   MonitorElement *ecalS9PointingMuDepEnergy_Sta;
0099   MonitorElement *hcalS9PointingMuDepEnergy_Sta;
0100   MonitorElement *hoS9PointingMuDepEnergy_Sta;
0101 };
0102 #endif