File indexing completed on 2024-04-06 12:08:23
0001 #ifndef SiPixelMonitorRecHits_SiPixelRecHitSource_h
0002 #define SiPixelMonitorRecHits_SiPixelRecHitSource_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include <memory>
0026
0027
0028 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0029
0030 #include "DQM/SiPixelMonitorRecHit/interface/SiPixelRecHitModule.h"
0031
0032 #include "DataFormats/Common/interface/DetSetVector.h"
0033 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0034 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0035 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0036 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0037 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0038 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0039 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0040 #include <cstdint>
0041
0042 class SiPixelRecHitSource : public DQMEDAnalyzer {
0043 public:
0044 explicit SiPixelRecHitSource(const edm::ParameterSet &conf);
0045 ~SiPixelRecHitSource() override;
0046
0047
0048
0049 void analyze(const edm::Event &, const edm::EventSetup &) override;
0050 void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override;
0051 void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override;
0052
0053 virtual void buildStructure(edm::EventSetup const &);
0054 virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup);
0055
0056 std::string topFolderName_;
0057
0058 private:
0059 edm::ParameterSet conf_;
0060 edm::EDGetTokenT<SiPixelRecHitCollection> src_;
0061 edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> trackerTopoTokenBeginRun_;
0062 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomTokenBeginRun_;
0063
0064 bool saveFile;
0065 bool isPIB;
0066 bool slowDown;
0067 int eventNo;
0068 std::map<uint32_t, SiPixelRecHitModule *> thePixelStructure;
0069 std::map<uint32_t, int> rechit_count;
0070 bool modOn;
0071 bool twoDimOn;
0072 bool reducedSet;
0073
0074 bool ladOn, layOn, phiOn;
0075
0076 bool ringOn, bladeOn, diskOn;
0077
0078 bool firstRun;
0079 bool isUpgrade;
0080 };
0081
0082 #endif