Go to the documentation of this file.00001 #ifndef RPCMonitorDigi_h
00002 #define RPCMonitorDigi_h
00003
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/EDAnalyzer.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/ServiceRegistry/interface/Service.h"
00009
00010 #include "DQMServices/Core/interface/DQMStore.h"
00011 #include "DQMServices/Core/interface/MonitorElement.h"
00012
00013 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
00016
00017 #include<string>
00018 #include<map>
00019
00020 class RPCMonitorDigi : public edm::EDAnalyzer {
00021 public:
00022 explicit RPCMonitorDigi( const edm::ParameterSet&);
00023 ~RPCMonitorDigi();
00024
00025 virtual void analyze( const edm::Event&, const edm::EventSetup& );
00026
00027 virtual void beginJob();
00028
00029 void endLuminosityBlock(edm::LuminosityBlock const& , edm::EventSetup const& );
00030
00031 virtual void endJob(void);
00032 void beginRun(const edm::Run& r, const edm::EventSetup& c);
00033
00035
00036 void bookRollME(RPCDetId& , const edm::EventSetup&, const std::string &, std::map<std::string, MonitorElement*> &);
00037
00039
00040 void bookSectorRingME(const std::string&, std::map<std::string, MonitorElement*> &);
00041
00043
00044 void bookWheelDiskME(const std::string &, std::map<std::string, MonitorElement*> &);
00045
00046
00047
00049
00050 void bookRegionME(const std::string &, std::map<std::string, MonitorElement*> &);
00051
00052 private:
00053
00054 enum detectorRegions{EM = 0, B = 1, EP= 2, ALL=3};
00055
00056 bool useMuonDigis_;
00057
00058 void performSourceOperation(std::map < RPCDetId , std::vector<RPCRecHit> > &, std::string );
00059 void makeDcsInfo(const edm::Event& ) ;
00060 int stripsInRoll(RPCDetId & ,const edm::EventSetup& );
00061
00062 static const std::string regionNames_[3];
00063 std::string muonFolder_;
00064 std::string noiseFolder_;
00065 int counter;
00066
00068 DQMStore * dbe;
00069 bool dcs_;
00070 float muPtCut_, muEtaCut_;
00071 bool useRollInfo_;
00072 MonitorElement * noiseRPCEvents_ ;
00073 MonitorElement * muonRPCEvents_ ;
00074
00075 MonitorElement * NumberOfRecHitMuon_;
00076 MonitorElement * NumberOfMuon_;
00077
00078 int numberOfDisks_, numberOfInnerRings_;
00079
00080
00081 std::map< std::string, std::map<std::string, MonitorElement*> > meMuonCollection;
00082 std::map<std::string, MonitorElement*> wheelDiskMuonCollection;
00083 std::map<std::string, MonitorElement*> regionMuonCollection;
00084 std::map<std::string, MonitorElement*> sectorRingMuonCollection;
00085
00086 std::map<std::string, std::map<std::string, MonitorElement*> > meNoiseCollection;
00087 std::map<std::string, MonitorElement*> wheelDiskNoiseCollection;
00088 std::map<std::string, MonitorElement*> regionNoiseCollection;
00089 std::map<std::string, MonitorElement*> sectorRingNoiseCollection;
00090
00091 std::string globalFolder_;
00092 std::string subsystemFolder_;
00093
00094 bool saveRootFile;
00095 std::string RootFileName;
00096
00097 edm::InputTag rpcRecHitLabel_;
00098 edm::InputTag muonLabel_;
00099 };
00100
00101 #endif